This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/6] Modify internalvar mechanism


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]