This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch to build gdb-5.0 with readline-4.1


Hi,

I noticed that one of the 'TODO' items was
"Readline 4.? is out.  A merge wouldn't hurt."

So I've done exactly that (hopefully no-one else
has done this already).  Note that I have updated
the ChangeLog files, which may not be the "right
thing".  If so,  please accept my apologies, but
this is the first patch I have ever put together...
for anyone.

Here are my changes:

gdb-5.0/gdb/ChangeLog
2000-05-28 Andrew Gaylard <andrew.gaylard@za.didata.com>

        * event-top.c, mac-xdep.c, top.c, tracepoint.c,
        utils.c: Updated to build with readline-4.1.
        * top.c: Small fix to let readline know $TERM.

gdb-5.0/gdb/doc/ChangeLog
2000-05-28 Andrew Gaylard <andrew.gaylard@za.didata.com>

        * Build with readline-4.1: change Makefile.in and gdb.texinfo
        to refer to hsuser.texinfo and not inc-hist.texinfo.


Here's the recipe (starting with gdb-5.0 as distributed):

tar zxf gdb-5.0.tar.gz
patch -p0 <gdb-rl4.1-merge.diff
cd gdb-5.0
mv readline readline-2.x
tar zxf ../readline-4.1.tar.gz
ln -s readline-4.1 readline
./configure
make
make install

And here's the patch (also attached as MIME, since I 
suspect that my mailer might wrap some of these lines):

diff -aur gdb-5.0/gdb/ChangeLog gdb-5.0-ag/gdb/ChangeLog
--- gdb-5.0/gdb/ChangeLog       Thu May 18 06:47:59 2000
+++ gdb-5.0-ag/gdb/ChangeLog    Sun May 28 20:00:33 2000
@@ -1,3 +1,9 @@
+2000-05-28 Andrew Gaylard <andrew.gaylard@za.didata.com>
+
+       * event-top.c, mac-xdep.c, top.c, tracepoint.c,
+       utils.c: Updated to build with readline-4.1.
+       * top.c: Small fix to let readline know $TERM.
+
 2000-05-17  Andrew Cagney  <cagney@sourceware.cygnus.com>
 
        * GDB 5.0 released.
diff -aur gdb-5.0/gdb/doc/ChangeLog gdb-5.0-ag/gdb/doc/ChangeLog
--- gdb-5.0/gdb/doc/ChangeLog   Wed May 17 13:54:04 2000
+++ gdb-5.0-ag/gdb/doc/ChangeLog        Sun May 28 19:58:19 2000
@@ -1,3 +1,8 @@
+2000-05-28 Andrew Gaylard <andrew.gaylard@za.didata.com>
+
+       * Build with readline-4.1: change Makefile.in and gdb.texinfo
+       to refer to hsuser.texinfo and not inc-hist.texinfo.
+
 2000-05-17  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * Makefile.in (install-info): Run install-info on installed Info
diff -aur gdb-5.0/gdb/doc/Makefile.in gdb-5.0-ag/gdb/doc/Makefile.in
--- gdb-5.0/gdb/doc/Makefile.in Wed May 17 13:54:04 2000
+++ gdb-5.0-ag/gdb/doc/Makefile.in      Sun May 28 15:41:10 2000
@@ -98,7 +98,7 @@
 SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED)
 
 SFILES_DOC = $(SFILES_LOCAL) $(GDBMI_DIR)/gdbmi.texinfo \
-                $(READLINE_DIR)/rluser.texinfo
$(READLINE_DIR)/inc-hist.texinfo
+                $(READLINE_DIR)/rluser.texinfo
$(READLINE_DIR)/hsuser.texinfo
 
 #### Host, target, and site specific Makefile fragments come in here.
 ###
@@ -171,7 +171,7 @@
        rm -f sedref.dvi sedref.tex tmp.sed
 
 clean: mostlyclean
-       rm -f rluser.texinfo inc-hist.texinfo gdb-cfg.texi
+       rm -f rluser.texinfo hsuser.texinfo gdb-cfg.texi
 
 distclean: clean
        rm -f Makefile config.status
