Re: [PATCH 2/2] Extend recognized types of SDT probe's arguments

Pedro Alves
2014-05-02T09:49:21Z

On 05/01/2014 10:52 PM, Sergio Durigan Junior wrote:
> This commit is actually an update to make the parser in
> gdb/stap-probe.c be aware of all the possible prefixes that a probe
> argument can have. According to the section "Argument Format" in:
>
> <https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation>
>
> The bitness of the arguments can be 8, 16, 32 or 64 bits, signed or
> unsigned. Currently GDB recognizes only 32 and 64-bit arguments.

Looks good.

> This commit extends this. Since this is a straightforward extension,
> I am not submitting a testcase; I can do that if anybody wants.

I think it'd be good to have a test -- the code that triggered the other
bug was also supposedly straightforward. :-) Can we do this in C ?
Ideally we'd also test that we don't crash with an invalid bitness
(the complaint path).

>
> gdb/
> 2014-05-01 Sergio Durigan Junior <sergiodj@redhat.com>
>
> stap-probe.c (enum stap_arg_bitness): New enums to represent 8

Missing '*'-

> and 16-bit signed and unsigned arguments.
> (stap_parse_probe_arguments): Extend code to handle such
> arguments.

--
Pedro Alves