diff options
author | Joel Brobecker <brobecker@adacore.com> | 2016-11-19 10:40:17 -0800 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2016-11-19 10:40:17 -0800 |
commit | cc188e5fd6d4f8d3061ed6c58c432a150f7966e9 (patch) | |
tree | 0d369c48e85f9f7871a8200f6d846e89cf303bdd /gdb/contrib | |
parent | 0fc9967d0b28a1e037233d49cec479d3ab1e9e59 (diff) | |
download | gdb-cc188e5fd6d4f8d3061ed6c58c432a150f7966e9.zip gdb-cc188e5fd6d4f8d3061ed6c58c432a150f7966e9.tar.gz gdb-cc188e5fd6d4f8d3061ed6c58c432a150f7966e9.tar.bz2 |
ARI: Add detection of printf_vma and sprintf_vma
We shouldn't be using these, since their output goes straight to
stdout, which doesn't allow redirection. So this patch updates
the ARI to detect any such use.
gdb/ChangeLog:
* contrib/ari/gdb_ari.sh: Add detection of printf_vma and
sprintf_vma.
Diffstat (limited to 'gdb/contrib')
-rwxr-xr-x | gdb/contrib/ari/gdb_ari.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh index 7e639e3..2ecc0d6 100755 --- a/gdb/contrib/ari/gdb_ari.sh +++ b/gdb/contrib/ari/gdb_ari.sh @@ -1097,6 +1097,22 @@ Do not use vasprintf(), instead use xstrvprintf" fail("vasprintf") } +BEGIN { doc["printf_vma"] = "\ +Do not use printf_vma, instead use paddress or phex_nz" + category["printf_vma"] = ari_code +} +/(^|[^_[:alnum:]])printf_vma[[:space:]]*\(/ { + fail("printf_vma") +} + +BEGIN { doc["sprintf_vma"] = "\ +Do not use sprintf_vma, instead use paddress or phex_nz" + category["sprintf_vma"] = ari_code +} +/(^|[^_[:alnum:]])sprintf_vma[[:space:]]*\(/ { + fail("sprintf_vma") +} + # More generic memory operations BEGIN { doc["bzero"] = "\ |