public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH v2 03/13] gdb: remove language.h include from frame.h
Date: Tue, 13 Dec 2022 22:34:31 -0500	[thread overview]
Message-ID: <20221214033441.499512-4-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20221214033441.499512-1-simon.marchi@polymtl.ca>

From: Simon Marchi <simon.marchi@efficios.com>

This helps resolve some cyclic include problem later in the series.
The only language-related thing frame.h needs is enum language, and that
is in defs.h.

Doing so reveals that a bunch of files were relying on frame.h to
include language.h, so fix the fallouts here and there.

Change-Id: I178a7efec1953c2d088adb58483bade1f349b705
---
 gdb/aarch64-tdep.c     | 1 +
 gdb/amd64-tdep.c       | 1 +
 gdb/arm-tdep.c         | 1 +
 gdb/cp-abi.c           | 1 +
 gdb/cp-support.c       | 1 +
 gdb/expop.h            | 1 +
 gdb/f-lang.h           | 1 +
 gdb/frame.h            | 1 -
 gdb/gnu-v3-abi.c       | 1 +
 gdb/go-lang.h          | 1 +
 gdb/m2-typeprint.c     | 1 +
 gdb/ppc-sysv-tdep.c    | 1 +
 gdb/python/py-disasm.c | 1 +
 gdb/python/py-frame.c  | 1 +
 gdb/thread.c           | 1 +
 15 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 024385a9fd81..6db50c710834 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -21,6 +21,7 @@
 #include "defs.h"
 
 #include "frame.h"
+#include "language.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
 #include "dis-asm.h"
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index bbfc509319cb..4ed547e6e520 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -20,6 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "language.h"
 #include "opcode/i386.h"
 #include "dis-asm.h"
 #include "arch-utils.h"
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 6f02f04b5cb2..d291fbd8645d 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -22,6 +22,7 @@
 #include <ctype.h>		/* XXX for isupper ().  */
 
 #include "frame.h"
+#include "language.h"
 #include "inferior.h"
 #include "infrun.h"
 #include "gdbcmd.h"
diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c
index c32b1f7d2f04..8c24c9d4ac61 100644
--- a/gdb/cp-abi.c
+++ b/gdb/cp-abi.c
@@ -18,6 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "language.h"
 #include "value.h"
 #include "cp-abi.h"
 #include "command.h"
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 77895a8bc98a..50cf00453177 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -20,6 +20,7 @@
 
 #include "defs.h"
 #include "cp-support.h"
+#include "language.h"
 #include "demangle.h"
 #include "gdbcmd.h"
 #include "dictionary.h"
diff --git a/gdb/expop.h b/gdb/expop.h
index 635580da2205..ed10b6dc36cc 100644
--- a/gdb/expop.h
+++ b/gdb/expop.h
@@ -24,6 +24,7 @@
 #include "c-lang.h"
 #include "cp-abi.h"
 #include "expression.h"
+#include "language.h"
 #include "objfiles.h"
 #include "gdbsupport/traits.h"
 #include "gdbsupport/enum-flags.h"
diff --git a/gdb/f-lang.h b/gdb/f-lang.h
index 6a97fabbd48a..afff9c8217d5 100644
--- a/gdb/f-lang.h
+++ b/gdb/f-lang.h
@@ -23,6 +23,7 @@
 #ifndef F_LANG_H
 #define F_LANG_H
 
+#include "language.h"
 #include "valprint.h"
 
 struct type_print_options;
diff --git a/gdb/frame.h b/gdb/frame.h
index cf8bbc6a52bd..5c292cd2b952 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -71,7 +71,6 @@
 
    */
 
-#include "language.h"
 #include "cli/cli-option.h"
 #include "gdbsupport/common-debug.h"
 
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index 2f000e634a4f..136630cda3b6 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -19,6 +19,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "language.h"
 #include "value.h"
 #include "cp-abi.h"
 #include "cp-support.h"
diff --git a/gdb/go-lang.h b/gdb/go-lang.h
index 523501bba4c3..5a098dc8a3eb 100644
--- a/gdb/go-lang.h
+++ b/gdb/go-lang.h
@@ -22,6 +22,7 @@
 
 struct type_print_options;
 
