* RFA: mi: correct loop printing args or locals
@ 2002-02-03 17:54 Jim Blandy
2002-02-03 18:06 ` Andrew Cagney
0 siblings, 1 reply; 2+ messages in thread
From: Jim Blandy @ 2002-02-03 17:54 UTC (permalink / raw)
To: gdb-patches
Without this patch, on platforms using STABS, MI's
-stack-list-arguments command describes frames for `callee1' in
`gdb/testsuite/gdb.mi/basics.c' like this:
frame={level="3",args=[name="intarg",name="strarg",name="fltarg",name="fltarg"]}
Note that `fltarg' appears twice. This is because there is both a
PSYM (parameter symbol) stab and an LSYM (local symbol) stab for
`fltarg', which I'm pretty sure is the standard (and correct) STABS
way to describe such functions. Anyway, the loop is clearly incorrect
for blocks that contain a mix of arguments and non-arguments.
2002-02-03 Jim Blandy <jimb@redhat.com>
* mi-cmd-stack.c (list_args_or_locals): Move declaration of
print_me inside the loop body, so it gets re-initialized every
iteration. The cases for the different symbol kinds leave
print_me unchanged if they don't want the symbol printed.
Index: gdb/mi/mi-cmd-stack.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/mi/mi-cmd-stack.c,v
retrieving revision 1.11
diff -c -r1.11 mi-cmd-stack.c
*** gdb/mi/mi-cmd-stack.c 2001/10/15 22:15:56 1.11
--- gdb/mi/mi-cmd-stack.c 2002/02/04 01:43:35
***************
*** 216,222 ****
struct block *block;
struct symbol *sym;
int i, nsyms;
- int print_me = 0;
static struct ui_stream *stb = NULL;
stb = ui_out_stream_new (uiout);
--- 216,221 ----
***************
*** 229,234 ****
--- 228,235 ----
{
ALL_BLOCK_SYMBOLS (block, i, sym)
{
+ int print_me = 0;
+
switch (SYMBOL_CLASS (sym))
{
default:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFA: mi: correct loop printing args or locals
2002-02-03 17:54 RFA: mi: correct loop printing args or locals Jim Blandy
@ 2002-02-03 18:06 ` Andrew Cagney
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2002-02-03 18:06 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb-patches
> frame={level="3",args=[name="intarg",name="strarg",name="fltarg",name="fltarg"]}
> Note that `fltarg' appears twice. This is because there is both a
> PSYM (parameter symbol) stab and an LSYM (local symbol) stab for
> `fltarg', which I'm pretty sure is the standard (and correct) STABS
> way to describe such functions.
I don't know about correct. However it is standard. Think of the
number of times you've received a debug-info sorting patch that
accidently re-ordered the stab info :-)
> Anyway, the loop is clearly incorrect
> for blocks that contain a mix of arguments and non-arguments.
Yes, fine. I take it you're having fun with the MI testsuite.
Feel free to just commit fixes to the other bugs you find.
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-02-04 2:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-03 17:54 RFA: mi: correct loop printing args or locals Jim Blandy
2002-02-03 18:06 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox