public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Saagar Jha <saagar@saagarjha.com>
To: Simon Marchi <simark@simark.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Rename block.{h,c} to gdb-block.{h, c}
Date: Sun, 6 Sep 2020 18:47:33 -0700	[thread overview]
Message-ID: <D3FC6073-CB6D-47FA-ADCC-4D29687C51D8@saagarjha.com> (raw)
In-Reply-To: <a6663f3d-1aa6-2243-d3e2-5dc6d0cd7fbf@simark.ca>

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]

Thanks, here’s an updated patch. If you’re interested in CI, I keep some personal mirrors of the bintutils-gdb repository so I took the liberty to turn on Travis CI for one–you can find that here: https://travis-ci.org/github/saagarjha/binutils-gdb. It’s nothing official, of course, but you might still be able to find it useful to consult (ideally, it should match the main repo by about 10 minutes). As you can see, it’s already caught a new build error ;)


[-- Attachment #2: Rename-block.-h-c-to-gdb-block.-h-c.patch --]
[-- Type: application/octet-stream, Size: 42891 bytes --]

From 19edb73260b6f7871e0da09ddf419442ad0aae98 Mon Sep 17 00:00:00 2001
From: Saagar Jha <saagar@saagarjha.com>
Date: Tue, 11 Aug 2020 17:16:53 -0700
Subject: [PATCH] Rename block.{h,c} to gdb-block.{h, c}

macOS, by default, uses a case-insensitive filesystem and ships with a
header in its SDK (as part of Xcode) at /usr/include/Block.h.
<functional> from Xcode 12's SDK for macOS 11 includes this file but
due to GDB's compilation flags ends up including gdb/block.h. The
simplest solution to fix the resulting build errors is to just rename it
to something that doesn't conflict.

gdb/ChangeLog:

	* Makefile.in: Replace block.c with gdb-block.c.
	* ada-exp.y:
	* ada-lang.c: Replace block.h with gdb-block.h.
	* alpha-mdebug-tdep.c: Replace block.h with gdb-block.h.
	* alpha-tdep.c: Replace block.h with gdb-block.h.
	* amd64-tdep.c: Replace block.h with gdb-block.h.
	* ax-gdb.c: Replace block.h with gdb-block.h.
	* blockframe.c: Replace block.h with gdb-block.h.
	* breakpoint.c: Replace block.h with gdb-block.h.
	* buildsym.c: Replace block.h with gdb-block.h.
	* c-exp.y: Replace block.h with gdb-block.h.
	* cli/cli-cmds.c: Replace block.h with gdb-block.h.
	* coffread.c: Replace block.h with gdb-block.h.
	* compile/compile-c-symbols.c: Replace block.h with gdb-block.h.
	* compile/compile-cplus-symbols.c: Replace block.h with
	gdb-block.h.
	* compile/compile-cplus-types.c: Replace block.h with
	gdb-block.h.
	* compile/compile-loc2c.c: Replace block.h with gdb-block.h.
	* compile/compile-object-load.c: Replace block.h with
	gdb-block.h.
	* compile/compile-object-run.c: Replace block.h with gdb-block.h.
	* compile/compile.c: Replace block.h with gdb-block.h.
	* cp-namespace.c: Replace block.h with gdb-block.h.
	* cp-support.c: Replace block.h with gdb-block.h.
	* csky-tdep.c: Replace block.h with gdb-block.h.
	* ctfread.c: Replace block.h with gdb-block.h.
	* d-exp.y: Replace block.h with gdb-block.h.
	* d-namespace.c: Replace block.h with gdb-block.h.
	* dbxread.c: Replace block.h with gdb-block.h.
	* dwarf2/frame-tailcall.c: Replace block.h with gdb-block.h.
	* dwarf2/loc.c: Replace block.h with gdb-block.h.
	* dwarf2/read.c: Replace block.h with gdb-block.h.
	* eval.c: Replace block.h with gdb-block.h.
	* expprint.c: Replace block.h with gdb-block.h.
	* f-exp.y: Replace block.h with gdb-block.h.
	* f-valprint.c: Replace block.h with gdb-block.h.
	* findvar.c: Replace block.h with gdb-block.h.
	* frame.c: Replace block.h with gdb-block.h.
	* block.c: Moved to...
	* gdb-block.c: ...here.
	* block.h: Moved to...
	* gdb-block.h: ...here.
	* go-exp.y: Replace block.h with gdb-block.h.
	* go-lang.c: Replace block.h with gdb-block.h.
	* guile/scm-block.c: Replace block.h with gdb-block.h.
	* guile/scm-frame.c: Replace block.h with gdb-block.h.
	* guile/scm-symbol.c: Replace block.h with gdb-block.h.
	* guile/scm-symtab.c: Replace block.h with gdb-block.h.
	* infcall.c: Replace block.h with gdb-block.h.
	* infcmd.c: Replace block.h with gdb-block.h.
	* infrun.c: Replace block.h with gdb-block.h.
	* inline-frame.c: Replace block.h with gdb-block.h.
	* jit.c: Replace block.h with gdb-block.h.
	* linespec.c: Replace block.h with gdb-block.h.
	* m2-exp.y: Replace block.h with gdb-block.h.
	* maint.c: Replace block.h with gdb-block.h.
	* mdebugread.c: Replace block.h with gdb-block.h.
	* mi/mi-cmd-stack.c: Replace block.h with gdb-block.h.
	* mips-sde-tdep.c: Replace block.h with gdb-block.h.
	* mips-tdep.c: Replace block.h with gdb-block.h.
	* objc-lang.c: Replace block.h with gdb-block.h.
	* objfiles.c: Replace block.h with gdb-block.h.
	* or1k-tdep.c: Replace block.h with gdb-block.h.
	* p-exp.y: Replace block.h with gdb-block.h.
	* parse.c: Replace block.h with gdb-block.h.
	* printcmd.c: Replace block.h with gdb-block.h.
	* psymtab.c: Replace block.h with gdb-block.h.
	* python/py-block.c: Replace block.h with gdb-block.h.
	* python/py-finishbreakpoint.c: Replace block.h with gdb-block.h.
	* python/py-frame.c: Replace block.h with gdb-block.h.
	* python/py-progspace.c: Replace block.h with gdb-block.h.
	* python/py-symbol.c: Replace block.h with gdb-block.h.
	* python/py-symtab.c: Replace block.h with gdb-block.h.
	* riscv-tdep.c: Replace block.h with gdb-block.h.
	* rust-exp.y: Replace block.h with gdb-block.h.
	* rust-lang.c: Replace block.h with gdb-block.h.
	* stack.c: Replace block.h with gdb-block.h.
	* symfile.c: Replace block.h with gdb-block.h.
	* symmisc.c: Replace block.h with gdb-block.h.
	* symtab.c (eq_symbol_entry): Replace block.{c,h} with
	gdb-block.{c,h}.
	* tracepoint.c: Replace block.h with gdb-block.h.
	* valops.c: Replace block.h with gdb-block.h.
	* value.c: Replace block.h with gdb-block.h.
	* varobj.c: Replace block.h with gdb-block.h.
---
 gdb/ChangeLog                       | 89 +++++++++++++++++++++++++++++
 gdb/Makefile.in                     |  2 +-
 gdb/ada-exp.y                       |  2 +-
 gdb/ada-lang.c                      |  2 +-
 gdb/alpha-mdebug-tdep.c             |  2 +-
 gdb/alpha-tdep.c                    |  2 +-
 gdb/amd64-tdep.c                    |  2 +-
 gdb/ax-gdb.c                        |  2 +-
 gdb/blockframe.c                    |  2 +-
 gdb/breakpoint.c                    |  2 +-
 gdb/buildsym.c                      |  2 +-
 gdb/c-exp.y                         |  2 +-
 gdb/cli/cli-cmds.c                  |  2 +-
 gdb/coffread.c                      |  2 +-
 gdb/compile/compile-c-symbols.c     |  2 +-
 gdb/compile/compile-cplus-symbols.c |  2 +-
 gdb/compile/compile-cplus-types.c   |  2 +-
 gdb/compile/compile-loc2c.c         |  2 +-
 gdb/compile/compile-object-load.c   |  2 +-
 gdb/compile/compile-object-run.c    |  2 +-
 gdb/compile/compile.c               |  2 +-
 gdb/cp-namespace.c                  |  2 +-
 gdb/cp-support.c                    |  2 +-
 gdb/csky-tdep.c                     |  2 +-
 gdb/ctfread.c                       |  2 +-
 gdb/d-exp.y                         |  2 +-
 gdb/d-namespace.c                   |  2 +-
 gdb/dbxread.c                       |  2 +-
 gdb/dwarf2/frame-tailcall.c         |  2 +-
 gdb/dwarf2/loc.c                    |  2 +-
 gdb/dwarf2/read.c                   |  2 +-
 gdb/eval.c                          |  2 +-
 gdb/expprint.c                      |  2 +-
 gdb/f-exp.y                         |  2 +-
 gdb/f-valprint.c                    |  2 +-
 gdb/findvar.c                       |  2 +-
 gdb/frame.c                         |  2 +-
 gdb/{block.c => gdb-block.c}        |  2 +-
 gdb/{block.h => gdb-block.h}        |  6 +-
 gdb/go-exp.y                        |  2 +-
 gdb/go-lang.c                       |  2 +-
 gdb/guile/scm-block.c               |  2 +-
 gdb/guile/scm-frame.c               |  2 +-
 gdb/guile/scm-symbol.c              |  2 +-
 gdb/guile/scm-symtab.c              |  2 +-
 gdb/infcall.c                       |  2 +-
 gdb/infcmd.c                        |  2 +-
 gdb/infrun.c                        |  2 +-
 gdb/inline-frame.c                  |  2 +-
 gdb/jit.c                           |  2 +-
 gdb/linespec.c                      |  2 +-
 gdb/m2-exp.y                        |  2 +-
 gdb/maint.c                         |  2 +-
 gdb/mdebugread.c                    |  2 +-
 gdb/mi/mi-cmd-stack.c               |  2 +-
 gdb/mips-sde-tdep.c                 |  2 +-
 gdb/mips-tdep.c                     |  2 +-
 gdb/objc-lang.c                     |  2 +-
 gdb/objfiles.c                      |  2 +-
 gdb/or1k-tdep.c                     |  2 +-
 gdb/p-exp.y                         |  2 +-
 gdb/parse.c                         |  2 +-
 gdb/printcmd.c                      |  2 +-
 gdb/psymtab.c                       |  2 +-
 gdb/python/py-block.c               |  2 +-
 gdb/python/py-finishbreakpoint.c    |  2 +-
 gdb/python/py-frame.c               |  2 +-
 gdb/python/py-progspace.c           |  2 +-
 gdb/python/py-symbol.c              |  2 +-
 gdb/python/py-symtab.c              |  2 +-
 gdb/riscv-tdep.c                    |  2 +-
 gdb/rust-exp.y                      |  2 +-
 gdb/rust-lang.c                     |  2 +-
 gdb/stack.c                         |  2 +-
 gdb/symfile.c                       |  2 +-
 gdb/symmisc.c                       |  2 +-
 gdb/symtab.c                        |  4 +-
 gdb/tracepoint.c                    |  2 +-
 gdb/valops.c                        |  2 +-
 gdb/value.c                         |  2 +-
 gdb/varobj.c                        |  2 +-
 81 files changed, 172 insertions(+), 83 deletions(-)
 rename gdb/{block.c => gdb-block.c} (99%)
 rename gdb/{block.h => gdb-block.h} (99%)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 65fc9550dd..3eac355d8e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,92 @@
+2020-09-06  Saagar Jha <saagar@saagarjha.com>
+
+	* Makefile.in: Replace block.c with gdb-block.c.
+	* ada-exp.y: 
+	* ada-lang.c: Replace block.h with gdb-block.h.
+	* alpha-mdebug-tdep.c: Replace block.h with gdb-block.h.
+	* alpha-tdep.c: Replace block.h with gdb-block.h.
+	* amd64-tdep.c: Replace block.h with gdb-block.h.
+	* ax-gdb.c: Replace block.h with gdb-block.h.
+	* blockframe.c: Replace block.h with gdb-block.h.
+	* breakpoint.c: Replace block.h with gdb-block.h.
+	* buildsym.c: Replace block.h with gdb-block.h.
+	* c-exp.y: Replace block.h with gdb-block.h.
+	* cli/cli-cmds.c: Replace block.h with gdb-block.h.
+	* coffread.c: Replace block.h with gdb-block.h.
+	* compile/compile-c-symbols.c: Replace block.h with gdb-block.h.
+	* compile/compile-cplus-symbols.c: Replace block.h with
+	gdb-block.h.
+	* compile/compile-cplus-types.c: Replace block.h with
+	gdb-block.h.
+	* compile/compile-loc2c.c: Replace block.h with gdb-block.h.
+	* compile/compile-object-load.c: Replace block.h with
+	gdb-block.h.
+	* compile/compile-object-run.c: Replace block.h with gdb-block.h.
+	* compile/compile.c: Replace block.h with gdb-block.h.
+	* cp-namespace.c: Replace block.h with gdb-block.h.
+	* cp-support.c: Replace block.h with gdb-block.h.
+	* csky-tdep.c: Replace block.h with gdb-block.h.
+	* ctfread.c: Replace block.h with gdb-block.h.
+	* d-exp.y: Replace block.h with gdb-block.h.
+	* d-namespace.c: Replace block.h with gdb-block.h.
+	* dbxread.c: Replace block.h with gdb-block.h.
+	* dwarf2/frame-tailcall.c: Replace block.h with gdb-block.h.
+	* dwarf2/loc.c: Replace block.h with gdb-block.h.
+	* dwarf2/read.c: Replace block.h with gdb-block.h.
+	* eval.c: Replace block.h with gdb-block.h.
+	* expprint.c: Replace block.h with gdb-block.h.
+	* f-exp.y: Replace block.h with gdb-block.h.
+	* f-valprint.c: Replace block.h with gdb-block.h.
+	* findvar.c: Replace block.h with gdb-block.h.
+	* frame.c: Replace block.h with gdb-block.h.
+	* block.c: Moved to...
+	* gdb-block.c: ...here.
+	* block.h: Moved to...
+	* gdb-block.h: ...here.
+	* go-exp.y: Replace block.h with gdb-block.h.
+	* go-lang.c: Replace block.h with gdb-block.h.
+	* guile/scm-block.c: Replace block.h with gdb-block.h.
+	* guile/scm-frame.c: Replace block.h with gdb-block.h.
+	* guile/scm-symbol.c: Replace block.h with gdb-block.h.
+	* guile/scm-symtab.c: Replace block.h with gdb-block.h.
+	* infcall.c: Replace block.h with gdb-block.h.
+	* infcmd.c: Replace block.h with gdb-block.h.
+	* infrun.c: Replace block.h with gdb-block.h.
+	* inline-frame.c: Replace block.h with gdb-block.h.
+	* jit.c: Replace block.h with gdb-block.h.
+	* linespec.c: Replace block.h with gdb-block.h.
+	* m2-exp.y: Replace block.h with gdb-block.h.
+	* maint.c: Replace block.h with gdb-block.h.
+	* mdebugread.c: Replace block.h with gdb-block.h.
+	* mi/mi-cmd-stack.c: Replace block.h with gdb-block.h.
+	* mips-sde-tdep.c: Replace block.h with gdb-block.h.
+	* mips-tdep.c: Replace block.h with gdb-block.h.
+	* objc-lang.c: Replace block.h with gdb-block.h.
+	* objfiles.c: Replace block.h with gdb-block.h.
+	* or1k-tdep.c: Replace block.h with gdb-block.h.
+	* p-exp.y: Replace block.h with gdb-block.h.
+	* parse.c: Replace block.h with gdb-block.h.
+	* printcmd.c: Replace block.h with gdb-block.h.
+	* psymtab.c: Replace block.h with gdb-block.h.
+	* python/py-block.c: Replace block.h with gdb-block.h.
+	* python/py-finishbreakpoint.c: Replace block.h with gdb-block.h.
+	* python/py-frame.c: Replace block.h with gdb-block.h.
+	* python/py-progspace.c: Replace block.h with gdb-block.h.
+	* python/py-symbol.c: Replace block.h with gdb-block.h.
+	* python/py-symtab.c: Replace block.h with gdb-block.h.
+	* riscv-tdep.c: Replace block.h with gdb-block.h.
+	* rust-exp.y: Replace block.h with gdb-block.h.
+	* rust-lang.c: Replace block.h with gdb-block.h.
+	* stack.c: Replace block.h with gdb-block.h.
+	* symfile.c: Replace block.h with gdb-block.h.
+	* symmisc.c: Replace block.h with gdb-block.h.
+	* symtab.c (eq_symbol_entry): Replace block.{c,h} with
+	gdb-block.{c,h}.
+	* tracepoint.c: Replace block.h with gdb-block.h.
+	* valops.c: Replace block.h with gdb-block.h.
+	* value.c: Replace block.h with gdb-block.h.
+	* varobj.c: Replace block.h with gdb-block.h.
+
 2020-09-06  Tom Tromey  <tom@tromey.com>
 
 	* symfile.h (dwarf2_free_objfile): Don't declare.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 4808357e65..feefaad25a 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -971,7 +971,6 @@ COMMON_SFILES = \
 	ax-general.c \
 	bcache.c \
 	bfd-target.c \
-	block.c \
 	blockframe.c \
 	break-catch-sig.c \
 	break-catch-syscall.c \
@@ -1044,6 +1043,7 @@ COMMON_SFILES = \
 	frame-base.c \
 	frame-unwind.c \
 	gcore.c \
+	gdb-block.c \
 	gdb-demangle.c \
 	gdb_bfd.c \
 	gdb_obstack.c \
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 57d89b01fe..3dfe7e232d 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -46,7 +46,7 @@
 #include "symfile.h" /* Required by objfiles.h.  */
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
 #include "frame.h"
-#include "block.h"
+#include "gdb-block.h"
 
 #define parse_type(ps) builtin_type (ps->gdbarch ())
 
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index e405cd23d2..2951a9c32f 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -39,7 +39,7 @@
 #include "ada-lang.h"
 #include "completer.h"
 #include "ui-out.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "infcall.h"
 #include "annotate.h"
 #include "valprint.h"
diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c
index 2fa27c4013..021f6db7e9 100644
--- a/gdb/alpha-mdebug-tdep.c
+++ b/gdb/alpha-mdebug-tdep.c
@@ -22,7 +22,7 @@
 #include "frame-base.h"
 #include "symtab.h"
 #include "gdbcore.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "trad-frame.h"
 
 #include "alpha-tdep.h"
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 377d7b1ac1..dce56eeeb7 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -35,7 +35,7 @@
 #include "reggroups.h"
 #include "arch-utils.h"
 #include "osabi.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "infcall.h"
 #include "trad-frame.h"
 
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 59f7c9f885..855f9848c9 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -23,7 +23,7 @@
 #include "opcode/i386.h"
 #include "dis-asm.h"
 #include "arch-utils.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "dummy-frame.h"
 #include "frame.h"
 #include "frame-base.h"
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 34e22b289e..b33048530e 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -30,7 +30,7 @@
 #include "target.h"
 #include "ax.h"
 #include "ax-gdb.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "regcache.h"
 #include "user-regs.h"
 #include "dictionary.h"
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 80b769514e..712ba0d3d5 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -32,7 +32,7 @@
 #include "dummy-frame.h"
 #include "command.h"
 #include "gdbcmd.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "inline-frame.h"
 
 /* Return the innermost lexical block in execution in a specified
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 670cba0057..5aa44d3bb6 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -46,7 +46,7 @@
 #include "completer.h"
 #include "ui-out.h"
 #include "cli/cli-script.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "solib.h"
 #include "solist.h"
 #include "observable.h"
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index bd0ca49140..7b77703d1b 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -29,7 +29,7 @@
 #include "filenames.h"		/* For DOSish file names.  */
 #include "macrotab.h"
 #include "demangle.h"		/* Needed by SYMBOL_INIT_DEMANGLED_NAME.  */
-#include "block.h"
+#include "gdb-block.h"
 #include "cp-support.h"
 #include "dictionary.h"
 #include "addrmap.h"
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 7fc23c4c8d..da8923c996 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -47,7 +47,7 @@
 #include "symfile.h" /* Required by objfiles.h.  */
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
 #include "charset.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "cp-support.h"
 #include "macroscope.h"
 #include "objc-lang.h"
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index e3965fea07..6e4a6ab696 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -38,7 +38,7 @@
 #include "tracepoint.h"
 #include "gdbsupport/filestuff.h"
 #include "location.h"
-#include "block.h"
+#include "gdb-block.h"
 
 #include "ui-out.h"
 #include "interps.h"
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 1592dc645c..0ba80d4d6c 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -34,7 +34,7 @@
 #include "stabsread.h"
 #include "complaints.h"
 #include "target.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "dictionary.h"
 
 #include "coff-pe-read.h"
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c
index f4e0783d4b..a214833bc9 100644
--- a/gdb/compile/compile-c-symbols.c
+++ b/gdb/compile/compile-c-symbols.c
@@ -23,7 +23,7 @@
 #include "compile-c.h"
 #include "symtab.h"
 #include "parser-defs.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "objfiles.h"
 #include "compile.h"
 #include "value.h"
diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c
index 11a2d32345..22bfc22543 100644
--- a/gdb/compile/compile-cplus-symbols.c
+++ b/gdb/compile/compile-cplus-symbols.c
@@ -24,7 +24,7 @@
 #include "gdbsupport/gdb_assert.h"
 #include "symtab.h"
 #include "parser-defs.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "objfiles.h"
 #include "compile.h"
 #include "value.h"
diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c
index 02df7ab90e..8e5e108ef6 100644
--- a/gdb/compile/compile-cplus-types.c
+++ b/gdb/compile/compile-cplus-types.c
@@ -29,7 +29,7 @@
 #include "cp-support.h"
 #include "cp-abi.h"
 #include "objfiles.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "gdbcmd.h"
 #include "c-lang.h"
 #include "compile-c.h"
diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c
index 2fd1810759..af4a07eb45 100644
--- a/gdb/compile/compile-loc2c.c
+++ b/gdb/compile/compile-loc2c.c
@@ -27,7 +27,7 @@
 #include "compile-internal.h"
 #include "compile-c.h"
 #include "compile.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "dwarf2/frame.h"
 #include "gdbsupport/gdb_vecs.h"
 #include "value.h"
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index 2f41607902..80a5009a3c 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -30,7 +30,7 @@
 #include "inferior.h"
 #include "gdbthread.h"
 #include "compile.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "arch-utils.h"
 #include <algorithm>
 
diff --git a/gdb/compile/compile-object-run.c b/gdb/compile/compile-object-run.c
index a2f3990005..9e45edfaec 100644
--- a/gdb/compile/compile-object-run.c
+++ b/gdb/compile/compile-object-run.c
@@ -24,7 +24,7 @@
 #include "objfiles.h"
 #include "compile-internal.h"
 #include "dummy-frame.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "valprint.h"
 #include "compile.h"
 
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 0c29a0476e..7416861fd8 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -33,7 +33,7 @@
 #include "language.h"
 #include "frame.h"
 #include "source.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "arch-utils.h"
 #include "gdbsupport/filestuff.h"
 #include "target.h"
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index bf57e703d4..33abf2a523 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -23,7 +23,7 @@
 #include "gdb_obstack.h"
 #include "symtab.h"
 #include "symfile.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "objfiles.h"
 #include "gdbtypes.h"
 #include "dictionary.h"
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 3c3ede26a6..5d6d1c8ba8 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -26,7 +26,7 @@
 #include "objfiles.h"
 #include "frame.h"
 #include "symtab.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "complaints.h"
 #include "gdbtypes.h"
 #include "expression.h"
diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
index 7e5b71eece..ec2a1fef07 100644
--- a/gdb/csky-tdep.c
+++ b/gdb/csky-tdep.c
@@ -35,7 +35,7 @@
 #include "arch-utils.h"
 #include "regcache.h"
 #include "osabi.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "reggroups.h"
 #include "elf/csky.h"
 #include "elf-bfd.h"
diff --git a/gdb/ctfread.c b/gdb/ctfread.c
index 5b6d731479..7fcc1e2f35 100644
--- a/gdb/ctfread.c
+++ b/gdb/ctfread.c
@@ -78,7 +78,7 @@
 #include "defs.h"
 #include "buildsym.h"
 #include "complaints.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "ctfread.h"
 #include "psympriv.h"
 
diff --git a/gdb/d-exp.y b/gdb/d-exp.y
index fdd68a51db..8f517d482f 100644
--- a/gdb/d-exp.y
+++ b/gdb/d-exp.y
@@ -50,7 +50,7 @@
 #include "symfile.h" /* Required by objfiles.h.  */
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
 #include "charset.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "type-stack.h"
 
 #define parse_type(ps) builtin_type (ps->gdbarch ())
diff --git a/gdb/d-namespace.c b/gdb/d-namespace.c
index f3053d6a73..72d4b99894 100644
--- a/gdb/d-namespace.c
+++ b/gdb/d-namespace.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "symtab.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "language.h"
 #include "namespace.h"
 #include "d-lang.h"
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index e76bf702b3..9f62818d68 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -53,7 +53,7 @@
 #include "cp-abi.h"
 #include "cp-support.h"
 #include "psympriv.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "aout/aout64.h"
 #include "aout/stab_gnu.h"	/* We always use GNU stabs, not
 				   native, now.  */
diff --git a/gdb/dwarf2/frame-tailcall.c b/gdb/dwarf2/frame-tailcall.c
index a90056808d..98419ab0b6 100644
--- a/gdb/dwarf2/frame-tailcall.c
+++ b/gdb/dwarf2/frame-tailcall.c
@@ -22,7 +22,7 @@
 #include "dwarf2/frame-tailcall.h"
 #include "dwarf2/loc.h"
 #include "frame-unwind.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "hashtab.h"
 #include "gdbtypes.h"
 #include "regcache.h"
diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c
index a2bed9d4a9..5df984f421 100644
--- a/gdb/dwarf2/loc.c
+++ b/gdb/dwarf2/loc.c
@@ -30,7 +30,7 @@
 #include "ax-gdb.h"
 #include "regcache.h"
 #include "objfiles.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "gdbcmd.h"
 #include "complaints.h"
 #include "dwarf2.h"
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 865f9e2118..2a07a907bd 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -59,7 +59,7 @@
 #include "hashtab.h"
 #include "command.h"
 #include "gdbcmd.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "addrmap.h"
 #include "typeprint.h"
 #include "psympriv.h"
diff --git a/gdb/eval.c b/gdb/eval.c
index 51b51865f4..067c7d25f6 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -30,7 +30,7 @@
 #include "cp-abi.h"
 #include "infcall.h"
 #include "objc-lang.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "parser-defs.h"
 #include "cp-support.h"
 #include "ui-out.h"
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 5427a56f6a..19a7fd4668 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -26,7 +26,7 @@
 #include "parser-defs.h"
 #include "user-regs.h"		/* For user_reg_map_regnum_to_name.  */
 #include "target.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "objfiles.h"
 #include "valprint.h"
 #include "cli/cli-style.h"
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 0fa18dd186..8ada6e1b14 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -51,7 +51,7 @@
 #include "bfd.h" /* Required by objfiles.h.  */
 #include "symfile.h" /* Required by objfiles.h.  */
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-#include "block.h"
+#include "gdb-block.h"
 #include <ctype.h>
 #include <algorithm>
 #include "type-stack.h"
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index fabdf45861..961ab1de35 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -31,7 +31,7 @@
 #include "frame.h"
 #include "gdbcore.h"
 #include "command.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "dictionary.h"
 #include "cli/cli-style.h"
 #include "gdbarch.h"
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 7e9dab567f..ab3f4bd165 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -28,7 +28,7 @@
 #include "symfile.h"		/* for overlay functions */
 #include "regcache.h"
 #include "user-regs.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "objfiles.h"
 #include "language.h"
 #include "dwarf2/loc.h"
diff --git a/gdb/frame.c b/gdb/frame.c
index 0b708e6682..89c96da373 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -37,7 +37,7 @@
 #include "observable.h"
 #include "objfiles.h"
 #include "gdbthread.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "inline-frame.h"
 #include "tracepoint.h"
 #include "hashtab.h"
diff --git a/gdb/block.c b/gdb/gdb-block.c
similarity index 99%
rename from gdb/block.c
rename to gdb/gdb-block.c
index 597d6d5d87..5d07d908e2 100644
--- a/gdb/block.c
+++ b/gdb/gdb-block.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "symtab.h"
 #include "symfile.h"
 #include "gdb_obstack.h"
diff --git a/gdb/block.h b/gdb/gdb-block.h
similarity index 99%
rename from gdb/block.h
rename to gdb/gdb-block.h
index 50ab049f8e..28f9bf0492 100644
--- a/gdb/block.h
+++ b/gdb/gdb-block.h
@@ -17,8 +17,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef BLOCK_H
-#define BLOCK_H
+#ifndef GDB_BLOCK_H
+#define GDB_BLOCK_H
 
 #include "dictionary.h"
 
@@ -425,4 +425,4 @@ extern int block_find_non_opaque_type_preferred (struct symbol *sym,
 struct blockranges *make_blockranges (struct objfile *objfile,
                                       const std::vector<blockrange> &rangevec);
 
-#endif /* BLOCK_H */
+#endif /* GDB_BLOCK_H */
diff --git a/gdb/go-exp.y b/gdb/go-exp.y
index 17c76ac02a..78d073ace9 100644
--- a/gdb/go-exp.y
+++ b/gdb/go-exp.y
@@ -63,7 +63,7 @@
 #include "symfile.h" /* Required by objfiles.h.  */
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
 #include "charset.h"
-#include "block.h"
+#include "gdb-block.h"
 
 #define parse_type(ps) builtin_type (ps->gdbarch ())
 
diff --git a/gdb/go-lang.c b/gdb/go-lang.c
index cb42ef1b7c..aec311c8a6 100644
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -33,7 +33,7 @@
 
 #include "defs.h"
 #include "gdb_obstack.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "symtab.h"
 #include "language.h"
 #include "varobj.h"
diff --git a/gdb/guile/scm-block.c b/gdb/guile/scm-block.c
index 813c6c1022..3235f9a8fa 100644
--- a/gdb/guile/scm-block.c
+++ b/gdb/guile/scm-block.c
@@ -21,7 +21,7 @@
    conventions, et.al.  */
 
 #include "defs.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "dictionary.h"
 #include "objfiles.h"
 #include "source.h"
diff --git a/gdb/guile/scm-frame.c b/gdb/guile/scm-frame.c
index 3617eb77de..a56eb10bae 100644
--- a/gdb/guile/scm-frame.c
+++ b/gdb/guile/scm-frame.c
@@ -21,7 +21,7 @@
    conventions, et.al.  */
 
 #include "defs.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "frame.h"
 #include "inferior.h"
 #include "objfiles.h"
diff --git a/gdb/guile/scm-symbol.c b/gdb/guile/scm-symbol.c
index 8bad7e6c5a..84f63a95b0 100644
--- a/gdb/guile/scm-symbol.c
+++ b/gdb/guile/scm-symbol.c
@@ -21,7 +21,7 @@
    conventions, et.al.  */
 
 #include "defs.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "frame.h"
 #include "symtab.h"
 #include "objfiles.h"
diff --git a/gdb/guile/scm-symtab.c b/gdb/guile/scm-symtab.c
index 0efd0aafac..2f5d650e0f 100644
--- a/gdb/guile/scm-symtab.c
+++ b/gdb/guile/scm-symtab.c
@@ -24,7 +24,7 @@
 #include "symtab.h"
 #include "source.h"
 #include "objfiles.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "guile-internal.h"
 
 /* A <gdb:symtab> smob.  */
diff --git a/gdb/infcall.c b/gdb/infcall.c
index cdb30137c3..0f86d5633c 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -25,7 +25,7 @@
 #include "regcache.h"
 #include "inferior.h"
 #include "infrun.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "gdbcore.h"
 #include "language.h"
 #include "objfiles.h"
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index cfc3169992..52d1a2937a 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -36,7 +36,7 @@
 #include "ui-out.h"
 #include "regcache.h"
 #include "reggroups.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "solib.h"
 #include <ctype.h>
 #include "observable.h"
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 938bc081a1..d4217d0a89 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -40,7 +40,7 @@
 #include "language.h"
 #include "solib.h"
 #include "main.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "mi/mi-common.h"
 #include "event-top.h"
 #include "record.h"
diff --git a/gdb/inline-frame.c b/gdb/inline-frame.c
index 300b1224db..e0caec3a51 100644
--- a/gdb/inline-frame.c
+++ b/gdb/inline-frame.c
@@ -21,7 +21,7 @@
 #include "breakpoint.h"
 #include "inline-frame.h"
 #include "addrmap.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "frame-unwind.h"
 #include "inferior.h"
 #include "gdbthread.h"
diff --git a/gdb/jit.c b/gdb/jit.c
index 024c66e7ad..03a45b0414 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -21,7 +21,7 @@
 
 #include "jit.h"
 #include "jit-reader.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "breakpoint.h"
 #include "command.h"
 #include "dictionary.h"
diff --git a/gdb/linespec.c b/gdb/linespec.c
index e8f3d594c3..3d9b04eb1d 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -30,7 +30,7 @@
 #include "cp-abi.h"
 #include "cp-support.h"
 #include "parser-defs.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "objc-lang.h"
 #include "linespec.h"
 #include "language.h"
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index c79c1f2582..43c405afc0 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -46,7 +46,7 @@
 #include "bfd.h" /* Required by objfiles.h.  */
 #include "symfile.h" /* Required by objfiles.h.  */
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-#include "block.h"
+#include "gdb-block.h"
 
 #define parse_type(ps) builtin_type (ps->gdbarch ())
 #define parse_m2_type(ps) builtin_m2_type (ps->gdbarch ())
diff --git a/gdb/maint.c b/gdb/maint.c
index 46dd99f6cc..7c746e80d2 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -28,7 +28,7 @@
 #include "command.h"
 #include "gdbcmd.h"
 #include "symtab.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "gdbtypes.h"
 #include "demangle.h"
 #include "gdbcore.h"
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index d38372041d..3f041b91cc 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -51,7 +51,7 @@
 #include "complaints.h"
 #include "demangle.h"
 #include "gdb-demangle.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "dictionary.h"
 #include "mdebugread.h"
 #include <sys/stat.h>
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index a8ef46df60..e4abd47717 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -24,7 +24,7 @@
 #include "mi-cmds.h"
 #include "ui-out.h"
 #include "symtab.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "stack.h"
 #include "dictionary.h"
 #include "language.h"
diff --git a/gdb/mips-sde-tdep.c b/gdb/mips-sde-tdep.c
index 685c3c7263..1ceb8e2182 100644
--- a/gdb/mips-sde-tdep.c
+++ b/gdb/mips-sde-tdep.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "osabi.h"
 #include "elf-bfd.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "symtab.h"
 
 #include "frame.h"
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index e0f0488880..3be4446461 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -36,7 +36,7 @@
 #include "regcache.h"
 #include "osabi.h"
 #include "mips-tdep.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "reggroups.h"
 #include "opcode/mips.h"
 #include "elf/mips.h"
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 63cdac1b03..236e5e8c93 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -39,7 +39,7 @@
 #include "frame.h"
 #include "gdb_regex.h"
 #include "regcache.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "infcall.h"
 #include "valprint.h"
 #include "cli/cli-utils.h"
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 3aa7973e0d..7895ac0560 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -40,7 +40,7 @@
 #include "hashtab.h"
 
 #include "breakpoint.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "dictionary.h"
 #include "source.h"
 #include "addrmap.h"
diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c
index 75df206a2b..ce74475896 100644
--- a/gdb/or1k-tdep.c
+++ b/gdb/or1k-tdep.c
@@ -30,7 +30,7 @@
 #include "target.h"
 #include "regcache.h"
 #include "safe-ctype.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "reggroups.h"
 #include "arch-utils.h"
 #include "frame-unwind.h"
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index 85ef4bd385..66cbec804f 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -53,7 +53,7 @@
 #include "bfd.h" /* Required by objfiles.h.  */
 #include "symfile.h" /* Required by objfiles.h.  */
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols.  */
-#include "block.h"
+#include "gdb-block.h"
 #include "completer.h"
 
 #define parse_type(ps) builtin_type (ps->gdbarch ())
diff --git a/gdb/parse.c b/gdb/parse.c
index 2fb474e27f..bbe668ec50 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -45,7 +45,7 @@
 #include "symfile.h"		/* for overlay functions */
 #include "inferior.h"
 #include "target-float.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "source.h"
 #include "objfiles.h"
 #include "user-regs.h"
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 309d2cabff..e9eb91a87b 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -37,7 +37,7 @@
 #include "objfiles.h"		/* ditto */
 #include "completer.h"		/* for completion functions */
 #include "ui-out.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "disasm.h"
 #include "target-float.h"
 #include "observable.h"
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 59db469e55..5b96c98648 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -21,7 +21,7 @@
 #include "symtab.h"
 #include "objfiles.h"
 #include "psympriv.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "filenames.h"
 #include "source.h"
 #include "addrmap.h"
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c
index 26d59e102a..41c7e7f9c8 100644
--- a/gdb/python/py-block.c
+++ b/gdb/python/py-block.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "dictionary.h"
 #include "symtab.h"
 #include "python-internal.h"
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index 92ac5557d7..32fe6ae747 100644
--- a/gdb/python/py-finishbreakpoint.c
+++ b/gdb/python/py-finishbreakpoint.c
@@ -28,7 +28,7 @@
 #include "language.h"
 #include "observable.h"
 #include "inferior.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "location.h"
 
 /* Function that is called when a Python finish bp is found out of scope.  */
diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c
index e121afb222..254ee555cc 100644
--- a/gdb/python/py-frame.c
+++ b/gdb/python/py-frame.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "charset.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "frame.h"
 #include "symtab.h"
 #include "stack.h"
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c
index 34baa87502..cc35b20b50 100644
--- a/gdb/python/py-progspace.c
+++ b/gdb/python/py-progspace.c
@@ -25,7 +25,7 @@
 #include "language.h"
 #include "arch-utils.h"
 #include "solib.h"
-#include "block.h"
+#include "gdb-block.h"
 
 typedef struct
 {
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index d683505c8e..4601d0de11 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "frame.h"
 #include "symtab.h"
 #include "python-internal.h"
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index 6229bc5123..e6475b89fb 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -23,7 +23,7 @@
 #include "source.h"
 #include "python-internal.h"
 #include "objfiles.h"
-#include "block.h"
+#include "gdb-block.h"
 
 typedef struct stpy_symtab_object {
   PyObject_HEAD
diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index b86ba63054..1e4067cb1d 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -33,7 +33,7 @@
 #include "regcache.h"
 #include "osabi.h"
 #include "riscv-tdep.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "reggroups.h"
 #include "opcode/riscv.h"
 #include "elf/riscv.h"
diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y
index 4e7878f67e..88c670cdb3 100644
--- a/gdb/rust-exp.y
+++ b/gdb/rust-exp.y
@@ -31,7 +31,7 @@
 
 #include "defs.h"
 
-#include "block.h"
+#include "gdb-block.h"
 #include "charset.h"
 #include "cp-support.h"
 #include "gdb_obstack.h"
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index a590f9d6b4..23def1598f 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -21,7 +21,7 @@
 
 #include <ctype.h>
 
-#include "block.h"
+#include "gdb-block.h"
 #include "c-lang.h"
 #include "charset.h"
 #include "cp-support.h"
diff --git a/gdb/stack.c b/gdb/stack.c
index 616b629e20..05cbe26961 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -33,7 +33,7 @@
 #include "inferior.h"
 #include "annotate.h"
 #include "ui-out.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "stack.h"
 #include "dictionary.h"
 #include "reggroups.h"
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 2c38ce4431..2f1178bd7a 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -45,7 +45,7 @@
 #include "bcache.h"
 #include "hashtab.h"
 #include "readline/tilde.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "observable.h"
 #include "exec.h"
 #include "parser-defs.h"
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index fc56cfa938..3772951afa 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -29,7 +29,7 @@
 #include "gdb_obstack.h"
 #include "language.h"
 #include "bcache.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "gdb_regex.h"
 #include <sys/stat.h>
 #include "dictionary.h"
diff --git a/gdb/symtab.c b/gdb/symtab.c
index f96ad9554d..3e34998d37 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -47,7 +47,7 @@
 #include "typeprint.h"
 
 #include "gdb_obstack.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "dictionary.h"
 
 #include <sys/types.h>
@@ -1176,7 +1176,7 @@ eq_symbol_entry (const struct symbol_cache_slot *slot,
 	 then this means using the symbol name comparison function of
 	 the symbol's language with symbol->search_name ().  See
 	 dictionary.c.  It also means using symbol_matches_domain for
-	 found symbols.  See block.c.
+	 found symbols.  See gdb-block.c.
 
 	 If the slot records a not-found symbol, then require a precise match.
 	 We could still be lax with whitespace like strcmp_iw though.  */
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 00b7059be5..caa63ef172 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -34,7 +34,7 @@
 #include "linespec.h"
 #include "regcache.h"
 #include "completer.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "dictionary.h"
 #include "observable.h"
 #include "user-regs.h"
diff --git a/gdb/valops.c b/gdb/valops.c
index 0eb2b09621..ad94e4a3f2 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -30,7 +30,7 @@
 #include "gdbcmd.h"
 #include "regcache.h"
 #include "cp-abi.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "infcall.h"
 #include "dictionary.h"
 #include "cp-support.h"
diff --git a/gdb/value.c b/gdb/value.c
index a6e21309f8..f261316874 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -29,7 +29,7 @@
 #include "language.h"
 #include "demangle.h"
 #include "regcache.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "target-float.h"
 #include "objfiles.h"
 #include "valprint.h"
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 3358be4e77..20a7b2a622 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -21,7 +21,7 @@
 #include "frame.h"
 #include "language.h"
 #include "gdbcmd.h"
-#include "block.h"
+#include "gdb-block.h"
 #include "valprint.h"
 #include "gdb_regex.h"
 
-- 
2.28.0


[-- Attachment #3: Type: text/plain, Size: 993 bytes --]



> On Sep 6, 2020, at 04:52, Simon Marchi <simark@simark.ca> wrote:
> 
> On 2020-09-05 10:21 p.m., Saagar Jha wrote:
>> GDB doesn’t build with newer SDKs because its block.h conflicts with macOS’s Block.h. This patch resolves the issue by renaming GDB’s files.
>> 
> 
> Hi,
> 
> Can you include in the commit message:
> 
> - which SDK are we talking about (for the non-initiated to macOS)
> - the relevant versions (macOS, SDK)
> 
> Renaming our file is a little bit annoying, but I don't see a better solution.  We could
> change our includes to be "./block.h" or "gdb/block.h", but sooner or later someone will
> add back a "block.h" include.  It will silently break macOS because we don't have CI for
> that, and it will take somebody building GDB on macOS to notice and fix it.
> 
> In your ChangeLog entry, drop the "gdb" part of the filenames, so that they are relative
> to the ChangeLog file itself (Makefile.in instead of gdb/Makefile.in).
> 
> Simon


  reply	other threads:[~2020-09-07  1:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06  2:21 Saagar Jha
2020-09-06 11:52 ` Simon Marchi
2020-09-07  1:47   ` Saagar Jha [this message]
2020-09-07  2:53     ` Kevin Buettner
2020-09-07  5:27       ` Saagar Jha
2020-09-07  2:40   ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D3FC6073-CB6D-47FA-ADCC-4D29687C51D8@saagarjha.com \
    --to=saagar@saagarjha.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).