From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7643 invoked by alias); 12 Nov 2008 16:23:26 -0000 Received: (qmail 7619 invoked by uid 22791); 12 Nov 2008 16:23:25 -0000 X-Spam-Check-By: sourceware.org Received: from beta.dmz-eu.st.com (HELO beta.dmz-eu.st.com) (164.129.1.35) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Nov 2008 16:22:39 +0000 Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 537B6DEC0 for ; Wed, 12 Nov 2008 14:42:07 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 044A64C0E5 for ; Wed, 12 Nov 2008 14:42:06 +0000 (GMT) Received: from crx595.cro.st.com (crx595.cro.st.com [164.129.44.95]) by mail1.cro.st.com (MOS 3.8.7a) with ESMTP id CQL29564 (AUTH "denis pilat"); Wed, 12 Nov 2008 15:43:26 +0100 (CET) Message-ID: <491AEB3D.40803@st.com> Date: Wed, 12 Nov 2008 16:23:00 -0000 From: Denis PILAT User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: insight@sources.redhat.com Cc: Nunzio RACITI Subject: [RFA] Problem while closing window Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2008-q4/txt/msg00016.txt.bz2 Hi Keith, We recently discovered 2 problems with insight: 1/ On Linux and Win32 hosts, when you open a binary file, close it thru the File Close menu, then Insight become "unstable" and it's nearly impossible to open a new binary and debug it. That problem is fixed with library/srcwin.itb below patch. 2/ On win32 host, when you open and close a binary, the source windows is then splitted into 2 part and alway displays the old sources. That comes from the ":" separator used in a regexp and also present into windows full path name. The patch about library/srctextwin.itb fixed that problem. Here are the patches done by a colleague (Nunzio Raciti) that do not have write acces on your cvs repository. I did my test on a previous version of insight (the 6.8 where we discovered that problems) since the current does not compiles well, but both of these patches are based on current cvs. Can I commit it ? Thanks Denis 2008-11-12 Denis Pilat on behalf of Nunzio Raciti * library/srctextwin.itb (_clear_cache): Take care of $p variable that could contains ":" for source pane on windows hosts. * library/srcwin.itb (choose_and_update): Avoid updating the "source" window if target executable name is empty. Index: gdbtk/library/srctextwin.itb =================================================================== --- gdbtk/library/srctextwin.itb (revision 711) +++ gdbtk/library/srctextwin.itb (working copy) @@ -2951,7 +2951,7 @@ itcl::body SrcTextWin::_clear_cache {} { # delete all cached frames foreach p [array names Stwc *:pane] { - set p [lindex [split $p :] 0] + set p [string trimright $p ":pane"] if {$p != "gdbtk_scratch_widget"} { catch { #debug "clearing cache: \"$p\"" Index: gdbtk/library/srcwin.itb =================================================================== --- gdbtk/library/srcwin.itb (revision 711) +++ gdbtk/library/srcwin.itb (working copy) @@ -1026,6 +1026,8 @@ itcl::body SrcWin::_choose_window {file} # Choose the right source window and then cause it to be updated # ------------------------------------------------------------------ itcl::body SrcWin::choose_and_update {} { + global gdb_exe_name + if {$pc_window == ""} then { set pc_window [lindex $window_list 0] } @@ -1039,10 +1041,12 @@ itcl::body SrcWin::choose_and_update {} set file [lindex $loc 2] set pc_window [_choose_window $file] debug "chose window $pc_window" - $pc_window _update $loc - if {$pc_window != $prev} then { - $pc_window reveal - $prev _set_tag_to_stack + if {$gdb_exe_name != ""} { + $pc_window _update $loc + if {$pc_window != $prev} then { + $pc_window reveal + $prev _set_tag_to_stack + } } } }