aboutsummaryrefslogtreecommitdiff
path: root/gdb/command.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-06-28 15:19:02 +0100
committerPedro Alves <palves@redhat.com>2017-06-28 15:19:02 +0100
commit6e75794e9da0e12b44c36272e16d18449d25a03d (patch)
tree0d6f16083ee9353ddb0f31e9a1d39d561cd14855 /gdb/command.h
parentbc491f2e76df1f2cec877eb07e88209b609ddecf (diff)
downloadgdb-6e75794e9da0e12b44c36272e16d18449d25a03d.zip
gdb-6e75794e9da0e12b44c36272e16d18449d25a03d.tar.gz
gdb-6e75794e9da0e12b44c36272e16d18449d25a03d.tar.bz2
gdb/command.h: Include common/scoped_restore.h
command.h depends on scoped_restore: extern scoped_restore_tmpl<int> prevent_dont_repeat (void); But doesn't include the corresponding header ("common/scoped_restore.h"). We haven't noticed a problem because utils.h includes scoped_restore.h, and defs.h includes utils.h. However, a patch that makes "symtab.h" include "completer.h", exposed the issue: https://sourceware.org/ml/gdb-patches/2017-06/msg00023.html. Without this fix that would break building all .o files like this: In file included from src/gdb/completer.h:21:0, from src/gdb/symtab.h:28, from src/gdb/language.h:26, from src/gdb/frame.h:72, from src/gdb/gdbarch.h:39, from src/gdb/defs.h:636, from src/gdb/top.c:20: src/gdb/command.h:434:8: error: ‘scoped_restore_tmpl’ does not name a type extern scoped_restore_tmpl<int> prevent_dont_repeat (void); ^ Makefile:1911: recipe for target 'top.o' failed because defs.h includes gdbarch.h before it includes utils.h. gdb/ChangeLog: 2017-06-28 Pedro Alves <palves@redhat.com> * command.h: Include "common/scoped_restore.h".
Diffstat (limited to 'gdb/command.h')
-rw-r--r--gdb/command.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/command.h b/gdb/command.h
index aa179e9..4a56a51 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -19,6 +19,7 @@
#define COMMAND_H 1
#include "gdb_vecs.h"
+#include "common/scoped_restore.h"
/* This file defines the public interface for any code wanting to
create commands. */