This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[Obvious] ARI fix: Do not use "%p"
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Tue, 6 Oct 2009 17:33:07 +0200
- Subject: [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;
}