Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@cygnus.com>
To: Jimmy Guo <guo@cup.hp.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH 1 of 2] readline rl_prompt corruption fix
Date: Tue, 01 Aug 2000 10:17:00 -0000	[thread overview]
Message-ID: <14727.1571.65160.775918@kwikemart.cygnus.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10007281012060.7566-100000@hpcll168.cup.hp.com>

In general patches to readline should be sent to the official
readline maintainer, Chet Ramey. ftp://ftp.cwru.edu/pub/bash/ We don't
want to diverge from the official readline release unless absolutely
necessary. 
In any event, I am sligltly confused about the 2 patches. 
What was the original problem? The positioning of the cursor in the TUI?
Can you explain a little more?

Thanks
Elena


Jimmy Guo writes:
 > This is part 1 of 2 patches to fix readline rl_prompt string corruption
 > problem.  This patch is for the readline library that readline will
 > store a copy of the passed in prompt string.  The next patch is for
 > gdb/event-top.c to plug a mem leak due to this change.
 > 
 > - Jimmy
 > 
 > Fri Jul 28 09:58:55	Jimmy Guo	<guo@cup.hp.com>
 > 
 > 	* readline.c: Initalize globals rl_initialized rl_prompt.
 > 	(readline): Use a copy of prompt instead of itself when
 > 	assigning to rl_prompt in readline ().
 > 
 > 	* callback.c (rl_callback_handler_install): Use a copy of
 > 	prompt instead of itself when assigning to rl_prompt.
 > 	
 > 	* display.c: Initialize local_prompt and local_prompt_prefix.
 > 
 > Index: readline.c
 > /usr/local/bin/diff -c -w -L readline.c readline.c@@/main/cygnus/6 readline.c
 > *** readline.c
 > --- readline.c	Fri Jul 28 09:57:29 2000
 > ***************
 > *** 119,125 ****
 >   int rl_arg_sign = 1;
 >   
 >   /* Non-zero means we have been called at least once before. */
 > ! static int rl_initialized;
 >   
 >   /* If non-zero, this program is running in an EMACS buffer. */
 >   static int running_in_emacs;
 > --- 119,125 ----
 >   int rl_arg_sign = 1;
 >   
 >   /* Non-zero means we have been called at least once before. */
 > ! static int rl_initialized = 0;
 >   
 >   /* If non-zero, this program is running in an EMACS buffer. */
 >   static int running_in_emacs;
 > ***************
 > *** 153,159 ****
 >   int readline_echoing_p = 1;
 >   
 >   /* Current prompt. */
 > ! char *rl_prompt;
 >   int rl_visible_prompt_length = 0;
 >   
 >   /* Set to non-zero by calling application if it has already printed rl_prompt
 > --- 153,159 ----
 >   int readline_echoing_p = 1;
 >   
 >   /* Current prompt. */
 > ! char *rl_prompt = NULL;
 >   int rl_visible_prompt_length = 0;
 >   
 >   /* Set to non-zero by calling application if it has already printed rl_prompt
 > ***************
 > *** 251,257 ****
 >   {
 >     char *value;
 >   
 > !   rl_prompt = prompt;
 >   
 >     /* If we are at EOF return a NULL string. */
 >     if (rl_pending_input == EOF)
 > --- 251,259 ----
 >   {
 >     char *value;
 >   
 > !   if (rl_prompt)
 > !     free (rl_prompt);
 > !   rl_prompt = prompt ? strdup (prompt) : 0;
 >   
 >     /* If we are at EOF return a NULL string. */
 >     if (rl_pending_input == EOF)
 > ***************
 > *** 260,266 ****
 >         return ((char *)NULL);
 >       }
 >   
 > !   rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
 >   
 >     rl_initialize ();
 >     (*rl_prep_term_function) (_rl_meta_flag);
 > --- 262,269 ----
 >         return ((char *)NULL);
 >       }
 >   
 > !   rl_visible_prompt_length = (rl_prompt && *rl_prompt) ?
 > !                              rl_expand_prompt (rl_prompt) : 0;
 >   
 >     rl_initialize ();
 >     (*rl_prep_term_function) (_rl_meta_flag);
 > Index: callback.c
 > /usr/local/bin/diff -c -w -L callback.c callback.c@@/main/cygnus/2 callback.c
 > *** callback.c
 > --- callback.c	Fri Jul 28 09:55:11 2000
 > ***************
 > *** 81,88 ****
 >        char *prompt;
 >        VFunction *linefunc;
 >   {
 > !   rl_prompt = prompt;
 > !   rl_visible_prompt_length = rl_prompt ? rl_expand_prompt (rl_prompt) : 0;
 >     rl_linefunc = linefunc;
 >     _rl_callback_newline ();
 >   }
 > --- 81,91 ----
 >        char *prompt;
 >        VFunction *linefunc;
 >   {
 > !   if (rl_prompt)
 > !     free (rl_prompt);
 > !   rl_prompt = prompt ? strdup (prompt) : 0;
 > !   rl_visible_prompt_length = (rl_prompt && *rl_prompt) ?
 > !                              rl_expand_prompt (rl_prompt) : 0;
 >     rl_linefunc = linefunc;
 >     _rl_callback_newline ();
 >   }
 > Index: display.c
 > /usr/local/bin/diff -c -w -L display.c display.c@@/main/cygnus/7 display.c
 > *** display.c
 > --- display.c	Fri Jul 28 09:56:05 2000
 > ***************
 > *** 146,152 ****
 >   /* Default and initial buffer size.  Can grow. */
 >   static int line_size = 1024;
 >   
 > ! static char *local_prompt, *local_prompt_prefix;
 >   static int visible_length, prefix_length;
 >   
 >   /* The number of invisible characters in the line currently being
 > --- 146,152 ----
 >   /* Default and initial buffer size.  Can grow. */
 >   static int line_size = 1024;
 >   
 > ! static char *local_prompt = NULL, *local_prompt_prefix = NULL;
 >   static int visible_length, prefix_length;
 >   
 >   /* The number of invisible characters in the line currently being
 > 
From guo@cup.hp.com Tue Aug 01 10:18:00 2000
From: Jimmy Guo <guo@cup.hp.com>
To: gdb-patches@sourceware.cygnus.com
Subject: [PATCH] dejagnu lib/target.exp HP warnings
Date: Tue, 01 Aug 2000 10:18:00 -0000
Message-id: <Pine.LNX.4.10.10008011016581.1500-100000@hpcll168.cup.hp.com>
X-SW-Source: 2000-08/msg00016.html
Content-length: 2191

Couple of changes specific to HP compilation message filtering.

- Jimmy

Tue Aug  1 10:13:22	Jimmy Guo	<guo@cup.hp.com>

	* lib/target.exp (prune_warnings): Remove duplicate PA2.0 pattern;
	revise HP Fortran (f77 & f90) pattern.

Index: lib/target.exp
/usr/local/bin/diff -c -L lib/target.exp lib/target.exp@@/main/cygnus/12 lib/target.exp
*** lib/target.exp
--- lib/target.exp	Tue Aug  1 10:12:06 2000
***************
*** 146,153 ****
         # Ignore the compiler's warnings about PA incompatibility.
         regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text 
   
-        regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text 
- 
         # And the linker's +vcompatwarnings verbage.
         regsub -all "(^|\n)\[^\n\]*Linker features were used that may not be supported\[^\n\]*.\[^\n\]*." $text "" text
  
--- 146,151 ----
***************
*** 188,198 ****
         #
         regsub -all "aCC .assigner.: Warning .*Could not satisfy instantiation request for \[^\n\]* contained in\[^\n\]*\n\t/lib/pa20_64/lib\[a-zA-Z0-9\]*.sl" $text "" text
         
!       # Remove the lines that are output by the HP F77 compiler to
        # indicate the functions that are being compiled.
        upvar compiler_type compiler_type
        if { [info exists compiler_type] && $compiler_type == "f77" } {
! 	  regsub -all "\[ \ta-zA-Z_0-9\./\]*:\[\r\n\]+" $text "" text
        }
  
        # Ignore the warnings about unknown options
--- 186,196 ----
         #
         regsub -all "aCC .assigner.: Warning .*Could not satisfy instantiation request for \[^\n\]* contained in\[^\n\]*\n\t/lib/pa20_64/lib\[a-zA-Z0-9\]*.sl" $text "" text
         
!       # Remove the lines that are output by the HP F77 / F90 compiler to
        # indicate the functions that are being compiled.
        upvar compiler_type compiler_type
        if { [info exists compiler_type] && $compiler_type == "f77" } {
! 	  regsub -all "\[ \ta-zA-Z_0-9\./\-\]*(:|)\[\r\n\]+.*" $text "" text
        }
  
        # Ignore the warnings about unknown options


       reply	other threads:[~2000-08-01 10:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.10.10007281012060.7566-100000@hpcll168.cup.hp.com>
2000-08-01 10:17 ` Elena Zannoni [this message]
2000-08-01 10:33   ` Jimmy Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14727.1571.65160.775918@kwikemart.cygnus.com \
    --to=ezannoni@cygnus.com \
    --cc=gdb-patches@sourceware.cygnus.com \
    --cc=guo@cup.hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox