[review] gdb: Support printf 'z' size modifier

Pedro Alves (Code Review)
2019-11-06T00:18:23Z

Pedro Alves has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/511
......................................................................

Patch Set 1:

(1 comment)

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/511/1//COMMIT_MSG
Commit Message:

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/511/1//COMMIT_MSG@11
PS1, Line 11:
6 |
7 | gdb: Support printf 'z' size modifier
8 |
9 | The gdb format mechanism doesn't currently support the 'z' size
10 | modifier, there are a few places in GDB where this is used. Instead
11 > of removing these uses lets just add support to GDB for using 'z'.
12 |
13 | I've not added a test for this as I ran into the issue when trying to
14 | use some debug output. Before this commit:
15 |
16 | (gdb) set debug dwarf-line 9

Just FYI, we didn't use to allow 'z' since it is a C99 feature (and thus C++11), and older compilers didn't support it, namely the MSVC runtime used by mingw.org. I think that is passed us nowadays, and I think mingw nowadays has replacement printf that support C99 features. And if it doesn't likely gnulib is taking care of it.

--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Ib6c44d88aa5bce265d757e4c0698881803dd186f
Gerrit-Change-Number: 511
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-CC: Pedro Alves <palves@redhat.com>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-CC: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Wed, 06 Nov 2019 00:18:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment