aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-05-30 16:08:10 +0800
committerYao Qi <yao@codesourcery.com>2014-06-24 09:30:34 +0800
commit3343ef86879b9348bb038bc7adecb665236ca4d8 (patch)
tree444c916928f7c10019cbd436553755b2b99c8671 /gdb
parent18d18ac8105647241a4e24a3a4d0196955666e73 (diff)
downloadgdb-3343ef86879b9348bb038bc7adecb665236ca4d8.zip
gdb-3343ef86879b9348bb038bc7adecb665236ca4d8.tar.gz
gdb-3343ef86879b9348bb038bc7adecb665236ca4d8.tar.bz2
Skip 'bx reg' on arm-linux
In arm-tdep.c, arm_skip_stub is installed to gdbarch skip_trampoline_code, but in arm-linux-tdep.c, find_solib_trampoline_target is installed to skip_trampoline_code. That means gdb configured for arm-linux target doesn't recognize some arm specific trampolines or stubs. Beside handling generic solib trampoline, gdb for arm-linux target should be able to handle arm specific trampolines. This patch is to skip arm specific stubs, if any, and as a fallback, skip the generic solib trampoline. gdb: 2014-06-24 Yao Qi <yao@codesourcery.com> * arm-linux-tdep.c (arm_linux_skip_trampoline_code): New. (arm_linux_init_abi): Set skip_trampoline_code with gdbarch_skip_trampoline_code instead of find_solib_trampoline_target.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/arm-linux-tdep.c15
2 files changed, 21 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 19a6657..44e8575 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2014-06-24 Yao Qi <yao@codesourcery.com>
+ * arm-linux-tdep.c (arm_linux_skip_trampoline_code): New.
+ (arm_linux_init_abi): Set skip_trampoline_code with
+ gdbarch_skip_trampoline_code instead of
+ find_solib_trampoline_target.
+
+2014-06-24 Yao Qi <yao@codesourcery.com>
+
* arm-tdep.c (arm_stub_unwind_sniffer): Return 1 if
arm_skip_bx_reg returns non-zero.
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 65d9084..a96ea3f 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -1322,6 +1322,19 @@ arm_linux_syscall_record (struct regcache *regcache, unsigned long svc_number)
return 0;
}
+/* Implement the skip_trampoline_code gdbarch method. */
+
+static CORE_ADDR
+arm_linux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
+{
+ CORE_ADDR target_pc = arm_skip_stub (frame, pc);
+
+ if (target_pc != 0)
+ return target_pc;
+
+ return find_solib_trampoline_target (frame, pc);
+}
+
static void
arm_linux_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
@@ -1387,7 +1400,7 @@ arm_linux_init_abi (struct gdbarch_info info,
set_gdbarch_software_single_step (gdbarch, arm_linux_software_single_step);
/* Shared library handling. */
- set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+ set_gdbarch_skip_trampoline_code (gdbarch, arm_linux_skip_trampoline_code);
set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
/* Enable TLS support. */