Move arm_apcs_32 extern declaration to header
authorChristian Biesinger <cbiesinger@google.com>
Thu, 19 Sep 2019 04:33:35 +0000 (13:33 +0900)
committerChristian Biesinger <cbiesinger@google.com>
Fri, 20 Sep 2019 00:17:49 +0000 (09:17 +0900)
Instead of having several extern declarations for arm_apcs_32
in a few .c files, declare it in arm-tdep.h. This file is already
included from these .c files.

gdb/ChangeLog:

2019-09-19  Christian Biesinger  <cbiesinger@google.com>

* arm-linux-nat.c: Remove extern declaration for arm_apcs_32.
* arm-linux-tdep.c: Likewise.
* arm-nbsd-nat.c: Likewise.
* arm-tdep.h: Declare arm_apcs_32.

gdb/ChangeLog
gdb/arm-linux-nat.c
gdb/arm-linux-tdep.c
gdb/arm-nbsd-nat.c
gdb/arm-tdep.c
gdb/arm-tdep.h

index 45e6e79fb89630bdb2bfdce79861bb9d83d3264e..c7e724eb8b059d3d53db087ec55237c7977d7af9 100644 (file)
@@ -1,3 +1,11 @@
+2019-09-19  Christian Biesinger  <cbiesinger@google.com>
+
+       * arm-linux-nat.c: Remove extern declaration for arm_apcs_32.
+       * arm-linux-tdep.c: Likewise.
+       * arm-nbsd-nat.c: Likewise.
+       * arm-tdep.h: Declare arm_apcs_32.
+       * arm-tdep.c: Move documentation for arm_apcs_32 to arm-tdep.h.
+
 2019-09-19  Christian Biesinger  <cbiesinger@google.com>
 
        * dwarf2loc.c: Remove extern declaration of dwarf_always_disassemble.
index ef44e68d31987cd5428209fa99fd1be5bec472f4..bef67c7ac7da8c79e87f30721f07640097b33a04 100644 (file)
@@ -66,8 +66,6 @@
 #define PTRACE_SETHBPREGS 30
 #endif
 
-extern bool arm_apcs_32;
-
 class arm_linux_nat_target final : public linux_nat_target
 {
 public:
index 31ea4564dbbaefa15d78c0bddbb3ffa8f5de0be9..54ea8511cbada9239be8ab73caac1a86846ad406 100644 (file)
@@ -56,7 +56,6 @@
 #include "user-regs.h"
 #include <ctype.h>
 #include "elf/common.h"
-extern bool arm_apcs_32;
 
 /* Under ARM GNU/Linux the traditional way of performing a breakpoint
    is to execute a particular software interrupt, rather than use a
index 38a9e954b920ac1c678ddfa6d202499eb9645f70..5160bfddf50138f13cc6da7383c35e1f41de7a8e 100644 (file)
@@ -40,8 +40,6 @@ public:
 
 static arm_netbsd_nat_target the_arm_netbsd_nat_target;
 
-extern bool arm_apcs_32;
-
 static void
 arm_supply_gregset (struct regcache *regcache, struct reg *gregset)
 {
index e17550fed7727d958e594b8a6c56eb7ee2c3812c..c247052148029ae7dacda25e39ec8f18621eba51 100644 (file)
@@ -294,7 +294,7 @@ static CORE_ADDR arm_analyze_prologue (struct gdbarch *gdbarch,
 
 #define DISPLACED_STEPPING_ARCH_VERSION                5
 
-/* Set to true if the 32-bit mode is in use.  */
+/* See arm-tdep.h.  */
 
 bool arm_apcs_32 = true;
 
index 6d1a91ca35ef3b6beda5fb0fe3ab7e2ce2d60310..2cf3379d7841c2ff7053e02614be7e418c8744c2 100644 (file)
@@ -26,6 +26,10 @@ struct get_next_pcs;
 struct arm_get_next_pcs;
 struct gdb_get_next_pcs;
 
+/* Set to true if the 32-bit mode is in use.  */
+
+extern bool arm_apcs_32;
+
 #include "gdbarch.h"
 #include "arch/arm.h"
 #include "infrun.h"
This page took 0.035061 seconds and 4 git commands to generate.