From patchwork Sun Sep 22 01:40:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 34633 Received: (qmail 105217 invoked by alias); 22 Sep 2019 01:40:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 105200 invoked by uid 89); 22 Sep 2019 01:40:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL autolearn=ham version=3.3.1 spammy=readline, indirectly, HContent-Transfer-Encoding:8bit X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 22 Sep 2019 01:40:15 +0000 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id cm4zHdp8Z4l0TtdG (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 Sep 2019 21:40:13 -0400 (EDT) Received: from simark.lan (unknown [192.222.164.54]) by smtp.ebox.ca (Postfix) with ESMTP id 14091441B21; Sat, 21 Sep 2019 21:40:13 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH] gdb: small cleanup in breakpoint.c's includes Date: Sat, 21 Sep 2019 21:40:12 -0400 Message-Id: <20190922014012.580651-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-IsSubscribed: yes In an attempt to reduce the number of files re-build when some headers are touched, I ran include-what-you-use with breakpoint.c as a guinea pig. It revealed a few files that were unnecessary to include, which this patch removes. breakpoint.c uses tilde_expand from readline, hence the necessity to include tilde.h. AFAIK, it's fine to include just that, and not the whole readline headers. include-what-you-use also reported many header files that should be included but aren't, I suppose that breakpoint.c currently includes them indirectly. For now I'll pretend I didn't see that :). gdb/ChangeLog: * breakpoint.c: Remove some includes: continuations.h, skip.h, mi/mi-main.h, readline/readline.h, readline/history.h. Add include: readline/tilde.h. -#include "skip.h" #include "ax-gdb.h" #include "dummy-frame.h" #include "interps.h" @@ -69,11 +67,9 @@ #include "thread-fsm.h" #include "tid-parse.h" #include "cli/cli-style.h" -#include "mi/mi-main.h" /* readline include files */ -#include "readline/readline.h" -#include "readline/history.h" +#include "readline/tilde.h" /* readline defines this. */ #undef savestring --- gdb/breakpoint.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 838c9d136fd1..3813f28672be 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -59,9 +59,7 @@ #include "gdb_regex.h" #include "probe.h" #include "cli/cli-utils.h" -#include "continuations.h" #include "stack.h" -#include "skip.h" #include "ax-gdb.h" #include "dummy-frame.h" #include "interps.h" @@ -69,11 +67,9 @@ #include "thread-fsm.h" #include "tid-parse.h" #include "cli/cli-style.h" -#include "mi/mi-main.h" /* readline include files */ -#include "readline/readline.h" -#include "readline/history.h" +#include "readline/tilde.h" /* readline defines this. */ #undef savestring