This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCHv5 1/5] gdb: Remove duplicate declaration of global innermost_block
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: gdb-patches at sourceware dot org
- Cc: donb at codesourcery dot com, simark at simark dot ca, palves at redhat dot com, Andrew Burgess <andrew dot burgess at embecosm dot com>
- Date: Tue, 2 Jan 2018 15:31:44 +0000
- Subject: [PATCHv5 1/5] gdb: Remove duplicate declaration of global innermost_block
- Authentication-results: sourceware.org; auth=none
- References: <cover.1514905848.git.andrew.burgess@embecosm.com>
- References: <cover.1508418720.git.andrew.burgess@embecosm.com> <cover.1514905848.git.andrew.burgess@embecosm.com>
The global 'innermost_block' is declared in two header files. Remove
one of the declarations, and add an include of the other header into
the one source file that could no longer see a declaration of
'innermost_block'.
gdb/ChangeLog:
* expression.h (innermost_block): Remove declaration.
* varobj.c: Add 'parser-defs.h' include.
---
gdb/ChangeLog | 5 +++++
gdb/expression.h | 5 -----
gdb/varobj.c | 1 +
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/gdb/expression.h b/gdb/expression.h
index a783ea5fef2..030f2f08e7a 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -111,11 +111,6 @@ extern expression_up parse_exp_1 (const char **, CORE_ADDR pc,
attempt completion. */
extern int parse_completion;
-/* The innermost context required by the stack and register variables
- we've encountered so far. To use this, set it to NULL, then call
- parse_<whatever>, then look at it. */
-extern const struct block *innermost_block;
-
/* From eval.c */
/* Values of NOSIDE argument to eval_subexp. */
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 01dabef37c3..701ef663766 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -30,6 +30,7 @@
#include "gdbthread.h"
#include "inferior.h"
#include "varobj-iter.h"
+#include "parser-defs.h"
#if HAVE_PYTHON
#include "python/python.h"
--
2.14.3