From: Vincent De Groote <vincent.degroote@encelade.com>
To: Daniel Jacobowitz <drow@false.org>, gdb@sourceware.org
Subject: Re: Nexted function context
Date: Tue, 30 Jan 2007 12:48:00 -0000 [thread overview]
Message-ID: <FB1878B8F4CB80D2CE364F5F@[192.168.1.2]> (raw)
In-Reply-To: <20070130121300.GA17458@nevyn.them.org>
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
next prev parent reply other threads:[~2007-01-30 12:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-30 8:51 Vincent De Groote
2007-01-30 12:13 ` Daniel Jacobowitz
2007-01-30 12:28 ` Mark Kettenis
2007-01-30 12:48 ` Vincent De Groote [this message]
2007-01-30 13:11 ` Daniel Jacobowitz
2007-01-30 13:39 ` Vincent De Groote
2007-01-30 13:42 ` Daniel Jacobowitz
2007-01-30 15:45 ` Vincent De Groote
2007-01-30 16:17 ` 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='FB1878B8F4CB80D2CE364F5F@[192.168.1.2]' \
--to=vincent.degroote@encelade.com \
--cc=drow@false.org \
--cc=gdb@sourceware.org \
/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