+#include "language.h"
 #include "gdbtypes.h"
 #include "symtab.h"
 #include "value.h"
diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c
index 67afddd5c391..6d1be6ff8b36 100644
--- a/gdb/m2-typeprint.c
+++ b/gdb/m2-typeprint.c
@@ -17,6 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "language.h"
 #include "gdbsupport/gdb_obstack.h"
 #include "bfd.h"		/* Binary File Description */
 #include "symtab.h"
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 32d007235660..ac721aa0ca1e 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -19,6 +19,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "language.h"
 #include "gdbcore.h"
 #include "inferior.h"
 #include "regcache.h"
diff --git a/gdb/python/py-disasm.c b/gdb/python/py-disasm.c
index a25252b43067..242cf6a57582 100644
--- a/gdb/python/py-disasm.c
+++ b/gdb/python/py-disasm.c
@@ -19,6 +19,7 @@
 
 #include "defs.h"
 #include "python-internal.h"
+#include "language.h"
 #include "dis-asm.h"
 #include "arch-utils.h"
 #include "charset.h"
diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c
index cbce9457755c..fac51a420320 100644
--- a/gdb/python/py-frame.c
+++ b/gdb/python/py-frame.c
@@ -18,6 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "language.h"
 #include "charset.h"
 #include "block.h"
 #include "frame.h"
diff --git a/gdb/thread.c b/gdb/thread.c
index cd7f1a7d5bb4..10ecda63e8b7 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -20,6 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "language.h"
 #include "symtab.h"
 #include "frame.h"
 #include "inferior.h"
-- 
2.38.1


  parent reply	other threads:[~2022-12-14  3:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14  3:34 [PATCH v2 00/13] Make frame_info_ptr automatic Simon Marchi
2022-12-14  3:34 ` [PATCH v2 01/13] gdb: move type_map_instance to compile/compile.c Simon Marchi
2022-12-14  3:34 ` [PATCH v2 02/13] gdb: move compile_instance to compile/compile.h Simon Marchi
2022-12-14  3:34 ` Simon Marchi [this message]
2022-12-14  3:34 ` [PATCH v2 04/13] gdb: move sect_offset and cu_offset to dwarf2/types.h Simon Marchi
2022-12-14  3:34 ` [PATCH v2 05/13] gdb: move call site types to call-site.h Simon Marchi
2022-12-14  3:34 ` [PATCH v2 06/13] gdb: move frame_info_ptr to frame.{c,h} Simon Marchi
2022-12-20 17:01   ` Bruno Larsen
2023-01-03 18:59     ` Simon Marchi
2022-12-14  3:34 ` [PATCH v2 07/13] gdb: add frame_id::user_created_p Simon Marchi
2022-12-14  3:34 ` [PATCH v2 08/13] gdb: add user-created frames to stash Simon Marchi
2022-12-14  3:34 ` [PATCH v2 09/13] gdb: add create_new_frame(frame_id) overload Simon Marchi
2022-12-14  3:34 ` [PATCH v2 10/13] gdb: make it possible to restore selected user-created frames Simon Marchi
2022-12-14  3:34 ` [PATCH v2 11/13] gdb: make user-created frames reinflatable Simon Marchi
2023-01-23 12:57   ` Tom de Vries
2023-01-23 14:34     ` Luis Machado
2023-01-24  3:55       ` Simon Marchi
2023-01-24  8:22         ` Luis Machado
2023-01-25  3:45           ` Simon Marchi
2023-01-30  8:49             ` Luis Machado
2023-01-30 16:20               ` Simon Marchi
2022-12-14  3:34 ` [PATCH v2 12/13] gdb: make frame_info_ptr grab frame level and id on construction Simon Marchi
2022-12-14  3:34 ` [PATCH v2 13/13] gdb: make frame_info_ptr auto-reinflatable Simon Marchi
2022-12-20 16:57 ` [PATCH v2 00/13] Make frame_info_ptr automatic Bruno Larsen
2023-01-03 19:00   ` Simon Marchi
2023-01-03 19:09 ` Simon Marchi
2023-01-18 18:10 ` Tom Tromey
2023-01-19  3:40   ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221214033441.499512-4-simon.marchi@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).