Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Cal Erickson <cerickson@mvista.com>
To: Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
Cc: tj <999alfred@comcast.net>, gdb@sources.redhat.com
Subject: Re: Still problems with gdb and nested functions.
Date: Tue, 22 Feb 2005 20:45:00 -0000	[thread overview]
Message-ID: <421B94FD.5060502@mvista.com> (raw)
In-Reply-To: <200502222015.j1MKFB1q017797@tully.CS.Berkeley.EDU>

You might try updating your GCC release. We found the same problem and
it was fixed by upgrading GCC.

Cal Erickson

Paul Hilfinger wrote:
>>#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

-- 
===========================================================================
Cal Erickson                 MontaVista Software Inc.
Linux Consultant             1237 E. Arques Ave.
Phone (408) 328-0304         Sunnyvale CA 94085
Fax   (408) 328-9204         web http://www.mvista.com
===========================================================================


  reply	other threads:[~2005-02-22 20:27 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
2005-02-22 20:45   ` Cal Erickson [this message]
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=421B94FD.5060502@mvista.com \
    --to=cerickson@mvista.com \
    --cc=999alfred@comcast.net \
    --cc=gdb@sources.redhat.com \
    --cc=hilfingr@EECS.Berkeley.EDU \
    /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