[binutils-gdb] Move processing_gcc to stabsread
Tom Tromey
tromey@sourceware.org
Mon Jul 16 15:16:00 GMT 2018
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6b84eeb21628a89b40c985b527d3d5db7806c93c
commit 6b84eeb21628a89b40c985b527d3d5db7806c93c
Author: Tom Tromey <tom@tromey.com>
Date: Sun May 20 11:16:57 2018 -0600
Move processing_gcc to stabsread
processing_gcc is also only used by stabsread -- it is set by the
DWARF reader, but this turns out not to be needed. So, this patch
moves processing_gcc and removes the assignment from the DWARF reader.
gdb/ChangeLog
2018-07-16 Tom Tromey <tom@tromey.com>
* stabsread.h (processing_gcc_compilation): Move from buildsym.h.
* dwarf2read.c (dwarf2_start_symtab): Don't set
processing_gcc_compilation.
* buildsym.h (processing_gcc_compilation): Move to stabsread.h.
Diff:
---
gdb/ChangeLog | 7 +++++++
gdb/buildsym.h | 5 -----
gdb/dwarf2read.c | 3 ---
gdb/stabsread.h | 5 +++++
4 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ad72cd8..f43ab29 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2018-07-16 Tom Tromey <tom@tromey.com>
+ * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
+ * dwarf2read.c (dwarf2_start_symtab): Don't set
+ processing_gcc_compilation.
+ * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
+
+2018-07-16 Tom Tromey <tom@tromey.com>
+
* stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
(next_symbol_text_func): Move from buildsym.h.
* stabsread.c (hashname): Move from buildsym.c.
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index 0b19c39..01d9acc 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -66,11 +66,6 @@ struct subfile
EXTERN struct subfile *current_subfile;
-/* Global variable which, when set, indicates that we are processing a
- .o file compiled with gcc */
-
-EXTERN unsigned char processing_gcc_compilation;
-
/* Record the symbols defined for each context in a list. We don't
create a struct block for the context until we know how long to
make it. */
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 372f45e..ff9d72c 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -21026,9 +21026,6 @@ dwarf2_start_symtab (struct dwarf2_cu *cu,
record_debugformat ("DWARF 2");
record_producer (cu->producer);
- /* We assume that we're processing GCC output. */
- processing_gcc_compilation = 2;
-
cu->processing_has_namespace_info = 0;
return cust;
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index 38e001a..0da88f4 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -48,6 +48,11 @@ EXTERN unsigned int symnum;
EXTERN const char *(*next_symbol_text_func) (struct objfile *);
+/* Global variable which, when set, indicates that we are processing a
+ .o file compiled with gcc */
+
+EXTERN unsigned char processing_gcc_compilation;
+
/* Hash table of global symbols whose values are not known yet.
They are chained thru the SYMBOL_VALUE_CHAIN, since we don't
have the correct data for that slot yet.
More information about the Gdb-cvs
mailing list