Re: [PATCH 3/4] Enable tracing of pseudo-registers on ARM

Yao Qi
2016-02-15T10:27:37Z

Marcin Kościelnicki <koriakin@0x04.net> writes:

> I'd like to point out that this testcase is near-useless for testing
> ax_pseudo_register_collect or pseudo_register_to_register at the
> moment - while gdb computes a mask of what registers need to be
> collected, gdbserver just ignores it and collects all registers if any
> register at all is to be collected. In turn, gdb allows you to
> display the state of all registers, even ones not included in the
> mask. In fact, the tfile-avx.exp test passes just fine if you change
> it to collect any unrelated register. My commit with
> ax_pseudo_register_collect only made it work because gdb needs to have
> that function return success, the actual returned mask could just as
> well be wrong...

The usefulness I can think of is that GDB can check whether the pseudo
register exists to collect. User may want to collect Q registers, but
they don't exist on the target.

>
> The other hook, pseudo_register_push_stack, is much easier to test -
> it's invoked when a pseudo is used in an actual agent expression,
> eg. if you use it in a tracepoint condition, or as part of the address
> of collected memory area. However, it cannot be used on SIMD
> registers (at least on x86, I don't know much about arm), as they
> don't fit in an ULONGEST...

The same issue on both arm and aarch64, AFAIK.

>
> Matter of fact, our support for >64-bit quantities in tracepoints is
> very poor at the moment - they can only be collected wholesale when
> they're single registers or contig memory areas. Use in expressions
> is out (if you happen to have something interesting in low 32 bits of
> a vector reg, sorry). Likewise, stiching them together with
> DW_op_piece (or whatever that was called) also fails (see
> https://sourceware.org/bugzilla/show_bug.cgi?id=17015). We could
> definitely use some improvement there...

Yeah, agreed.

--
Yao (齐尧)