]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* configure.tgt (arm*-stellaris-*): Use armv7m configuration.
authorMark Mitchell <mark@codesourcery.com>
Mon, 20 Mar 2006 22:45:13 +0000 (22:45 +0000)
committerMark Mitchell <mark@codesourcery.com>
Mon, 20 Mar 2006 22:45:13 +0000 (22:45 +0000)
* 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.

ChangeLog.csl
gdb/arm-tdep.c
gdb/config/arm/armv7m.mt [new file with mode: 0644]
gdb/config/arm/tm-armv7m.h [new file with mode: 0644]
gdb/configure.tgt

index afd9a1aad389ab0d8dea7da9f79c5e1d9416cb14..4954e97ace07e1326a1821337987512865347e91 100644 (file)
@@ -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.
index cb3c2615910aafc793441ca30825d3e9935c9cd2..d9e4401775dc7e80f6c42eb0e3e7f136982f14a3 100644 (file)
@@ -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
 }
 \f
 static enum gdb_osabi
diff --git a/gdb/config/arm/armv7m.mt b/gdb/config/arm/armv7m.mt
new file mode 100644 (file)
index 0000000..11dbb41
--- /dev/null
@@ -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 (file)
index 0000000..f4032ae
--- /dev/null
@@ -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 */
index d305b6870dc8c1898a6df0122e77eb9456dc4a00..041f88ff6c29b21d07052022a20b7c7eddde14b9 100644 (file)
@@ -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