[PATCHv4,1/5] gdb: Remove duplicate declaration of a function

Message ID 2677012b106ea6d716c7f6baf9388fe3d3772402.1508418720.git.andrew.burgess@embecosm.com
State New, archived
Headers

Commit Message

Andrew Burgess Oct. 19, 2017, 1:27 p.m. UTC
  A function is declared in two header files.  Remove the extra
declaration, and add an include of the correct header into the one place
this seems cause an issue.

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(-)
  

Comments

Simon Marchi Nov. 12, 2017, 4 p.m. UTC | #1
On 2017-10-19 09:27 AM, Andrew Burgess wrote:
> A function is declared in two header files.  Remove the extra

function, or global variable?

> declaration, and add an include of the correct header into the one place
> this seems cause an issue.

What issue?

The change in itself looks good to me.

Simon
  

Patch

diff --git a/gdb/expression.h b/gdb/expression.h
index 9e4ddf5ded..396ddf776a 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -113,11 +113,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 2d850fb5e1..f2232888c4 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"