gdb: Add guess_tracepoint_registers hook to gdbarch.
authorMarcin Kościelnicki <koriakin@0x04.net>
Thu, 18 Feb 2016 08:21:38 +0000 (09:21 +0100)
committerMarcin Kościelnicki <koriakin@0x04.net>
Thu, 18 Feb 2016 16:21:22 +0000 (17:21 +0100)
commit5f034a78b986d30a90030b2409c61a8660b9b48c
tree312e005927c2673b81ad675d0e46e8b6ac5a5cd2
parentc304e18e5ca825f57963bd0c5f022fa8f5797b29
gdb: Add guess_tracepoint_registers hook to gdbarch.

When we're looking at a tracefile trace frame where registers are not
available, and the tracepoint has only one location, we supply
the location's address as the PC register.  However, this only works
if PC is not a pseudo register, and individual architectures may want
to guess more registers.  Add a gdbarch hook that will handle that.

gdb/ChangeLog:

* arch-utils.c (default_guess_tracepoint_registers): New function.
* arch-utils.h (default_guess_tracepoint_registers): New prototype.
* gdbarch.c: Regenerate.
* gdbarch.h: Regenerate.
* gdbarch.sh: Add guess_tracepoint_registers hook.
* tracefile.c (tracefile_fetch_registers): Use the new gdbarch hook.
gdb/ChangeLog
gdb/arch-utils.c
gdb/arch-utils.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/tracefile.c