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]

[Obvious] ARI fix: Do not use "%p"


  "%p" use resurrected, while it should not be used.
"%p" should be replaced by "%s" and paddress ()
for a target address, or host_address_to_string ()
for a host address as is the case here.

Pierre Muller
acting as ARI maintainer...


ChangeLog entry

2009-10-06  Pierre Muller  <muller@ics.u-strasbg.fr>

	* ARI fix: "%p" rule.
	target.c (debug_to_thread_architecture): Replace %p by %s using
	host_address_to_string function.


Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.226
diff -u -p -r1.226 target.c
--- target.c	15 Sep 2009 16:16:40 -0000	1.226
+++ target.c	6 Oct 2009 15:27:43 -0000
@@ -3367,8 +3367,8 @@ debug_to_thread_architecture (struct tar
 
   retval = debug_target.to_thread_architecture (ops, ptid);
 
-  fprintf_unfiltered (gdb_stdlog, "target_thread_architecture (%s) = %p
[%s]\n",
-		      target_pid_to_str (ptid), retval,
+  fprintf_unfiltered (gdb_stdlog, "target_thread_architecture (%s) = %s
[%s]\n",
+		      target_pid_to_str (ptid), host_address_to_string
(retval),
 		      gdbarch_bfd_arch_info (retval)->printable_name);
   return retval;
 }


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