From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 1F2553858D39; Wed, 8 Feb 2023 18:37:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F2553858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675881461; bh=/m5mdCPHZQH/Bd9Ll/5RtXAiHS1X447kAt/9jrRKppY=; h=From:To:Subject:Date:From; b=VuMOU8B/EgIv7XY/9cOI5EyzbNXbjzB3CHsZTBi3vrZZyS2EXLuOFrBD8/lcSNJ9j 2/heae7q9lrBx2TPVprfbyxWcHYfaPC54FxaFaf4joWwbt0MZTTPvoyzWojvOfzAC5 qJmOAWkc9Rq0b//GitkaKGtzWyI+QbE+OepCVaEU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Don't include block.h from expop.h X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: b885aea1bb987435929b4298982ac6fc27f69403 X-Git-Newrev: 0671cc8b19d5b96f448a0a487cf12fe772df08fb Message-Id: <20230208183741.1F2553858D39@sourceware.org> Date: Wed, 8 Feb 2023 18:37:41 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D0671cc8b19d5= b96f448a0a487cf12fe772df08fb commit 0671cc8b19d5b96f448a0a487cf12fe772df08fb Author: Tom Tromey Date: Sat Jan 21 14:00:05 2023 -0700 Don't include block.h from expop.h =20 expop.h needs block.h for a single inline function. However, I don't think most of the check_objfile functions need to be defined in the header (just the templates). This patch moves the one offending function and removes the include. Diff: --- gdb/expop.h | 8 ++------ gdb/expprint.c | 6 ++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gdb/expop.h b/gdb/expop.h index 9e6ab0dd244..bfe55e4f2fd 100644 --- a/gdb/expop.h +++ b/gdb/expop.h @@ -20,7 +20,6 @@ #ifndef EXPOP_H #define EXPOP_H =20 -#include "block.h" #include "c-lang.h" #include "cp-abi.h" #include "expression.h" @@ -229,11 +228,8 @@ check_objfile (struct symbol *sym, struct objfile *obj= file) return check_objfile (sym->objfile (), objfile); } =20 -static inline bool -check_objfile (const struct block *block, struct objfile *objfile) -{ - return check_objfile (block_objfile (block), objfile); -} +extern bool check_objfile (const struct block *block, + struct objfile *objfile); =20 static inline bool check_objfile (const block_symbol &sym, struct objfile *objfile) diff --git a/gdb/expprint.c b/gdb/expprint.c index b70645fac92..63004f7f106 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -75,6 +75,12 @@ debug_exp (struct expression *exp) namespace expr { =20 +bool +check_objfile (const struct block *block, struct objfile *objfile) +{ + return check_objfile (block_objfile (block), objfile); +} + void dump_for_expression (struct ui_file *stream, int depth, enum exp_opcode op) {