Re: New ARI warning Wed Oct 2 01:56:22 UTC 2019

Tom Tromey
2019-10-02T16:15:33Z

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

>>> gdb/valprint.c:2077: 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/valprint.c:2077: fprintf_filtered (stream, " %p[<repeats %u times>%p]",
>>

Simon> Hmm, I think we can get rid of that %p rule (or improve it),
Simon> otherwise we will have a lot of noise.

How's this?

Tom

commit ce98317860cdcdb19426ddee3509ccceea79c7b1
Author: Tom Tromey <tromey@adacore.com>
Date: Wed Oct 2 10:13:33 2019 -0600

Let ARI allow gdb %p printf extensions

As pointed out by Simon, this changes ARI to allow the gdb-specific %p
printf extensions.

gdb/ChangeLog
2019-10-02 Tom Tromey <tromey@adacore.com>

* contrib/ari/gdb_ari.sh (%p): Allow gdb-specific %p extensions.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cb450e28730..e79612696e6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2019-10-02 Tom Tromey <tromey@adacore.com>
+
+ * contrib/ari/gdb_ari.sh (%p): Allow gdb-specific %p extensions.
+
2019-10-02 Tom Tromey <tromey@adacore.com>

* NEWS: Add $_ada_exception entry.
diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh
index 4bd434c8fec..1556756a12c 100755
--- a/gdb/contrib/ari/gdb_ari.sh
+++ b/gdb/contrib/ari/gdb_ari.sh
@@ -353,7 +353,7 @@ Do not use printf(\"%p\"), instead use printf(\"%s\",paddr()) to dump a \
target address, or host_address_to_string() for a host address"
category["%p"] = ari_code
}
-/%p/ && !/%prec/ {
+/%p[^][sF]/ && !/%prec/ {
fail("%p")
}