From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13329 invoked by alias); 30 Jul 2013 05:57:22 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 13302 invoked by uid 48); 30 Jul 2013 05:57:22 -0000 From: "b.r.longbons at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/15801] some C++11 symbols can't be demangled Date: Tue, 30 Jul 2013 05:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: b.r.longbons at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00126.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15801 --- Comment #3 from Ben Longbons --- Created attachment 7127 --> http://sourceware.org/bugzilla/attachment.cgi?id=7127&action=edit my original program, trimmed as much as possible without breaking types very much Some observations: gcc 4.6 is best to test with, since it *only* emits the wrong symbols. With gcc 4.7 and gcc 4.8, this might be a heisenbug. clang only emits the right symbols (but clang is still useless for compiling programs to be debugged). puts() is there just to set a nice breakpoint. The need to explicitly call 'set lang c++' before 'maint demangle' is *really* annoying when using 'up' or 'frame' after a call to a C library. Hm ... cosmetic issue, but perhaps gdb should not print the () if it successfully demangles a name and it's not printing arguments backtrace for gcc 4.6, attempting demangling: (gdb) bt #0 _IO_puts (str=0x4015ec "hello") at ioputs.c:34 #1 0x00000000004014ed in bool extract<(char)32, global_reg>(strings::XString, VRecord<(char)32, global_reg>) () #2 0x0000000000401493 in bool extract<(char)9, 1, VRecord<(char)32, global_reg>>(strings::XString, Record<(char)9, 1, VRecord<(char)32, global_reg>>) () #3 0x0000000000401422 in extract<(char)9, 2, TimeT >*> () #4 0x0000000000401391 in bool extract<(char)9, 3, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 3, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #5 0x00000000004012e7 in extract<(char)9, 4, IP_String*, TimeT*, VRecord<(char)32, global_reg> >*> () #6 0x0000000000401228 in extract<(char)9, 5, TimeT*, IP_String, VRecord<(char)32, global_reg> >*> () #7 0x000000000040115c in extract<(char)9, 6, timestamp_seconds_buffer*, IP_String, VRecord<(char)32, global_reg> >*> () #8 0x0000000000401083 in extract<(char)9, 7, AccountEmail*, IP_String, VRecord<(char)32, global_reg> >*> () #9 0x0000000000400fa7 in bool extract<(char)9, 8, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 8, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #10 0x0000000000400eb8 in bool extract<(char)9, 9, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 9, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #11 0x0000000000400da8 in bool extract<(char)9, 10, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 10, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #12 0x0000000000400c86 in _Z7extractILc9ELi11EP29timestamp_milliseconds_bufferIPN7strings7VStringILh1EEEPiS6_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS3_ILh254EEESC_7VRecordILc32E10global_regEEEbNS2_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #13 0x0000000000400b52 in _Z7extractILc9ELi12EP12AccountCryptIP29timestamp_milliseconds_bufferPN7strings7VStringILh1EEEPiS8_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS5_ILh254EEESE_7VRecordILc32E10global_regEEEbNS4_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #14 0x0000000000400a0d in _Z7extractILc9ELi13EP11AccountNameIP12AccountCryptP29timestamp_milliseconds_bufferPN7strings7VStringILh1EEEPiSA_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS7_ILh254EEESG_7VRecordILc32E10global_regEEEbNS6_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #15 0x00000000004008ac in bool extract<(char)9, 14, int*, AccountName*, AccountCrypt*, timestamp_milliseconds_buffer*, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 14, int*, AccountName*, AccountCrypt*, timestamp_milliseconds_buffer*, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #16 0x00000000004006fc in extract(strings::XString, AuthData*) () #17 0x000000000040073d in mmo_auth_init(strings::XString) () #18 0x0000000000400752 in main () backtrace for gcc 4.6, no demangling: (gdb) bt #0 _IO_puts (str=0x4015ec "hello") at ioputs.c:34 #1 0x00000000004014ed in _Z7extractILc32E10global_regEbN7strings7XStringE7VRecordIXT_ET0_E () #2 0x0000000000401493 in _Z7extractILc9ELi1E7VRecordILc32E10global_regEIEEbN7strings7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #3 0x0000000000401422 in _Z7extractILc9ELi2EP5TimeTI7VRecordILc32E10global_regEEEbN7strings7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #4 0x0000000000401391 in _Z7extractILc9ELi3EPN7strings7VStringILh254EEEIP5TimeT7VRecordILc32E10global_regEEEbNS0_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #5 0x00000000004012e7 in _Z7extractILc9ELi4EP9IP_StringIPN7strings7VStringILh254EEEP5TimeT7VRecordILc32E10global_regEEEbNS2_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #6 0x0000000000401228 in _Z7extractILc9ELi5EP5TimeTIP9IP_StringPN7strings7VStringILh254EEES1_7VRecordILc32E10global_regEEEbNS4_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #7 0x000000000040115c in _Z7extractILc9ELi6EP24timestamp_seconds_bufferIP5TimeTP9IP_StringPN7strings7VStringILh254EEES3_7VRecordILc32E10global_regEEEbNS6_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #8 0x0000000000401083 in _Z7extractILc9ELi7EP12AccountEmailIP24timestamp_seconds_bufferP5TimeTP9IP_StringPN7strings7VStringILh254EEES5_7VRecordILc32E10global_regEEEbNS8_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #9 0x0000000000400fa7 in _Z7extractILc9ELi8EPiIP12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPN7strings7VStringILh254EEES6_7VRecordILc32E10global_regEEEbNS9_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #10 0x0000000000400eb8 in _Z7extractILc9ELi9EPiIS0_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPN7strings7VStringILh254EEES6_7VRecordILc32E10global_regEEEbNS9_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #11 0x0000000000400da8 in _Z7extractILc9ELi10EPN7strings7VStringILh1EEEIPiS4_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS1_ILh254EEESA_7VRecordILc32E10global_regEEEbNS0_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #12 0x0000000000400c86 in _Z7extractILc9ELi11EP29timestamp_milliseconds_bufferIPN7strings7VStringILh1EEEPiS6_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS3_ILh254EEESC_7VRecordILc32E10global_regEEEbNS2_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #13 0x0000000000400b52 in _Z7extractILc9ELi12EP12AccountCryptIP29timestamp_milliseconds_bufferPN7strings7VStringILh1EEEPiS8_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS5_ILh254EEESE_7VRecordILc32E10global_regEEEbNS4_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #14 0x0000000000400a0d in _Z7extractILc9ELi13EP11AccountNameIP12AccountCryptP29timestamp_milliseconds_bufferPN7strings7VStringILh1EEEPiSA_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS7_ILh254EEESG_7VRecordILc32E10global_regEEEbNS6_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #15 0x00000000004008ac in _Z7extractILc9ELi14EPiIP11AccountNameP12AccountCryptP29timestamp_milliseconds_bufferPN7strings7VStringILh1EEES0_S0_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS8_ILh254EEESG_7VRecordILc32E10global_regEEEbNS7_7XStringE6RecordIXT_EXT0_EIT1_DpT2_EE () #16 0x00000000004006fc in _ZL7extractN7strings7XStringEP8AuthData () #17 0x000000000040073d in _Z13mmo_auth_initN7strings7XStringE () #18 0x0000000000400752 in main () backtrace for clang, with demangling: #0 _IO_puts (str=0x40247c "hello") at ioputs.c:34 #1 0x000000000040239c in bool extract<(char)32, global_reg>(strings::XString, VRecord<(char)32, global_reg>) () #2 0x000000000040234d in bool extract<(char)9, 1, VRecord<(char)32, global_reg>>(strings::XString, Record<(char)9, 1, VRecord<(char)32, global_reg>>) () #3 0x0000000000402317 in bool extract<(char)9, 2, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 2, TimeT*, VRecord<(char)32, global_reg> >) () #4 0x0000000000402298 in bool extract<(char)9, 3, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 3, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #5 0x00000000004021f9 in bool extract<(char)9, 4, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 4, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #6 0x0000000000402140 in bool extract<(char)9, 5, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 5, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #7 0x0000000000402090 in bool extract<(char)9, 6, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 6, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #8 0x0000000000401fe8 in bool extract<(char)9, 7, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 7, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #9 0x0000000000401f58 in bool extract<(char)9, 8, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 8, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #10 0x0000000000401ec0 in bool extract<(char)9, 9, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 9, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #11 0x0000000000401e00 in bool extract<(char)9, 10, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 10, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #12 0x0000000000401d48 in bool extract<(char)9, 11, timestamp_milliseconds_buffer*, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 11, timestamp_milliseconds_buffer*, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #13 0x0000000000401c7b in bool extract<(char)9, 12, AccountCrypt*, timestamp_milliseconds_buffer*, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 12, AccountCrypt*, timestamp_milliseconds_buffer*, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #14 0x0000000000401ba9 in bool extract<(char)9, 13, AccountName*, AccountCrypt*, timestamp_milliseconds_buffer*, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 13, AccountName*, AccountCrypt*, timestamp_milliseconds_buffer*, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #15 0x000000000040094f in bool extract<(char)9, 14, int*, AccountName*, AccountCrypt*, timestamp_milliseconds_buffer*, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >(strings::XString, Record<(char)9, 14, int*, AccountName*, AccountCrypt*, timestamp_milliseconds_buffer*, strings::VString<(unsigned char)1>*, int*, int*, AccountEmail*, timestamp_seconds_buffer*, TimeT*, IP_String*, strings::VString<(unsigned char)254>*, TimeT*, VRecord<(char)32, global_reg> >) () #16 0x0000000000400879 in extract(strings::XString, AuthData*) () #17 0x0000000000400685 in mmo_auth_init(strings::XString) () #18 0x000000000040089d in main () backtrace for clang, no demangling: (gdb) bt #0 _IO_puts (str=0x40247c "hello") at ioputs.c:34 #1 0x000000000040239c in _Z7extractILc32E10global_regEbN7strings7XStringE7VRecordIXT_ET0_E () #2 0x000000000040234d in _Z7extractILc9ELi1E7VRecordILc32E10global_regEJEEbN7strings7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #3 0x0000000000402317 in _Z7extractILc9ELi2EP5TimeTJ7VRecordILc32E10global_regEEEbN7strings7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #4 0x0000000000402298 in _Z7extractILc9ELi3EPN7strings7VStringILh254EEEJP5TimeT7VRecordILc32E10global_regEEEbNS0_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #5 0x00000000004021f9 in _Z7extractILc9ELi4EP9IP_StringJPN7strings7VStringILh254EEEP5TimeT7VRecordILc32E10global_regEEEbNS2_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #6 0x0000000000402140 in _Z7extractILc9ELi5EP5TimeTJP9IP_StringPN7strings7VStringILh254EEES1_7VRecordILc32E10global_regEEEbNS4_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #7 0x0000000000402090 in _Z7extractILc9ELi6EP24timestamp_seconds_bufferJP5TimeTP9IP_StringPN7strings7VStringILh254EEES3_7VRecordILc32E10global_regEEEbNS6_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #8 0x0000000000401fe8 in _Z7extractILc9ELi7EP12AccountEmailJP24timestamp_seconds_bufferP5TimeTP9IP_StringPN7strings7VStringILh254EEES5_7VRecordILc32E10global_regEEEbNS8_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #9 0x0000000000401f58 in _Z7extractILc9ELi8EPiJP12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPN7strings7VStringILh254EEES6_7VRecordILc32E10global_regEEEbNS9_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #10 0x0000000000401ec0 in _Z7extractILc9ELi9EPiJS0_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPN7strings7VStringILh254EEES6_7VRecordILc32E10global_regEEEbNS9_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #11 0x0000000000401e00 in _Z7extractILc9ELi10EPN7strings7VStringILh1EEEJPiS4_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS1_ILh254EEESA_7VRecordILc32E10global_regEEEbNS0_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #12 0x0000000000401d48 in _Z7extractILc9ELi11EP29timestamp_milliseconds_bufferJPN7strings7VStringILh1EEEPiS6_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS3_ILh254EEESC_7VRecordILc32E10global_regEEEbNS2_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #13 0x0000000000401c7b in _Z7extractILc9ELi12EP12AccountCryptJP29timestamp_milliseconds_bufferPN7strings7VStringILh1EEEPiS8_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS5_ILh254EEESE_7VRecordILc32E10global_regEEEbNS4_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #14 0x0000000000401ba9 in _Z7extractILc9ELi13EP11AccountNameJP12AccountCryptP29timestamp_milliseconds_bufferPN7strings7VStringILh1EEEPiSA_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS7_ILh254EEESG_7VRecordILc32E10global_regEEEbNS6_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #15 0x000000000040094f in _Z7extractILc9ELi14EPiJP11AccountNameP12AccountCryptP29timestamp_milliseconds_bufferPN7strings7VStringILh1EEES0_S0_P12AccountEmailP24timestamp_seconds_bufferP5TimeTP9IP_StringPNS8_ILh254EEESG_7VRecordILc32E10global_regEEEbNS7_7XStringE6RecordIXT_EXT0_EJT1_DpT2_EE () #16 0x0000000000400879 in _ZL7extractN7strings7XStringEP8AuthData () #17 0x0000000000400685 in _Z13mmo_auth_initN7strings7XStringE () #18 0x000000000040089d in main () -- You are receiving this mail because: You are on the CC list for the bug.