From: Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
To: tj <999alfred@comcast.net>
Cc: gdb@sources.redhat.com
Subject: Re: Still problems with gdb and nested functions.
Date: Tue, 22 Feb 2005 20:27:00 -0000 [thread overview]
Message-ID: <200502222015.j1MKFB1q017797@tully.CS.Berkeley.EDU> (raw)
In-Reply-To: Message from tj <999alfred@comcast.net> of "Tue, 22 Feb 2005 14:17:42 EST." <421B8556.6070905@comcast.net>
> #include <stdio.h>
>
> int main(int argc, char *argv[]){
>
> int i,j;
>
> int inside(void){
> int k,l;
>
> k = 1;
> l = k;
> printf("inside, k = %d, l = %d\n", k,l);
> return 0;
>
> }
>
> inside();
> i = 0;
> j = 1;
> }
>
....
> Breakpoint 1, inside.0 () at test.c:12
> 12 printf("inside, k = %d, l = %d\n", k,l);
> (gdb) p k
> No symbol "k" in current context.
I presume you have confirmed that k is actually there (since it is set
only from a constant, it could be folded away even without fancy
optimization).
Paul Hilfinger
next prev parent reply other threads:[~2005-02-22 20:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-22 19:31 tj
2005-02-22 20:27 ` Paul Hilfinger [this message]
2005-02-22 20:45 ` Cal Erickson
2005-02-22 20:53 ` Eli Zaretskii
2005-02-22 21:02 ` Cal Erickson
2005-02-22 21:43 ` Cal Erickson
2005-02-22 20:56 ` Eli Zaretskii
2005-02-22 20:50 ` Eli Zaretskii
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=200502222015.j1MKFB1q017797@tully.CS.Berkeley.EDU \
--to=hilfingr@eecs.berkeley.edu \
--cc=999alfred@comcast.net \
--cc=gdb@sources.redhat.com \
/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