public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Move arm_apcs_32 extern declaration to header
@ 2019-09-20  0:18 Christian Biesinger
  0 siblings, 0 replies; only message in thread
From: Christian Biesinger @ 2019-09-20  0:18 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c7ae7675cf726c343a1db3e27e3e5665cb485271

commit c7ae7675cf726c343a1db3e27e3e5665cb485271
Author: Christian Biesinger <cbiesinger@google.com>
Date:   Thu Sep 19 13:33:35 2019 +0900

    Move arm_apcs_32 extern declaration to header
    
    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.

Diff:
---
 gdb/ChangeLog        | 8 ++++++++
 gdb/arm-linux-nat.c  | 2 --
 gdb/arm-linux-tdep.c | 1 -
 gdb/arm-nbsd-nat.c   | 2 --
 gdb/arm-tdep.c       | 2 +-
 gdb/arm-tdep.h       | 4 ++++
 6 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 45e6e79..c7e724e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
 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.
 	* dwarf2read.h: Declare dwarf_always_disassemble.
 
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index ef44e68..bef67c7 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -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:
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 31ea456..54ea851 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -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
diff --git a/gdb/arm-nbsd-nat.c b/gdb/arm-nbsd-nat.c
index 38a9e95..5160bfd 100644
--- a/gdb/arm-nbsd-nat.c
+++ b/gdb/arm-nbsd-nat.c
@@ -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)
 {
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index e17550f..c247052 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -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;
 
diff --git a/gdb/arm-tdep.h b/gdb/arm-tdep.h
index 6d1a91c..2cf3379 100644
--- a/gdb/arm-tdep.h
+++ b/gdb/arm-tdep.h
@@ -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"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-20  0:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20  0:18 [binutils-gdb] Move arm_apcs_32 extern declaration to header Christian Biesinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).