From 5f034a78b986d30a90030b2409c61a8660b9b48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= Date: Thu, 18 Feb 2016 09:21:38 +0100 Subject: 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/arch-utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/arch-utils.h') diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index 3fad2c3..9e1e70e 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -204,4 +204,8 @@ extern char *default_gcc_target_options (struct gdbarch *gdbarch); extern const char *default_gnu_triplet_regexp (struct gdbarch *gdbarch); extern int default_addressable_memory_unit_size (struct gdbarch *gdbarch); +extern void default_guess_tracepoint_registers (struct gdbarch *gdbarch, + struct regcache *regcache, + CORE_ADDR addr); + #endif -- cgit v1.1