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: [RFA/RFC] Support DW_OP_breg for tracepoints


On 11/13/05, Daniel Jacobowitz <drow@false.org> wrote:
> > >This code should go in ax-gdb.[ch].  That has a translator from GDB
> > >expressions to agent expressions; it would make sense to also have a
> > >translator from Dwarf expressions to agent expressions.
>
> Why is it any more logical to have dwarf code in ax-gdb.c than to have
> agent code in dwarf2loc.c?  In any case, it is a method of the symbol.
> Please see struct symbol_ops.

Yes, I'm not suggesting that we move locexpr_tracepoint_var_ref or
loclist_tracepoint_var_ref.

ax-general.c and ax.h are supposed to be very GDB-independent, and
depend only on the definition of the agent expression bytecode
language for their correctness.  Everyplace else in GDB is supposed to
be as ignorant as possible of the details of agent expressions. 
ax-gdb.c is supposed to be the meeting place where we handle the GDB
expression / agent expression relationship.

dwarf2_tracepoint_var_ref is a similar situation: it is where Dwarf
expressions and agent expressions meet.  Other Dwarf code should stay
independent of the details of agent expressions, and other agent code
should stay independent of Dwarf.  So maybe there should be a file
parallel to ax-gdb.c called ax-dwarf.c; but that seems like overkill. 
My thought was to make ax-gdb.c the overall rendezvous where we get
down and dirty about the correspondence between agent expression
semantics and other little languages' semantics.


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