[PATCH 3/6] Modify internalvar mechanism

Tom Tromey tromey@redhat.com
Tue Apr 12 20:40:00 GMT 2011


>>>>> "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



More information about the Gdb-patches mailing list