Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: fix pretty-printing in "bt full"
Date: Mon, 22 Dec 2008 20:52:00 -0000	[thread overview]
Message-ID: <20081222205157.GA15887@adacore.com> (raw)
In-Reply-To: <m34p0wb8fa.fsf@fleche.redhat.com>

> Also, this may introduce a behavior change in print_frame_arg_vars.  I
> haven't tried to test this, but the old code printed the variable name
> before looking up the second symbol; it seems to me that the new code
> could fail while looking up the second symbol and then not print
> anything.

I don't think that this would be a problem in practice. I don't think
it should error out. See lookup_block_symbol:

      /* Note that parameter symbols do not always show up last in the
         list; this loop makes sure to take anything else other than
         parameter symbols first; it only uses parameter symbols as a
         last resort.  Note that this only takes up extra computation
         time on a match.  */

So, even if there is no local symbol for our parameter symbol,
lookup_symbol should still return the parameter one as a fallback.
But even if the call to lookup_symbol did error-out, not having
the name of the parameter under those unusual circumstance shouldn't
be too bad, given that the output will be broken by the error message.

> 2008-12-22  Tom Tromey  <tromey@redhat.com>
> 
> 	* stack.c (print_block_frame_locals): Print spaces, not tabs.
> 	Update for call to print_variable_and_value.
> 	(print_frame_arg_vars): Update.
> 	* value.h (print_variable_and_value): Rename from
> 	print_variable_value.  Add 'name' and 'indent' parameters.
> 	* printcmd.c (print_variable_and_value): Rename from
> 	print_variable_value.  Add 'name' and 'indent' parameters.  Use
> 	common_val_print.
> 	* f-valprint.c (info_common_command): Update.

OK.

-- 
Joel


  reply	other threads:[~2008-12-22 20:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 20:30 Tom Tromey
2008-12-22  5:01 ` Joel Brobecker
2008-12-22 14:18   ` Tom Tromey
2008-12-22 20:52     ` Joel Brobecker [this message]
2008-12-22 23:17       ` Tom Tromey

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=20081222205157.GA15887@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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