This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 05/17] ARM support


Support for the ARM target.  Even though ARM shares almost everything
with x86 regarding signal numbers, there is SIGSWI which is an ARM-only
signal as far as I have verified.  However, GDB's internal signal
definition does not recognize SIGSWI, so there is nothing we can/must
do.

Therefore, I have chosen to define the target-specific enum anyway,
even though we end up using the generic Linux function to translate to
the target's signal representation.

2013-07-01  Sergio Durigan Junior  <sergiodj@redhat.com>

	* arm-linux-tdep.c: Define enum with differences between ARM and
	x86 signals.
	(arm_linux_init_abi): Set gdbarch_gdb_signal_to_target to
	linux_gdb_signal_to_target.
---
 gdb/arm-linux-tdep.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 1502bdc..f580d1e 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -250,6 +250,18 @@ static const gdb_byte arm_linux_thumb2_le_breakpoint[] = { 0xf0, 0xf7, 0x00, 0xa
 #define ARM_LDR_PC_SP_12		0xe49df00c
 #define ARM_LDR_PC_SP_4			0xe49df004
 
+/* This enum represents the signals' numbers on the ARM
+   architecture.  It just contains the signal definitions which are
+   different from x86.
+
+   It is derived from the file <arch/arm/include/uapi/asm/signal.h>,
+   from the Linux kernel tree.  */
+
+enum
+  {
+    ARM_LINUX_SIGSWI = 32,
+  };
+
 static void
 arm_linux_sigtramp_cache (struct frame_info *this_frame,
 			  struct trad_frame_cache *this_cache,
@@ -1292,6 +1304,8 @@ arm_linux_init_abi (struct gdbarch_info info,
   set_gdbarch_stap_parse_special_token (gdbarch,
 					arm_stap_parse_special_token);
 
+  set_gdbarch_gdb_signal_to_target (gdbarch, linux_gdb_signal_to_target);
+
   tdep->syscall_next_pc = arm_linux_syscall_next_pc;
 
   /* Syscall record.  */
-- 
1.7.11.7


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]