Index: attachdlg.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/attachdlg.itb,v retrieving revision 1.7 diff -u -p -r1.7 attachdlg.itb --- attachdlg.itb 23 Dec 2005 18:26:50 -0000 1.7 +++ attachdlg.itb 9 Feb 2008 01:14:00 -0000 @@ -1,5 +1,5 @@ # Attach Dialog for Insight. -# Copyright (C) 1999, 2002, 2003 Red Hat, Inc. +# Copyright (C) 1999, 2002, 2003, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -159,9 +159,9 @@ itcl::body AttachDlg::choose_symbol_file # ------------------------------------------------------------------ itcl::body AttachDlg::list_pids {{pattern *}} { - global tcl_platform + global gdbtk_platform - switch $tcl_platform(os) { + switch $gdbtk_platform(os) { Linux { set ps_cmd "ps axw" } Index: bpwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/bpwin.itb,v retrieving revision 1.19 diff -u -p -r1.19 bpwin.itb --- bpwin.itb 23 Dec 2005 18:26:50 -0000 1.19 +++ bpwin.itb 9 Feb 2008 01:14:01 -0000 @@ -1,5 +1,5 @@ # Breakpoint window for Insight. -# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003 Red Hat, Inc. +# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -44,7 +44,7 @@ itcl::body BpWin::destructor {} {} # METHOD: build_win - build the main breakpoint window # ------------------------------------------------------------------ itcl::body BpWin::build_win {} { - global _bp_en _bp_disp tcl_platform + global _bp_en _bp_disp set bg1 $::Colors(bg) set hsmode dynamic @@ -194,7 +194,7 @@ itcl::body BpWin::build_win {} { # METHOD: bp_add - add a breakpoint entry # ------------------------------------------------------------------ itcl::body BpWin::bp_add {bp_event {tracepoint 0}} { - global _bp_en _bp_disp tcl_platform _files + global _bp_en _bp_disp gdbtk_platform _files set number [$bp_event get number] set thread [$bp_event get thread] @@ -227,7 +227,7 @@ itcl::body BpWin::bp_add {bp_event {trac if {$thread != "-1"} {set color [pref get gdb/src/thread_fg]} - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { checkbutton $twin.en$i -relief flat -variable _bp_en($i) \ -activebackground $bg1 -command "$this bp_able $i" -fg $color } else { @@ -438,7 +438,7 @@ itcl::body BpWin::_select_and_popup {bp # METHOD: bp_modify - modify a breakpoint entry # ------------------------------------------------------------------ itcl::body BpWin::bp_modify {bp_event {tracepoint 0}} { - global _bp_en _bp_disp tcl_platform _files + global _bp_en _bp_disp gdbtk_platform _files set number [$bp_event get number] set thread [$bp_event get thread] @@ -485,7 +485,7 @@ itcl::body BpWin::bp_modify {bp_event {t if {$thread != "-1"} {set color [pref get gdb/src/thread_fg]} - if {$tcl_platform(platform) == "windows"} then { + if {$gdbtk_platform(platform) == "windows"} then { $twin.en$i configure -fg $color } else { $twin.en$i configure -selectcolor $color Index: download.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/download.itb,v retrieving revision 1.11 diff -u -p -r1.11 download.itb --- download.itb 23 Dec 2005 18:26:50 -0000 1.11 +++ download.itb 9 Feb 2008 01:14:01 -0000 @@ -167,8 +167,7 @@ itcl::body Download::download_hash { sec itcl::body Download::download_it { } { global gdb_exe_name gdb_downloading gdb_loaded global gdb_target_name gdb_pretty_name - global gdb_running - global tcl_platform + global gdb_running gdbtk_platform debug "exe=$gdb_exe_name downloading=$gdb_downloading" debug " loaded=$gdb_loaded target=$gdb_target_name running=$gdb_running" @@ -207,7 +206,7 @@ itcl::body Download::download_it { } { } } - if {[string compare $tcl_platform(platform) "windows"] == 0} { + if {[string compare $gdbtk_platform(platform) "windows"] == 0} { set f [ide_cygwin_path to_win32 $gdb_exe_name] } else { set f $gdb_exe_name Index: globalpref.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/globalpref.itb,v retrieving revision 1.14 diff -u -p -r1.14 globalpref.itb --- globalpref.itb 23 Dec 2005 18:26:50 -0000 1.14 +++ globalpref.itb 9 Feb 2008 01:14:01 -0000 @@ -1,5 +1,5 @@ # Global preference class implementation for Insight. -# Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004 Red Hat +# Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004, 2008 Red Hat # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -76,7 +76,7 @@ itcl::body GlobalPref::destructor {} { # METHOD: _build_win - build the dialog # ------------------------------------------------------------------ itcl::body GlobalPref::_build_win {} { - global tcl_platform GDBTK_LIBRARY + global gdbtk_platform GDBTK_LIBRARY debug frame $itk_interior.f frame $itk_interior.x @@ -150,7 +150,7 @@ itcl::body GlobalPref::_build_win {} { set fam [lsort $fam] if {$font_cache == ""} { - if {$tcl_platform(platform) == "unix"} { + if {$gdbtk_platform(platform) == "unix"} { toplevel .c wm title .c "Scanning for fonts" message .c.m -width 3i -text "Scanning system for fonts\n\nPlease wait..." \ @@ -178,7 +178,7 @@ itcl::body GlobalPref::_build_win {} { _make_font_item $f fixed "Fixed Font:" $font_cache - if {$tcl_platform(platform) != "windows"} { + if {$gdbtk_platform(platform) != "windows"} { # Cannot change the windows menu font ourselves _make_font_item $f menu "Menu Font:" $fam } @@ -203,7 +203,7 @@ itcl::body GlobalPref::_build_win {} { -width $tracing_labels(max_len) -anchor w # use_icons - if {$tcl_platform(platform) == "unix"} { + if {$gdbtk_platform(platform) == "unix"} { checkbutton $f.use_icons \ -text "Use builtin image as icon." -variable [scope _new(gdb/use_icons)] } @@ -218,13 +218,13 @@ itcl::body GlobalPref::_build_win {} { grid $f.tracing -sticky w -padx 5 -pady 5 - if {$tcl_platform(platform) == "unix"} { + if {$gdbtk_platform(platform) == "unix"} { grid $f.use_icons -sticky w -padx 5 -pady 5 } grid $f.consolewrap -sticky w -padx 5 -pady 5 grid $f.use_cs -sticky w -padx 5 -pady 5 - if {$tcl_platform(platform) == "unix"} { + if {$gdbtk_platform(platform) == "unix"} { # Compatibility frame iwidgets::Labeledframe $frame.compat -labelpos nw -labeltext "OS Compatibility" set fc [$frame.compat childsite] @@ -241,7 +241,7 @@ itcl::body GlobalPref::_build_win {} { pack $frame.icons.lab $frame.icons.cb -side left grid $frame.icons x -sticky w -pady 10 grid $frame.d -columnspan 2 -sticky w - if {$tcl_platform(platform) == "unix"} { + if {$gdbtk_platform(platform) == "unix"} { grid $frame.compat $frame.misc -sticky we } else { grid $frame.misc x -sticky we Index: helpviewer.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/helpviewer.tcl,v retrieving revision 1.4 diff -u -p -r1.4 helpviewer.tcl --- helpviewer.tcl 24 Jan 2006 01:30:49 -0000 1.4 +++ helpviewer.tcl 9 Feb 2008 01:14:01 -0000 @@ -1,5 +1,5 @@ # Open a viewer for HTML help info -# Copyright (C) 2002, Red Hat, Inc. +# Copyright (C) 2002, 2008, Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -24,7 +24,7 @@ proc open_help {hfile} { set link file://[file join $::GDBTK_LIBRARY help $hfile] # windows is easy - if {$::tcl_platform(platform) == "windows"} { + if {$::gdbtk_platform(platform) == "windows"} { ide_shell_execute open $link return } Index: interface.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v retrieving revision 1.57 diff -u -p -r1.57 interface.tcl --- interface.tcl 23 Dec 2005 18:26:50 -0000 1.57 +++ interface.tcl 9 Feb 2008 01:14:03 -0000 @@ -1,5 +1,5 @@ # Interface between GDB and Insight. -# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2004 Red Hat, Inc. +# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2004, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -301,7 +301,7 @@ proc gdbtk_cleanup {} { # PROC: gdbtk_tcl_query - # ------------------------------------------------------------------ proc gdbtk_tcl_query {message {default yes}} { - global gdb_checking_for_exit gdbtk_state tcl_platform + global gdb_checking_for_exit gdbtk_state gdbtk_platform # FIXME We really want a Help button here. But Tk's brain-damaged # modal dialogs won't really allow it. Should have async dialog @@ -317,7 +317,7 @@ proc gdbtk_tcl_query {message {default y set modal "system" } - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { # On Windows, we want to only ask each question once. # If we're already asking the question, just wait for the answer # to come back. @@ -376,7 +376,7 @@ proc gdbtk_tcl_warning {message} { # PROC: show_warning - # ------------------------------------------------------------------ proc show_warning {message} { - global tcl_platform + global gdbtk_platform # FIXME We really want a Help button here. But Tk's brain-damaged # modal dialogs won't really allow it. Should have async dialog @@ -395,7 +395,7 @@ proc show_warning {message} { # another thread is not required. - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { ide_messageBox [list set r] -icon warning \ -default ok -message $message -title $title \ -type ok -modal $modal -parent . @@ -916,7 +916,7 @@ proc set_exe {} { # ------------------------------------------------------------------ proc _open_file {{file ""}} { - global gdb_running gdb_downloading tcl_platform + global gdb_running gdb_downloading gdbtk_platform if {$gdb_running || $gdb_downloading} { # We are already running/downloading something.. @@ -962,7 +962,7 @@ proc _open_file {{file ""}} { } # Add the base dir for this file to the source search path. set root [file dirname $file] - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { set root [ide_cygwin_path to_posix $root] set file [ide_cygwin_path to_posix $file] } @@ -1160,7 +1160,7 @@ necessary,\nmodify the port setting with proc run_executable { {auto_start 1} } { global gdb_loaded gdb_downloading gdb_target_name global gdb_exe_changed gdb_target_changed gdb_program_has_run - global gdb_running gdb_exe_name tcl_platform + global gdb_running gdb_exe_name gdbtk_platform # debug "auto_start=$auto_start gdb_target_name=$gdb_target_name" @@ -1256,7 +1256,7 @@ proc run_executable { {auto_start 1} } { # If the user requested it, start an xterm for use as the # inferior's tty. - if {$tcl_platform(platform) != "windows" + if {$gdbtk_platform(platform) != "windows" && [pref getd gdb/process/xtermtty] == "yes"} { tty::create } Index: main.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/main.tcl,v retrieving revision 1.17 diff -u -p -r1.17 main.tcl --- main.tcl 23 Dec 2005 18:26:50 -0000 1.17 +++ main.tcl 9 Feb 2008 01:14:03 -0000 @@ -1,5 +1,5 @@ # GDBtk (Insight) entry point -# Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004 Red Hat, Inc. +# Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -127,6 +127,26 @@ if {[info exists env(GDBTK_DEBUG)] && $e # For testing set _test(interactive) 0 +# Set up platform globals. We replace Tcl's tcl_platform with +# our own version which knows the difference between cygwin and +# mingw. +global gdbtk_platform +set gdbtk_platform(platform) $tcl_platform(platform) +switch $tcl_platform(platform) { + windows { + if {[llength [info commands ide_cygwin_path]] == 0} { + set gdbtk_platform(os) "mingw" + } else { + set gdbtk_platform(os) "cygwin" + } + } + + default { + set gdbtk_platform(os) $tcl_platform(os) + } +} +set gdbtk_platform(osVersion) $tcl_platform(osVersion) + # set traces on state variables trace variable gdb_running w do_state_hook trace variable gdb_downloading w do_state_hook Index: managedwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/managedwin.itb,v retrieving revision 1.29 diff -u -p -r1.29 managedwin.itb --- managedwin.itb 23 Dec 2005 18:26:50 -0000 1.29 +++ managedwin.itb 9 Feb 2008 01:14:04 -0000 @@ -1,5 +1,5 @@ # Managed window for Insight. -# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc. +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -104,7 +104,7 @@ itcl::body ManagedWin::reveal {} { # the window is visible. if {[info exists ::$_top._init_geometry]} { upvar ::$_top._init_geometry gm - if {$::tcl_platform(platform) == "unix"} { + if {$::gdbtk_platform(platform) == "unix"} { wm geometry $_top $gm } unset ::$_top._init_geometry @@ -119,7 +119,7 @@ itcl::body ManagedWin::reveal {} { # NOT for Windows, though. Without the focus, we get, eg. a # register window on top of the source window, but the source window # will have the focus. This is not the proper model for Windows. - if {$::tcl_platform(platform) == "windows"} { + if {$::gdbtk_platform(platform) == "windows"} { focus -force [focus -lastfor $_top] } } @@ -298,7 +298,7 @@ itcl::body ManagedWin::_create { class a set w . } wm transient $top $w - } elseif {$::tcl_platform(platform) == "unix"} { + } elseif {$::gdbtk_platform(platform) == "unix"} { # Modal dialogs DONT get Icons... if {[pref get gdb/use_icons] && ![$newwin isa ModalDialog]} { set icon [_make_icon_window ${top}_icon] Index: memwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/memwin.itb,v retrieving revision 1.24 diff -u -p -r1.24 memwin.itb --- memwin.itb 23 Dec 2005 18:26:50 -0000 1.24 +++ memwin.itb 9 Feb 2008 01:14:04 -0000 @@ -1,5 +1,5 @@ # Memory display window class definition for Insight. -# Copyright (C) 1998, 1999, 2001, 2002, 2005 Red Hat, Inc. +# Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -63,7 +63,7 @@ itcl::body MemWin::destructor {} { # METHOD: build_win - build the main memory window # ------------------------------------------------------------------ itcl::body MemWin::build_win {} { - global tcl_platform gdb_ImageDir _mem ${this}_memval + global gdb_ImageDir _mem ${this}_memval set maxlen 0 set maxalen 0 Index: pluginwin.itcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/pluginwin.itcl,v retrieving revision 1.7 diff -u -p -r1.7 pluginwin.itcl --- pluginwin.itcl 23 Dec 2005 18:26:50 -0000 1.7 +++ pluginwin.itcl 9 Feb 2008 01:14:04 -0000 @@ -1,5 +1,5 @@ # PluginWindow -# Copyright (C) 2001 Red Hat, Inc. +# Copyright (C) 2001, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -121,7 +121,6 @@ itcl::class PluginWindow { # 2 off on gdb has no inferior, and is idle # ------------------------------------------------------------------ public method enable_ui {on} { - global tcl_platform debug "$on" # Do the enabling so that all the disabling happens first, this way if a Index: prefs.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/prefs.tcl,v retrieving revision 1.34 diff -u -p -r1.34 prefs.tcl --- prefs.tcl 19 Sep 2006 18:39:38 -0000 1.34 +++ prefs.tcl 9 Feb 2008 01:14:06 -0000 @@ -1,5 +1,5 @@ # Local preferences functions for Insight. -# Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004 Red Hat +# Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004, 2008 Red Hat # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -32,10 +32,10 @@ proc pref_read {} { global prefs_init_filename env gdb_ImageDir GDBTK_LIBRARY GDBStartup - global tcl_platform + global gdbtk_platform if {[info exists env(HOME)]} { - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { set home [ide_cygwin_path to_win32 $env(HOME)] } else { set home $env(HOME) @@ -44,7 +44,7 @@ proc pref_read {} { set home "" } - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { set prefs_init_filename "gdbtk.ini" } else { set prefs_init_filename ".gdbtkinit" @@ -287,7 +287,7 @@ proc unescape_value {val version} { # PROC: pref_set_defaults - set up default values # ------------------------------------------------------------------ proc pref_set_defaults {} { - global GDBTK_LIBRARY tcl_platform gdb_ImageDir + global GDBTK_LIBRARY gdbtk_platform gdb_ImageDir debug # Gdb global defaults @@ -302,9 +302,9 @@ proc pref_set_defaults {} { # some window managers can't deal with it. # OS compatibility. Valid values are "Windows", "GNOME", "KDE", and "default" - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { pref define gdb/compat "Windows" - } elseif {$tcl_platform(platform) == "unix"} { + } elseif {$gdbtk_platform(platform) == "unix"} { pref define gdb/compat "GNOME" } else { pref define gdb/compat "default" @@ -318,7 +318,7 @@ proc pref_set_defaults {} { pref define gdb/load/bp_at_func 0 pref define gdb/load/bp_func "" pref define gdb/load/baud 38400 - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { pref define gdb/load/port com1 } else { pref define gdb/load/port "/dev/ttyS0" @@ -469,7 +469,7 @@ proc pref_set_colors {home} { # To enable us to fix that without hardcoding colors, we create a color # array here and use it as needed to force widgets to the correct colors. - global Colors tcl_platform + global Colors debug # UNIX colors @@ -735,7 +735,7 @@ proc pref_set_option_db {makebg} { option add *highlightBackground $Colors(bg) option add *selectBackground $Colors(sbg) - if {$::tcl_platform(platform) == "unix"} { + if {$::gdbtk_platform(platform) == "unix"} { option add *activeBackground $Colors(sbg) } @@ -758,7 +758,7 @@ proc pref_set_option_db {makebg} { # Change the default select color for checkbuttons, etc to match # selectBackground. - if {$::tcl_platform(platform) == "unix"} { + if {$::gdbtk_platform(platform) == "unix"} { option add *selectColor $Colors(sbg) } } Index: process.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/process.itb,v retrieving revision 1.12 diff -u -p -r1.12 process.itb --- process.itb 23 Dec 2005 18:26:50 -0000 1.12 +++ process.itb 9 Feb 2008 01:14:06 -0000 @@ -1,5 +1,5 @@ # Process window for Insight. -# Copyright (C) 1998, 1999, 2001, 2002 Red Hat, Inc. +# Copyright (C) 1998, 1999, 2001, 2002, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -34,7 +34,6 @@ itcl::body ProcessWin::constructor {args # METHOD: build_win - build the main process window # ------------------------------------------------------------------ itcl::body ProcessWin::build_win {} { - global tcl_platform itk_component add slbox { iwidgets::scrolledlistbox $itk_interior.slbox \ Index: session.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/session.tcl,v retrieving revision 1.16 diff -u -p -r1.16 session.tcl --- session.tcl 23 Dec 2005 18:26:50 -0000 1.16 +++ session.tcl 9 Feb 2008 01:14:06 -0000 @@ -1,5 +1,5 @@ # Local preferences functions for Insight. -# Copyright (C) 2000, 2001, 2002, 2004 Red Hat, Inc. +# Copyright (C) 2000, 2001, 2002, 2004, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -18,10 +18,9 @@ namespace eval Session { # should use `realpath', but that is more work. So for now we neglect # the possibility of symlinks. proc _exe_name {path} { - global tcl_platform # Get real directory. - if {[string compare $tcl_platform(platform) "windows"] == 0} { + if {[string compare $::gdbtk_platform(os) "cygwin"] == 0} { set path [ide_cygwin_path to_win32 $path] } set save [pwd] Index: srcbar.itcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srcbar.itcl,v retrieving revision 1.25 diff -u -p -r1.25 srcbar.itcl --- srcbar.itcl 23 Dec 2005 18:26:50 -0000 1.25 +++ srcbar.itcl 9 Feb 2008 01:14:06 -0000 @@ -1,5 +1,5 @@ # SrcBar -# Copyright (C) 2001, 2002, 2004 Red Hat, Inc. +# Copyright (C) 2001, 2002, 2004, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -144,7 +144,7 @@ itcl::class SrcBar { # Used really only to update the session list. # ------------------------------------------------------------------ private method _update_file_menu {} { - global enable_external_editor tcl_platform gdb_exe_name + global enable_external_editor gdbtk_platform gdb_exe_name # Clear the File menu $Menu clear file @@ -182,7 +182,7 @@ itcl::class SrcBar { $Menu add separator - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { $Menu add command None "Page Setup..." \ [format { set top %s @@ -235,7 +235,7 @@ itcl::class SrcBar { # I will hold off on the Windows implementation for now. if {$is_native} { - if {[string compare $::tcl_platform(platform) windows] != 0} { + if {[string compare $::gdbtk_platform(platform) windows] != 0} { $Menu add command Attach "Attach to process" \ [code $this do_attach $run_menu] \ -underline 0 -accelerator "Ctrl+A" @@ -255,7 +255,7 @@ itcl::class SrcBar { } if {$is_native} { - if {[string compare $::tcl_platform(platform) windows] != 0} { + if {[string compare $::gdbtk_platform(platform) windows] != 0} { $Menu add command Detach "Detach" \ [code $this do_detach $run_menu] \ -underline 0 -state disabled @@ -956,7 +956,6 @@ itcl::class SrcBar { # 2 off on off gdb has no inferior, and is idle # ------------------------------------------------------------------ public method enable_ui {on} { - global tcl_platform debug "$on - Browsing=$Browsing" # Do the enabling so that all the disabling happens first, this way if a Index: srctextwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srctextwin.itb,v retrieving revision 1.42 diff -u -p -r1.42 srctextwin.itb --- srctextwin.itb 23 Dec 2005 18:26:50 -0000 1.42 +++ srctextwin.itb 9 Feb 2008 01:14:09 -0000 @@ -1,5 +1,5 @@ # Paned text widget for source code, for Insight -# Copyright (C) 1997, 1998, 1999, 2001, 2002 Red Hat, Inc. +# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -884,14 +884,14 @@ itcl::body SrcTextWin::ClearTags {} { # has changed. # ------------------------------------------------------------------ itcl::body SrcTextWin::_mtime_changed {filename} { - global tcl_platform + global gdbtk_platform if [catch {gdb_find_file $filename} f] { set r 1 } elseif {$f == ""} { set r 1 } else { - if {[string compare $tcl_platform(platform) "windows"] == 0} { + if {[string compare $gdbtk_platform(os) "cygwin"] == 0} { set f [ide_cygwin_path to_win32 $f] } if {[catch {file mtime $f} mtime]} { @@ -2669,7 +2669,7 @@ itcl::body SrcTextWin::search {exp direc itcl::body SrcTextWin::LoadFromCache {w name asm lib} { debug "LoadFromCache $w $name $asm" - global tcl_platform + global gdbtk_platform upvar ${w}win win upvar _${w}pane pane @@ -2715,7 +2715,7 @@ itcl::body SrcTextWin::LoadFromCache {w # out. if {$loadingSource} { - if {[string compare $tcl_platform(platform) "windows"] == 0} { + if {[string compare $gdbtk_platform(os) "cygwin"] == 0} { set f [ide_cygwin_path to_win32 $name] } else { set f $name Index: srcwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.itb,v retrieving revision 1.35 diff -u -p -r1.35 srcwin.itb --- srcwin.itb 26 Jun 2006 20:44:57 -0000 1.35 +++ srcwin.itb 9 Feb 2008 01:14:09 -0000 @@ -1,5 +1,5 @@ # Source window for Insight. -# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2008, # 2006 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it @@ -420,7 +420,7 @@ itcl::body SrcWin::fillFuncCB {name} { # linespec will be "{} {} {} 0 0x0 0x0" when GDB has not started debugging. # ------------------------------------------------------------------ itcl::body SrcWin::location {tag linespec} { - global gdb_running gdb_exe_name _files tcl_platform + global gdb_running gdb_exe_name _files # We need to keep track of changes to the line, filename, function name # and address so we can keep the widgets up-to-date. Otherwise we Index: stackwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/stackwin.itb,v retrieving revision 1.12 diff -u -p -r1.12 stackwin.itb --- stackwin.itb 23 Dec 2005 18:26:50 -0000 1.12 +++ stackwin.itb 9 Feb 2008 01:14:09 -0000 @@ -1,5 +1,5 @@ # Stack window for Insight. -# Copyright (C) 1997, 1998, 1999, 2002, 2003 Red Hat +# Copyright (C) 1997, 1998, 1999, 2002, 2003, 2008 Red Hat # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -34,7 +34,6 @@ itcl::body StackWin::destructor {} { # METHOD: build_win - build the main register window # ------------------------------------------------------------------ itcl::body StackWin::build_win {} { - global tcl_platform itk_component add slb { iwidgets::scrolledlistbox $itk_interior.s \ Index: targetselection.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/targetselection.itb,v retrieving revision 1.20 diff -u -p -r1.20 targetselection.itb --- targetselection.itb 1 Dec 2006 01:07:55 -0000 1.20 +++ targetselection.itb 9 Feb 2008 01:14:10 -0000 @@ -1,5 +1,5 @@ # Target selection dialog for Insight. -# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc. +# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -278,9 +278,9 @@ itcl::body TargetSelection::init_target_ } itcl::body TargetSelection::default_port {} { - global tcl_platform - switch -regexp $tcl_platform(os) { - Windows { set port com1 } + global gdbtk_platform + switch -regexp $gdbtk_platform(os) { + cygwin { set port com1 } Linux { set port /dev/ttyS0 } SunOS { set port /dev/ttya } AIX { set port /dev/foo1 } @@ -290,7 +290,7 @@ itcl::body TargetSelection::default_port NetBSD { set port /dev/foo1 } HP-UX { # Special case... - switch -regexp $tcl_platform(osVersion) { + switch -regexp $gdbtk_platform(osVersion) { A.09 { set port /dev/tty00 } B.10 - B.11 { set port /dev/tty0p0 } @@ -385,7 +385,7 @@ itcl::body TargetSelection::_init {} { # METHOD: build_win - build the dialog # ------------------------------------------------------------------ itcl::body TargetSelection::build_win {} { - global tcl_platform PREFS_state gdb_ImageDir gdb_target_name + global gdbtk_platform PREFS_state gdb_ImageDir gdb_target_name set f [frame $itk_interior.f] set opts [frame $itk_interior.moreoptions] @@ -426,7 +426,7 @@ itcl::body TargetSelection::build_win {} -width $Width # port combobox - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { set editable 0 } else { set editable 1 @@ -441,13 +441,13 @@ itcl::body TargetSelection::build_win {} fill_rates # load port combobox - if {$tcl_platform(platform) == "windows"} { + if {$gdbtk_platform(platform) == "windows"} { foreach val [port_list] { $fr.port list insert end $val } } else { # fixme: how do I find valid values for these???? - switch $tcl_platform(os) { + switch $gdbtk_platform(os) { Linux { set ports [list /dev/cua0 /dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /dev/ttyS3]} SunOS { set ports [list /dev/ttya /dev/ttyb] } AIX { set ports [list /dev/foo1 /dev/foo2] } @@ -457,7 +457,7 @@ itcl::body TargetSelection::build_win {} NetBSD { set ports [list /dev/foo1 /dev/foo2] } HP-UX { # Special case... - switch -regexp $tcl_platform(osVersion) { + switch -regexp $gdbtk_platform(osVersion) { A.09 { set ports [list /dev/tty00 /dev/tty01] } B.10 - B.11 { set ports [list /dev/tty0p0 /dev/tty1p0] } @@ -485,7 +485,7 @@ itcl::body TargetSelection::build_win {} checkbutton $f.fr.verb -text [gettext "Display Download Dialog"] \ -variable [pref varname gdb/load/$target-verbose] - if {$tcl_platform(platform) == "unix"} { + if {$gdbtk_platform(platform) == "unix"} { checkbutton $f.fr.xterm -text [gettext "Use xterm as inferior's tty"] \ -variable [pref varname gdb/process/xtermtty] \ -onvalue yes -offvalue no @@ -515,7 +515,7 @@ itcl::body TargetSelection::build_win {} pack $f.fr.bp.at_func $f.fr.bp.func -side left grid $f.fr.bp -sticky w -padx 5 -pady 5 grid $f.fr.verb -sticky w -padx 5 -pady 5 - if {$tcl_platform(platform) == "unix"} { + if {$gdbtk_platform(platform) == "unix"} { grid $f.fr.xterm -sticky w -padx 5 -pady 5 } if {![pref get gdb/control_target]} { Index: tdump.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/tdump.tcl,v retrieving revision 1.10 diff -u -p -r1.10 tdump.tcl --- tdump.tcl 23 Dec 2005 18:26:50 -0000 1.10 +++ tdump.tcl 9 Feb 2008 01:14:10 -0000 @@ -1,5 +1,5 @@ # Trace dump window for Insight -# Copyright (C) 1998, 1999, 2001, 2002, 2004 Red Hat, Inc. +# Copyright (C) 1998, 1999, 2001, 2002, 2004, 2008 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License (GPL) as published by @@ -45,8 +45,6 @@ itcl::class TdumpWin { # METHOD: build_win - build the main tdump window # ------------------------------------------------------------------ method build_win {} { - global tcl_platform - itk_component add stext { iwidgets::scrolledtext $itk_interior.stext -hscrollmode dynamic \ -vscrollmode dynamic -textfont global/fixed \