Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Dave Korn" <dk@artimi.com>
To: "'Fabian Cenedese'" <Cenedese@indel.ch>, <gdb@sources.redhat.com>,
	"'Craig Jeffree'" <craig.jeffree@preston.net>
Subject: RE: gdb 6.1.1 (PPC) crash (long) AND gdb crash in cp_print_class_method
Date: Thu, 02 Sep 2004 12:20:00 -0000	[thread overview]
Message-ID: <NUTMEGwwW2W9baQTlhr000010cb@NUTMEG.CAM.ARTIMI.COM> (raw)
In-Reply-To: <5.2.0.9.1.20040901111203.01d35778@NT_SERVER>

> -----Original Message-----
> From: gdb-owner On Behalf Of Fabian Cenedese
> Sent: 01 September 2004 10:18
> To: gdb
> Subject: Re: gdb 6.1.1 (PPC) crash (long)

[...snip!...]

> (gdb) frame 2
> #2  0x004dda6c in c_type_print_base (type=0xa2b4b68, stream=0xa084088,
>     show=1, level=0) at ../../gdb-6.1.1/gdb/c-typeprint.c:952
> 952                       int is_full_physname_constructor =
> (gdb) info locals

[...snip!...]

> mangled_name = 0xa297650 "_._9CMainTask"
> demangled_name = 0xa28da58 "X\203)\nE\203)\nk::~CMainTask(void)"

[...snip!...]

> Is this supposed to look like that?
> 
> demangled_name = 0xa28da58 "X\203)\nE\203)\nk::~CMainTask(void)"



> -----Original Message-----
> From: gdb-owner On Behalf Of Craig Jeffree
> Sent: 02 September 2004 00:48
> To: gdb
> Subject: gdb crash in cp_print_class_method

[...snip!...]

> Crash 1
> =======
> (gdb) bt
> #0  0xb74b0e7a in strcmp () from /lib/tls/libc.so.6
> #1  0x0814d00f in cp_print_class_method (
>     valaddr=0x15a88b68 "\030\214W\bnline/taam/src/m!", 
> type=0x15ab6c48,
>     stream=0x8283740) at cp-valprint.c:134
> #2  0x0814ca69 in c_val_print (type=0x11361658,
>     valaddr=0x15b2d3f8 "??4\bodel/dynamicX", embedded_offset=0,
>     address=139955224, stream=0x8283740, format=0, deref_ref=1,
> recurse=0,
>     pretty=Val_prettyprint) at c-valprint.c:449
> #3  0x080dbc40 in val_print (type=0x11361658,
>     valaddr=0x15b2d3f8 "??4\bodel/dynamicX", embedded_offset=0,
>     address=139955224, stream=0x8283740, format=0, deref_ref=1,
> recurse=0,
>     pretty=Val_pretty_default) at ./valprint.c:149


  Gentlemen, you seem very likely to have stumbled across the same problem.
There is clearly something very very wrong in the C++ demangling and pretty
printing.  Last time I checked the bfd demangler had no regressions in it,
so I think it's fairly likely that something is stomping over the demangled
string after it's been returned to cp_print_class_method by bfd, and this is
causing a later failure when the damaged data is passed to strcmp or
is_constructor_name.  It might be possible to debug this by a clever
combination of scripting and setting hardware memory watchpoints to try and
catch anything changing the relevant memory area apart from the
demangler.... 

  Fabian, about a point from your first email:  the addresses in .stackdump
files are always raw, even from a debug build of the code; the
stackdump-writing code is quite simple and doesn't look them up for you.
You can use 'addr2line' from binutils to decode the "Function" addresses it
shows; check the man/info page for more.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


  reply	other threads:[~2004-09-02 12:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-01  9:01 gdb 6.1.1 (PPC) crash (long) Fabian Cenedese
2004-09-01  9:18 ` Fabian Cenedese
2004-09-02 12:20   ` Dave Korn [this message]
2004-09-02 12:59     ` gdb 6.1.1 (PPC) crash (long) AND gdb crash in cp_print_class_method Fabian Cenedese
2004-09-02 14:07       ` Dave Korn
2004-09-02 22:48         ` Craig Jeffree
2004-09-07 14:41           ` Dave Korn
2004-09-02 11:59 ` gdb 6.1.1 (PPC) crash (long) Fabian Cenedese
2004-09-07 14:50   ` Daniel Jacobowitz
     [not found] ` <5.2.0.9.1.20040907170934.01d457f8@NT_SERVER>
2004-09-07 17:02   ` Daniel Jacobowitz
2004-09-29  5:27     ` Craig Jeffree

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=NUTMEGwwW2W9baQTlhr000010cb@NUTMEG.CAM.ARTIMI.COM \
    --to=dk@artimi.com \
    --cc=Cenedese@indel.ch \
    --cc=craig.jeffree@preston.net \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox