From: Bogdan Slusarczyk <bodzio131@op.pl>
To: gdb@sourceware.org
Subject: [gdb 6.7.1/6.8] does '-var-create - @' work or not?
Date: Thu, 03 Apr 2008 13:20:00 -0000 [thread overview]
Message-ID: <47F4D97B.8060400@op.pl> (raw)
I've done simple test:
int test2( int a )
{
int b = a + 20;
return b;//should be a=11, b=31, but is a=31,b=0
}
int test1( int a )
{
int b = a + 10;
return test2( b );//should be a=1, b=11, but is a=11, b=11
}
int main( int argc, char** argv )
{
int a = 10;
int b = 1;
test1( 1 );//should be a=10, b=1 and is a=10, b=1
return 0;
}
I thought that created var objects using '-var-create - @' can be
updated in another frame. But it doesn't work, -var-evaluate-expression
returns wrong value. On the other hand 'print' returns right values. Or
maybe I did something wrong? My sequence: -var-create at the begining,
and next -var-update and -var-evaluate-expression in another frames.
Regards,
Bogdan
next reply other threads:[~2008-04-03 13:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-03 13:20 Bogdan Slusarczyk [this message]
2008-04-03 13:33 ` Daniel Jacobowitz
2008-04-03 13:50 ` Vladimir Prus
2008-04-03 14:30 ` Bogdan Slusarczyk
2008-04-03 17:33 ` Vladimir Prus
2008-04-03 14:13 ` Bogdan Slusarczyk
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=47F4D97B.8060400@op.pl \
--to=bodzio131@op.pl \
--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