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.)
> 
Frist - thanks for the clarification - it would have taken me quite some time
to figure that out.
Second - the file is on the web at: http://dslab.lzu.edu.cn/hello.readelf

If I write up thos functions (no idea yet how hard that will be and if I can
actually do it), what would be the procedure to get these changes into GDB ?
The tracepoint implementation I should do is intended for release under GPL
so I would like to get it clean from the start.

thx !
hofrat


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