This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/6] Modify internalvar mechanism
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Tom Tromey <tromey at redhat dot com>
- Date: Tue, 12 Apr 2011 19:33:05 -0300
- Subject: Re: [PATCH 3/6] Modify internalvar mechanism
- References: <m3lizqpvbh.fsf@redhat.com> <201104121224.31901.pedro@codesourcery.com>
Pedro Alves <pedro@codesourcery.com> writes:
> On Monday 04 April 2011 04:08:34, Sergio Durigan Junior wrote:
>> Hi,
>>
>> This patch modifies the mechanism of internalvar. It basically adds
>> more manipulation functions to them (`compile_to_ax' and `destroy'), and
>> updates the definitions and pointers of existing internalvars.
>
> Can you explain this? Why would you want to compile an internal var
> to AX, for example?
A SystemTap probe can have up to 10 arguments. In our original plan,
the idea is that the user should be able to collect those arguments
using the tracepoint mechanism. Since we already have the necessary
code to evaluate an argument (which is treated as an internal varibale
inside GDB), we thought it would be easier to extend this code in order
to compile it to AX.
You could do something like:
(gdb) trace probe:test
..
(gdb) actions
..
> collect $_probe_arg0
> end
..
In order to collect the probe's first argument, and so on.
> It would be imensely helpful if patches came with a high
> level explanation of why they are necessary in the first
> place. :-/
My fault, sorry.
Regards,
Sergio.