public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Denis PILAT <denis.pilat@st.com>
To: insight@sources.redhat.com
Cc: Nunzio RACITI <nunzio.raciti@st.com>
Subject: [RFA] Problem while closing window
Date: Wed, 12 Nov 2008 16:23:00 -0000	[thread overview]
Message-ID: <491AEB3D.40803@st.com> (raw)

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  <denis.pilat@st.com> 
	on behalf of Nunzio Raciti  <nunzio.raciti@st.com>

	* 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
+      }
     }
   }
 }




             reply	other threads:[~2008-11-12 16:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 16:23 Denis PILAT [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-11-12 16:20 Denis PILAT
2008-12-15 18:24 ` Keith Seitz
2008-12-16  9:15   ` Denis PILAT

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=491AEB3D.40803@st.com \
    --to=denis.pilat@st.com \
    --cc=insight@sources.redhat.com \
    --cc=nunzio.raciti@st.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).