This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: scope in nested function
- From: "Jim Blandy" <jimb at red-bean dot com>
- To: "Bill Pursell" <bill dot pursell at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 30 Mar 2006 22:57:49 -0800
- Subject: Re: scope in nested function
- References: <442CC4BB.5070709@gmail.com>
On 3/30/06, Bill Pursell <bill.pursell@gmail.com> wrote:
> I'm not sure how to reference a variable in a nested function from gdb.
> In the gdb session below, there are 2 things I don't understand
> how to do:
>
> 1) how do I set a breakpoint in foo? (other than by referencing a line
> number)
Have you tried calling it main::foo?
> 2) when I'm in foo, how do I reference i?
Have you tried calling it main::i?
I'm not sure these will work, but I think they're supposed to.