]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Use the target architecture when encoding tracepoint actions
authorAntoine Tremblay <antoine.tremblay@ericsson.com>
Thu, 11 Feb 2016 13:14:12 +0000 (08:14 -0500)
committerAntoine Tremblay <antoine.tremblay@ericsson.com>
Thu, 11 Feb 2016 13:14:35 +0000 (08:14 -0500)
commit82e9becd8afe1d7c9971096592bf312637d9437f
tree4a5e2db2b01f180b8baadccbdb6ab05b4fb8ba3b
parent32875eb1f3b928dfe63c5752e8152a9dc09928f3
Use the target architecture when encoding tracepoint actions

This patch uses the target architecture rather then the objfile
architecture when encoding tracepoint actions.

The target architecture may contain additional registers. E.g. ARM VFP
registers. This information is needed to allow their collection. Since we
can never know whether the registers numbers in the target match the
binary's we have to use tdesc here.

One note about combined debuggers / multi-inferior from Pedro Alves:

In the combined debugger case taking Cell as the practical example that
gdb supports currently:

In that case, the main target_gdbarch() will be powerpc, but you may have set a
tracepoint on _spu_ code, which has a different gdbarch.  so for that case,
target_gdbarch would be wrong.  I think that in that case, we'd need to
find __the_ target/tdesc gdbarch that is (bfd) compatible with the
objfile's gdbarch.

I think cell/spu gdbserver doesn't support tracepoints, so we can ignore
this for now.

The multi-inferior/process case is somewhat related, but its simpler.
each inferior has its own gdbarch.

That is, target_gdbarch depends on the current inferior selected.
In fact, that just returns inferior->gdbarch nowaways.

No regressions, tested on ubuntu 14.04 ARMv7 and x86.
With gdbserver-{native,extended} / { -marm -mthumb }

gdb/ChangeLog:

* tracepoint.c (encode_actions_1): Use target_gdbarch () rather
than loc->gdbarch.
gdb/ChangeLog
gdb/tracepoint.c