Don't include readline headers from tracepoint.c

Message ID 20190812180721.1904-1-tromey@adacore.com
State New
Headers show
Series
  • Don't include readline headers from tracepoint.c
Related show

Commit Message

Tom Tromey Aug. 12, 2019, 6:07 p.m.
I was curious why updating readline caused so much to be to rebuilt,
so I look at all the uses of the readline headers.  Most are included
for valid reasons (either readline directory or for tilde_expand); but
the includes in tracepoint.c didn't seem to be used.

This patch removes them.  Tested by rebuilding.

gdb/ChangeLog
2019-08-12  Tom Tromey  <tromey@adacore.com>

	* tracepoint.c: Don't include readline.h or history.h.
---
 gdb/ChangeLog    | 4 ++++
 gdb/tracepoint.c | 7 -------
 2 files changed, 4 insertions(+), 7 deletions(-)

-- 
2.20.1

Comments

Kevin Buettner Aug. 13, 2019, 4:15 p.m. | #1
On Mon, 12 Aug 2019 12:07:21 -0600
Tom Tromey <tromey@adacore.com> wrote:

> I was curious why updating readline caused so much to be to rebuilt,

> so I look at all the uses of the readline headers.  Most are included

> for valid reasons (either readline directory or for tilde_expand); but

> the includes in tracepoint.c didn't seem to be used.

> 

> This patch removes them.  Tested by rebuilding.

> 

> gdb/ChangeLog

> 2019-08-12  Tom Tromey  <tromey@adacore.com>

> 

> 	* tracepoint.c: Don't include readline.h or history.h.


LGTM.

Kevin

Patch

diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index ed1d75e170e..2d5b9c705ef 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -58,13 +58,6 @@ 
 #include "location.h"
 #include <algorithm>
 
-/* readline include files */
-#include "readline/readline.h"
-#include "readline/history.h"
-
-/* readline defines this.  */
-#undef savestring
-
 #include <unistd.h>
 
 /* Maximum length of an agent aexpression.