This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Extend handling of immediates on ARM's SystemTap SDT probe support
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Yufeng Zhang <Yufeng dot Zhang at arm dot com>
- Date: Sat, 28 Dec 2013 19:25:23 -0200
- Subject: Re: [PATCH] Extend handling of immediates on ARM's SystemTap SDT probe support
- Authentication-results: sourceware.org; auth=none
- References: <m3wqivic2t dot fsf at redhat dot com> <20131228034121 dot GF4532 at adacore dot com>
On Saturday, December 28 2013, Joel Brobecker wrote:
>> diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
>> index 0284f69..df2b8c4 100644
>> --- a/gdb/arm-linux-tdep.c
>> +++ b/gdb/arm-linux-tdep.c
>> @@ -1116,7 +1116,7 @@ arm_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
>> static int
>> arm_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
>> {
>> - return (*s == '#' /* Literal number. */
>> + return (*s == '#' || *s == '$' || isdigit (*s) /* Literal number. */
>> || *s == '[' /* Register indirection or
>> displacement. */
>> || isalpha (*s)); /* Register value. */
>> @@ -1183,14 +1183,19 @@ arm_stap_parse_special_token (struct gdbarch *gdbarch,
>>
>> ++tmp;
>> tmp = skip_spaces_const (tmp);
>> - if (*tmp++ != '#')
>> - return 0;
>> + if (*tmp == '#' || *tmp == '$')
>> + ++tmp;
>>
>> if (*tmp == '-')
>> {
>> ++tmp;
>> got_minus = 1;
>> }
>> + else if (*tmp == '+')
>> + ++tmp;
>> +
>> + if (!isdigit (*tmp))
>> + return 0;
>>
>
> I think you mixed in one change which is unrelated to this patch
> (the handling of the '+' sign). Perhaps you had meant to have it
> as part of the first patch?
>
> [PATCH v2] Fix for PR tdep/15653: Implement SystemTap SDT probe
> support for AArch64
> http://www.sourceware.org/ml/gdb-patches/2013-12/msg00887.html
>
> IIRC, this patch was born by extraction out of v1 of the patch above.
>
> If I am correct, this patch is pre-approved with the '+' bit moved to
> the correct patch.
You are indeed correct that this change doesn't belong to this patch,
but it also doesn't belong to the AArch64 patch (that's why I didn't
include it there). I will actually post a separate patch for this
change. In fact, there are some other places that could use this
improvement too, so this new patch will include those as well.
Having said that, I removed this piece from the patch and committed the
rest. Thank you a lot for the review!
<https://sourceware.org/ml/gdb-cvs/2013-12/msg00124.html>
--
Sergio