From: Daniel Jacobowitz <drow@false.org>
To: Peng Yu <pengyu.ut@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: namespace and argument dependent name lookup (ADL) in gdb
Date: Thu, 13 Dec 2007 04:02:00 -0000 [thread overview]
Message-ID: <20071213040129.GA26901@caradoc.them.org> (raw)
In-Reply-To: <366c6f340712121938j2fc71e6dmf69a9395ca6d8f6f@mail.gmail.com>
On Wed, Dec 12, 2007 at 09:38:53PM -0600, Peng Yu wrote:
> Hi,
>
> I don't have to write test::f in the following program because of
> argument dependent name lookup.
>
> http://en.wikipedia.org/wiki/Argument_dependent_name_lookup
>
> But to debug such program, I have to write the namespace test. For example,
> (gdb) tb f
> Function "f" not defined.
> (gdb) tb test::f
> Breakpoint 1 at 0x804867c: file main.cc, line 11.
That's not Koenig lookup. There's no arguments. If you were already
in the namespace 'test', GDB would search it.
> I'm wondering if gdb supports ADL. In a big program, it might not be
> easy for me to find out which namespace is the function "f" in. If gdb
> support ADL, it would save user a lot of time.
GDB supports some kinds of context-sensitive lookup, but not this one.
It is too complex to reconstruct the necessary information in the
debugger to do accurate name lookup.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-12-13 4:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-13 3:39 Peng Yu
2007-12-13 4:02 ` Daniel Jacobowitz [this message]
[not found] ` <366c6f340712141515u4a55053if6bc378bc6712975@mail.gmail.com>
2007-12-15 4:46 ` Daniel Jacobowitz
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=20071213040129.GA26901@caradoc.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=pengyu.ut@gmail.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