[PATCHv2] gdb/x86: handle stap probe arguments in xmm registers

Pedro Alves pedro@palves.net
Thu Mar 17 15:54:48 GMT 2022


On 2022-03-16 17:23, Tom Tromey wrote:
> Andrew> This is because GDB doesn't currently support placing non-scalar types
> Andrew> on the agent expression evaluation stack.  Solving this is clearly
> Andrew> related to the original problem, but feels a bit like a second
> Andrew> problem.  I'd like to get feedback on whether my approach to solving
> Andrew> the original problem is acceptable or not before I start looking at
> Andrew> how to handle xmm registers within agent expressions.
> 
> Note that there are many things that can't be represented in agent
> expressions.  I recall filing a bug report about this -- there are some
> DWARF expressions that can't be translated, and IIRC, floating point
> isn't handled at all.  So, I wouldn't worry too much about this.  My
> sense is that tracepoints aren't used a whole lot.

Yeah.  They were definitely being used in production a few years back when we were
revamping them, adding support to gdbserver, etc.  But it seems like users stopped using
them since.  It's possible that the fact that more and more DWARF expressions
can't be converted carries some weight.  Or users simply started using other
tools for the job.

In any case, if I were to tackle the whole problem set today, instead of extending agent 
expressions bytecode to be able to do more of what DWARF can do, I'd be looking at expressing
what should be collected via DWARF expressions/locations.  I mean, send DWARF expressions
to the target side to be evaluated.


More information about the Gdb-patches mailing list