Do not include py-ref.h in most files
authorTom Tromey <tom@tromey.com>
Mon, 21 Jan 2019 20:49:06 +0000 (13:49 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 23 Jan 2019 03:35:21 +0000 (20:35 -0700)
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-22  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.

27 files changed:
gdb/ChangeLog
gdb/python/py-arch.c
gdb/python/py-bpevent.c
gdb/python/py-cmd.c
gdb/python/py-continueevent.c
gdb/python/py-event.h
gdb/python/py-evtregistry.c
gdb/python/py-finishbreakpoint.c
gdb/python/py-frame.c
gdb/python/py-framefilter.c
gdb/python/py-function.c
gdb/python/py-infevents.c
gdb/python/py-linetable.c
gdb/python/py-objfile.c
gdb/python/py-param.c
gdb/python/py-prettyprint.c
gdb/python/py-progspace.c
gdb/python/py-symbol.c
gdb/python/py-symtab.c
gdb/python/py-type.c
gdb/python/py-unwind.c
gdb/python/py-utils.c
gdb/python/py-value.c
gdb/python/py-varobj.c
gdb/python/py-xmethods.c
gdb/python/python.c
gdb/varobj.c

index 02cca05a677144b61ef803400aa85582693983b5..63b66b07aac05e1a2927024b24cab4729b134641 100644 (file)
@@ -1,3 +1,32 @@
+2019-01-22  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.
+
 2019-01-22  Tom Tromey  <tom@tromey.com>
 
        * objfiles.h (struct objfile_per_bfd_storage): Use "struct"
index cbdd8818732dd51a10d936a1d19f1fcdfd08cb9c..23cb2c58326d09175f6ba42609e8c774c26aae1b 100644 (file)
@@ -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
index 6bdbd8cb1b905e77107384e5568b70170dcf44f5..64bd50e6cf50b143f733ce20322a8e13c6fc5b3c 100644 (file)
@@ -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.  */
index bc18cec436d2a7a0e5123ec981e707047958e718..1677c3dcec95662a44159a884182a8b27aeca992 100644 (file)
@@ -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
index eb17766b08a5aa12318664b658aad8c7f20e67ad..b9de1971d910427f56470c34fd90fe7a4f74c69a 100644 (file)
@@ -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
index f4a91017942f7610b7ed00eb7af8c2ef3a7ff3db..07b99d26857131e47a33620dd2940d83ba92296d 100644 (file)
@@ -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) \
index 941fe9df36254ffa067c2a18859156f4c3366060..cf3505e6542437aa9c8996890e8c400d86558ee9 100644 (file)
@@ -20,7 +20,6 @@
 #include "defs.h"
 #include "command.h"
 #include "py-events.h"
-#include "py-ref.h"
 
 events_object gdb_py_events;
 
index 6ad79cddb65d2fec1a1f7dc9401a7618b738378e..f3affbd0f432da48df74bead2ca4759d581a1514 100644 (file)
@@ -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";
index 88a50e73e2abef080cba9a95083db105bb1dc51f..0eef6543f848c622e313b8319a173cc97036d226 100644 (file)
@@ -28,7 +28,6 @@
 #include "symfile.h"
 #include "objfiles.h"
 #include "user-regs.h"
-#include "py-ref.h"
 
 typedef struct {
   PyObject_HEAD
index c078e9420ca14e67d8e1c78ce0686b113ed2bd47..7f416cb6d30e720458f1e7c7300046e297ede4ca 100644 (file)
@@ -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
index dbd5649bbb527696348a6b7691d6985ee54d85f5..46a66cf3ecea46fc957a9747c27bb3cd0a8cf2f6 100644 (file)
@@ -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");
index dc27e0d9b5994949b5f6a166ff1acb923b6b8e79..60bafc5b41cf25792fb649a63c8641563f8230e9 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "defs.h"
 #include "py-event.h"
-#include "py-ref.h"
 
 /* Construct either a gdb.InferiorCallPreEvent or a
    gdb.InferiorCallPostEvent. */
index a11a8d8855bd177ac976038ee4eb01a784ba8db5..b9d74b8aa3d9f1a89116af5670c8c781485455c9 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "defs.h"
 #include "python-internal.h"
-#include "py-ref.h"
 
 typedef struct {
   PyObject_HEAD
index efad0072c27d65455e2ced65ce7a9ebd29f70a04..67f63b314e35001ef746b16028bdc71368347606 100644 (file)
@@ -24,7 +24,6 @@
 #include "language.h"
 #include "build-id.h"
 #include "symtab.h"
-#include "py-ref.h"
 
 typedef struct
 {
index 5fd4360899268a98555853a426a449879f5b4cb1..3b79a5c4fd77823ae98011d7596e3f156f88643e 100644 (file)
@@ -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
index ae3001e61691e149102903afdf6847c7916b6d57..8effa81d5b09f8dd4332e3b706769f53095bea6b 100644 (file)
@@ -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.  */
 
index b80b2c260f2be32f090339124a3d67da12a74dc1..b82a91b44d598be5add3c705516f2e17f85eead6 100644 (file)
@@ -24,7 +24,6 @@
 #include "objfiles.h"
 #include "language.h"
 #include "arch-utils.h"
-#include "py-ref.h"
 #include "solib.h"
 #include "block.h"
 
index 61667579bf44c1eb3a0eaed91049b9600b6f46f4..afff995068921843b78b4b485d860a15d1859fc6 100644 (file)
@@ -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
index a5f376ae9e271c00e82e1525ef3944d38f3c1c06..0fef6e4747dc71e10cbbf64cfe910e6d3cf60470 100644 (file)
@@ -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
index fff3d302205b7345e33ede57d688cabbd40046cf..18c1598173096d406605b747d4d9f43425bbe7aa 100644 (file)
@@ -28,7 +28,6 @@
 #include "language.h"
 #include "vec.h"
 #include "typeprint.h"
-#include "py-ref.h"
 
 typedef struct pyty_type_object
 {
index 5fc555e1ef8ed7e4be9b8409506ecde7710c4b1a..f07a8d8fa20e5643e3b8bc310d35ab04d6076818 100644 (file)
@@ -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); }
index 0f838c2baea76e1365c2f6aa07effc4dc7926ed4..0f96aab718a9c04705f7b23dfe113ead796a9c57 100644 (file)
@@ -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,
index ebd7ef1a47e8ed95902048a31cf8473ed18c8471..20ef5822f8ee932866c88779f0ee6e8f685f7661 100644 (file)
@@ -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
index 274b2dedf86f2217ad5ab8e488cef0a7265bdf8d..611c4ca76f2a1b0206d0ef78dfb07ee51346c8e0 100644 (file)
@@ -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.  */
index 2e0b2bbcc91ee1641206e93c41f36b90fbc0767e..8606f40975029fa1e955128d50855587970317b4 100644 (file)
@@ -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";
index d8505e968d6f4de6e18af69222f493b7ac473411..eafcc0414b96f7be3ca94337612083970eec5ac8 100644 (file)
@@ -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
index f43910e17a28c58ee6e0b70c27bb6c41113dec6b..ca43a8f0c19f23d3b4fd698a8cca5015457ed392 100644 (file)
@@ -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