Re: [PATCH 2/2 v2] Demangler crash handler

Florian Weimer
2014-05-25T12:59:24Z

* 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).