This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: fix pretty-printing in "bt full"
> 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