From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23371 invoked by alias); 9 Nov 2003 17:31:01 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 23360 invoked by uid 0); 9 Nov 2003 17:31:00 -0000 Resent-Message-ID: <20031109173100.23359.qmail@sources.redhat.com> Received: (qmail 8848 invoked from network); 9 Nov 2003 07:56:39 -0000 Received: from unknown (HELO splode.eterna.com.au) (203.15.111.1) by sources.redhat.com with SMTP; 9 Nov 2003 07:56:39 -0000 Received: from splode.eterna.com.au (localhost [127.0.0.1]) by splode.eterna.com.au (Postfix) with ESMTP id A37752609F for ; Sun, 9 Nov 2003 18:56:34 +1100 (EST) To: gdb-patches@sources.redhat.com organisation: people's front against (bozotic) www (softwar foundation) x-other-organisation: The NetBSD Foundation. x-message: step back from the shadows of war! seek out the ways of peace subject: [PATCH] armeb-netbsdelf support Date: Sun, 09 Nov 2003 17:31:00 -0000 Message-ID: <25138.1068364594@splode.eterna.com.au> From: matthew green Resent-From: root@sourceware.org Resent-Date: Sun, 9 Nov 2003 17:31:00 +0000 Resent-To: gdb-patches@sourceware.org X-SW-Source: 2003-11/txt/msg00169.txt.bz2 hi folks. this minor changes adds armeb-netbsdelf support to GDB. thanks to richard earnshaw for pointing me the right way. this works with a relatively simple test case, but i'm having trouble getting results with the gdb testsuite due to hardware lossage. this patch also works fine in GDB 5.3. (BTW, i have an unrelated change to my breakpoint.c that gets gdb to actually link, due to missing symbols hidden by SOADD_LIB not being defined. i have this problem with the working-in-5.3 little endian arm-netbsdelf target as well. it seems unrelated to the armeb-netbsdelf support.) thanks. .mrg. 2003-11-09 matthew green * armnbsd-tdep.c (arm_nbsd_arm_be_breakpoint): New char array. (arm_netbsd_init_abi_common): Use arm_nbsd_arm_be_breakpoint if this target is big endian. Index: armnbsd-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/armnbsd-tdep.c,v retrieving revision 1.10 diff -p -r1.10 armnbsd-tdep.c *** gdb/armnbsd-tdep.c 24 Mar 2003 09:53:41 -0000 1.10 --- gdb/armnbsd-tdep.c 9 Nov 2003 07:35:05 -0000 *************** *** 32,37 **** --- 32,38 ---- /* For compatibility with previous implemenations of GDB on arm/NetBSD, override the default little-endian breakpoint. */ static const char arm_nbsd_arm_le_breakpoint[] = {0x11, 0x00, 0x00, 0xe6}; + static const char arm_nbsd_arm_be_breakpoint[] = {0xe6, 0x00, 0x00, 0x11}; static int arm_netbsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name) *************** arm_netbsd_init_abi_common (struct gdbar *** 49,56 **** struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); tdep->lowest_pc = 0x8000; ! tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint; ! tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint); tdep->jb_pc = ARM_NBSD_JB_PC; tdep->jb_elt_size = ARM_NBSD_JB_ELEMENT_SIZE; --- 50,65 ---- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); tdep->lowest_pc = 0x8000; ! if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) ! { ! tdep->arm_breakpoint = arm_nbsd_arm_be_breakpoint; ! tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_be_breakpoint); ! } ! else ! { ! tdep->arm_breakpoint = arm_nbsd_arm_le_breakpoint; ! tdep->arm_breakpoint_size = sizeof (arm_nbsd_arm_le_breakpoint); ! } tdep->jb_pc = ARM_NBSD_JB_PC; tdep->jb_elt_size = ARM_NBSD_JB_ELEMENT_SIZE;