* [PATCH] Avoid using the ISO C99 `z' formatted output modifier
@ 2014-03-19 18:47 Maciej W. Rozycki
2014-03-20 12:24 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2014-03-19 18:47 UTC (permalink / raw)
To: gdb-patches
Hi,
This fixes a call in mi_memory_changed that makes use of the ISO C99 `z'
formatted output modifier. We still require ISO C90 conformance. This
update removes a failure on the i686-mingw32 host (tested with the
powerpc-eabi target):
(gdb)
PASS: gdb.mi/mi-memory-changed.exp: continue to callee4
Expecting: ^(set var C = 4[
]+)?(.*=memory-changed,thread-group="i[0-9]+".addr="0x[0-9A-Fa-f]+",len="0x[0-9A-Fa-f]+".*\^done[
]+[(]gdb[)]
[ ]*)
set var C = 4
&"set var C = 4\n"
=memory-changed,thread-group="i1",addr="0x17ffff28",len="0xzx"
^done
(gdb)
FAIL: gdb.mi/mi-memory-changed.exp: set var C = 4
With the change applied the log is as follows:
(gdb)
PASS: gdb.mi/mi-memory-changed.exp: continue to callee4
Expecting: ^(set var C = 4[
]+)?(.*=memory-changed,thread-group="i[0-9]+".addr="0x[0-9A-Fa-f]+",len="0x[0-9A-Fa-f]+".*\^done[
]+[(]gdb[)]
[ ]*)
set var C = 4
&"set var C = 4\n"
=memory-changed,thread-group="i1",addr="0x17ffff28",len="0x4"
^done
(gdb)
PASS: gdb.mi/mi-memory-changed.exp: set var C = 4
No change in output on the i686-linux-gnu host. OK to apply?
2014-03-19 Maciej W. Rozycki <macro@codesourcery.com>
gdb/
* mi/mi-interp.c (mi_memory_changed): Avoid using the ISO C99
`z' formatted output modifier.
Maciej
gdb-mi-interp-size-t-printf.diff
Index: gdb-fsf-trunk-quilt/gdb/mi/mi-interp.c
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/mi/mi-interp.c 2014-01-14 22:02:56.000000000 +0000
+++ gdb-fsf-trunk-quilt/gdb/mi/mi-interp.c 2014-03-19 13:25:57.018399978 +0000
@@ -854,7 +854,7 @@ mi_memory_changed (struct inferior *infe
ui_out_field_fmt (mi_uiout, "thread-group", "i%d", inferior->num);
ui_out_field_core_addr (mi_uiout, "addr", target_gdbarch (), memaddr);
- ui_out_field_fmt (mi_uiout, "len", "0x%zx", len);
+ ui_out_field_fmt (mi_uiout, "len", "%s", hex_string (len));
/* Append 'type=code' into notification if MEMADDR falls in the range of
sections contain code. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Avoid using the ISO C99 `z' formatted output modifier
2014-03-19 18:47 [PATCH] Avoid using the ISO C99 `z' formatted output modifier Maciej W. Rozycki
@ 2014-03-20 12:24 ` Joel Brobecker
2014-03-20 21:45 ` Maciej W. Rozycki
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2014-03-20 12:24 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: gdb-patches
Hi Maciej,
> 2014-03-19 Maciej W. Rozycki <macro@codesourcery.com>
>
> gdb/
> * mi/mi-interp.c (mi_memory_changed): Avoid using the ISO C99
> `z' formatted output modifier.
LGTM - go ahead and commit.
Thank you,
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Avoid using the ISO C99 `z' formatted output modifier
2014-03-20 12:24 ` Joel Brobecker
@ 2014-03-20 21:45 ` Maciej W. Rozycki
0 siblings, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2014-03-20 21:45 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On Thu, 20 Mar 2014, Joel Brobecker wrote:
> > * mi/mi-interp.c (mi_memory_changed): Avoid using the ISO C99
> > `z' formatted output modifier.
>
> LGTM - go ahead and commit.
Thanks, applied.
Maciej
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-20 21:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-19 18:47 [PATCH] Avoid using the ISO C99 `z' formatted output modifier Maciej W. Rozycki
2014-03-20 12:24 ` Joel Brobecker
2014-03-20 21:45 ` Maciej W. Rozycki
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).