@@ -280,11 +280,11 @@
                -e 's/^@end ftable/@end table/g' \
                ${READLINE_DIR}/rluser.texinfo > ./rluser.texinfo
 
-inc-hist.texinfo: ${READLINE_DIR}/inc-hist.texinfo
+hsuser.texinfo: ${READLINE_DIR}/hsuser.texinfo
        (test "$$LN_S" = "ln -s" && \
-        ln -s ${READLINE_DIR}/inc-hist.texinfo .) || \
-       ln ${READLINE_DIR}/inc-hist.texinfo . || \
-       cp ${READLINE_DIR}/inc-hist.texinfo .
+        ln -s ${READLINE_DIR}/hsuser.texinfo .) || \
+       ln ${READLINE_DIR}/hsuser.texinfo . || \
+       cp ${READLINE_DIR}/hsuser.texinfo .
 
 gdbmi.texinfo: ${GDBMI_DIR}/gdbmi.texinfo
        (test "$$LN_S" = "ln -s" && \
@@ -293,7 +293,7 @@
        cp ${GDBMI_DIR}/gdbmi.texinfo .
 
 # gdb manual suitable for [gtn]roff -me
-gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo
gdbmi.texinfo
+gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo hsuser.texinfo
gdbmi.texinfo
        sed -e '/\\input texinfo/d' \
                -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
                -e '/^@ifinfo/,/^@end ifinfo/d' \
@@ -308,7 +308,7 @@
        >gdb.me 
 
 # gdb manual suitable for [gtn]roff -ms
-gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo
gdbmi.texinfo
+gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo hsuser.texinfo
gdbmi.texinfo
        sed -e '/\\input texinfo/d' \
                -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
                -e '/^@ifinfo/,/^@end ifinfo/d' \
@@ -325,7 +325,7 @@
 # gdb manual suitable for [tn]roff -mm
 # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer, 
 #   try leaving them in
-gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo
gdbmi.texinfo
+gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo hsuser.texinfo
gdbmi.texinfo
        sed -e '/\\input texinfo/d' \
                -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
                -e '/^@ifinfo/,/^@end ifinfo/d' \
diff -aur gdb-5.0/gdb/doc/gdb.texinfo gdb-5.0-ag/gdb/doc/gdb.texinfo
--- gdb-5.0/gdb/doc/gdb.texinfo Fri May 12 12:30:39 2000
+++ gdb-5.0-ag/gdb/doc/gdb.texinfo      Sun May 28 15:41:12 2000
@@ -12460,11 +12460,11 @@
 @c The readline documentation is distributed with the readline code
 @c and consists of the two following files:
 @c     rluser.texinfo
-@c     inc-hist.texinfo
+@c     hsuser.texinfo
 @c Use -I with makeinfo to point to the appropriate directory,
 @c environment var TEXINPUTS with TeX.
 @include rluser.texinfo
-@include inc-hist.texinfo
+@include hsuser.texinfo
 
 
 @node Formatting Documentation
diff -aur gdb-5.0/gdb/event-top.c gdb-5.0-ag/gdb/event-top.c
--- gdb-5.0/gdb/event-top.c     Thu Mar 30 20:54:28 2000
+++ gdb-5.0-ag/gdb/event-top.c  Sun May 28 15:41:12 2000
@@ -32,12 +32,14 @@
 #include "gdbcmd.h"
 
 /* readline include files */
+/* This is needed to prevent readline-4.1 (re-)defining it.  */
+#define savestring
 #include <readline/readline.h>
 #include <readline/history.h>
 
 #include <signal.h>
 
-/* readline defines this.  */
+/* readline needed this.  */
 #undef savestring
 
 extern void _initialize_event_loop (void);
diff -aur gdb-5.0/gdb/mac-xdep.c gdb-5.0-ag/gdb/mac-xdep.c
--- gdb-5.0/gdb/mac-xdep.c      Wed Jul  7 22:07:57 1999
+++ gdb-5.0-ag/gdb/mac-xdep.c   Sun May 28 15:41:13 2000
@@ -21,8 +21,12 @@
 
 #include "defs.h"
 
+/* This is needed to prevent readline-4.1 (re-)defining it.  */
+#define savestring
 #include <readline/readline.h>
 #include <readline/history.h>
+/* readline needed this.  */
+#undef savestring
 
 #include <Types.h>
 #include <Resources.h>
diff -aur gdb-5.0/gdb/top.c gdb-5.0-ag/gdb/top.c
--- gdb-5.0/gdb/top.c   Wed Apr 12 18:46:03 2000
+++ gdb-5.0-ag/gdb/top.c        Sun May 28 15:41:14 2000
@@ -36,10 +36,12 @@
 #include "version.h"
 
 /* readline include files */
+/* This is needed to prevent readline-4.1 (re-)defining it.  */
+#define savestring
 #include <readline/readline.h>
 #include <readline/history.h>
 
-/* readline defines this.  */
+/* readline needed this.  */
 #undef savestring
 
 #include <sys/types.h>
@@ -4127,6 +4129,7 @@
   rl_completer_word_break_characters =
gdb_completer_word_break_characters;
   rl_completer_quote_characters = gdb_completer_quote_characters;
   rl_readline_name = "gdb";
+  rl_terminal_name=getenv("TERM");
 
   /* Define the classes of commands.
      They will appear in the help list in the reverse of this order. 
*/
diff -aur gdb-5.0/gdb/tracepoint.c gdb-5.0-ag/gdb/tracepoint.c
--- gdb-5.0/gdb/tracepoint.c    Tue Dec 14 03:05:38 1999
+++ gdb-5.0-ag/gdb/tracepoint.c Sun May 28 15:41:15 2000
@@ -36,10 +36,12 @@
 #include "ax-gdb.h"
 
 /* readline include files */
+/* This is needed to prevent readline-4.1 (re-)defining it.  */
+#define savestring
 #include <readline/readline.h>
 #include <readline/history.h>
 
-/* readline defines this.  */
+/* readline needed this.  */
 #undef savestring
 
 #ifdef HAVE_UNISTD_H
diff -aur gdb-5.0/gdb/utils.c gdb-5.0-ag/gdb/utils.c
--- gdb-5.0/gdb/utils.c Fri Apr 21 06:10:46 2000
+++ gdb-5.0-ag/gdb/utils.c      Sun May 28 15:41:16 2000
@@ -50,12 +50,14 @@
 #include "language.h"
 #include "annotate.h"
 
+/* This is needed to prevent readline-4.1 (re-)defining it.  */
+#define savestring
 #include <readline/readline.h>
 
 #undef XMALLOC
 #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
 
-/* readline defines this.  */
+/* readline needed this.  */
 #undef savestring
 
 void (*error_begin_hook) PARAMS ((void));
diff -aur gdb-5.0/gdb/ChangeLog gdb-5.0-ag/gdb/ChangeLog
--- gdb-5.0/gdb/ChangeLog	Thu May 18 06:47:59 2000
+++ gdb-5.0-ag/gdb/ChangeLog	Sun May 28 20:00:33 2000
@@ -1,3 +1,9 @@
+2000-05-28 Andrew Gaylard <andrew.gaylard@za.didata.com>
+
+	* event-top.c, mac-xdep.c, top.c, tracepoint.c,
+	utils.c: Updated to build with readline-4.1.
+	* top.c: Small fix to let readline know $TERM.
+
 2000-05-17  Andrew Cagney  <cagney@sourceware.cygnus.com>
 
 	* GDB 5.0 released.
diff -aur gdb-5.0/gdb/doc/ChangeLog gdb-5.0-ag/gdb/doc/ChangeLog
--- gdb-5.0/gdb/doc/ChangeLog	Wed May 17 13:54:04 2000
+++ gdb-5.0-ag/gdb/doc/ChangeLog	Sun May 28 19:58:19 2000
@@ -1,3 +1,8 @@
+2000-05-28 Andrew Gaylard <andrew.gaylard@za.didata.com>
+
+	* Build with readline-4.1: change Makefile.in and gdb.texinfo
+	to refer to hsuser.texinfo and not inc-hist.texinfo.
+
 2000-05-17  Eli Zaretskii  <eliz@is.elta.co.il>
 
 	* Makefile.in (install-info): Run install-info on installed Info
diff -aur gdb-5.0/gdb/doc/Makefile.in gdb-5.0-ag/gdb/doc/Makefile.in
--- gdb-5.0/gdb/doc/Makefile.in	Wed May 17 13:54:04 2000
+++ gdb-5.0-ag/gdb/doc/Makefile.in	Sun May 28 15:41:10 2000
@@ -98,7 +98,7 @@
 SFILES_LOCAL = $(srcdir)/gdb.texinfo GDBvn.texi $(SFILES_INCLUDED)
 
 SFILES_DOC = $(SFILES_LOCAL) $(GDBMI_DIR)/gdbmi.texinfo \
-                $(READLINE_DIR)/rluser.texinfo $(READLINE_DIR)/inc-hist.texinfo
+                $(READLINE_DIR)/rluser.texinfo $(READLINE_DIR)/hsuser.texinfo
 
 #### Host, target, and site specific Makefile fragments come in here.
 ###
@@ -171,7 +171,7 @@
 	rm -f sedref.dvi sedref.tex tmp.sed
 
 clean: mostlyclean
-	rm -f rluser.texinfo inc-hist.texinfo gdb-cfg.texi
+	rm -f rluser.texinfo hsuser.texinfo gdb-cfg.texi
 
 distclean: clean
 	rm -f Makefile config.status
@@ -280,11 +280,11 @@
 		-e 's/^@end ftable/@end table/g' \
 		${READLINE_DIR}/rluser.texinfo > ./rluser.texinfo
 
-inc-hist.texinfo: ${READLINE_DIR}/inc-hist.texinfo
+hsuser.texinfo: ${READLINE_DIR}/hsuser.texinfo
 	(test "$$LN_S" = "ln -s" && \
-	 ln -s ${READLINE_DIR}/inc-hist.texinfo .) || \
-	ln ${READLINE_DIR}/inc-hist.texinfo . || \
-	cp ${READLINE_DIR}/inc-hist.texinfo .
+	 ln -s ${READLINE_DIR}/hsuser.texinfo .) || \
+	ln ${READLINE_DIR}/hsuser.texinfo . || \
+	cp ${READLINE_DIR}/hsuser.texinfo .
 
 gdbmi.texinfo: ${GDBMI_DIR}/gdbmi.texinfo
 	(test "$$LN_S" = "ln -s" && \
@@ -293,7 +293,7 @@
 	cp ${GDBMI_DIR}/gdbmi.texinfo .
 
 # gdb manual suitable for [gtn]roff -me
-gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo gdbmi.texinfo
+gdb.me: $(SFILES_LOCAL) links2roff rluser.texinfo hsuser.texinfo gdbmi.texinfo
 	sed -e '/\\input texinfo/d' \
 		-e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
 		-e '/^@ifinfo/,/^@end ifinfo/d' \
@@ -308,7 +308,7 @@
 	>gdb.me 
 
 # gdb manual suitable for [gtn]roff -ms
-gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo gdbmi.texinfo
+gdb.ms: $(SFILES_LOCAL) links2roff rluser.texinfo hsuser.texinfo gdbmi.texinfo
 	sed -e '/\\input texinfo/d' \
 		-e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
 		-e '/^@ifinfo/,/^@end ifinfo/d' \
@@ -325,7 +325,7 @@
 # gdb manual suitable for [tn]roff -mm
 # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer, 
 #   try leaving them in
-gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo inc-hist.texinfo gdbmi.texinfo
+gdb.mm: $(SFILES_LOCAL) links2roff rluser.texinfo hsuser.texinfo gdbmi.texinfo
 	sed -e '/\\input texinfo/d' \
 		-e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
 		-e '/^@ifinfo/,/^@end ifinfo/d' \
diff -aur gdb-5.0/gdb/doc/gdb.texinfo gdb-5.0-ag/gdb/doc/gdb.texinfo
--- gdb-5.0/gdb/doc/gdb.texinfo	Fri May 12 12:30:39 2000
+++ gdb-5.0-ag/gdb/doc/gdb.texinfo	Sun May 28 15:41:12 2000
@@ -12460,11 +12460,11 @@
 @c The readline documentation is distributed with the readline code
 @c and consists of the two following files:
 @c     rluser.texinfo
-@c     inc-hist.texinfo
+@c     hsuser.texinfo
 @c Use -I with makeinfo to point to the appropriate directory,
 @c environment var TEXINPUTS with TeX.
 @include rluser.texinfo
-@include inc-hist.texinfo
+@include hsuser.texinfo
 
 
 @node Formatting Documentation
diff -aur gdb-5.0/gdb/event-top.c gdb-5.0-ag/gdb/event-top.c
--- gdb-5.0/gdb/event-top.c	Thu Mar 30 20:54:28 2000
+++ gdb-5.0-ag/gdb/event-top.c	Sun May 28 15:41:12 2000
@@ -32,12 +32,14 @@
 #include "gdbcmd.h"
 
 /* readline include files */
+/* This is needed to prevent readline-4.1 (re-)defining it.  */
+#define savestring
 #include <readline/readline.h>
 #include <readline/history.h>
 
 #include <signal.h>
 
-/* readline defines this.  */
+/* readline needed this.  */
 #undef savestring
 
 extern void _initialize_event_loop (void);
diff -aur gdb-5.0/gdb/mac-xdep.c gdb-5.0-ag/gdb/mac-xdep.c
--- gdb-5.0/gdb/mac-xdep.c	Wed Jul  7 22:07:57 1999
+++ gdb-5.0-ag/gdb/mac-xdep.c	Sun May 28 15:41:13 2000
@@ -21,8 +21,12 @@
 
 #include "defs.h"
 
+/* This is needed to prevent readline-4.1 (re-)defining it.  */
+#define savestring
 #include <readline/readline.h>
 #include <readline/history.h>
+/* readline needed this.  */
+#undef savestring
 
 #include <Types.h>
 #include <Resources.h>
diff -aur gdb-5.0/gdb/top.c gdb-5.0-ag/gdb/top.c
--- gdb-5.0/gdb/top.c	Wed Apr 12 18:46:03 2000
+++ gdb-5.0-ag/gdb/top.c	Sun May 28 15:41:14 2000
@@ -36,10 +36,12 @@
 #include "version.h"
 
 /* readline include files */
+/* This is needed to prevent readline-4.1 (re-)defining it.  */
+#define savestring
 #include <readline/readline.h>
 #include <readline/history.h>
 
-/* readline defines this.  */
+/* readline needed this.  */
 #undef savestring
 
 #include <sys/types.h>
@@ -4127,6 +4129,7 @@
   rl_completer_word_break_characters = gdb_completer_word_break_characters;
   rl_completer_quote_characters = gdb_completer_quote_characters;
   rl_readline_name = "gdb";
+  rl_terminal_name=getenv("TERM");
 
   /* Define the classes of commands.
      They will appear in the help list in the reverse of this order.  */
diff -aur gdb-5.0/gdb/tracepoint.c gdb-5.0-ag/gdb/tracepoint.c
--- gdb-5.0/gdb/tracepoint.c	Tue Dec 14 03:05:38 1999
+++ gdb-5.0-ag/gdb/tracepoint.c	Sun May 28 15:41:15 2000
@@ -36,10 +36,12 @@
 #include "ax-gdb.h"
 
 /* readline include files */
+/* This is needed to prevent readline-4.1 (re-)defining it.  */
+#define savestring
 #include <readline/readline.h>
 #include <readline/history.h>
 
-/* readline defines this.  */
+/* readline needed this.  */
 #undef savestring
 
 #ifdef HAVE_UNISTD_H
diff -aur gdb-5.0/gdb/utils.c gdb-5.0-ag/gdb/utils.c
--- gdb-5.0/gdb/utils.c	Fri Apr 21 06:10:46 2000
+++ gdb-5.0-ag/gdb/utils.c	Sun May 28 15:41:16 2000
@@ -50,12 +50,14 @@
 #include "language.h"
 #include "annotate.h"
 
+/* This is needed to prevent readline-4.1 (re-)defining it.  */
+#define savestring
 #include <readline/readline.h>
 
 #undef XMALLOC
 #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
 
-/* readline defines this.  */
+/* readline needed this.  */
 #undef savestring
 
 void (*error_begin_hook) PARAMS ((void));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]