This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ pretty-printers vs. inspecting objects
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Avi Kivity <avi at cloudius-systems dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 27 Jul 2015 11:52:49 +0100
- Subject: Re: libstdc++ pretty-printers vs. inspecting objects
- Authentication-results: sourceware.org; auth=none
- References: <55B4F76C dot 20904 at cloudius-systems dot com> <CAH6eHdSXwhTn=yrk7rjfcvP7w0D926yY2NFrtWhCkVCm2aZjiw at mail dot gmail dot com> <55B5F1E3 dot 7050503 at cloudius-systems dot com> <CAH6eHdSpCUfATbvhTriuMsxkiZ0AGhfuYM03_nH8FPNkaZ+hcw at mail dot gmail dot com> <55B601FC dot 5070604 at cloudius-systems dot com>
On 27 July 2015 at 11:03, Avi Kivity wrote:
>
>
> On 07/27/2015 12:44 PM, Jonathan Wakely wrote:
>>
>> On 27 July 2015 at 09:54, Avi Kivity wrote:
>>>
>>> I realize this is a lot of work, but as it is, debugging modern C++
>>> programs
>>> is quite a headache with g++/gdb. gdb won't even load binaries compiled
>>> with -O0,
>>
>> Why not?
>
>
> It segfaults on symbols it cannot demangle:
>
> $ gdb build/debug/apps/httpd/httpd
> GNU gdb (GDB) Fedora 7.8.2-39.fc21
> Copyright (C) 2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-redhat-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from build/debug/apps/httpd/httpd...Segmentation fault (core
> dumped)
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=17455
OK so that's a crash on a specific mangled symbol, not a general
problem with debugging -O0 binaries.