Diff
Not logged in

Differences From Artifact [68ae98e885]:

To Artifact [f3fde8741e]:


84
85
86
87
88
89
90
91

92
93
94
95
96
97

98
99
100
101
102
103
104
84
85
86
87
88
89
90

91
92
93
94
95
96

97
98
99
100
101
102
103
104







-
+





-
+







        eval tcl eval [list $interp] $args
      }
    }

    #
    # NOTE: This procedure attempts to load the TclDevKit remote debugger
    #       package into the specified Tcl interpreter.  By default, the
    #       "master" Tcl interpreter will be used.  If the native Tcl
    #       "primary" Tcl interpreter will be used.  If the native Tcl
    #       interface is not ready or if the remote debugger package
    #       cannot be loaded, an error will be raised.
    #
    proc tcl_debugger_setup { {interp ""} } {
      if {![tcl ready]} then {error "native Tcl interface is not ready"}
      if {[string length $interp] == 0} then {set interp [tcl master]}
      if {[string length $interp] == 0} then {set interp [tcl primary]}

      set directory [getTclDevKitDirectory]

      if {[string length $directory] == 0} then {
        error "the TclDevKit does not appear to be installed"
      }

147
148
149
150
151
152
153
154

155
156
157
158
159
160
161

162
163
164
165
166
167
168

169
170
171
172
173
174
175

176
177
178
179
180
181
182
183
184
185
186

187
188
189
190
191
192
193
194
195
196
197
198
199
147
148
149
150
151
152
153

154
155
156
157
158
159
160

161
162
163
164
165
166
167

168
169
170
171
172
173
174

175
176
177
178
179
180
181
182
183
184
185

186
187
188
189
190
191
192
193
194
195
196
197
198
199







-
+






-
+






-
+






-
+










-
+














      exec $applicationFileName $projectFileName &; after 5000
    }

    #
    # NOTE: This procedure attempts to initialize the TclDevKit remote
    #       debugger in the specified Tcl interpreter.  By default, the
    #       "master" Tcl interpreter will be used.  If the native Tcl
    #       "primary" Tcl interpreter will be used.  If the native Tcl
    #       interface is not ready or if the remote debugger package
    #       cannot be initialized, an error will be raised.
    #
    proc tcl_debugger_init {
            {interp ""} {host 127.0.0.1} {port 2576} {cdata {}} } {
      if {![tcl ready]} then {error "native Tcl interface is not ready"}
      if {[string length $interp] == 0} then {set interp [tcl master]}
      if {[string length $interp] == 0} then {set interp [tcl primary]}

      tcl_eval $interp [list debugger_init $host $port $cdata]
    }

    #
    # NOTE: This procedure attempts to evaluate a Tcl script under control
    #       of the TclDevKit remote debugger.  By default, the "master" Tcl
    #       of the TclDevKit remote debugger.  By default, the "primary" Tcl
    #       interpreter will be used.  If the native Tcl interface is not
    #       ready or if the remote debugger package fails to evaluate the
    #       Tcl script, an error will be raised.
    #
    proc tcl_debugger_eval { {interp ""} args } {
      if {![tcl ready]} then {error "native Tcl interface is not ready"}
      if {[string length $interp] == 0} then {set interp [tcl master]}
      if {[string length $interp] == 0} then {set interp [tcl primary]}

      tcl_eval $interp debugger_eval $args
    }

    #
    # NOTE: This procedure attempts to tell the TclDevKit remote debugger
    #       to break the execution of the Tcl script in progress.
    #
    proc tcl_debugger_break { {interp ""} {str ""} } {
      if {![tcl ready]} then {error "native Tcl interface is not ready"}
      if {[string length $interp] == 0} then {set interp [tcl master]}
      if {[string length $interp] == 0} then {set interp [tcl primary]}

      tcl_eval $interp [list debugger_break $str]
    }
  }

  if {![info exists tdk_path]} then {
    set tdk_path [file dirname [info script]]
  }

  package provide Eagle.TclDevKit.Integration \
    [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
}