From: Maxim Grigoriev <maxim@tensilica.com>
To: Maxim Grigoriev <maxim@tensilica.com>
Cc: gdb@sourceware.org, Pete MacLiesh <pmac@tensilica.com>,
Vinay Pandit <vinayp@tensilica.com>,
Shaiju P <shaijup@tensilica.com>,
Marc Gauthier <marc@tensilica.com>,
Maxim Grigoriev <maxim@tensilica.com>
Subject: Re: Which MI behavior is correct ?
Date: Sat, 19 May 2007 01:58:00 -0000 [thread overview]
Message-ID: <464E59A5.2010208@hq.tensilica.com> (raw)
In-Reply-To: <464E4C4D.9010709@hq.tensilica.com>
[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]
The test case wasn't included:
Now, it is.
-- Maxim
Maxim Grigoriev wrote:
> Hello GDB experts,
>
> I wonder if somebody can help me to understand which
> GDB MI behavior is supposed to be correct.
>
> I've included the test case, the MI commands used, and
> the outputs from two debuggers: the native FC5 Linux-X86
>
> GNU gdb Red Hat Linux (6.3.0.0-1.134.fc5rh)
>
> and ours
>
> GNU gdb 6.5 Xtensa Tools 7.1.0-development
>
> Our GNU gdb 6.5 is consistent with the top of the FSF tree.
>
>
> PROBLEM DESCRIPTION:
> ====================
>
> When we hit the breakpoint inside f11() second time:
>
> In case of 6.3 we have :
>
> 228^done,changelist=[{name="var3",in_scope="true",type_changed="false"}]
> (gdb)
> 229^done,changelist=[{name="var4",in_scope="true",type_changed="false"}]
> (gdb)
> 230^done,value="3"
> (gdb)
> 231^done,value="2"
> (gdb)
>
> In in case of 6.5+ we have :
>
> 228^done,changelist=[{name="var3",in_scope="false"}]
> (gdb)
> 229^done,changelist=[{name="var4",in_scope="false"}]
> (gdb)
> 230^done,value="2"
> (gdb)
> 231^done,value="1"
> (gdb)
>
> So "var3" and "var4" are out of scope.
>
> Our GUI front-end relies on the 6.3-like behavior, which is consistent
> with
> what we had in our previous releases based on GNU gdb 5.2.1.
>
> QUESTIONS
> =========
>
> 1) Is 6.5(+)-style behavior incorrect ?
>
> If it is correct:
>
> - Are we supposed to recreate variables each time we enter the
> function ?
> - Is this efficient ?
>
> 2) Where can I find a good documentation describing these aspects of
> GDB MI ?
> All docs I found on the Internet weren't quite helpful.
>
> Thanks in advance for any of your help.
>
> -- Maxim
>
>
>
>
>
>
[-- Attachment #2: create_var.cxx --]
[-- Type: text/x-c++src, Size: 245 bytes --]
#include <stdio.h>
int f11(int b)
{
int a;
a = b + 1;
return a;
}
int f1(int a)
{
int b;
b = f11(a) + 1;
return b;
}
int main()
{
int a=1;
int b;
a = f11(a);
a = f11(a);
b = f1(a);
printf("a,b: %d,%d\n", a, b);
return 0;
}
next prev parent reply other threads:[~2007-05-19 1:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-19 1:01 Maxim Grigoriev
2007-05-19 1:58 ` Maxim Grigoriev [this message]
2007-05-19 2:20 ` Nick Roberts
2007-05-19 3:03 ` Daniel Jacobowitz
2007-05-19 3:27 ` Nick Roberts
2007-05-19 19:36 ` Maxim Grigoriev
2007-05-19 23:08 ` Nick Roberts
2007-05-21 3:43 ` Maxim Grigoriev
2007-05-25 20:51 ` Jim Blandy
2007-05-25 21:48 ` Maxim Grigoriev
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=464E59A5.2010208@hq.tensilica.com \
--to=maxim@tensilica.com \
--cc=gdb@sourceware.org \
--cc=marc@tensilica.com \
--cc=pmac@tensilica.com \
--cc=shaijup@tensilica.com \
--cc=vinayp@tensilica.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