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: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Tue, 12 Apr 2011 14:39:51 -0600
- Subject: Re: [PATCH 3/6] Modify internalvar mechanism
- References: <m3lizqpvbh.fsf@redhat.com> <201104121224.31901.pedro@codesourcery.com>
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
>> 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.
Pedro> Can you explain this? Why would you want to compile an internal
Pedro> var to AX, for example?
A programmer can pass arguments to a SystemTap probe. In GDB these are
represented as convenience variables. We also wanted to be able to
collect these probe arguments from tracepoints set at probe points.
Rather than write custom code to recognize the variables by name, I
thought it would be better to provide a general way to define variables
which can be compiled to AX.
Pedro> It would be imensely helpful if patches came with a high
Pedro> level explanation of why they are necessary in the first
Pedro> place. :-/
Sorry about that.
Tom