This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] [patch] 'info symbol' to print more info


Paul Pluzhnikov <ppluzhnikov@google.com> writes:

> Index: maint.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/maint.c,v
> retrieving revision 1.68
> diff -u -p -u -r1.68 maint.c
> --- maint.c	30 Oct 2008 20:35:30 -0000	1.68
> +++ maint.c	15 Nov 2008 15:01:17 -0000
> @@ -484,9 +484,19 @@ maintenance_translate_address (char *arg
>      sym = lookup_minimal_symbol_by_pc (address);
>  
>    if (sym)
> -    printf_filtered ("%s+%s\n",
> -		     SYMBOL_PRINT_NAME (sym),
> -		     pulongest (address - SYMBOL_VALUE_ADDRESS (sym)));
> +    {
> +      printf_filtered ("%s + %s",
> +		       SYMBOL_PRINT_NAME (sym),
> +		       pulongest (address - SYMBOL_VALUE_ADDRESS (sym)));
> +      if ((sect = SYMBOL_OBJ_SECTION(sym)))

Please move the assignment out of the condition.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]