public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Patch: Fix insight hang in thread window on win machine
@ 2003-03-18  7:54 Jafa
  2003-03-28 14:30 ` Keith Seitz
  0 siblings, 1 reply; 2+ messages in thread
From: Jafa @ 2003-03-18  7:54 UTC (permalink / raw)
  To: insight; +Cc: Nick Kelsey

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

Hi guys,

I traced the problem with Insight locking up on a Windows machine when the
thread window was accessed - process.itb was trying to create ide_sizebox
which not longer exists (it looks like it was made redundant with the recent
tcl update). This code pattern exists in a few other files, most of which
have already been commented out.

The attached patch fixes the thread window problem, removes a second
instance which would cause the same problem, and cleans up the other
instances which were commented out anyway.

Tested on a WinXP machine running cygwin.

Nick

2003-03-17  Nick Kelsey  nickk@ubicom.com


        * process.itb (build_win): Removed ide_sizebox instantiation that is
no longer required and is causing errors for win hosts.
        * tdump.tcl (build_win): Ditto.
        * locals.tcl (build_win): Removed ide_sizebox instantiation that is
no longer required and already commented out.
        * regwin.itb (build_win): Ditto.
        * srcwin.itb (constructor): Ditto.
        * stackwin.itb (constructor): Ditto.
        * watch.tcl (constructor): Ditto.


[-- Attachment #2: gdbtk_win.patch --]
[-- Type: application/octet-stream, Size: 6989 bytes --]

Index: gdbtk/library/locals.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/locals.tcl,v
retrieving revision 1.7
diff -c -3 -p -r1.7 locals.tcl
*** gdbtk/library/locals.tcl	21 Jan 2003 21:58:33 -0000	1.7
--- gdbtk/library/locals.tcl	18 Mar 2003 04:10:05 -0000
*************** itcl::class LocalsWin {
*** 82,91 ****
      set tree [VarTree $f.tree -type "local"]
      pack $f.tree -expand yes -fill both
      pack $f -expand yes -fill both
-     if {$::tcl_platform(platform) == "windows"} {
- #      ide_sizebox [namespace tail $this].sizebox
- #      place [namespace tail $this].sizebox -relx 1 -rely 1 -anchor se
-     }
      
      window_name "Local Variables"
      ::update idletasks
--- 82,87 ----
Index: gdbtk/library/process.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/process.itb,v
retrieving revision 1.10
diff -c -3 -p -r1.10 process.itb
*** gdbtk/library/process.itb	15 Oct 2002 21:19:51 -0000	1.10
--- gdbtk/library/process.itb	18 Mar 2003 04:10:05 -0000
*************** itcl::body ProcessWin::constructor {args
*** 36,51 ****
  itcl::body ProcessWin::build_win {} {
    global tcl_platform
  
-   if {$tcl_platform(platform) == "windows"} {
-     set hsmode static
-     set vsmode static
-     ide_sizebox $itk_interior.sbox
-     place $itk_interior.sbox -relx 1.0 -rely 1.0 -anchor se
-   } else {
-     set hsmode dynamic
-     set vsmode dynamic
-   }
- 
    itk_component add slbox {
      iwidgets::scrolledlistbox $itk_interior.slbox \
        -background $::Colors(bg) \
--- 36,41 ----
*************** itcl::body ProcessWin::destructor {} {
*** 138,144 ****
  # ------------------------------------------------------------------
  itcl::body ProcessWin::reconfig {} {
    destroy $itk_interior.s
-   if {[winfo exists $itk_interior.sbox]} { destroy $itk_interior.sbox }
    if {[winfo exists $itk_interior.slbox]} { destroy $itk_interior.slbox }
    build_win
  }
--- 128,133 ----
Index: gdbtk/library/regwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/regwin.itb,v
retrieving revision 1.25
diff -c -3 -p -r1.25 regwin.itb
*** gdbtk/library/regwin.itb	21 Jan 2003 21:58:34 -0000	1.25
--- gdbtk/library/regwin.itb	18 Mar 2003 04:10:06 -0000
*************** itcl::body RegWin::_build_win {} {
*** 241,252 ****
    grid rowconfigure $itk_interior 0 -weight 0
    grid rowconfigure $itk_interior 1 -weight 1
  
- # Add sizebox for windows
- #  if {[string compare $::tcl_platform(platform) "windows"] == 0} {
- #    ide_sizebox $itk_interior.sbox
- #    place $itk_interior.sbox -relx 1.0 -rely 1.0 -anchor se
- #  }
- 
    # Add popup menu - we populate it in the event handler
    itk_component add popup {
      menu $itk_interior.pop -tearoff 0
--- 241,246 ----
Index: gdbtk/library/srcwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.itb,v
retrieving revision 1.30
diff -c -3 -p -r1.30 srcwin.itb
*** gdbtk/library/srcwin.itb	6 Mar 2003 01:25:50 -0000	1.30
--- gdbtk/library/srcwin.itb	18 Mar 2003 04:10:06 -0000
*************** itcl::body SrcWin::constructor {args} {
*** 22,32 ****
  
    _update_title ""
  
-   # On Windows, create a sizebox.
-   if {$::tcl_platform(platform) == "windows"} {
- #    ide_sizebox $itk_interior.sizebox
-   }
- 
    set Tracing [pref get gdb/mode]
    set current(filename) ""
  
--- 22,27 ----
Index: gdbtk/library/stackwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/stackwin.itb,v
retrieving revision 1.10
diff -c -3 -p -r1.10 stackwin.itb
*** gdbtk/library/stackwin.itb	21 Jan 2003 21:58:34 -0000	1.10
--- gdbtk/library/stackwin.itb	18 Mar 2003 04:10:06 -0000
*************** itcl::body StackWin::build_win {} {
*** 46,57 ****
    [$itk_component(slb) component listbox] configure \
      -bg $::Colors(textbg) -fg $::Colors(textfg)
  
-   # Add sizebox for windows
-   if {[string compare $tcl_platform(platform) "windows"] == 0} {
- #    ide_sizebox $itk_interior.sbox
- #    place $itk_interior.sbox -relx 1.0 -rely 1.0 -anchor se
-   }
- 
    update dummy
  
    pack $itk_interior.s -side left -expand yes -fill both
--- 46,51 ----
*************** itcl::body StackWin::change_frame {} {
*** 133,139 ****
  # ------------------------------------------------------------------
  itcl::body StackWin::reconfig {} {
    destroy $itk_interior.s
-   if {[winfo exists $itk_interior.sbox]} { destroy $itk_interior.sbox }
    build_win
  }
  
--- 127,132 ----
Index: gdbtk/library/tdump.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/tdump.tcl,v
retrieving revision 1.7
diff -c -3 -p -r1.7 tdump.tcl
*** gdbtk/library/tdump.tcl	15 Oct 2002 21:19:51 -0000	1.7
--- gdbtk/library/tdump.tcl	18 Mar 2003 04:10:06 -0000
*************** itcl::class TdumpWin {
*** 47,60 ****
    method build_win {} {
      global tcl_platform
  
-     if {[string compare $tcl_platform(platform) "windows"] == 0} {
-       set mode static
-       ide_sizebox $itk_interior.sbox
-       place $itk_interior.sbox -relx 1.0 -rely 1.0 -anchor se
-     } else {
-       set mode dynamic
-     }
- 
      itk_component add stext {
        iwidgets::scrolledtext $itk_interior.stext -hscrollmode $mode \
  	-vscrollmode $mode -textfont global/fixed \
--- 47,52 ----
*************** itcl::class TdumpWin {
*** 96,102 ****
    #  METHOD:  reconfig - used when preferences change
    # ------------------------------------------------------------------
    method reconfig {} {
-     if {[winfo exists $itk_interior.sbox]} { destroy $itk_interior.sbox }
      if {[winfo exists $itk_interior.stext]} { destroy $itk_interior.stext }
      build_win
    }
--- 88,93 ----
Index: gdbtk/library/watch.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/watch.tcl,v
retrieving revision 1.8
diff -c -3 -p -r1.8 watch.tcl
*** gdbtk/library/watch.tcl	21 Jan 2003 21:58:34 -0000	1.8
--- gdbtk/library/watch.tcl	18 Mar 2003 04:10:06 -0000
*************** itcl::class WatchWin {
*** 91,102 ****
      grid columnconfigure $entryFrame 0 -weight 1
      grid columnconfigure $entryFrame 1
  
-     if {$::tcl_platform(platform) == "windows"} {
- #      grid columnconfigure $entryFrame 1 -pad 20
- #      ide_sizebox [namespace tail $this].sizebox
- #      place [namespace tail $this].sizebox -relx 1 -rely 1 -anchor se
-     }
- 
      grid $treeFrame -row 0 -column 0 -sticky news
      grid $entryFrame -row 1 -column 0 -padx 5 -pady 5 -sticky news
      grid columnconfigure $f 0 -weight 1
--- 91,96 ----

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

* Re: Patch: Fix insight hang in thread window on win machine
  2003-03-18  7:54 Patch: Fix insight hang in thread window on win machine Jafa
@ 2003-03-28 14:30 ` Keith Seitz
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Seitz @ 2003-03-28 14:30 UTC (permalink / raw)
  To: Jafa; +Cc: insight, Nick Kelsey

On Mon, 2003-03-17 at 20:31, Jafa wrote:
> The attached patch fixes the thread window problem, removes a second
> instance which would cause the same problem, and cleans up the other
> instances which were commented out anyway.

Committed. Thanks!

Keith

> 2003-03-17  Nick Kelsey  nickk@ubicom.com
> 
> 
>         * process.itb (build_win): Removed ide_sizebox instantiation that is
> no longer required and is causing errors for win hosts.
>         * tdump.tcl (build_win): Ditto.
>         * locals.tcl (build_win): Removed ide_sizebox instantiation that is
> no longer required and already commented out.
>         * regwin.itb (build_win): Ditto.
>         * srcwin.itb (constructor): Ditto.
>         * stackwin.itb (constructor): Ditto.
>         * watch.tcl (constructor): Ditto.
> 

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

end of thread, other threads:[~2003-03-27 18:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-18  7:54 Patch: Fix insight hang in thread window on win machine Jafa
2003-03-28 14:30 ` Keith Seitz

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