This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
[RFA] Problem while closing window
- From: Denis PILAT <denis dot pilat at st dot com>
- To: insight at sources dot redhat dot com
- Cc: Nunzio RACITI <nunzio dot raciti at st dot com>
- Date: Wed, 12 Nov 2008 15:42:05 +0100
- Subject: [RFA] Problem while closing window
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
+ }
}
}
}