From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5583 invoked by alias); 13 Oct 2019 03:47:24 -0000 Mailing-List: contact gdb-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: gdb-cvs-owner@sourceware.org List-Subscribe: Sender: gdb-cvs-owner@sourceware.org Received: (qmail 5539 invoked by uid 10037); 13 Oct 2019 03:47:24 -0000 Date: Sun, 13 Oct 2019 03:47:00 -0000 Message-ID: <20191013034724.5538.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: small cleanup in breakpoint.c's includes X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: d6e763135663f01349ed4126b80090ea2f37fcf2 X-Git-Newrev: 073bbbb058e36c60e5d30a4a25b48307429b7128 X-SW-Source: 2019-10/txt/msg00109.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=073bbbb058e36c60e5d30a4a25b48307429b7128 commit 073bbbb058e36c60e5d30a4a25b48307429b7128 Author: Simon Marchi Date: Sat Oct 12 23:46:15 2019 -0400 gdb: small cleanup in breakpoint.c's includes 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 Change-Id: I88bfe9071f2f973fd84caaf04b95c33a4dfb33de Diff: --- gdb/ChangeLog | 6 ++++++ gdb/breakpoint.c | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e6e1489..381bdc4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2019-10-12 Simon Marchi + + * breakpoint.c: Remove some includes: continuations.h, skip.h, + mi/mi-main.h, readline/readline.h, readline/history.h. Add + include: readline/tilde.h. + 2019-10-12 Christian Biesinger * remote.c (remote_target::get_trace_status): Remove declaration of diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 0a70516..31f4005 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