This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]