From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31099 invoked by alias); 1 Jul 2013 07:43:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 30999 invoked by uid 89); 1 Jul 2013 07:43:04 -0000 X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 01 Jul 2013 07:43:03 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r617h2K9016894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Jul 2013 03:43:02 -0400 Received: from psique.redhat.com (ovpn-113-175.phx2.redhat.com [10.3.113.175]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r617gssQ017377; Mon, 1 Jul 2013 03:43:01 -0400 From: Sergio Durigan Junior To: GDB Patches Cc: Sergio Durigan Junior Subject: [PATCH 05/17] ARM support Date: Mon, 01 Jul 2013 07:43:00 -0000 Message-Id: <1372664545-3947-6-git-send-email-sergiodj@redhat.com> In-Reply-To: <1372664545-3947-1-git-send-email-sergiodj@redhat.com> References: <1372664545-3947-1-git-send-email-sergiodj@redhat.com> X-SW-Source: 2013-07/txt/msg00017.txt.bz2 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 * 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 , + 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