scope in nested function
Jim Blandy
jimb@red-bean.com
Fri Mar 31 07:54:00 GMT 2006
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.
More information about the Gdb
mailing list