namespace and argument dependent name lookup (ADL) in gdb
Daniel Jacobowitz
drow@false.org
Sat Dec 15 04:46:00 GMT 2007
On Fri, Dec 14, 2007 at 05:15:06PM -0600, Peng Yu wrote:
> > > (gdb) tb test::f
> > > Breakpoint 1 at 0x804867c: file main.cc, line 11.
> >
> > That's not Koenig lookup. There's no arguments.
>
> Why there is no argument? a is f's argument.
You typed "tb f". There's no a in that. GDB only works from
what you type.
> > If you were already
> > in the namespace 'test', GDB would search it.
>
> What if I'm in the function body of "main"?
Then type "tb test::f". You have to know where things are defined by
looking through the source. You can also use "info function" to search.
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb
mailing list