This is the mail archive of the gdb@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: tracepoint implementation question


Actually, I think the problem you're running into is that the
debugging information in your executable is using Dwarf location
expressions to describe where the variables live, and the tracepoint
code isn't using the supplied functions to translate between Dwarf
location expressions and tracepoint bytecodes.

"Symbol class 21" is LOC_COMPUTED_ARG; the tracepoint code ought to be
calling the 'tracepoint_var_ref' function in the symbol's 'struct
symbol_ops' structure.  Probably we need a new function
gen_trace_for_symbol in ax-gdb.c, analogous to gen_trace_for_expr. 
Depending on the exact expression at hand, dwarf2_tracepoint_var_ref
may need to be expanded.

You're right, to some extent this indicates a lack of active
maintenance.  When the tracepoint code was written, few variables used
Dwarf expressions; now it is much more common.

Could you post the result of running 'readelf -wi' on your test
program (the one with 'someint' in it)?  (If the output is very large,
put it on the web and post a link.)


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