This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Select a particular mangling of a demangled symbol in lookup_block_symbol
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: drow at mvista dot com, gdb-patches at sources dot redhat dot com
- Date: Fri, 15 Feb 2002 18:38:37 -0600
- Subject: Re: [RFA] Select a particular mangling of a demangled symbol in lookup_block_symbol
Hi Daniel,
> What we really SHOULD do is set it on both constructors silently, without
> even acknowledging that they are different functions, or else offer the user
> the choice. My preference is actually for the former.
There's more grossness than that. Suppose that the constructor calls
another function foo(). Suppose the user sets a breakpoint on foo()
and looks at the stack and sees the constructor. Suppose the user looks
at the assembly code for the constructor. Suppose the user continues,
and takes the breakpoint on foo() again, and disassembles the constructor
again, and sees different assembly code for the constructor.
Games like that impair the user's trust in gdb. They start with a lie,
And they lead to endless scenarios where you have to fix things up in
order to maintain the lie.
I would prefer that the different blocks of object code with different
mangled names have different demangled names as well, such as "Foo::Foo()"
and "Foo::Foo$nic()". (I guess if the user actually names one of his
member functions Foo$nic then we are screwed ... is there any possible
name which is not legal C++ member name?)
Michael C