From: Jim Blandy <jimb@zwingli.cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: mi: correct loop printing args or locals
Date: Sun, 03 Feb 2002 17:54:00 -0000 [thread overview]
Message-ID: <20020204015611.3804E5E9DE@zwingli.cygnus.com> (raw)
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:
next reply other threads:[~2002-02-04 1:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-03 17:54 Jim Blandy [this message]
2002-02-03 18:06 ` Andrew Cagney
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=20020204015611.3804E5E9DE@zwingli.cygnus.com \
--to=jimb@zwingli.cygnus.com \
--cc=gdb-patches@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