This is the mail archive of the gdb@sources.redhat.com 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: Upcoming DWARF 3 and FORTRAN95 patches for 5.1.1 or 5.2?



Daniel Berlin <dan@dberlin.org> writes:
> >       /* Write to STREAM a natural-language description of the location of
> >          the object described by BATON.  */
> >       int (*describe_location) (void *baton, struct ui_file *stream);
> 
> I assume natural language is a codeword for "meant for user only, don't 
> try to parse it"?

Well, that function is just there for the `info address' command:

    (gdb) info addr argc
    Symbol "argc" is an argument at offset 8.
    (gdb) 

So its job is to be comprehensible to the user, and accurate enough to
be useful to people hacking on GDB; it doesn't have many technical
constraints on what it says.


> >       /* Tracepoint support.
> >          Append bytecodes to the tracepoint agent expression AX that push
> >          the address of the object described by BATON.  Set VALUE
> >          appropriately.  Note --- for objects in registers, this needn't
> >          emit any code; as long as it sets VALUE properly, then the caller
> >          will generate the right code in the process of treating this as
> >          an lvalue or rvalue.  */
> 
> Is this always possible without a current address?
> IE can the agent bytecode support the fact that for location lists, we 
> need to know where we are before we can tell you where the variable is.
> One could encode this as a bunch of if's and comparisons if the agent 
> bytecode supports them, i guess.

Oh, you're right --- yes, you need a sal in order to decide what
bytecode to emit.  A tracepoint's bytecode gets run when we hit a
tracepoint, so GDB can generate bytecode specific to that PC.

> >       void (*tracepoint_var_ref) (void *baton,
> >                                   struct agent_expr *ax,
> >                                   struct axs_value *value);

So that should be:

      /* Tracepoint support.
         Append bytecodes to the tracepoint agent expression AX that
         push the address of the object described by BATON, at the
         point in the code given by tracepoint_pos.  Set VALUE
         appropriately.  Note --- for objects in registers, this
         needn't emit any code; as long as it sets VALUE properly,
         then the caller will generate the right code in the process
         of treating this as an lvalue or rvalue.  */
       void (*tracepoint_var_ref) (void *baton,
                                   struct symtabs_and_lines *tracepoint_pos,
                                   struct agent_expr *ax,
                                   struct axs_value *value);


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