From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2192 invoked by alias); 7 Mar 2002 18:42:04 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 2058 invoked from network); 7 Mar 2002 18:42:01 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 7 Mar 2002 18:42:01 -0000 Received: from makita.cygnus.com (makita.cygnus.com [205.180.230.78]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id KAA03144; Thu, 7 Mar 2002 10:41:28 -0800 (PST) Received: from localhost (keiths@localhost) by makita.cygnus.com (8.8.8+Sun/8.6.4) with ESMTP id KAA05665; Thu, 7 Mar 2002 10:41:28 -0800 (PST) X-Authentication-Warning: makita.cygnus.com: keiths owned process doing -bs Date: Thu, 07 Mar 2002 10:42:00 -0000 From: Keith Seitz X-X-Sender: To: "Martin M. Hunt" cc: Insight Mailing List Subject: Re: [RFA] readline cleanup In-Reply-To: <200203070631.g276Vtx31403@localhost.localdomain> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-q1/txt/msg00190.txt.bz2 On Wed, 6 Mar 2002, Martin M. Hunt wrote: > In interface.tcl, the gdbtk readline stuff was trying to call non-existent functions. > I replaced them with something reasonable. > > gdb_run_readline_command() is not used. It looks like it MIGHT be useful, > but I don't know what for. Anyone know? I'd really like to know how all this keeps getting broken. I know that I fixed this myself not too long ago (year or two). Any way, yes, please commit. Do you think you could try adding a testcase for this somewhere? Thanks, Keith > 2002-03-06 Martin M. Hunt > > * library/interface.tcl (gdbtk_tcl_readline): Remove > call to "command::insert" and instead insert the command > into the console window. > (gdbtk_tcl_readline_end): Catch the unsets and do not call > non-existent function command::end_multi_line_input. > > > Index: library/interface.tcl > =================================================================== > RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v > retrieving revision 1.41 > diff -u -p -r1.41 interface.tcl > --- interface.tcl 2002/02/18 17:19:44 1.41 > +++ interface.tcl 2002/03/07 06:28:37 > @@ -512,7 +512,7 @@ proc gdbtk_tcl_trace_find_hook {arg from > # ------------------------------------------------------------------ > proc gdb_run_readline_command {command args} { > global gdbtk_state > -# debug "$command $args" > + debug "$command $args" > set gdbtk_state(readlineArgs) $args > set gdbtk_state(readlineShowUser) 1 > gdb_cmd $command > @@ -524,7 +524,7 @@ proc gdb_run_readline_command {command a > # ------------------------------------------------------------------ > proc gdb_run_readline_command_no_output {command args} { > global gdbtk_state > -# debug "$command $args" > + debug "$command $args" > set gdbtk_state(readlineArgs) $args > set gdbtk_state(readlineShowUser) 0 > gdb_cmd $command > @@ -535,7 +535,7 @@ proc gdb_run_readline_command_no_output > # ------------------------------------------------------------------ > proc gdbtk_tcl_readline_begin {message} { > global gdbtk_state > -# debug "readline begin" > +# debug > set gdbtk_state(readline) 0 > if {$gdbtk_state(console) != "" && $gdbtk_state(readlineShowUser)} { > $gdbtk_state(console) insert $message > @@ -547,12 +547,12 @@ proc gdbtk_tcl_readline_begin {message} > # ------------------------------------------------------------------ > proc gdbtk_tcl_readline {prompt} { > global gdbtk_state > -# debug "$prompt" > +# debug "prompt=$prompt" > if {[info exists gdbtk_state(readlineArgs)]} { > # Not interactive, so pop the list, and print element. > set cmd [lvarpop gdbtk_state(readlineArgs)] > - if {$gdbtk_state(readlineShowUser)} { > - command::insert_command $cmd > + if {$gdbtk_state(console) != "" && $gdbtk_state(readlineShowUser)} { > + $gdbtk_state(console) insert $cmd > } > } else { > # Interactive. > @@ -573,10 +573,9 @@ proc gdbtk_tcl_readline {prompt} { > # ------------------------------------------------------------------ > proc gdbtk_tcl_readline_end {} { > global gdbtk_state > -# debug "readline_end" > +# debug > catch {unset gdbtk_state(readlineArgs)} > - unset gdbtk_state(readlineActive) > - command::end_multi_line_input > + catch {unset gdbtk_state(readlineActive)} > } > > # ------------------------------------------------------------------ >