This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Nexted function context
I just made a simple example:
#include <stdio.h>
int main ( int argc, char ** argv ) {
int add_something ( int value ) {
int result;
if ( value < 10 )
result = value + 10;
else
result = value - 10;
return ( result );
}
int i;
for ( i = 0; i < 100; i++ )
printf ("%d\n", add_something ( i ));
return (0);
}
when single stepping into add_something function,
doing "p value" or "p result" reports the same message "No symbol "xxxxx"
in current context".
I also looked for a way of setting a breakpoint into a nested function, but
never succeeds.
Thanks
Vincent De Groote
--On 30 January 2007 07:13 -0500 Daniel Jacobowitz <drow@false.org> wrote:
On Tue, Jan 30, 2007 at 08:53:13AM +0000, Vincent De Groote wrote:
Hello,
I'm using gdb on c files compiled with gcc. I use a lot of nested
function calls.
When the program makes a core dump in a nested function, I can't see the
local variables (No symbol in local context).
I have the same problem if I single step within a running program.
Can you provide a small test case for this problem?
--
Daniel Jacobowitz
CodeSourcery