From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13850 invoked by alias); 12 Nov 2008 16:20:06 -0000 Received: (qmail 13728 invoked by uid 22791); 12 Nov 2008 16:20:04 -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:19:12 +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 8EA7BEA78; Wed, 12 Nov 2008 15:18:24 +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 E705A4C3A4; Wed, 12 Nov 2008 15:18:11 +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 CQL30986 (AUTH "denis pilat"); Wed, 12 Nov 2008 16:19:32 +0100 (CET) Message-ID: <491AF3B3.9020501@st.com> Date: Wed, 12 Nov 2008 16:20:00 -0000 From: Denis PILAT User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: insight@sourceware.org, Keith Seitz Subject: [RFA] Problem while closing window Content-Type: multipart/mixed; boundary="------------070207010209090000090302" 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/msg00015.txt.bz2 This is a multi-part message in MIME format. --------------070207010209090000090302 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 61 Sorry I used a wrong mailing list, here is a patch proposal. --------------070207010209090000090302 Content-Type: message/rfc822; name="[RFA] Problem while closing window.eml" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="[RFA] Problem while closing window.eml" Content-length: 3344 X-Mozilla-Keys: Message-ID: <491AEB3D.40803@st.com> Date: Wed, 12 Nov 2008 15:42:05 +0100 From: Denis PILAT Organization: STMicroelectronics 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 Content-length: 2826 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 + } } } } --------------070207010209090000090302--