diff options
author | Mark Mitchell <mark@codesourcery.com> | 2006-03-20 22:45:13 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 2006-03-20 22:45:13 +0000 |
commit | bef0bb7e54b807a8050679167be7a732538762b2 (patch) | |
tree | c3bc7a198f6eaf3b951fba19ff40499d2b3fea2f | |
parent | 9fb98e9234e5df089783a75a63e9eddee596cdf2 (diff) | |
download | binutils-gdb-bef0bb7e54b807a8050679167be7a732538762b2.tar.gz |
* configure.tgt (arm*-stellaris-*): Use armv7m configuration.
* config/arm/armv7m.mt: New file.
* config/arm/tm-armv7m.h: Likewise.
* arm-tdep.c (arm_register_name_strings): Use xPSR on ARM V7M.
(arm_pc_is_thumb): ARM V7M is always Thumb.
(set_disassembly_style): Use xPSR on ARM V7M.
(arm_write_pc): Do not set T bit in CSPR on V7M.
-rw-r--r-- | ChangeLog.csl | 26 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 31 | ||||
-rw-r--r-- | gdb/config/arm/armv7m.mt | 3 | ||||
-rw-r--r-- | gdb/config/arm/tm-armv7m.h | 30 | ||||
-rw-r--r-- | gdb/configure.tgt | 1 |
5 files changed, 88 insertions, 3 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl index afd9a1aad38..4954e97ace0 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,29 @@ + * configure.tgt (arm*-stellaris-*): Use armv7m configuration. + * config/arm/armv7m.mt: New file. + * config/arm/tm-armv7m.h: Likewise. + * arm-tdep.c (arm_register_name_strings): Use xPSR on ARM V7M. + (arm_pc_is_thumb): ARM V7M is always Thumb. + (set_disassembly_style): Use xPSR on ARM V7M. + (arm_write_pc): Do not set T bit in CSPR on V7M. + +2006-03-20 Mark Mitchell <mark@codesourcery.com> + + * libiberty/pex-win32.c (<errno.h>): Include. + (fix_argv): Remove. + (argv_to_cmdline): New function. + (std_suffixes): New variable. + (no_suffixes): Likewise. + (find_executable): New function. + (win32_spawn): Likewise. + (spawn_script): Use win32_spawn instead of _spawnv[p]. + (pex_win32_exec_child): Replace MSVCRT calls with Win32 API calls. + (pex_win32_wait): Likewise. + +2006-03-19 Mark Mitchell <mark@codesourcery.com> + + * gdb/ser-mingw.c (free_pipe_state): Close pipe before calling + pex_free. + 2006-03-17 Mark Mitchell <mark@codesourcery.com> * gdb/config/arm/embed.mt (TDEPFILES): Remove remote-rdp.o. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index cb3c2615910..d9e4401775d 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -115,7 +115,13 @@ static char * arm_register_name_strings[] = "r12", "sp", "lr", "pc", /* 12 13 14 15 */ "f0", "f1", "f2", "f3", /* 16 17 18 19 */ "f4", "f5", "f6", "f7", /* 20 21 22 23 */ - "fps", "cpsr" }; /* 24 25 */ + "fps", /* 24 */ +#ifndef ARM_V7M + "cpsr" /* 25 */ +#else + "xPSR" /* 25 */ +#endif +}; static char **arm_register_names = arm_register_name_strings; /* Valid register name styles. */ @@ -175,6 +181,7 @@ int arm_apcs_32 = 1; int arm_pc_is_thumb (CORE_ADDR memaddr) { +#ifndef ARM_V7M struct minimal_symbol *sym; /* If bit 0 of the address is set, assume this is a Thumb address. */ @@ -191,6 +198,10 @@ arm_pc_is_thumb (CORE_ADDR memaddr) { return 0; } +#else + /* ARMV7M processors are always in Thumb mode. */ + return 1; +#endif } /* Remove useless bits from addresses in a running program. */ @@ -2497,12 +2508,24 @@ set_disassembly_style (void) if (isupper (*regnames[ARM_PC_REGNUM])) { arm_register_names[ARM_FPS_REGNUM] = "FPS"; - arm_register_names[ARM_PS_REGNUM] = "CPSR"; + arm_register_names[ARM_PS_REGNUM] = +#ifndef ARM_V7M + "CPSR" +#else + "xPSR" +#endif + ; } else { arm_register_names[ARM_FPS_REGNUM] = "fps"; - arm_register_names[ARM_PS_REGNUM] = "cpsr"; + arm_register_names[ARM_PS_REGNUM] = +#ifndef ARM_V7M + "cpsr" +#else + "xPSR" +#endif + ; } /* Synchronize the disassembler. */ @@ -2551,6 +2574,7 @@ arm_write_pc (CORE_ADDR pc, ptid_t ptid) { write_register_pid (ARM_PC_REGNUM, pc, ptid); +#ifndef ARM_V7M /* If necessary, set the T bit. */ if (arm_apcs_32) { @@ -2560,6 +2584,7 @@ arm_write_pc (CORE_ADDR pc, ptid_t ptid) else write_register_pid (ARM_PS_REGNUM, val & ~(CORE_ADDR) 0x20, ptid); } +#endif } static enum gdb_osabi diff --git a/gdb/config/arm/armv7m.mt b/gdb/config/arm/armv7m.mt new file mode 100644 index 00000000000..11dbb414add --- /dev/null +++ b/gdb/config/arm/armv7m.mt @@ -0,0 +1,3 @@ +# Target: ARM V7M embedded system +TDEPFILES= arm-tdep.o +DEPRECATED_TM_FILE= tm-armv7m.h diff --git a/gdb/config/arm/tm-armv7m.h b/gdb/config/arm/tm-armv7m.h new file mode 100644 index 00000000000..f4032aec248 --- /dev/null +++ b/gdb/config/arm/tm-armv7m.h @@ -0,0 +1,30 @@ +/* Definitions to target GDB to ARMV7M embedded systems. + Copyright 2006 CodeSourcery, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef TM_ARMV7M_H +#define TM_ARMV7M_H + +/* Include the common embeddedd ARM definitions. */ +#include "arm/tm-embed.h" + +/* Tell GDB we are building for ARM V7M. */ +#define ARM_V7M + +#endif /* TM_ARMV7M_H */ diff --git a/gdb/configure.tgt b/gdb/configure.tgt index d305b6870dc..041f88ff6c2 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -59,6 +59,7 @@ arm*-*-netbsd* | arm*-*-knetbsd*-gnu) gdb_target=nbsd ;; arm-*-nto*) gdb_target=nto ;; arm*-*-openbsd*) gdb_target=nbsd ;; +arm*-stellaris-*) gdb_target=armv7m ;; arm*-*-* | thumb*-*-* | strongarm*-*-*) gdb_target=embed build_rdi_share=yes |