|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric5.DebugClients.Python3.DebugThread</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.DebugClients.Python3.DebugThread</h1> |
|
12 <p> |
|
13 Module implementing the debug thread. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#DebugThread">DebugThread</a></td> |
|
23 <td>Class implementing a debug thread.</td> |
|
24 </tr> |
|
25 </table> |
|
26 <h3>Functions</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <hr /><hr /> |
|
31 <a NAME="DebugThread" ID="DebugThread"></a> |
|
32 <h2>DebugThread</h2> |
|
33 <p> |
|
34 Class implementing a debug thread. |
|
35 </p><p> |
|
36 It represents a thread in the python interpreter that we are tracing. |
|
37 </p><p> |
|
38 Provides simple wrapper methods around bdb for the 'owning' client to |
|
39 call to step etc. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 DebugBase |
|
43 <h3>Class Attributes</h3> |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <h3>Methods</h3> |
|
48 <table> |
|
49 <tr> |
|
50 <td><a href="#DebugThread.__init__">DebugThread</a></td> |
|
51 <td>Constructor</td> |
|
52 </tr><tr> |
|
53 <td><a href="#DebugThread.bootstrap">bootstrap</a></td> |
|
54 <td>Private method to bootstrap the thread.</td> |
|
55 </tr><tr> |
|
56 <td><a href="#DebugThread.get_ident">get_ident</a></td> |
|
57 <td>Public method to return the id of this thread.</td> |
|
58 </tr><tr> |
|
59 <td><a href="#DebugThread.get_name">get_name</a></td> |
|
60 <td>Public method to return the name of this thread.</td> |
|
61 </tr><tr> |
|
62 <td><a href="#DebugThread.set_ident">set_ident</a></td> |
|
63 <td>Public method to set the id for this thread.</td> |
|
64 </tr><tr> |
|
65 <td><a href="#DebugThread.traceThread">traceThread</a></td> |
|
66 <td>Private method to setup tracing for this thread.</td> |
|
67 </tr><tr> |
|
68 <td><a href="#DebugThread.trace_dispatch">trace_dispatch</a></td> |
|
69 <td>Private method wrapping the trace_dispatch of bdb.py.</td> |
|
70 </tr> |
|
71 </table> |
|
72 <a NAME="DebugThread.__init__" ID="DebugThread.__init__"></a> |
|
73 <h4>DebugThread (Constructor)</h4> |
|
74 <b>DebugThread</b>(<i>dbgClient, targ = None, args = None, kwargs = None, mainThread = False</i>) |
|
75 <p> |
|
76 Constructor |
|
77 </p><dl> |
|
78 <dt><i>dbgClient</i></dt> |
|
79 <dd> |
|
80 the owning client |
|
81 </dd><dt><i>targ</i></dt> |
|
82 <dd> |
|
83 the target method in the run thread |
|
84 </dd><dt><i>args</i></dt> |
|
85 <dd> |
|
86 arguments to be passed to the thread |
|
87 </dd><dt><i>kwargs</i></dt> |
|
88 <dd> |
|
89 arguments to be passed to the thread |
|
90 </dd><dt><i>mainThread</i></dt> |
|
91 <dd> |
|
92 0 if this thread is not the mainscripts thread |
|
93 </dd> |
|
94 </dl><a NAME="DebugThread.bootstrap" ID="DebugThread.bootstrap"></a> |
|
95 <h4>DebugThread.bootstrap</h4> |
|
96 <b>bootstrap</b>(<i></i>) |
|
97 <p> |
|
98 Private method to bootstrap the thread. |
|
99 </p><p> |
|
100 It wraps the call to the user function to enable tracing |
|
101 before hand. |
|
102 </p><a NAME="DebugThread.get_ident" ID="DebugThread.get_ident"></a> |
|
103 <h4>DebugThread.get_ident</h4> |
|
104 <b>get_ident</b>(<i></i>) |
|
105 <p> |
|
106 Public method to return the id of this thread. |
|
107 </p><dl> |
|
108 <dt>Returns:</dt> |
|
109 <dd> |
|
110 the id of this thread (int) |
|
111 </dd> |
|
112 </dl><a NAME="DebugThread.get_name" ID="DebugThread.get_name"></a> |
|
113 <h4>DebugThread.get_name</h4> |
|
114 <b>get_name</b>(<i></i>) |
|
115 <p> |
|
116 Public method to return the name of this thread. |
|
117 </p><dl> |
|
118 <dt>Returns:</dt> |
|
119 <dd> |
|
120 name of this thread (string) |
|
121 </dd> |
|
122 </dl><a NAME="DebugThread.set_ident" ID="DebugThread.set_ident"></a> |
|
123 <h4>DebugThread.set_ident</h4> |
|
124 <b>set_ident</b>(<i>id</i>) |
|
125 <p> |
|
126 Public method to set the id for this thread. |
|
127 </p><dl> |
|
128 <dt><i>id</i></dt> |
|
129 <dd> |
|
130 id for this thread (int) |
|
131 </dd> |
|
132 </dl><a NAME="DebugThread.traceThread" ID="DebugThread.traceThread"></a> |
|
133 <h4>DebugThread.traceThread</h4> |
|
134 <b>traceThread</b>(<i></i>) |
|
135 <p> |
|
136 Private method to setup tracing for this thread. |
|
137 </p><a NAME="DebugThread.trace_dispatch" ID="DebugThread.trace_dispatch"></a> |
|
138 <h4>DebugThread.trace_dispatch</h4> |
|
139 <b>trace_dispatch</b>(<i>frame, event, arg</i>) |
|
140 <p> |
|
141 Private method wrapping the trace_dispatch of bdb.py. |
|
142 </p><p> |
|
143 It wraps the call to dispatch tracing into |
|
144 bdb to make sure we have locked the client to prevent multiple |
|
145 threads from entering the client event loop. |
|
146 </p><dl> |
|
147 <dt><i>frame</i></dt> |
|
148 <dd> |
|
149 The current stack frame. |
|
150 </dd><dt><i>event</i></dt> |
|
151 <dd> |
|
152 The trace event (string) |
|
153 </dd><dt><i>arg</i></dt> |
|
154 <dd> |
|
155 The arguments |
|
156 </dd> |
|
157 </dl><dl> |
|
158 <dt>Returns:</dt> |
|
159 <dd> |
|
160 local trace function |
|
161 </dd> |
|
162 </dl> |
|
163 <div align="right"><a href="#top">Up</a></div> |
|
164 <hr /> |
|
165 </body></html> |