Message ID | 87k19nt51q.fsf@tromey.com |
---|---|
State | New |
Headers | show |
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:
Simon> Well, as long as the regex does what it is meant to do, I am fine with it.
Simon> I just thought that it would be nice to have a small comment that explains
Simon> what it does, prevent using %p to print raw pointers, but allow the gdb
Simon> extensions.
Tom> I went ahead and made both changes.
I'm checking this in now.
Tom
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..7202563f7a3 100755 --- a/gdb/contrib/ari/gdb_ari.sh +++ b/gdb/contrib/ari/gdb_ari.sh @@ -353,7 +353,8 @@ 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/ { +# Allow gdb %p extensions, but not other uses of %p. +/%p[^[\]sF]/ && !/%prec/ { fail("%p") }