This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

Re: gdb vs readline, 1line patch


=?iso-8859-1?Q?Emmanuel_Thom=E9?= writes:
 > 
 > The following patch should be added to gdb since it includes readline
 > 4.1 ; diff is against stock 5.2.1
 > 
 > Starting with readline 4.2, this is no longer needed (it is possible as
 > well to patch readline/readline.c to adopt readline's new behavior,
 > which is using getenv if rl_terminal_name is unset).
 > 
 > Not setting rl_terminal_name results in non-working $if term= directives
 > in .inputrc. ; this has been a long-standing bug in gdb for a while.
 > 
 > Cheers,
 > 
 > E. Thomé.
 > 
 > --- gdb-5.2.1/gdb/top.c.orig	Sat Feb 23 21:12:13 2002
 > +++ gdb-5.2.1/gdb/top.c	Tue Aug 27 15:30:08 2002
 > @@ -1929,6 +1929,7 @@
 >  				 get_gdb_completer_word_break_characters ();
 >    rl_completer_quote_characters = get_gdb_completer_quote_characters ();
 >    rl_readline_name = "gdb";
 > +  rl_terminal_name = getenv("TERM");
 >  
 >    /* The name for this defun comes from Bash, where it originated.
 >       15 is Control-o, the same binding this function has in Bash.  */


I have committed the following.  I think this should also be added to
the 5.3 branch. Yes?  After all we are going to merge readline in
mainline really soon now, and it won't matter there, but the branch
could use the fix.

Elena


2002-09-09  Elena Zannoni  <ezannoni@redhat.com>

	From: Emmanuel Thome'  <thome@lix.polytechnique.fr>
	* top.c (init_main): Set rl_terminal_name.

Index: top.c
===================================================================
RCS file: /cvs/uberbaum/gdb/top.c,v
retrieving revision 1.66
diff -u -p -r1.66 top.c
--- top.c	18 Aug 2002 12:39:03 -0000	1.66
+++ top.c	9 Sep 2002 20:38:12 -0000
@@ -1957,6 +1957,7 @@ init_main (void)
 				 get_gdb_completer_word_break_characters ();
   rl_completer_quote_characters = get_gdb_completer_quote_characters ();
   rl_readline_name = "gdb";
+  rl_terminal_name = getenv ("TERM");
 
   /* The name for this defun comes from Bash, where it originated.
      15 is Control-o, the same binding this function has in Bash.  */


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