OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [gdbtcl/] [actiondlg.tcl] - Blame information for rev 1767

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# Tracepoint actions dialog for GDBtk.
2
# Copyright 1997, 1998, 1999 Cygnus Solutions
3
#
4
# This program is free software; you can redistribute it and/or modify it
5
# under the terms of the GNU General Public License (GPL) as published by
6
# the Free Software Foundation; either version 2 of the License, or (at
7
# your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
 
14
 
15
itcl_class ActionDlg {
16
  # ------------------------------------------------------------------
17
  # CONSTRUCTOR
18
  # ------------------------------------------------------------------
19
  constructor {config} {
20
    global _TStepCount _TOtherVariable
21
 
22
    set class [$this info class]
23
    set hull [namespace tail $this]
24
    set old_name $this
25
    ::rename $this $this-tmp-
26
    ::frame $hull -class $class
27
    ::rename $hull $old_name-win-
28
    ::rename $this $old_name
29
 
30
    set top [winfo toplevel [namespace tail $this]]
31
    wm withdraw $top
32
 
33
    set Registers [gdb_regnames]
34
    if {$Line != ""} {
35
      set Locals  [gdb_get_locals "$File:$Line"]
36
      set Args    [gdb_get_args "$File:$Line"]
37
    } else {
38
      set Locals  [gdb_get_locals "*$Address"]
39
      set Args    [gdb_get_args "*$Address"]
40
    }
41
    set Variables [concat $Locals $Args]
42
    foreach a $Registers {
43
      lappend Variables "\$$a"
44
    }
45
 
46
    if {[llength $Args] > 0} {
47
      lappend Variables "All Arguments"
48
    }
49
    if {[llength $Locals] > 0} {
50
      lappend Variables  "All Locals"
51
    }
52
    lappend Variables "All Registers"
53
    lappend Variables "Collect Stack"
54
 
55
    build_win $this
56
 
57
    # Set a default return status, in case we are destroyed
58
    set _TOtherVariable {}
59
 
60
    # Fill the listboxes with any default data
61
    if {"$Data" != {}} {
62
      change 1 $Data
63
    }
64
 
65
    after idle [list wm deiconify $top]
66
    # after idle grab $this
67
  }
68
 
69
  # ------------------------------------------------------------------
70
  #  DESTRUCTOR - destroy window containing widget
71
  # ------------------------------------------------------------------
72
  destructor {
73
 
74
    # Remove this window and all hooks
75
    # grab release $this
76
 
77
    # Note that this is okay: the callback (TraceDlg::done, usually) will
78
    # ignore stray "cancel" callbacks
79
    eval $Callback cancel
80
 
81
    set top [winfo toplevel [namespace tail $this]]
82
    destroy $this
83
    destroy $top
84
  }
85
 
86
  # ------------------------------------------------------------------
87
  # METHOD: build_win - build the Trace dialog box (cache this?)
88
  # ------------------------------------------------------------------
89
  method build_win {f} {
90
    global _TStepCount _TOtherVariable
91
 
92
    # The two frames of this dialog
93
    set bbox [frame $f.bbox];            # for holding OK,CANCEL buttons
94
    set data [frame $f.data];            # for everything else
95
 
96
    # Setup the button box
97
    button $bbox.ok     -text OK -command "$this ok"
98
    button $bbox.cancel -text CANCEL -command "$this cancel"
99
    pack $bbox.ok $bbox.cancel -side left -padx 10 -expand yes
100
 
101
    # The "Data Collection" Frame
102
    set top [frame $data.top]
103
    set bot [frame $data.bot]
104
 
105
    set boxes  [frame $top.boxes]
106
    set cFrame [frame $boxes.cFrame]
107
    set vFrame [frame $boxes.vFrame]
108
    set bFrame [frame $boxes.bframe]
109
    set oFrame [frame $top.uFrame]
110
    pack $cFrame $bFrame $vFrame -side left -expand yes -padx 5
111
 
112
    # While stepping
113
    if {$WhileStepping} {
114
      set step_frame [frame $top.stepf]
115
      label $step_frame.whilelbl -text {While Stepping,   Steps:}
116
      set WhileSteppingEntry [entry $step_frame.steps          \
117
                                -textvariable _TStepCount      \
118
                                -width 5]
119
      pack $step_frame.whilelbl $WhileSteppingEntry -side left
120
    }
121
 
122
    # The Collect listbox
123
    label $cFrame.lbl -text {Collect:}
124
    tixScrolledListBox $cFrame.lb -scrollbar auto \
125
      -browsecmd "$this toggle_button_state 0"    \
126
      -command "$this change 0"
127
    set CollectLB [$cFrame.lb subwidget listbox]
128
    $CollectLB configure -selectmode extended
129
    pack $cFrame.lbl $cFrame.lb -side top -expand yes -pady 2
130
 
131
    # The Variables listbox
132
    label $vFrame.lbl -text {Variables:}
133
    tixScrolledListBox $vFrame.lb -scrollbar auto \
134
      -browsecmd "$this toggle_button_state 1"    \
135
      -command "$this change 1"
136
    set VariablesLB [$vFrame.lb subwidget listbox]
137
    $VariablesLB configure -selectmode extended
138
    pack $vFrame.lbl $vFrame.lb -side top -expand yes -pady 2
139
 
140
    # The button frame
141
    set AddButton [button $bFrame.add -text {<<< Collect}   \
142
                     -command "$this change 1" -state disabled]
143
    set RemoveButton [button $bFrame.del -text {Ignore >>>} \
144
                        -command "$this change 0" -state disabled]
145
    pack $bFrame.add $bFrame.del -side top -expand yes -pady 5
146
 
147
    # The other frame (type-in)
148
    label $oFrame.lbl -text {Other:}
149
    set OtherEntry [entry $oFrame.ent -textvariable _TOtherVariable]
150
    pack $oFrame.lbl $OtherEntry -side left
151
    bind $OtherEntry <Return> "$this change_other"
152
 
153
    # Pack these frames
154
    if {$WhileStepping} {
155
      pack $step_frame -side top
156
    }
157
 
158
    pack $boxes $oFrame -side top -padx 5 -pady 5
159
    pack $top $bot -side top
160
 
161
    # Fill the list boxes
162
    fill_listboxes
163
 
164
    # Pack the main frames
165
    # after idle
166
    pack $f.data $bbox -side top -padx 4 -pady 2 \
167
      -expand yes -fill x
168
 
169
    # !!???
170
    if {$WhileStepping} {
171
      $WhileSteppingEntry delete 0 end
172
      $WhileSteppingEntry insert 0 $Steps
173
    }
174
  }
175
 
176
  method toggle_button_state {add} {
177
 
178
    # BUG in Tix.. This is invoked whenever a <1> event is generated in
179
    # the listbox...
180
    if {$add} {
181
      set a [$VariablesLB curselection]
182
      if {"$a" != ""} {
183
        $AddButton configure -state normal
184
        $RemoveButton configure -state disabled
185
      }
186
    } else {
187
      set a [$CollectLB curselection]
188
      if {"$a" != ""} {
189
        $AddButton configure -state disabled
190
        $RemoveButton configure -state normal
191
      }
192
    }
193
  }
194
 
195
 
196
  # ------------------------------------------------------------------
197
  # METHOD: fill_listboxes - fills the two listboxes
198
  # ------------------------------------------------------------------
199
  method fill_listboxes {{last {}}} {
200
 
201
    # Fill the Collect listbox with the variables being collected
202
    if {[info exists Collect]} {
203
      fill_collect $last
204
    }
205
 
206
    fill_variables $last
207
  }
208
 
209
  # ------------------------------------------------------------------
210
  # METHOD: change - change a selected variable
211
  # ------------------------------------------------------------------
212
  method change {add {select {}}} {
213
    if {"$select" == {}} {
214
      set selections [get_selections $add]
215
      set lb        [lindex $selections 0]
216
      set last      [lindex $selections 1]
217
      set selection [lindex $selections 2]
218
      set noname 1
219
    } else {
220
      # This usually (only) occurs when we open this dialog for editing
221
      # some existing action.
222
      set lb   {}
223
      set last {}
224
      set noname 0
225
      set selection $select
226
    }
227
 
228
    $RemoveButton configure -state disabled
229
    $AddButton configure -state disabled
230
 
231
    # Remove all the selections from one list
232
    # and add them to the other list
233
    if {$add} {
234
      set list1 $Variables
235
      set list2 $Collect
236
    } else {
237
      set list1 $Collect
238
      set list2 $Variables
239
    }
240
 
241
    foreach a $selection {
242
      if {$noname} {
243
        set name [$lb get $a]
244
      } else {
245
        set name $a
246
      }
247
 
248
      if {"$name" == "All Locals" || "$name" == {$loc}} {
249
        set name "All Locals"
250
        set lists [all_locals $add]
251
        set list1 [lindex $lists 0]
252
        set list2 [lindex $lists 1]
253
      } elseif {"$name" == "All Registers" || "$name" == {$reg}} {
254
        set name "All Registers"
255
        set lists [all_regs $add]
256
        set list1 [lindex $lists 0]
257
        set list2 [lindex $lists 1]
258
      } elseif {"$name" == "All Arguments" || "$name" == {$arg}} {
259
        set name "All Arguments"
260
        set lists [all_args $add]
261
        set list1 [lindex $lists 0]
262
        set list2 [lindex $lists 1]
263
      } else {
264
        set i [lsearch -exact $list1 $name]
265
        set list1 [lreplace $list1 $i $i]
266
 
267
        # Check if this is something we want to keep on a list
268
        if {[lsearch $Args $name] != -1 || [lsearch $Registers [string trim $name \$]] != -1 || [lsearch $Locals $name] != -1 || $add} {
269
          lappend list2 $name
270
        }
271
      }
272
 
273
      if {$add} {
274
        set Collect $list2
275
        set Variables $list1
276
      } else {
277
        set Collect $list1
278
        set Variables $list2
279
      }
280
    }
281
 
282
    # Update boxes (!! SLOW !!)
283
    fill_collect $last
284
    fill_variables $last
285
  }
286
 
287
  # ------------------------------------------------------------------
288
  # METHOD: fill_collect - fill the collect box
289
  # ------------------------------------------------------------------
290
  method fill_collect {{last {}}} {
291
 
292
    $CollectLB delete 0 end
293
    set Collect [sort $Collect]
294
    foreach a $Collect {
295
      $CollectLB insert end $a
296
    }
297
    if {"$last" != ""} {
298
      $CollectLB see $last
299
    }
300
  }
301
 
302
  # ------------------------------------------------------------------
303
  # METHOD: fill_variables - fill the variables box
304
  # ------------------------------------------------------------------
305
  method fill_variables {{last {}}} {
306
 
307
    $VariablesLB delete 0 end
308
    set Variables [sort $Variables]
309
    foreach a $Variables {
310
      $VariablesLB insert end $a
311
    }
312
 
313
    if {"$last" != ""} {
314
      $VariablesLB see $last
315
    }
316
  }
317
 
318
  # ------------------------------------------------------------------
319
  # METHOD: sort - sort a list of variables, placing regs and
320
  #                special identifiers (like "All Locals") at end
321
  # ------------------------------------------------------------------
322
  method sort {list} {
323
 
324
    set special_names {
325
      "All Arguments" args \
326
        "All Locals" locs \
327
        "All Registers" regs \
328
        "Collect Stack" stack
329
    }
330
 
331
    foreach {name var} $special_names {
332
      set i [lsearch $list $name]
333
      if {$i != -1} {
334
        set $var 1
335
        set list [lreplace $list $i $i]
336
      } else {
337
        set $var 0
338
      }
339
    }
340
 
341
    # Extract all the locals, regs, args, globals
342
    set types_list {Args Locals Registers }
343
    foreach type $types_list {
344
      set used_$type {}
345
 
346
      foreach a [set $type] {
347
        set i [lsearch $list $a]
348
        if {$i != -1} {
349
          lappend used_$type $a
350
          set list [lreplace $list $i $i]
351
        }
352
      }
353
      set used_$type [lsort [set used_$type]]
354
    }
355
 
356
    set globals [lsort $list]
357
 
358
    # Sort the remaining list in order: args, locals, globals, regs
359
    set list [concat $used_Args $used_Locals $globals $used_Registers]
360
 
361
    set list2 {}
362
 
363
    foreach {name var} $special_names {
364
      if {[set $var]} {
365
        lappend list2 $name
366
      }
367
    }
368
 
369
    set list [concat $list2 $list]
370
    return $list
371
  }
372
 
373
  # ------------------------------------------------------------------
374
  # METHOD: all_args - add/remove all args
375
  # ------------------------------------------------------------------
376
  method all_args {add} {
377
 
378
    if {$add} {
379
      set list1 $Variables
380
      set list2 $Collect
381
    } else {
382
      set list1 $Collect
383
      set list2 $Variables
384
    }
385
 
386
#    foreach var $Args {
387
#      set i [lsearch $list1 $var]
388
#      if {$i != -1} {
389
#       set list1 [lreplace $list1 $i $i]
390
#       lappend list2 $var
391
#      }
392
#    }
393
 
394
    lappend list2 "All Arguments"
395
    set i [lsearch $list1 "All Arguments"]
396
    if {$i != -1} {
397
      set list1 [lreplace $list1 $i $i]
398
    }
399
 
400
    return [list $list1 $list2]
401
  }
402
 
403
  # ------------------------------------------------------------------
404
  # METHOD: all_locals - add/remove all locals
405
  # ------------------------------------------------------------------
406
  method all_locals {add} {
407
 
408
    if {$add} {
409
      set list1 $Variables
410
      set list2 $Collect
411
    } else {
412
      set list1 $Collect
413
      set list2 $Variables
414
    }
415
 
416
#    foreach var $Locals {
417
#      set i [lsearch $list1 $var]
418
#      if {$i != -1} {
419
#       set list1 [lreplace $list1 $i $i]
420
#       lappend list2 $var
421
#      }
422
#    }
423
 
424
    lappend list2 "All Locals"
425
    set i [lsearch $list1 "All Locals"]
426
    if {$i != -1} {
427
      set list1 [lreplace $list1 $i $i]
428
    }
429
 
430
    return [list $list1 $list2]
431
  }
432
 
433
  # ------------------------------------------------------------------
434
  # METHOD: all_regs - add/remove all registers
435
  # ------------------------------------------------------------------
436
  method all_regs {add} {
437
 
438
    if {$add} {
439
      set list1 $Variables
440
      set list2 $Collect
441
    } else {
442
      set list1 $Collect
443
      set list2 $Variables
444
    }
445
 
446
#    foreach var $Registers {
447
#      set i [lsearch $list1 "\$$var"]
448
#      if {$i != -1} {
449
#       set list1 [lreplace $list1 $i $i]
450
#       lappend list2 "\$$var"
451
#      }
452
#    }
453
 
454
    lappend list2 "All Registers"
455
    set i [lsearch $list1 "All Registers"]
456
    if {$i != -1} {
457
      set list1 [lreplace $list1 $i $i]
458
    }
459
 
460
    return [list $list1 $list2]
461
  }
462
 
463
  # ------------------------------------------------------------------
464
  # METHOD: change_other - add/remove a user defined type
465
  # ------------------------------------------------------------------
466
  method change_other {} {
467
    set other [$OtherEntry get]
468
 
469
    if {"$other" != ""} {
470
      set added 0
471
 
472
      # Check if this is a local/register/arg
473
      set i [lsearch $Locals "$other"]
474
      if {$i != -1} {
475
        set i [lsearch $Collect "$other"]
476
        set added 1
477
        if {$i != -1} {
478
          # It's a local on the collection list
479
          debug "local on collection list"
480
          set add 0
481
          set list1 [lreplace $Collect $i $i]
482
          set list2 [concat $Variables "$other"]
483
        } else {
484
          # It's a local on the variables list
485
          debug "local on variable list"
486
          set add 1
487
          set i [lsearch $Variables "$other"]
488
          set list1 [lreplace $Variables $i $i]
489
          set list2 [concat $Collect "$other"]
490
        }
491
      }
492
 
493
      set i [lsearch $Registers [string trim "$other" \$]]
494
      if {$i != -1} {
495
        set i [lsearch $Collect "$other"]
496
        set added 1
497
        if {$i != -1} {
498
          # It's a register on the collection list
499
          debug "register on collection list"
500
          set add 0
501
          set list1 [lreplace $Collect $i $i]
502
          set list2 [concat $Variables "$other"]
503
        } else {
504
          # It's a register on the variables list
505
          debug "register on variable list"
506
          set add 1
507
          set i [lsearch $Variables "$other"]
508
          set list1 [lreplace $Variables $i $i]
509
          set list2 [concat $Collect "$other"]
510
        }
511
      }
512
 
513
      set i [lsearch $Args $other]
514
      if {$i != -1} {
515
        set i [lsearch $Collect "$other"]
516
        set added 1
517
        if {$i != -1} {
518
          # It's an arg on the collection list
519
          debug "arg on collection list"
520
          set add 0
521
          set list1 [lreplace $Collect $i $i]
522
          set list2 [concat $Variables "$other"]
523
        } else {
524
          # It's an arg on the variables list
525
          debug "arg on variable list"
526
          set add 1
527
          set i [lsearch $Variables "$other"]
528
          set list1 [lreplace $Variables $i $i]
529
          set list2 [concat $Collect "$other"]
530
        }
531
      }
532
 
533
      # Check for special tags
534
      if {!$added} {
535
        if {"[string tolower $other]" == "all locals"} {
536
          set i [lsearch $Variables "All Locals"]
537
          if {$i != -1} {
538
            # It's "All Locals" on the variables list
539
            set add 1
540
            set lists [all_locals 1]
541
            set list1 [lindex $lists 0]
542
            set list2   [lindex $lists 1]
543
          } else {
544
            # It's "All Locals" on the Collect list
545
            set add 0
546
            set lists [all_locals 0]
547
            set list1 [lindex $lists 0]
548
            set list2 [lindex $lists 1]
549
          }
550
        } elseif {"[string tolower $other]" == "all registers"} {
551
          set i [lsearch $Variables "All Registers"]
552
          if {$i != -1} {
553
            # It's "All Registers" on the Variables list
554
            set add 1
555
            set lists [all_regs 1]
556
            set list1 [lindex $lists 0]
557
            set list2 [lindex $lists 1]
558
          } else {
559
            set add 0
560
            set lists [all_regs 0]
561
            set list1 [lindex $lists 0]
562
            set list2 [lindex $lists 1]
563
          }
564
        } elseif {"[string tolower $other]" == "all arguments"} {
565
          set i [lsearch $Variables "All Arguments"]
566
          if {$i != -1} {
567
            # It's "All Arguments" on the Variables list
568
            set add 1
569
            set lists [all_args 1]
570
            set list1 [lindex $lists 0]
571
            set list2 [lindex $lists 1]
572
          } else {
573
            set add 0
574
            set lists [all_args 0]
575
            set list1 [lindex $lists 0]
576
            set list2 [lindex $lists 1]
577
          }
578
        } elseif {"[string tolower $other]" == "collect stack"} {
579
          set i [lsearch $Variables "Collect Stack"]
580
          if {$i != -1} {
581
            # It's "All Arguments" on the Variables list
582
            set add 1
583
            set lists [all_args 1]
584
            set list1 [lindex $lists 0]
585
            set list2 [lindex $lists 1]
586
          } else {
587
            set add 0
588
            set lists [all_args 0]
589
            set list1 [lindex $lists 0]
590
            set list2 [lindex $lists 1]
591
          }
592
        } else {
593
          # Check if this entry is on the Collect list
594
          set i [lsearch $Collect $other]
595
          if {$i != -1} {
596
            # It's on the list -- remove it
597
            set add 0
598
            set list1 [lreplace $Collect $i $i]
599
            set list2 $Variables
600
          } else {
601
            # It's not on the list -- add it
602
 
603
            set other [string trim $other \ \r\t\n]
604
 
605
            # accept everything, send to gdb to validate
606
            set ok 1
607
 
608
            # memranges will be rejected right here
609
 
610
            if {[string range $other 0 1] == "\$("} {
611
              tk_messageBox -type ok -icon error \
612
                  -message "Expression syntax not supported"
613
              set ok 0
614
            }
615
 
616
            # do all syntax checking later
617
             if {$ok} {
618
              #debug "Keeping \"$other\""
619
              # We MUST string out all spaces...
620
              if {[regsub -all { } $other {} expression]} {
621
                set other $expression
622
              }
623
              set add 1
624
              set list1 $Variables
625
              set list2 [concat $Collect "$other"]
626
            } else {
627
              #debug "Discarding \"$other\""
628
            }
629
          }
630
        }
631
      }
632
 
633
      # Clear the entry
634
      $OtherEntry delete 0 end
635
 
636
      if {$add} {
637
        set Variables $list1
638
        set Collect $list2
639
      } else {
640
        set Variables $list2
641
        set Collect $list1
642
      }
643
      fill_listboxes
644
    }
645
  }
646
 
647
 
648
  # ------------------------------------------------------------------
649
  # METHOD: get_selections - get all the selected variables
650
  #         pass 0 to get the selections from the collect box
651
  #         Returns a list of: listbox in which the selections were
652
  #         obtained, last element selected on the list, and all the
653
  #         selected elements
654
  # ------------------------------------------------------------------
655
  method get_selections {vars} {
656
 
657
    if {$vars} {
658
      set widget $VariablesLB
659
    } else {
660
      set widget $CollectLB
661
    }
662
 
663
    set elements [$widget curselection]
664
    set list {}
665
    set i 0
666
    foreach i $elements {
667
      lappend list [$widget get $i]
668
    }
669
 
670
    return [list $widget $i $elements]
671
  }
672
 
673
  # ------------------------------------------------------------------
674
  # METHOD: cancel - cancel the dialog and do not set the trace
675
  # ------------------------------------------------------------------
676
  method cancel {} {
677
    delete
678
  }
679
 
680
  method remove_special {list items} {
681
 
682
    foreach item $items {
683
      set i [lsearch $list $item]
684
      if {$i != -1} {
685
        set list [lreplace $list $i $i]
686
      } else {
687
        set i [lsearch $list \$$item]
688
        if {$i != -1} {
689
          set list [lreplace $list $i $i]
690
        }
691
      }
692
    }
693
 
694
    return $list
695
  }
696
 
697
  # ------------------------------------------------------------------
698
  # METHOD: ok - validate the tracepoint and install it
699
  # ------------------------------------------------------------------
700
  method ok {} {
701
    global _TStepCount
702
 
703
    # Add anything in the OtherEntry
704
    change_other
705
 
706
    # Check that we are collecting data
707
    if {[llength $Collect] == 0} {
708
      # No data!
709
      set msg "No data specified for the given action."
710
      set answer [tk_messageBox -type ok -title "Tracepoint Error" \
711
                    -icon error \
712
                    -message $msg]
713
      case $answer {
714
        cancel {
715
          cancel
716
        }
717
        ok {
718
          return
719
        }
720
      }
721
    }
722
 
723
    set i [lsearch $Collect "All Locals"]
724
    if {$i != -1} {
725
      set data [lreplace $Collect $i $i]
726
      set data [concat $data {$loc}]
727
 
728
      # Remove all the locals from the list
729
      set data [remove_special $data $Locals]
730
    } else {
731
      set data $Collect
732
    }
733
 
734
    set i [lsearch $data "All Registers"]
735
    if {$i != -1} {
736
      set data [lreplace $data $i $i]
737
      set data [concat $data {$reg}]
738
 
739
      # Remove all the locals from the list
740
      set data [remove_special $data $Registers]
741
    }
742
 
743
    set i [lsearch $data "All Arguments"]
744
    if {$i != -1} {
745
      set data [lreplace $data $i $i]
746
      set data [concat $data {$arg}]
747
 
748
      # Remove all the locals from the list
749
      set data [remove_special $data $Args]
750
    }
751
 
752
   set i [lsearch $data "Collect Stack"]
753
    if {$i != -1} {
754
      set data [lreplace $data $i $i]
755
      set data [concat $data [collect_stack]]
756
 
757
    }
758
 
759
    # Remove repeats
760
    set d {}
761
    foreach i $data {
762
      if {![info exists check($i)]} {
763
        set check($i) 1
764
        lappend d $i
765
      }
766
    }
767
 
768
    if {$WhileStepping} {
769
      set steps $_TStepCount
770
    } else {
771
      set steps 0
772
    }
773
 
774
    if {"$Data" != {}} {
775
      set command "modify"
776
    } else {
777
      set command "add"
778
    }
779
 
780
    debug "DATA = $data"
781
    eval $Callback $command $steps [list $data]
782
    delete
783
  }
784
 
785
 
786
  method collect_stack {} {
787
    return $StackCollect
788
  }
789
 
790
  method cmd {line} {
791
    $line
792
  }
793
 
794
  # PUBLIC DATA
795
  public File
796
  public Line {}
797
  public WhileStepping 0
798
  public Number
799
  public Callback
800
  public Data {}
801
  public Steps {}
802
  public Address {}
803
 
804
  # PROTECTED DATA
805
  protected WhileSteppingEntry
806
  protected CollectLB
807
  protected VariablesLB
808
  protected Variables {}
809
  protected Collect {}
810
  protected Locals
811
  protected Args
812
  protected Registers
813
  protected Others {}
814
  protected AddButton
815
  protected RemoveButton
816
  protected OtherEntry
817
  protected StackCollect {*(char*)$sp@64}
818
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.