This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2 v2] Demangler crash handler
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Gary Benson <gbenson at redhat dot com>, Eli Zaretskii <eliz at gnu dot org>, gdb-patches at sourceware dot org, aburgess at broadcom dot com, xdje42 at gmail dot com, mark dot kettenis at xs4all dot nl, tromey at redhat dot com
- Date: Sun, 25 May 2014 14:59:11 +0200
- Subject: Re: [PATCH 2/2 v2] Demangler crash handler
- Authentication-results: sourceware.org; auth=none
- References: <20140519114801 dot GA31140 at blade dot nx> <83iop1dd8e dot fsf at gnu dot org> <20140519154822 dot GA20315 at blade dot nx> <8361l1d7yx dot fsf at gnu dot org> <20140519190530 dot GA22506 at blade dot nx> <537A6C81 dot 5040203 at redhat dot com>
* Pedro Alves:
> Wouldn't a new "set debug demangle on" option, that would make
> GDB output:
>
> (gdb) bt / whatever-gdb-command-that-triggers-demangling
> demangling _ZN2CV1mEi ... CV::m(int)
> demangling _Zwhatever ... <NULL>
>
> be just as helpful, and, even potentially be helpful to debug
> scenarios where GDB/libiberty might get the demangling wrong,
> but not cause a crash?
Here's another idea: You could strcpy the input string to a mapped
file (say, ~/.config/gdb/demangler) and read that on startup, printing
it and adding the offending symbol to a blacklist (say,
~/.config/gdb/demangler.blacklist).