* New ARI warning Thu Sep 22 01:56:01 UTC 2016
@ 2016-09-22 9:05 GDB Administrator
2016-09-22 11:12 ` [PATCH] arc: Fix ARI warning for printf(%p) Anton Kolesov
0 siblings, 1 reply; 3+ messages in thread
From: GDB Administrator @ 2016-09-22 9:05 UTC (permalink / raw)
To: gdb-patches
24a25
> gdb/arc-tdep.c:577: code: %p: Do not use printf(%p), instead use printf(%s,paddr()) to dump a target address, or host_address_to_string() for a host address
gdb/arc-tdep.c:577: debug_printf ("arc: return_value (readbuf = %p, writebuf = %p)\n",
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] arc: Fix ARI warning for printf(%p)
2016-09-22 9:05 New ARI warning Thu Sep 22 01:56:01 UTC 2016 GDB Administrator
@ 2016-09-22 11:12 ` Anton Kolesov
2016-09-22 11:20 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Anton Kolesov @ 2016-09-22 11:12 UTC (permalink / raw)
To: gdb-patches; +Cc: Anton Kolesov, Francois Bedard
This particular warning is printed only when option -Wari is passed to
contrib/ari/gdb_ari.sh , so it slipped under my radar.
Ok to commit?
--
Replace printf ("%p") with printf ("%s", host_address_to_string ()). Printing
host address might make sense here because printed pointers can be null and
this would affect how arc_return_value behaves.
---
gdb/arc-tdep.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index 6048ad6..7bb93ad 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -574,8 +574,9 @@ arc_return_value (struct gdbarch *gdbarch, struct value *function,
|| TYPE_LENGTH (valtype) > 2 * ARC_REGISTER_SIZE);
if (arc_debug)
- debug_printf ("arc: return_value (readbuf = %p, writebuf = %p)\n",
- readbuf, writebuf);
+ debug_printf ("arc: return_value (readbuf = %s, writebuf = %s)\n",
+ host_address_to_string (readbuf),
+ host_address_to_string (writebuf));
if (writebuf != NULL)
{
--
2.8.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arc: Fix ARI warning for printf(%p)
2016-09-22 11:12 ` [PATCH] arc: Fix ARI warning for printf(%p) Anton Kolesov
@ 2016-09-22 11:20 ` Pedro Alves
0 siblings, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2016-09-22 11:20 UTC (permalink / raw)
To: Anton Kolesov, gdb-patches; +Cc: Francois Bedard
On 09/22/2016 11:40 AM, Anton Kolesov wrote:
> This particular warning is printed only when option -Wari is passed to
> contrib/ari/gdb_ari.sh , so it slipped under my radar.
>
> Ok to commit?
OK. Thanks for the quick fix.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-22 11:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 9:05 New ARI warning Thu Sep 22 01:56:01 UTC 2016 GDB Administrator
2016-09-22 11:12 ` [PATCH] arc: Fix ARI warning for printf(%p) Anton Kolesov
2016-09-22 11:20 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).