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: [patch]: Get rid of deprecated_print_address_numeric


Markus Deuling wrote:

> 	* annotate.c (annotate_source, annotate_frame_begin): Replace
> 	deprecated_print_address_numeric with paddress.
> 	* cli/cli-cmds.c (list_command, edit_command): Likewise.
> 	* tui/tui-stack.c (tui_make_status_line): Likewise.
> 
> 	* defs.h (deprecated_print_address_numeric): Remove.
> 	* printcmd.c (deprecated_print_address_numeric): Remove.
> 	* maint.c (maint_print_section_info): Fix comment.

In general, I like the idea, but I was wondering about one thing:

> @@ -418,10 +418,9 @@ annotate_source (char *filename, int lin
>    else
>      printf_filtered (("\032\032"));
>  
> -  printf_filtered (("%s:%d:%d:%s:0x"), filename,
> -		   line, character,
> +  printf_filtered (("%s:%d:%d:%s:"), filename, line, character,
>  		   mid ? "middle" : "beg");
> -  deprecated_print_address_numeric (pc, 0, gdb_stdout);
> +  fputs_filtered (paddress (pc), gdb_stdout);
>    printf_filtered (("\n"));


Hmm, I guess one of the benefits of paddress is that you no longer
need to break out a single (logical) message into multiple pieces.

Something like

  printf_filtered (("%s:%d:%d:%s:%s\n"), filename, line, character,
  		   mid ? "middle" : "beg", paddress (pc));

instead of the lines above would be better.

(Even if that doesn't really matter in this particular case, in
general it is also better to use complete phrases as strings for
translation.)


Would you mind changing the patch accordingly?

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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