public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [RFA] Problem while closing window
@ 2008-11-12 16:23 Denis PILAT
  0 siblings, 0 replies; 4+ messages in thread
From: Denis PILAT @ 2008-11-12 16:23 UTC (permalink / raw)
  To: insight; +Cc: Nunzio RACITI

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] Problem while closing window
  2008-12-15 18:24 ` Keith Seitz
@ 2008-12-16  9:15   ` Denis PILAT
  0 siblings, 0 replies; 4+ messages in thread
From: Denis PILAT @ 2008-12-16  9:15 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

I've just committed it
-- 
Denis

Keith Seitz wrote:
> Denis PILAT wrote:
>> Sorry I used a wrong mailing list, here is a patch proposal.
>
> That's okay: I've neglected to respond to this for quite some time!
>
> Please commit if you still have the patches lying around.
>
> Keith
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] Problem while closing window
  2008-11-12 16:20 Denis PILAT
@ 2008-12-15 18:24 ` Keith Seitz
  2008-12-16  9:15   ` Denis PILAT
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Seitz @ 2008-12-15 18:24 UTC (permalink / raw)
  To: Denis PILAT; +Cc: insight

Denis PILAT wrote:
> Sorry I used a wrong mailing list, here is a patch proposal.

That's okay: I've neglected to respond to this for quite some time!

Please commit if you still have the patches lying around.

Keith

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [RFA] Problem while closing window
@ 2008-11-12 16:20 Denis PILAT
  2008-12-15 18:24 ` Keith Seitz
  0 siblings, 1 reply; 4+ messages in thread
From: Denis PILAT @ 2008-11-12 16:20 UTC (permalink / raw)
  To: insight, Keith Seitz

[-- Attachment #1: Type: text/plain, Size: 61 bytes --]

Sorry I used a wrong mailing list, here is a patch proposal.

[-- Attachment #2: [RFA] Problem while closing window.eml --]
[-- Type: message/rfc822, Size: 3365 bytes --]

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 15:42:05 +0100
Message-ID: <491AEB3D.40803@st.com>

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






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-16  9:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-12 16:23 [RFA] Problem while closing window Denis PILAT
  -- 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

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).