From: Daniel Jacobowitz <drow@mvista.com>
To: Michael Elizabeth Chastain <mec@shout.net>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Select a particular mangling of a demangled symbol in lookup_block_symbol
Date: Fri, 15 Feb 2002 16:46:00 -0000 [thread overview]
Message-ID: <20020215194641.A13830@nevyn.them.org> (raw)
In-Reply-To: <200202160038.g1G0cbd03065@duracef.shout.net>
On Fri, Feb 15, 2002 at 06:38:37PM -0600, Michael Elizabeth Chastain wrote:
> 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?)
We -could- just use the names the C++ demangler provides with
DMGL_VERBOSE for some printing. However, we want to be careful about
that. They look like:
A::A[not-in-charge](int).
and for max confusion:
A::~A [not-in-charge](int)
[I should report that, I suppose...]
I would prefer to recognize this using our constructor machinery and
describe this as something like:
A::A(int) [not-in-charge]
which is more aesthetic and lets us have a better conception of what is
going on. Bear in mind that sometimes we look up "A::A" wanting to get
that. Our overload handling needs some work, which I'm trying to
figure out right now.
Meanwhile, I'd like to put this patch in because it is a strict
improvement over what we have.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-02-16 0:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-15 16:38 Michael Elizabeth Chastain
2002-02-15 16:46 ` Daniel Jacobowitz [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-02-16 10:59 Michael Elizabeth Chastain
2002-02-15 18:15 Michael Elizabeth Chastain
2002-02-14 15:55 Daniel Jacobowitz
2002-03-19 11:53 ` Daniel Jacobowitz
2002-03-19 14:25 ` Elena Zannoni
2002-03-19 14:20 ` Elena Zannoni
2002-03-19 14:47 ` Elena Zannoni
2002-03-22 10:55 ` Daniel Jacobowitz
2002-03-22 12:11 ` Elena Zannoni
2002-03-22 14:53 ` Daniel Jacobowitz
2002-03-22 10:52 ` Daniel Jacobowitz
2002-03-22 12:10 ` Elena Zannoni
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=20020215194641.A13830@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mec@shout.net \
/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