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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [gdbtcl/] [srctextwin.ith] - Blame information for rev 578

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

Line No. Rev Author Line
1 578 markom
# SrcTextWin class definition, for Insight
2
# Copyright 1997, 1998, 1999, 2001 Red Hat, Inc.
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
class SrcTextWin {
16
  inherit itk::Widget GDBWin
17
 
18
  public {
19
    variable Tracing    ;# 1 if we are running in trace mode
20
    variable Browsing     0 ;# 1 if we are browsing a trace experiment
21
    variable parent {}  ;# the parent SrcWin
22
    variable ignore_var_balloons 0;  # ignore all variable balloons
23
 
24
    # Set the height of the src window
25
    variable textheight 5i {
26
      catch {$itk_interior.p configure -height $itk_option(-textheight)}
27
    }
28
 
29
    method constructor {args}
30
    method destructor {}
31
    method disassembly_changed {}
32
    method reconfig {}
33
    method trace_find_hook {mode from_tty}
34
    method set_control_mode {mode}
35
    method build_popups {}
36
    method build_win {}
37
    method SetRunningState {state}
38
    method enable {on}
39
    method setTabs {win {asm S}}
40
    method enable_disable_src_tags {win how}
41
    method config_win {win {asm S}}
42
    method addPopup {menu label command {abg {}} {browse 1} {run 1}}
43
    method updateBalloon {}
44
    method ClearTags {}
45
    method FillSource {winname tagname filename funcname line addr pc_addr lib}
46
    method FillAssembly {winname tagname filename funcname line addr pc_addr lib}
47
    method FillMixed {winname tagname filename funcname line addr pc_addr lib}
48
    method location {tagname filename funcname line addr pc_addr lib}
49
    method LoadFile {winname name lib mtime_changed}
50
    method display_line { win line }
51
    method display_breaks {}
52
    method insertBreakTag {win linenum tag}
53
    method removeBreakTag {win linenum tag }
54
    method bp {action bpnum addr {linenum {}} {file {}} {type 0} {enabled 0} {thread -1}}
55
    method do_bp { win action linenum type bpnum enabled thread asm}
56
    method hasBP {win line}
57
    method hasTP {win line}
58
    method report_source_location {}
59
    method lookup_line {win y}
60
    method continue_to_here {{win {}} {y -1} {threads -1}}
61
    method jump_to_here {{win {}} {y -1} {threads -1}}
62
    method set_bp_at_line {{type N} {win {}} {y -1} {threads "-1"}}
63
    method remove_bp_at_line {{win {}} {y -1}}
64
    method enable_disable_at_line {action}
65
    method set_tp_at_line {{win {}} {y -1}}
66
    method next_hit_at_line {{win {}} {y -1}}
67
    method remove_tp_at_line {{win {}} {y -1}}
68
    method do_tag_popup {name X Y y}
69
    method do_source_popup { X Y x y }
70
    method addToWatch {var}
71
    method do_key {key}
72
    method mode_get {}
73
    method mode_set {new_mode {go 1}}
74
    method cancelMotion {}
75
    method motion {type win x y}
76
    method showBPBalloon {win x y}
77
    method showBalloon {win x y}
78
    method getVariable {x y {line {}}}
79
    method trace_help {args}
80
    method line_is_executable {win line}
81
    method tracepoint_range {win low high}
82
    method search {exp direction}
83
    method LoadFromCache {pname name asm lib}
84
    method UnLoadFromCache {pname oldpane name asm lib}
85
    method print {top}
86
    method ask_thread_bp {}
87
    method do_thread_bp {listbox}
88
    method test_get {var}
89
    method clear_file {}
90
    method get_file {}
91
    method set_tag_to_stack {}
92
 
93
    # GDB Events
94
    method breakpoint {event}
95
    method tracepoint {event}
96
    method set_variable {event}
97
  }
98
 
99
  private {
100
    variable top        ;# toplevel window
101
    variable twin       ;# top text window of pane
102
    variable _tpane     ;# top pane name
103
    variable bwin ""    ;# bottom text window of pane
104
    variable _bpane ""  ;# bottom pane name
105
 
106
    variable do_display_breaks 0        ;# flag
107
    variable popups
108
 
109
    variable timeoutID {} ;# The timeout ID for the variable balloon help
110
    variable UseVariableBalloons
111
 
112
    variable mode_changed 0
113
    variable current    ;# our current state
114
    variable pc         ;# where the PC is now
115
    variable oldmode "" ;# remember the mode we want, even if we can't have it
116
 
117
    variable Running 0  ;# another way to disable things while target is active
118
    variable Linenums   ;# use linenumbers?
119
    variable SearchIndex 1.0    ;# static
120
    variable id ;#thread id to line mapping
121
    # needed for assembly support
122
    variable _map
123
    variable Cname  ""  ;# cache index name for _map
124
    # cache is not shared among windows yet.  That could be a later
125
    # optimization
126
    variable Stwc       ;# Source Text Window Cache
127
    variable filenum 0
128
 
129
    # The variable object which the variable balloon describes
130
    variable _balloon_var {}
131
 
132
    method balloon_value {variable}
133
    method _mtime_changed {filename}
134
    method _initialize_srctextwin {}
135
    method _clear_cache {}
136
    method _highlightAsmLine {win addr pc_addr tagname filename funcname} {}
137
 
138
    proc makeBreakDot {size colorList {image {}}}
139
  }
140
 
141
 
142
 
143
  # common variables are shared among all objects of this type
144
  # break_images stores the images associated with the break dot.
145
  # bp
146
  # temp_bp
147
  # disabled_bp
148
  # tp
149
  # thread_bp
150
  protected common break_images
151
 
152
  # This is the list of bp types.  Be nice, and don't put spaces in
153
  # any of the elements of this list...
154
  protected common bp_types {bp temp_bp disabled_bp thread_bp}
155
 
156
  # This variable is used in the "Continue to here" case, where we are
157
  # disabling then reenabling breakpoints behind the user's back to
158
  # implement this feature, but we don't want the user to see this...
159
  protected common dont_change_appearance 0
160
 
161
  protected common TimeOut 100 ;# The timeout value for variable balloon help
162
 
163
}

powered by: WebSVN 2.1.0

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