* [PATCH 6/9] Rename "lines" parameter in source-cache.h
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
2019-01-22 8:04 ` [PATCH 2/9] Remove a comment in compile/compile-cplus-types.c Tom Tromey
2019-01-22 8:04 ` [PATCH 8/9] Include coff/sym.h from coff/ecoff.h Tom Tromey
@ 2019-01-22 8:04 ` Tom Tromey
2019-01-22 8:04 ` [PATCH 9/9] corelow.c does not need sys/file.h Tom Tromey
` (6 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Tom Tromey @ 2019-01-22 8:04 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
A compile in the TUI somehow had "lines" defined as a macro. This
caused a compile error when including source-cache.h after whatever
header did that. I didn't track this down, but rather just changed
source-cache.h to avoid the clash.
2019-01-21 Tom Tromey <tom@tromey.com>
* source-cache.h (class source_cache) <get_source_lines,
get_plain_source_lines, extract_lines>: Rename "lines" parameter.
---
gdb/ChangeLog | 5 +++++
gdb/source-cache.h | 10 +++++-----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/gdb/source-cache.h b/gdb/source-cache.h
index b6656e035e..dd23266e25 100644
--- a/gdb/source-cache.h
+++ b/gdb/source-cache.h
@@ -36,10 +36,10 @@ public:
/* Get the source text for the source file in symtab S. FIRST_LINE
and LAST_LINE are the first and last lines to return; line
numbers are 1-based. If the file cannot be read, false is
- returned. Otherwise, LINES is set to the desired text. The
+ returned. Otherwise, LINES_OUT is set to the desired text. The
returned text may include ANSI terminal escapes. */
bool get_source_lines (struct symtab *s, int first_line,
- int last_line, std::string *lines);
+ int last_line, std::string *lines_out);
/* Remove all the items from the source cache. */
void clear ()
@@ -62,12 +62,12 @@ private:
source lines are not highlighted. The arguments and return value
are as for get_source_lines. */
bool get_plain_source_lines (struct symtab *s, int first_line,
- int last_line, std::string *lines);
+ int last_line, std::string *lines_out);
/* A helper function for get_plain_source_lines that extracts the
- desired source lines from TEXT, putting them into LINES. The
+ desired source lines from TEXT, putting them into LINES_OUT. The
arguments and return value are as for get_source_lines. */
bool extract_lines (const struct source_text &text, int first_line,
- int last_line, std::string *lines);
+ int last_line, std::string *lines_out);
/* The contents of the cache. */
std::vector<source_text> m_source_map;
--
2.17.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 9/9] corelow.c does not need sys/file.h
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
` (2 preceding siblings ...)
2019-01-22 8:04 ` [PATCH 6/9] Rename "lines" parameter in source-cache.h Tom Tromey
@ 2019-01-22 8:04 ` Tom Tromey
2019-01-22 8:04 ` [PATCH 3/9] Use "struct bcache" in objfiles.h Tom Tromey
` (5 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Tom Tromey @ 2019-01-22 8:04 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
I did not see any reason that corelow.c should include <sys/file.h>.
The provided explanatory comment seems to be wrong. This patch
removes the include.
2019-01-21 Tom Tromey <tom@tromey.com>
* corelow.c: Do not include sys/file.h.
---
gdb/ChangeLog | 4 ++++
gdb/corelow.c | 3 ---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/gdb/corelow.c b/gdb/corelow.c
index ab32e09828..462103a80b 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -21,9 +21,6 @@
#include "arch-utils.h"
#include <signal.h>
#include <fcntl.h>
-#ifdef HAVE_SYS_FILE_H
-#include <sys/file.h> /* needed for F_OK and friends */
-#endif
#include "frame.h" /* required by inferior.h */
#include "inferior.h"
#include "infrun.h"
--
2.17.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 3/9] Use "struct bcache" in objfiles.h
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
` (3 preceding siblings ...)
2019-01-22 8:04 ` [PATCH 9/9] corelow.c does not need sys/file.h Tom Tromey
@ 2019-01-22 8:04 ` Tom Tromey
2019-01-22 8:04 ` [PATCH 7/9] Include gdb_curses.h in tui-wingeneral.h Tom Tromey
` (4 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Tom Tromey @ 2019-01-22 8:04 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
If objfiles.h is included after bcache.h, then the "bcache" function
will cause a compiler error because "bcache" will be seen as a
function, not a type. Fix this error by using the "struct" keyword.
gdb/ChangeLog
2019-01-21 Tom Tromey <tom@tromey.com>
* objfiles.h (struct objfile_per_bfd_storage): Use "struct"
keyword for bcache.
---
gdb/ChangeLog | 5 +++++
gdb/objfiles.h | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 5f106d9835..a10781f598 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -240,11 +240,11 @@ struct objfile_per_bfd_storage
/* Byte cache for file names. */
- bcache *filename_cache = NULL;
+ struct bcache *filename_cache = NULL;
/* Byte cache for macros. */
- bcache *macro_cache = NULL;
+ struct bcache *macro_cache = NULL;
/* The gdbarch associated with the BFD. Note that this gdbarch is
determined solely from BFD information, without looking at target
--
2.17.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 4/9] Do not include py-ref.h in most files
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
` (5 preceding siblings ...)
2019-01-22 8:04 ` [PATCH 7/9] Include gdb_curses.h in tui-wingeneral.h Tom Tromey
@ 2019-01-22 8:04 ` Tom Tromey
2019-01-22 8:14 ` [PATCH 1/9] Include compile-internal.h in gcc-c-plugin.h Tom Tromey
` (2 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Tom Tromey @ 2019-01-22 8:04 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
py-ref.h can really only be included from a specific spot in
python-internal.h. The other includes are not useful, and cause
compilation errors if the includes are ever sorted. So, remove these
includes.
Arguably, py-ref.h should simply not be a separate header.
gdb/ChangeLog
2019-01-21 Tom Tromey <tom@tromey.com>
* python/py-arch.c: Do not include py-ref.h.
* python/py-bpevent.c: Do not include py-ref.h.
* python/py-cmd.c: Do not include py-ref.h.
* python/py-continueevent.c: Do not include py-ref.h.
* python/py-event.h: Do not include py-ref.h.
* python/py-evtregistry.c: Do not include py-ref.h.
* python/py-finishbreakpoint.c: Do not include py-ref.h.
* python/py-frame.c: Do not include py-ref.h.
* python/py-framefilter.c: Do not include py-ref.h.
* python/py-function.c: Do not include py-ref.h.
* python/py-infevents.c: Do not include py-ref.h.
* python/py-linetable.c: Do not include py-ref.h.
* python/py-objfile.c: Do not include py-ref.h.
* python/py-param.c: Do not include py-ref.h.
* python/py-prettyprint.c: Do not include py-ref.h.
* python/py-progspace.c: Do not include py-ref.h.
* python/py-symbol.c: Do not include py-ref.h.
* python/py-symtab.c: Do not include py-ref.h.
* python/py-type.c: Do not include py-ref.h.
* python/py-unwind.c: Do not include py-ref.h.
* python/py-utils.c: Do not include py-ref.h.
* python/py-value.c: Do not include py-ref.h.
* python/py-varobj.c: Do not include py-ref.h.
* python/py-xmethods.c: Do not include py-ref.h.
* python/python.c: Do not include py-ref.h.
* varobj.c: Do not include py-ref.h.
---
gdb/ChangeLog | 29 +++++++++++++++++++++++++++++
gdb/python/py-arch.c | 1 -
gdb/python/py-bpevent.c | 1 -
gdb/python/py-cmd.c | 1 -
gdb/python/py-continueevent.c | 1 -
gdb/python/py-event.h | 1 -
gdb/python/py-evtregistry.c | 1 -
gdb/python/py-finishbreakpoint.c | 1 -
gdb/python/py-frame.c | 1 -
gdb/python/py-framefilter.c | 1 -
gdb/python/py-function.c | 1 -
gdb/python/py-infevents.c | 1 -
gdb/python/py-linetable.c | 1 -
gdb/python/py-objfile.c | 1 -
gdb/python/py-param.c | 1 -
gdb/python/py-prettyprint.c | 1 -
gdb/python/py-progspace.c | 1 -
gdb/python/py-symbol.c | 1 -
gdb/python/py-symtab.c | 1 -
gdb/python/py-type.c | 1 -
gdb/python/py-unwind.c | 1 -
gdb/python/py-utils.c | 1 -
gdb/python/py-value.c | 1 -
gdb/python/py-varobj.c | 1 -
gdb/python/py-xmethods.c | 1 -
gdb/python/python.c | 1 -
gdb/varobj.c | 1 -
27 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/gdb/python/py-arch.c b/gdb/python/py-arch.c
index cbdd881873..23cb2c5832 100644
--- a/gdb/python/py-arch.c
+++ b/gdb/python/py-arch.c
@@ -22,7 +22,6 @@
#include "arch-utils.h"
#include "disasm.h"
#include "python-internal.h"
-#include "py-ref.h"
typedef struct arch_object_type_object {
PyObject_HEAD
diff --git a/gdb/python/py-bpevent.c b/gdb/python/py-bpevent.c
index 6bdbd8cb1b..64bd50e6cf 100644
--- a/gdb/python/py-bpevent.c
+++ b/gdb/python/py-bpevent.c
@@ -19,7 +19,6 @@
#include "defs.h"
#include "py-stopevent.h"
-#include "py-ref.h"
/* Create and initialize a BreakpointEvent object. This acquires new
references to BREAKPOINT_LIST and FIRST_BP. */
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index bc18cec436..1677c3dcec 100644
--- a/gdb/python/py-cmd.c
+++ b/gdb/python/py-cmd.c
@@ -27,7 +27,6 @@
#include "cli/cli-decode.h"
#include "completer.h"
#include "language.h"
-#include "py-ref.h"
/* Struct representing built-in completion types. */
struct cmdpy_completer
diff --git a/gdb/python/py-continueevent.c b/gdb/python/py-continueevent.c
index eb17766b08..b9de1971d9 100644
--- a/gdb/python/py-continueevent.c
+++ b/gdb/python/py-continueevent.c
@@ -19,7 +19,6 @@
#include "defs.h"
#include "py-event.h"
-#include "py-ref.h"
#include "gdbthread.h"
/* Create a gdb.ContinueEvent event. gdb.ContinueEvent is-a
diff --git a/gdb/python/py-event.h b/gdb/python/py-event.h
index f4a9101794..07b99d2685 100644
--- a/gdb/python/py-event.h
+++ b/gdb/python/py-event.h
@@ -24,7 +24,6 @@
#include "command.h"
#include "python-internal.h"
#include "inferior.h"
-#include "py-ref.h"
/* Declare all event types. */
#define GDB_PY_DEFINE_EVENT_TYPE(name, py_name, doc, base) \
diff --git a/gdb/python/py-evtregistry.c b/gdb/python/py-evtregistry.c
index 941fe9df36..cf3505e654 100644
--- a/gdb/python/py-evtregistry.c
+++ b/gdb/python/py-evtregistry.c
@@ -20,7 +20,6 @@
#include "defs.h"
#include "command.h"
#include "py-events.h"
-#include "py-ref.h"
events_object gdb_py_events;
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index 6ad79cddb6..f3affbd0f4 100644
--- a/gdb/python/py-finishbreakpoint.c
+++ b/gdb/python/py-finishbreakpoint.c
@@ -30,7 +30,6 @@
#include "inferior.h"
#include "block.h"
#include "location.h"
-#include "py-ref.h"
/* Function that is called when a Python finish bp is found out of scope. */
static const char outofscope_func[] = "out_of_scope";
diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c
index 88a50e73e2..0eef6543f8 100644
--- a/gdb/python/py-frame.c
+++ b/gdb/python/py-frame.c
@@ -28,7 +28,6 @@
#include "symfile.h"
#include "objfiles.h"
#include "user-regs.h"
-#include "py-ref.h"
typedef struct {
PyObject_HEAD
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
index c078e9420c..7f416cb6d3 100644
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -30,7 +30,6 @@
#include "demangle.h"
#include "mi/mi-cmds.h"
#include "python-internal.h"
-#include "py-ref.h"
#include "common/gdb_optional.h"
enum mi_print_types
diff --git a/gdb/python/py-function.c b/gdb/python/py-function.c
index dbd5649bbb..46a66cf3ec 100644
--- a/gdb/python/py-function.c
+++ b/gdb/python/py-function.c
@@ -27,7 +27,6 @@
#include "completer.h"
#include "expression.h"
#include "language.h"
-#include "py-ref.h"
extern PyTypeObject fnpy_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("PyObject");
diff --git a/gdb/python/py-infevents.c b/gdb/python/py-infevents.c
index dc27e0d9b5..60bafc5b41 100644
--- a/gdb/python/py-infevents.c
+++ b/gdb/python/py-infevents.c
@@ -19,7 +19,6 @@
#include "defs.h"
#include "py-event.h"
-#include "py-ref.h"
/* Construct either a gdb.InferiorCallPreEvent or a
gdb.InferiorCallPostEvent. */
diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c
index a11a8d8855..b9d74b8aa3 100644
--- a/gdb/python/py-linetable.c
+++ b/gdb/python/py-linetable.c
@@ -19,7 +19,6 @@
#include "defs.h"
#include "python-internal.h"
-#include "py-ref.h"
typedef struct {
PyObject_HEAD
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index efad0072c2..67f63b314e 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -24,7 +24,6 @@
#include "language.h"
#include "build-id.h"
#include "symtab.h"
-#include "py-ref.h"
typedef struct
{
diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c
index 5fd4360899..3b79a5c4fd 100644
--- a/gdb/python/py-param.c
+++ b/gdb/python/py-param.c
@@ -27,7 +27,6 @@
#include "completer.h"
#include "language.h"
#include "arch-utils.h"
-#include "py-ref.h"
/* Parameter constants and their values. */
struct parm_constant
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index ae3001e616..8effa81d5b 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -25,7 +25,6 @@
#include "extension-priv.h"
#include "python.h"
#include "python-internal.h"
-#include "py-ref.h"
/* Return type of print_string_repr. */
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c
index b80b2c260f..b82a91b44d 100644
--- a/gdb/python/py-progspace.c
+++ b/gdb/python/py-progspace.c
@@ -24,7 +24,6 @@
#include "objfiles.h"
#include "language.h"
#include "arch-utils.h"
-#include "py-ref.h"
#include "solib.h"
#include "block.h"
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 61667579bf..afff995068 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -23,7 +23,6 @@
#include "symtab.h"
#include "python-internal.h"
#include "objfiles.h"
-#include "py-ref.h"
typedef struct sympy_symbol_object {
PyObject_HEAD
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index a5f376ae9e..0fef6e4747 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -24,7 +24,6 @@
#include "python-internal.h"
#include "objfiles.h"
#include "block.h"
-#include "py-ref.h"
typedef struct stpy_symtab_object {
PyObject_HEAD
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index fff3d30220..18c1598173 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -28,7 +28,6 @@
#include "language.h"
#include "vec.h"
#include "typeprint.h"
-#include "py-ref.h"
typedef struct pyty_type_object
{
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index 5fc555e1ef..f07a8d8fa2 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -28,7 +28,6 @@
#include "regcache.h"
#include "valprint.h"
#include "user-regs.h"
-#include "py-ref.h"
#define TRACE_PY_UNWIND(level, args...) if (pyuw_debug >= level) \
{ fprintf_unfiltered (gdb_stdlog, args); }
diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c
index 0f838c2bae..0f96aab718 100644
--- a/gdb/python/py-utils.c
+++ b/gdb/python/py-utils.c
@@ -21,7 +21,6 @@
#include "charset.h"
#include "value.h"
#include "python-internal.h"
-#include "py-ref.h"
/* Converts a Python 8-bit string to a unicode string object. Assumes the
8-bit string is in the host charset. If an error occurs during conversion,
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index ebd7ef1a47..20ef5822f8 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -29,7 +29,6 @@
#include "python.h"
#include "python-internal.h"
-#include "py-ref.h"
/* Even though Python scalar types directly map to host types, we use
target types here to remain consistent with the values system in
diff --git a/gdb/python/py-varobj.c b/gdb/python/py-varobj.c
index 274b2dedf8..611c4ca76f 100644
--- a/gdb/python/py-varobj.c
+++ b/gdb/python/py-varobj.c
@@ -17,7 +17,6 @@
#include "python-internal.h"
#include "varobj.h"
#include "varobj-iter.h"
-#include "py-ref.h"
/* A dynamic varobj iterator "class" for python pretty-printed
varobjs. This inherits struct varobj_iter. */
diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c
index 2e0b2bbcc9..8606f40975 100644
--- a/gdb/python/py-xmethods.c
+++ b/gdb/python/py-xmethods.c
@@ -26,7 +26,6 @@
#include "python.h"
#include "python-internal.h"
-#include "py-ref.h"
static const char enabled_field_name[] = "enabled";
static const char match_method_name[] = "match";
diff --git a/gdb/python/python.c b/gdb/python/python.c
index d8505e968d..eafcc0414b 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -98,7 +98,6 @@ const struct extension_language_defn extension_language_python =
#include "gdbthread.h"
#include "interps.h"
#include "event-top.h"
-#include "py-ref.h"
#include "py-event.h"
/* True if Python has been successfully initialized, false
diff --git a/gdb/varobj.c b/gdb/varobj.c
index f43910e17a..ca43a8f0c1 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -35,7 +35,6 @@
#if HAVE_PYTHON
#include "python/python.h"
#include "python/python-internal.h"
-#include "python/py-ref.h"
#else
typedef int PyObject;
#endif
--
2.17.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 8/9] Include coff/sym.h from coff/ecoff.h
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
2019-01-22 8:04 ` [PATCH 2/9] Remove a comment in compile/compile-cplus-types.c Tom Tromey
@ 2019-01-22 8:04 ` Tom Tromey
2019-01-22 8:04 ` [PATCH 6/9] Rename "lines" parameter in source-cache.h Tom Tromey
` (7 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Tom Tromey @ 2019-01-22 8:04 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
coff/ecoff.h refers to some names defined in coff/sym.h. Include the
latter from the former, so that users of the header don't need to know
this detail.
2019-01-21 Tom Tromey <tom@tromey.com>
* coff/ecoff.h: Include coff/sym.h.
---
include/ChangeLog | 4 ++++
include/coff/ecoff.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/include/coff/ecoff.h b/include/coff/ecoff.h
index 0ea66c52aa..75cf3ead14 100644
--- a/include/coff/ecoff.h
+++ b/include/coff/ecoff.h
@@ -22,6 +22,8 @@
#ifndef ECOFF_H
#define ECOFF_H
+#include "coff/sym.h"
+
/* Mips magic numbers used in filehdr. MIPS_MAGIC_LITTLE is used on
little endian machines. MIPS_MAGIC_BIG is used on big endian
machines. Where is MIPS_MAGIC_1 from? */
--
2.17.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/9] Remove a comment in compile/compile-cplus-types.c
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
@ 2019-01-22 8:04 ` Tom Tromey
2019-01-22 8:04 ` [PATCH 8/9] Include coff/sym.h from coff/ecoff.h Tom Tromey
` (8 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Tom Tromey @ 2019-01-22 8:04 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
The include sorter can't handle multi-line comments on the same line
as a #include. This patch removes the only such comment.
In general I think these sorts of comments do not provide much value:
more often than not, I find that the comment is obsolete in one way or
another, and so the include sorter removes them in most cases.
gdb/ChangeLog
2019-01-21 Tom Tromey <tom@tromey.com>
* compile/compile-cplus-types.c: Remove a comment by #include.
---
gdb/ChangeLog | 4 ++++
gdb/compile/compile-cplus-types.c | 3 +--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c
index 97c4d3c707..330589c796 100644
--- a/gdb/compile/compile-cplus-types.c
+++ b/gdb/compile/compile-cplus-types.c
@@ -32,8 +32,7 @@
#include "block.h"
#include "gdbcmd.h"
#include "c-lang.h"
-#include "compile-c.h" /* Included for c_get_range_decl_name
- et al. */
+#include "compile-c.h"
#include <algorithm>
/* Default compile flags for C++. */
--
2.17.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 7/9] Include gdb_curses.h in tui-wingeneral.h
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
` (4 preceding siblings ...)
2019-01-22 8:04 ` [PATCH 3/9] Use "struct bcache" in objfiles.h Tom Tromey
@ 2019-01-22 8:04 ` Tom Tromey
2019-01-22 8:04 ` [PATCH 4/9] Do not include py-ref.h in most files Tom Tromey
` (3 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Tom Tromey @ 2019-01-22 8:04 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
tui-wingeneral.h uses WINDOW, which is defined by curses. So, include
gdb_curses.h from tui-wingeneral.h.
2019-01-21 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.h: Include gdb_curses.h.
---
gdb/ChangeLog | 4 ++++
gdb/tui/tui-wingeneral.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/gdb/tui/tui-wingeneral.h b/gdb/tui/tui-wingeneral.h
index 181bacc8e4..769573393d 100644
--- a/gdb/tui/tui-wingeneral.h
+++ b/gdb/tui/tui-wingeneral.h
@@ -22,6 +22,8 @@
#ifndef TUI_WINGENERAL_H
#define TUI_WINGENERAL_H
+#include "gdb_curses.h"
+
struct tui_win_info;
struct tui_gen_win_info;
--
2.17.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 5/9] Declare remote_target in remote-fileio.h
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
` (7 preceding siblings ...)
2019-01-22 8:14 ` [PATCH 1/9] Include compile-internal.h in gcc-c-plugin.h Tom Tromey
@ 2019-01-22 8:14 ` Tom Tromey
2019-01-22 19:47 ` [PATCH 0/9] #include cleanups Sergio Durigan Junior
9 siblings, 0 replies; 13+ messages in thread
From: Tom Tromey @ 2019-01-22 8:14 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
remote-fileio.h refers to remote_target, so forward-declare it.
2019-01-21 Tom Tromey <tom@tromey.com>
* remote-fileio.h (struct remote_target): Declare.
---
gdb/ChangeLog | 4 ++++
gdb/remote-fileio.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/gdb/remote-fileio.h b/gdb/remote-fileio.h
index f84e2539ef..4b3b2b2bf9 100644
--- a/gdb/remote-fileio.h
+++ b/gdb/remote-fileio.h
@@ -25,6 +25,7 @@
#include "fileio.h"
struct cmd_list_element;
+struct remote_target;
/* Unified interface to remote fileio, called in remote.c from
remote_wait () and remote_async_wait (). */
--
2.17.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/9] Include compile-internal.h in gcc-c-plugin.h
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
` (6 preceding siblings ...)
2019-01-22 8:04 ` [PATCH 4/9] Do not include py-ref.h in most files Tom Tromey
@ 2019-01-22 8:14 ` Tom Tromey
2019-01-22 8:14 ` [PATCH 5/9] Declare remote_target in remote-fileio.h Tom Tromey
2019-01-22 19:47 ` [PATCH 0/9] #include cleanups Sergio Durigan Junior
9 siblings, 0 replies; 13+ messages in thread
From: Tom Tromey @ 2019-01-22 8:14 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
gcc-c-plugin.h refers to some types defined in compile-internal.h.
This patch changes the former to include the latter.
gdb/ChangeLog
2019-01-21 Tom Tromey <tom@tromey.com>
* compile/gcc-c-plugin.h: Include compile-internal.h.
---
gdb/ChangeLog | 4 ++++
gdb/compile/gcc-c-plugin.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/gdb/compile/gcc-c-plugin.h b/gdb/compile/gcc-c-plugin.h
index 882bb044ac..9ec78e2725 100644
--- a/gdb/compile/gcc-c-plugin.h
+++ b/gdb/compile/gcc-c-plugin.h
@@ -17,6 +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/>. */
+#include "compile-internal.h"
+
/* A class representing the C plug-in. */
class gcc_c_plugin
--
2.17.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 0/9] #include cleanups
@ 2019-01-22 8:14 Tom Tromey
2019-01-22 8:04 ` [PATCH 2/9] Remove a comment in compile/compile-cplus-types.c Tom Tromey
` (9 more replies)
0 siblings, 10 replies; 13+ messages in thread
From: Tom Tromey @ 2019-01-22 8:14 UTC (permalink / raw)
To: gdb-patches
This series cleans up various #includes, in preparation for sorting.
The patches make sense even if sort isn't desirable, though, as for
the most part they fix latent ordering bugs.
Tested by the buildbot.
Tom
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/9] #include cleanups
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
` (8 preceding siblings ...)
2019-01-22 8:14 ` [PATCH 5/9] Declare remote_target in remote-fileio.h Tom Tromey
@ 2019-01-22 19:47 ` Sergio Durigan Junior
2019-01-23 3:34 ` Tom Tromey
9 siblings, 1 reply; 13+ messages in thread
From: Sergio Durigan Junior @ 2019-01-22 19:47 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On Tuesday, January 22 2019, Tom Tromey wrote:
> This series cleans up various #includes, in preparation for sorting.
> The patches make sense even if sort isn't desirable, though, as for
> the most part they fix latent ordering bugs.
>
> Tested by the buildbot.
I looked at the patches, and they seem good to me. Thanks for doing
this.
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/9] #include cleanups
2019-01-22 19:47 ` [PATCH 0/9] #include cleanups Sergio Durigan Junior
@ 2019-01-23 3:34 ` Tom Tromey
2019-01-23 17:33 ` Sergio Durigan Junior
0 siblings, 1 reply; 13+ messages in thread
From: Tom Tromey @ 2019-01-23 3:34 UTC (permalink / raw)
To: Sergio Durigan Junior; +Cc: Tom Tromey, gdb-patches
>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:
Sergio> On Tuesday, January 22 2019, Tom Tromey wrote:
>> This series cleans up various #includes, in preparation for sorting.
>> The patches make sense even if sort isn't desirable, though, as for
>> the most part they fix latent ordering bugs.
>>
>> Tested by the buildbot.
Sergio> I looked at the patches, and they seem good to me. Thanks for doing
Sergio> this.
Thanks for the review.
I wasn't sure about patch #6, since I was a bit lazy about the
investigation. So, I went back and took a look.
gcc -E -dD says:
[...]
# 116 "/usr/include/term.h" 3 4
[...]
#define lines CUR Numbers[2]
So in the end I think just renaming "lines" in this header is a
reasonable thing to do.
I'm going to check the series in now.
Tom
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/9] #include cleanups
2019-01-23 3:34 ` Tom Tromey
@ 2019-01-23 17:33 ` Sergio Durigan Junior
0 siblings, 0 replies; 13+ messages in thread
From: Sergio Durigan Junior @ 2019-01-23 17:33 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On Tuesday, January 22 2019, Tom Tromey wrote:
>>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:
>
> Sergio> On Tuesday, January 22 2019, Tom Tromey wrote:
>>> This series cleans up various #includes, in preparation for sorting.
>>> The patches make sense even if sort isn't desirable, though, as for
>>> the most part they fix latent ordering bugs.
>>>
>>> Tested by the buildbot.
>
> Sergio> I looked at the patches, and they seem good to me. Thanks for doing
> Sergio> this.
>
> Thanks for the review.
>
> I wasn't sure about patch #6, since I was a bit lazy about the
> investigation. So, I went back and took a look.
>
> gcc -E -dD says:
>
> [...]
> # 116 "/usr/include/term.h" 3 4
> [...]
> #define lines CUR Numbers[2]
Thanks for the investigation. Yesterday I grep'ed files from readline
and ncurses, and was on my way to finding this define as well.
> So in the end I think just renaming "lines" in this header is a
> reasonable thing to do.
Yes, it does seem reasonable.
> I'm going to check the series in now.
Thanks,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-01-23 17:33 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 8:14 [PATCH 0/9] #include cleanups Tom Tromey
2019-01-22 8:04 ` [PATCH 2/9] Remove a comment in compile/compile-cplus-types.c Tom Tromey
2019-01-22 8:04 ` [PATCH 8/9] Include coff/sym.h from coff/ecoff.h Tom Tromey
2019-01-22 8:04 ` [PATCH 6/9] Rename "lines" parameter in source-cache.h Tom Tromey
2019-01-22 8:04 ` [PATCH 9/9] corelow.c does not need sys/file.h Tom Tromey
2019-01-22 8:04 ` [PATCH 3/9] Use "struct bcache" in objfiles.h Tom Tromey
2019-01-22 8:04 ` [PATCH 7/9] Include gdb_curses.h in tui-wingeneral.h Tom Tromey
2019-01-22 8:04 ` [PATCH 4/9] Do not include py-ref.h in most files Tom Tromey
2019-01-22 8:14 ` [PATCH 1/9] Include compile-internal.h in gcc-c-plugin.h Tom Tromey
2019-01-22 8:14 ` [PATCH 5/9] Declare remote_target in remote-fileio.h Tom Tromey
2019-01-22 19:47 ` [PATCH 0/9] #include cleanups Sergio Durigan Junior
2019-01-23 3:34 ` Tom Tromey
2019-01-23 17:33 ` Sergio Durigan Junior
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).