From patchwork Wed Jul 13 17:26:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 240 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a98:d5ce:0:b0:178:cc93:bf7d with SMTP id g14csp371476eik; Wed, 13 Jul 2022 10:28:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tcZds9hI1c8QdMTZERN72zD7EV5kiMrhPKeoZimUIqdaZijVKXXRbiSBclX5YsMDiFZTsX X-Received: by 2002:a17:907:7f22:b0:72b:94a2:86b8 with SMTP id qf34-20020a1709077f2200b0072b94a286b8mr4703880ejc.236.1657733329874; Wed, 13 Jul 2022 10:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657733329; cv=none; d=google.com; s=arc-20160816; b=EZtkqqkQo6NnUyND507rB/nkAcquloDdq+tATHtKPGIjRvcKsNuu2BCptzMTIzK3rp 1kFEL3b8ZA5ko29TdS+AsDz8U1THDvAcGtemmKRlirXjDvYeooCamyYa/PshoKZp+fAE OWz/J9LMvMMfi5p7b+Mzzzbev/ytxZkSD0q/2O3TD9JZ7RX5ZFkcJ0dhNhtpJcdevIxc dnM7VlGume7H7diA24jaI29cS2mP6tN8e6KOYJhgkdPeoNE0vXPDN4vzQ2NRdLZdTfdA LAWnCbvpJmzwHs5OTe199sS7qz9OqJZCLRAveHq9CXxrC0PF5PEn0MPr+dPxr7CpdZY7 3iPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-language:to:subject:user-agent:mime-version:date:message-id :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=ltsa/1uuZ9td5cHUp8hBseW3/4eGuIiKkg6gGFBAr6M=; b=OS4pDw0iCIG6v8ud5iBWUJe348v5w2Vf16tEx5h66U9012XsEMXsEHjSrs9MvJpsjZ naA4nS4RuBXZqQ3K6NLhRaGD3yWwAQLWuYQ2npl/3Z+V/V94TTLLF1BhyBkDAmhLzslA tkPUApgR2qCL4Xdq6zCjEAf3jeZPnsgg8v2R0UqPJATSLnfjwbDDYZCewdfp0DCyyKah 77XvissSDlWkhGUMNCoeBuuurBQoVKTvAfY2EsQjRyHLI8YdphY9OSrfAx2a4zln9npy Al73Q/z2L+sBLlKEIHAKUansbr1Qw8Hhc/iJed9oJqxWY4cVu/Hw8rKfHHj8g+6SQzst 3hXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=uMgct20G; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id hb44-20020a170907162c00b007269661baf2si762049ejc.475.2022.07.13.10.28.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jul 2022 10:28:49 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=uMgct20G; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 98716382A2C8 for ; Wed, 13 Jul 2022 17:28:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98716382A2C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1657733312; bh=ltsa/1uuZ9td5cHUp8hBseW3/4eGuIiKkg6gGFBAr6M=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=uMgct20GC93cybzM+dWfkQ4QUL372Io61VUk3m7XZIotoA+oMvAvIBDxo+61+h5R9 FrYG4eY1IQ2qaa/QmssxkUF9PYqUQRB1EGPezII6dMVZ+R5Abu0OhPVh2yxnRzGUh9 wI9JwJefdWEVAO4sqBQZU2KXhLCOHSWv7Ih3fj3o= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id CADC0384F01F; Wed, 13 Jul 2022 17:27:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CADC0384F01F Received: by mail-ej1-x62b.google.com with SMTP id ss3so15030983ejc.11; Wed, 13 Jul 2022 10:27:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:content-language; bh=ltsa/1uuZ9td5cHUp8hBseW3/4eGuIiKkg6gGFBAr6M=; b=PjSsjzSgHT3PwJiAVtoVVuMkdwH0tZIjCiOf9LQmM1p0OUF/Tt1HWbDwcK1swLvaHz 3xvp92x6BjM7g5zuGXsSQyqwpeiSCSgCBhB+QgVCkdNnH8DxbXc0OLctAhevoUcouyix OhIH6eCcRFfFsyV0hm7mEg9dOnnBCKAvEojwGEYHyUySvmW9QGhyEngiZAmnMAMf58+V N7n0CgPWowiLquKPvxSBU/0WkjwvRPK6oKeDbwqpe0awEMRobm1GDB1NUaWCm/S/ikA0 lXPv6WqC1n2XDH7vpgIrfCKIdvHX/ldFJpihKlwbcOLmK4dmRN56W8Me7tQthiknnz5O fUZA== X-Gm-Message-State: AJIora8n7LiWnMmU79+4q6+lOP+Y6O4qg/6V8uKx7nhB+RWFjxyF6L/c 4zku77aQxn1P3goCWVE7OGLzEwDXUPc= X-Received: by 2002:a17:906:5d08:b0:6ff:8ed:db63 with SMTP id g8-20020a1709065d0800b006ff08eddb63mr4593441ejt.408.1657733265221; Wed, 13 Jul 2022 10:27:45 -0700 (PDT) Received: from [10.13.0.220] ([109.190.253.11]) by smtp.googlemail.com with ESMTPSA id e41-20020a056402332900b0042de3d661d2sm8352196eda.1.2022.07.13.10.27.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Jul 2022 10:27:44 -0700 (PDT) Message-ID: Date: Wed, 13 Jul 2022 19:26:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: [PATCH] Add _GLIBCXX_DEBUG backtrace generation To: "libstdc++@gcc.gnu.org" Content-Language: fr X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Fran=C3=A7ois_Dumont_via_Gcc-patches?= From: =?utf-8?q?Fran=C3=A7ois_Dumont?= Reply-To: =?utf-8?q?Fran=C3=A7ois_Dumont?= Cc: gcc-patches Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1738259383789827435?= X-GMAIL-MSGID: =?utf-8?q?1738259383789827435?= libstdc++: [_GLIBCXX_DEBUG] Add backtrace generation on demand Add _GLIBCXX_DEBUG_BACKTRACE macro to activate backtrace generation on _GLIBCXX_DEBUG assertions. Prerequisite is to have configure the lib with: --enable-libstdcxx-backtrace=yes libstdc++-v3/ChangeLog: * include/debug/formatter.h [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_state): Declare. [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_create_state): Declare. [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_callback): Define. [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_error_callback): Define. [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_func): Define. [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full): Declare. [_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_state): New. [_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_full): New. * src/c++11/debug.cc (pretty_print): Rename into... (print_function): ...that. [_GLIBCXX_HAVE_STACKTRACE](print_backtrace): New. (_Error_formatter::_M_error()): Adapt. * src/libbacktrace/Makefile.am: Add backtrace.c. * src/libbacktrace/Makefile.in: Regenerate. * src/libbacktrace/backtrace-rename.h (backtrace_full): New. * testsuite/23_containers/vector/debug/assign4_neg.cc: Add backtrace    generation. * doc/xml/manual/debug_mode.xml: Document _GLIBCXX_DEBUG_BACKTRACE. * doc/xml/manual/using.xml: Likewise. Tested under Linux x86_64 normal and _GLIBCXX_DEBUG modes. Ok to commit ? François diff --git a/libstdc++-v3/doc/xml/manual/debug_mode.xml b/libstdc++-v3/doc/xml/manual/debug_mode.xml index 988c4a93601..dadc0cd1bb4 100644 --- a/libstdc++-v3/doc/xml/manual/debug_mode.xml +++ b/libstdc++-v3/doc/xml/manual/debug_mode.xml @@ -161,6 +161,12 @@ which always works correctly. GLIBCXX_DEBUG_MESSAGE_LENGTH can be used to request a different length. +Note that libstdc++ is able to produce backtraces on error. + It requires that you configure libstdc++ build with + . + Use -D_GLIBCXX_DEBUG_BACKTRACE to activate it. + You'll then have to link with libstdc++_libbacktrace static library + () to build your application.
Using a Specific Debug Container diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml index 36b86702d22..26f14fae194 100644 --- a/libstdc++-v3/doc/xml/manual/using.xml +++ b/libstdc++-v3/doc/xml/manual/using.xml @@ -1129,6 +1129,15 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe extensions and libstdc++-specific behavior into errors. + _GLIBCXX_DEBUG_BACKTRACE + + + Undefined by default. Considered only if libstdc++ has been configured with + and if _GLIBCXX_DEBUG + is defined. When defined display backtraces on + debug mode assertions. + + _GLIBCXX_PARALLEL Undefined by default. When defined, compiles user code @@ -1635,6 +1644,7 @@ A quick read of the relevant part of the GCC header will remain compatible between different GCC releases.
+
Concurrency diff --git a/libstdc++-v3/include/debug/formatter.h b/libstdc++-v3/include/debug/formatter.h index 80e8ba46d1e..f31b44d184a 100644 --- a/libstdc++-v3/include/debug/formatter.h +++ b/libstdc++-v3/include/debug/formatter.h @@ -31,6 +31,37 @@ #include +#if _GLIBCXX_HAVE_STACKTRACE +struct __glibcxx_backtrace_state; + +extern "C" +{ + __glibcxx_backtrace_state* + __glibcxx_backtrace_create_state(const char*, int, + void(*)(void*, const char*, int), + void*); + + typedef int (*__glibcxx_backtrace_full_callback) ( + void*, __UINTPTR_TYPE__, const char *, int, const char*); + + typedef void (*__glibcxx_backtrace_error_callback) ( + void*, const char*, int); + + typedef int (*__glibcxx_backtrace_full_func) ( + __glibcxx_backtrace_state*, int, + __glibcxx_backtrace_full_callback, + __glibcxx_backtrace_error_callback, + void*); + + int + __glibcxx_backtrace_full( + __glibcxx_backtrace_state*, int, + __glibcxx_backtrace_full_callback, + __glibcxx_backtrace_error_callback, + void*); +} +#endif + #if __cpp_rtti # include # define _GLIBCXX_TYPEID(_Type) &typeid(_Type) @@ -565,6 +596,15 @@ namespace __gnu_debug const char* __function) : _M_file(__file), _M_line(__line), _M_num_parameters(0), _M_text(0) , _M_function(__function) +#if _GLIBCXX_HAVE_STACKTRACE +# ifdef _GLIBCXX_DEBUG_BACKTRACE + , _M_backtrace_state( + __glibcxx_backtrace_create_state(nullptr, 0, nullptr, nullptr)) + , _M_backtrace_full(&__glibcxx_backtrace_full) +# else + , _M_backtrace_state() +# endif +#endif { } #if !_GLIBCXX_INLINE_VERSION @@ -580,6 +620,10 @@ namespace __gnu_debug unsigned int _M_num_parameters; const char* _M_text; const char* _M_function; +#if _GLIBCXX_HAVE_STACKTRACE + __glibcxx_backtrace_state* _M_backtrace_state; + __glibcxx_backtrace_full_func _M_backtrace_full; +#endif public: static _Error_formatter& diff --git a/libstdc++-v3/src/c++11/debug.cc b/libstdc++-v3/src/c++11/debug.cc index 4706defedf1..3e45433be22 100644 --- a/libstdc++-v3/src/c++11/debug.cc +++ b/libstdc++-v3/src/c++11/debug.cc @@ -609,10 +609,12 @@ namespace void print_raw(PrintContext& ctx, const char* str, ptrdiff_t nbc = -1) { - if (nbc >= 0) - ctx._M_column += fprintf(stderr, "%.*s", (int)nbc, str); - else - ctx._M_column += fprintf(stderr, "%s", str); + if (nbc != 0) + { + ctx._M_column += (nbc > 0) + ? fprintf(stderr, "%.*s", (int)nbc, str) + : fprintf(stderr, "%s", str); + } } void @@ -666,25 +668,35 @@ namespace } void - pretty_print(PrintContext& ctx, const char* str, _Print_func_t print_func) + print_function(PrintContext& ctx, const char* func, _Print_func_t print_func) { - const char cxx1998[] = "cxx1998::"; + const char cxx1998[] = "__cxx1998::"; + const char uglification[] = "__"; for (;;) { - if (auto pos = strstr(str, "__")) + size_t offset; + auto idx = strstr(func, cxx1998); + if (idx) + offset = sizeof(cxx1998) - 1; + else if ((idx = strstr(func, uglification))) + offset = sizeof(uglification) - 1; + + if (idx) { - if (pos != str) - print_func(ctx, str, pos - str); + if (idx != func) + print_func(ctx, func, idx - func); + + func = idx + offset; - pos += 2; // advance past "__" - if (memcmp(pos, cxx1998, 9) == 0) - pos += 9; // advance part "cxx1998::" + while (*func && isspace((unsigned char)*func)) + ++func; - str = pos; + if (!*func) + break; } else { - print_func(ctx, str, -1); + print_func(ctx, func, -1); break; } } @@ -704,7 +716,7 @@ namespace char* demangled_name = __cxxabiv1::__cxa_demangle(info->name(), NULL, NULL, &status); if (status == 0) - pretty_print(ctx, demangled_name, &print_word); + print_function(ctx, demangled_name, &print_word); else print_word(ctx, info->name()); free(demangled_name); @@ -735,7 +747,7 @@ namespace print_named_name(PrintContext& ctx, const _Parameter::_Named& named) { assert(named._M_name); - pretty_print(ctx, named._M_name, print_word); + print_function(ctx, named._M_name, print_word); } template @@ -1090,6 +1102,58 @@ namespace void print_string(PrintContext& ctx, const char* str, ptrdiff_t nbc) { print_string(ctx, str, nbc, nullptr, 0); } + +#if _GLIBCXX_HAVE_STACKTRACE + int + print_backtrace(void* data, __UINTPTR_TYPE__ pc, const char* filename, + int lineno, const char* function) + { + const int bufsize = 64; + char buf[bufsize]; + + PrintContext& ctx = *static_cast(data); + + int written = __builtin_sprintf(buf, "%p ", (void*)pc); + print_word(ctx, buf, written); + + int ret = 0; + if (function) + { + int status; + char* demangled_name = + __cxxabiv1::__cxa_demangle(function, NULL, NULL, &status); + if (status == 0) + print_function(ctx, demangled_name, &print_raw); + else + print_word(ctx, function); + + free(demangled_name); + ret = strstr(function, "main") ? 1 : 0; + } + + print_literal(ctx, "\n"); + + if (filename) + { + bool wordwrap = false; + swap(wordwrap, ctx._M_wordwrap); + print_word(ctx, filename); + + if (lineno) + { + written = __builtin_sprintf(buf, ":%u\n", lineno); + print_word(ctx, buf, written); + } + else + print_literal(ctx, "\n"); + swap(wordwrap, ctx._M_wordwrap); + } + else + print_literal(ctx, "???:0\n"); + + return ret; + } +#endif } namespace __gnu_debug @@ -1130,11 +1194,22 @@ namespace __gnu_debug if (_M_function) { print_literal(ctx, "In function:\n"); - pretty_print(ctx, _M_function, &print_string); + print_function(ctx, _M_function, &print_string); + print_literal(ctx, "\n"); + ctx._M_first_line = true; print_literal(ctx, "\n"); + } + +#if _GLIBCXX_HAVE_STACKTRACE + if (_M_backtrace_state) + { + print_literal(ctx, "Backtrace:\n"); + _M_backtrace_full( + _M_backtrace_state, 1, print_backtrace, nullptr, &ctx); ctx._M_first_line = true; print_literal(ctx, "\n"); } +#endif print_literal(ctx, "Error: "); diff --git a/libstdc++-v3/src/libbacktrace/Makefile.am b/libstdc++-v3/src/libbacktrace/Makefile.am index 0f1143507f3..52d8f81b97b 100644 --- a/libstdc++-v3/src/libbacktrace/Makefile.am +++ b/libstdc++-v3/src/libbacktrace/Makefile.am @@ -60,6 +60,7 @@ libstdc___libbacktrace_la_SHORTNAME = $(obj_prefix) libstdc___libbacktrace_la_SOURCES = \ atomic.c \ + backtrace.c \ dwarf.c \ fileline.c \ posix.c \ diff --git a/libstdc++-v3/src/libbacktrace/Makefile.in b/libstdc++-v3/src/libbacktrace/Makefile.in index 7545894d59a..5c6b4dd1a0c 100644 --- a/libstdc++-v3/src/libbacktrace/Makefile.in +++ b/libstdc++-v3/src/libbacktrace/Makefile.in @@ -181,10 +181,10 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" LTLIBRARIES = $(toolexeclib_LTLIBRARIES) am_libstdc___libbacktrace_la_OBJECTS = $(obj_prefix)-atomic.lo \ - $(obj_prefix)-dwarf.lo $(obj_prefix)-fileline.lo \ - $(obj_prefix)-posix.lo $(obj_prefix)-sort.lo \ - $(obj_prefix)-simple.lo $(obj_prefix)-state.lo \ - $(obj_prefix)-cp-demangle.lo + $(obj_prefix)-backtrace.lo $(obj_prefix)-dwarf.lo \ + $(obj_prefix)-fileline.lo $(obj_prefix)-posix.lo \ + $(obj_prefix)-sort.lo $(obj_prefix)-simple.lo \ + $(obj_prefix)-state.lo $(obj_prefix)-cp-demangle.lo libstdc___libbacktrace_la_OBJECTS = \ $(am_libstdc___libbacktrace_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -507,6 +507,7 @@ obj_prefix = std_stacktrace libstdc___libbacktrace_la_SHORTNAME = $(obj_prefix) libstdc___libbacktrace_la_SOURCES = \ atomic.c \ + backtrace.c \ dwarf.c \ fileline.c \ posix.c \ @@ -647,6 +648,9 @@ distclean-compile: $(obj_prefix)-atomic.lo: atomic.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstdc___libbacktrace_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(obj_prefix)-atomic.lo `test -f 'atomic.c' || echo '$(srcdir)/'`atomic.c +$(obj_prefix)-backtrace.lo: backtrace.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstdc___libbacktrace_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(obj_prefix)-backtrace.lo `test -f 'backtrace.c' || echo '$(srcdir)/'`backtrace.c + $(obj_prefix)-dwarf.lo: dwarf.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstdc___libbacktrace_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $(obj_prefix)-dwarf.lo `test -f 'dwarf.c' || echo '$(srcdir)/'`dwarf.c diff --git a/libstdc++-v3/src/libbacktrace/backtrace-rename.h b/libstdc++-v3/src/libbacktrace/backtrace-rename.h index 7a59f166e62..79bdef6309f 100644 --- a/libstdc++-v3/src/libbacktrace/backtrace-rename.h +++ b/libstdc++-v3/src/libbacktrace/backtrace-rename.h @@ -4,6 +4,7 @@ #define backtrace_create_state __glibcxx_backtrace_create_state #define backtrace_dwarf_add __glibcxx_backtrace_dwarf_add #define backtrace_free __glibcxx_backtrace_free +#define backtrace_full __glibcxx_backtrace_full #define backtrace_get_view __glibcxx_backtrace_get_view #define backtrace_initialize __glibcxx_backtrace_initialize #define backtrace_open __glibcxx_backtrace_open diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_neg.cc index 7ab658d0ba1..cb1b1740cfe 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/debug/assign4_neg.cc @@ -16,6 +16,7 @@ // . // // { dg-do run { xfail *-*-* } } +// { dg-options "-D_GLIBCXX_DEBUG_BACKTRACE -lstdc++_libbacktrace" } #include #include