xref: /haiku/docs/develop/kits/debugger/debugger.docbook (revision 098eaec6305ae804d3eb6c8e6c6aad790fb4cfb1)
1<?xml version="1.0"?>
2<!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V4.1.2.5//EN" "http://www.oasis-open.org/docbook/xml/simple/4.1.2.5/sdocbook.dtd">
3<article xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" role="specification">
4  <title>UML Model</title>
5  <section id="actors">
6    <title>Actors</title>
7  </section>
8  <section id="usecases">
9    <title>Use Cases</title>
10  </section>
11  <section id="interfaces">
12    <title>Interfaces</title>
13  </section>
14  <section id="classes">
15    <title>Classes</title>
16    <section>
17      <title>TargetHostInterface</title>
18      <table frame="all">
19        <title/>
20        <tgroup cols="3" align="left" colsep="1" rowsep="1">
21          <colspec colname="c1"/>
22          <colspec colname="c2"/>
23          <colspec colname="c3"/>
24          <thead>
25            <row>
26              <entry role="class-title">Class</entry>
27              <entry role="class-name" namest="c2" nameend="c3">TargetHostInterface</entry>
28            </row>
29          </thead>
30          <tbody>
31            <row>
32              <entry role="comment" namest="c1" nameend="c3">
33                <para>Keeps track of how many TeamDebuggers there are, starts new ones, finds existing ones, and removes old ones.</para>
34              </entry>
35            </row>
36            <row>
37              <entry namest="c1" nameend="c3">
38                <para/>
39              </entry>
40            </row>
41          </tbody>
42        </tgroup>
43      </table>
44    </section>
45    <section>
46      <title>RemoteTargetHostInterface</title>
47      <table frame="all">
48        <title/>
49        <tgroup cols="3" align="left" colsep="1" rowsep="1">
50          <colspec colname="c1"/>
51          <colspec colname="c2"/>
52          <colspec colname="c3"/>
53          <thead>
54            <row>
55              <entry role="class-title">Class</entry>
56              <entry role="class-name" namest="c2" nameend="c3">RemoteTargetHostInterface</entry>
57            </row>
58          </thead>
59          <tbody>
60            <row>
61              <entry role="comment" namest="c1" nameend="c3">
62                <para>Operates on remote computers. Not implemented.</para>
63              </entry>
64            </row>
65            <row>
66              <entry namest="c1" nameend="c3">
67                <para/>
68              </entry>
69            </row>
70            <section>
71              <title>Supertypes:</title>
72            </section>
73          </tbody>
74        </tgroup>
75      </table>
76    </section>
77    <section>
78      <title>LocalTargetHostInterface</title>
79      <table frame="all">
80        <title/>
81        <tgroup cols="3" align="left" colsep="1" rowsep="1">
82          <colspec colname="c1"/>
83          <colspec colname="c2"/>
84          <colspec colname="c3"/>
85          <thead>
86            <row>
87              <entry role="class-title">Class</entry>
88              <entry role="class-name" namest="c2" nameend="c3">LocalTargetHostInterface</entry>
89            </row>
90          </thead>
91          <tbody>
92            <row>
93              <entry role="comment" namest="c1" nameend="c3">
94                <para>Operates on the local computer. Creates teams, attaches to existing teams, and finds teams by threads.
95
96It is responsible for keeping its instance of TargetHost up-to-date.</para>
97              </entry>
98            </row>
99            <section>
100              <title>Supertypes:</title>
101            </section>
102            <row>
103              <entry role="info-title" namest="c1" nameend="c3">
104                <para>Operations:</para>
105              </entry>
106            </row>
107            <row>
108              <entry role="feature-heading">
109                <para>visibility</para>
110              </entry>
111              <entry role="feature-heading">
112                <para>return</para>
113              </entry>
114              <entry role="feature-heading">
115                <para>name</para>
116              </entry>
117            </row>
118            <row>
119              <entry role="feature-detail"/>
120              <entry role="feature-detail">
121                <para role="datatype">void</para>
122              </entry>
123              <entry role="feature-detail">GetTargetHost</entry>
124            </row>
125            <row>
126              <entry role="comment"/>
127              <entry namest="c2" nameend="c3" role="comment"/>
128            </row>
129          </tbody>
130        </tgroup>
131      </table>
132    </section>
133    <section>
134      <title>TargetHost</title>
135      <table frame="all">
136        <title/>
137        <tgroup cols="3" align="left" colsep="1" rowsep="1">
138          <colspec colname="c1"/>
139          <colspec colname="c2"/>
140          <colspec colname="c3"/>
141          <thead>
142            <row>
143              <entry role="class-title">Class</entry>
144              <entry role="class-name" namest="c2" nameend="c3">TargetHost</entry>
145            </row>
146          </thead>
147          <tbody>
148            <row>
149              <entry role="comment" namest="c1" nameend="c3">
150                <para>Stores wich teams are on the target host.</para>
151              </entry>
152            </row>
153            <row>
154              <entry namest="c1" nameend="c3">
155                <para/>
156              </entry>
157            </row>
158          </tbody>
159        </tgroup>
160      </table>
161    </section>
162    <section>
163      <title>TeamDebugger</title>
164      <table frame="all">
165        <title/>
166        <tgroup cols="3" align="left" colsep="1" rowsep="1">
167          <colspec colname="c1"/>
168          <colspec colname="c2"/>
169          <colspec colname="c3"/>
170          <thead>
171            <row>
172              <entry role="class-title">Class</entry>
173              <entry role="class-name" namest="c2" nameend="c3">TeamDebugger</entry>
174            </row>
175          </thead>
176          <tbody>
177            <row>
178              <entry role="comment" namest="c1" nameend="c3">
179                <para>Acts as the backend for UserInterface. Receives the UserInterface's requests through the UserInterfaceListener.</para>
180              </entry>
181            </row>
182            <row>
183              <entry namest="c1" nameend="c3">
184                <para/>
185              </entry>
186            </row>
187            <section><title>Supertypes:</title>,  </section>
188          </tbody>
189        </tgroup>
190      </table>
191    </section>
192    <section>
193      <title>UserInterfaceListener</title>
194      <table frame="all">
195        <title/>
196        <tgroup cols="3" align="left" colsep="1" rowsep="1">
197          <colspec colname="c1"/>
198          <colspec colname="c2"/>
199          <colspec colname="c3"/>
200          <thead>
201            <row>
202              <entry role="class-title">Class</entry>
203              <entry role="class-name" namest="c2" nameend="c3">UserInterfaceListener</entry>
204            </row>
205          </thead>
206          <tbody>
207            <row>
208              <entry role="comment" namest="c1" nameend="c3">
209                <para>Class that receives requests from the UserInterface to set and clear breakpoints and watchpoints, read and write memory, write core files, step over and into functions, load images, evaluate expressions, and so on.</para>
210              </entry>
211            </row>
212            <row>
213              <entry namest="c1" nameend="c3">
214                <para/>
215              </entry>
216            </row>
217          </tbody>
218        </tgroup>
219      </table>
220    </section>
221    <section>
222      <title>UserInterface</title>
223      <table frame="all">
224        <title/>
225        <tgroup cols="3" align="left" colsep="1" rowsep="1">
226          <colspec colname="c1"/>
227          <colspec colname="c2"/>
228          <colspec colname="c3"/>
229          <thead>
230            <row>
231              <entry role="class-title">Class</entry>
232              <entry role="class-name" namest="c2" nameend="c3">UserInterface</entry>
233            </row>
234          </thead>
235          <tbody>
236            <row>
237              <entry role="comment" namest="c1" nameend="c3">
238                <para>Similar to BApplication class. States the existence of Show, Terminate, Init, LoadSettings, SaveSettings, etc.</para>
239              </entry>
240            </row>
241            <row>
242              <entry namest="c1" nameend="c3">
243                <para/>
244              </entry>
245            </row>
246            <section>
247              <title>Supertypes:</title>
248            </section>
249          </tbody>
250        </tgroup>
251      </table>
252    </section>
253    <section>
254      <title>Debugger</title>
255      <table frame="all">
256        <title/>
257        <tgroup cols="3" align="left" colsep="1" rowsep="1">
258          <colspec colname="c1"/>
259          <colspec colname="c2"/>
260          <colspec colname="c3"/>
261          <thead>
262            <row>
263              <entry role="class-title">Class</entry>
264              <entry role="class-name" namest="c2" nameend="c3">Debugger</entry>
265            </row>
266          </thead>
267          <tbody>
268            <row>
269              <entry role="comment" namest="c1" nameend="c3">
270                <para>Main class of the Debugger GUI. Usually starts the TeamsDebugger window when run.</para>
271              </entry>
272            </row>
273            <row>
274              <entry namest="c1" nameend="c3">
275                <para/>
276              </entry>
277            </row>
278            <section>
279              <title>Supertypes:</title>
280            </section>
281          </tbody>
282        </tgroup>
283      </table>
284    </section>
285    <section>
286      <title>BApplication</title>
287      <table frame="all">
288        <title/>
289        <tgroup cols="3" align="left" colsep="1" rowsep="1">
290          <colspec colname="c1"/>
291          <colspec colname="c2"/>
292          <colspec colname="c3"/>
293          <thead>
294            <row>
295              <entry role="class-title">Class</entry>
296              <entry role="class-name" namest="c2" nameend="c3">BApplication</entry>
297            </row>
298          </thead>
299          <tbody>
300            <row>
301              <entry namest="c1" nameend="c3">
302                <para/>
303              </entry>
304            </row>
305          </tbody>
306        </tgroup>
307      </table>
308    </section>
309    <section>
310      <title>GraphicalUserInterface</title>
311      <table frame="all">
312        <title/>
313        <tgroup cols="3" align="left" colsep="1" rowsep="1">
314          <colspec colname="c1"/>
315          <colspec colname="c2"/>
316          <colspec colname="c3"/>
317          <thead>
318            <row>
319              <entry role="class-title">Class</entry>
320              <entry role="class-name" namest="c2" nameend="c3">GraphicalUserInterface</entry>
321            </row>
322          </thead>
323          <tbody>
324            <row>
325              <entry role="comment" namest="c1" nameend="c3">
326                <para>The GUI of a single debugger attached to a single process</para>
327              </entry>
328            </row>
329            <row>
330              <entry namest="c1" nameend="c3">
331                <para/>
332              </entry>
333            </row>
334            <section>
335              <title>Supertypes:</title>
336            </section>
337          </tbody>
338        </tgroup>
339      </table>
340    </section>
341    <section>
342      <title>TeamWindow</title>
343      <table frame="all">
344        <title/>
345        <tgroup cols="3" align="left" colsep="1" rowsep="1">
346          <colspec colname="c1"/>
347          <colspec colname="c2"/>
348          <colspec colname="c3"/>
349          <thead>
350            <row>
351              <entry role="class-title">Class</entry>
352              <entry role="class-name" namest="c2" nameend="c3">TeamWindow</entry>
353            </row>
354          </thead>
355          <tbody>
356            <row>
357              <entry role="comment" namest="c1" nameend="c3">
358                <para>The window shown when the debugger is attached to the process. Allows stepping through code, setting breakpoints, etc.</para>
359              </entry>
360            </row>
361            <row>
362              <entry namest="c1" nameend="c3">
363                <para/>
364              </entry>
365            </row>
366          </tbody>
367        </tgroup>
368      </table>
369    </section>
370    <section>
371      <title>TeamsWindow</title>
372      <table frame="all">
373        <title/>
374        <tgroup cols="3" align="left" colsep="1" rowsep="1">
375          <colspec colname="c1"/>
376          <colspec colname="c2"/>
377          <colspec colname="c3"/>
378          <thead>
379            <row>
380              <entry role="class-title">Class</entry>
381              <entry role="class-name" namest="c2" nameend="c3">TeamsWindow</entry>
382            </row>
383          </thead>
384          <tbody>
385            <row>
386              <entry role="comment" namest="c1" nameend="c3">
387                <para>The list of applications shown when the debugger is first launched. The user can choose one from the list to attach to or start their own.</para>
388              </entry>
389            </row>
390            <row>
391              <entry namest="c1" nameend="c3">
392                <para/>
393              </entry>
394            </row>
395          </tbody>
396        </tgroup>
397      </table>
398    </section>
399    <section>
400      <title>BFilePanel</title>
401      <table frame="all">
402        <title/>
403        <tgroup cols="3" align="left" colsep="1" rowsep="1">
404          <colspec colname="c1"/>
405          <colspec colname="c2"/>
406          <colspec colname="c3"/>
407          <thead>
408            <row>
409              <entry role="class-title">Class</entry>
410              <entry role="class-name" namest="c2" nameend="c3">BFilePanel</entry>
411            </row>
412          </thead>
413          <tbody>
414            <row>
415              <entry namest="c1" nameend="c3">
416                <para/>
417              </entry>
418            </row>
419          </tbody>
420        </tgroup>
421      </table>
422    </section>
423    <section>
424      <title>TargetHostInterfaceRoster</title>
425      <table frame="all">
426        <title/>
427        <tgroup cols="3" align="left" colsep="1" rowsep="1">
428          <colspec colname="c1"/>
429          <colspec colname="c2"/>
430          <colspec colname="c3"/>
431          <thead>
432            <row>
433              <entry role="class-title">Class</entry>
434              <entry role="class-name" namest="c2" nameend="c3">TargetHostInterfaceRoster</entry>
435            </row>
436          </thead>
437          <tbody>
438            <row>
439              <entry role="comment" namest="c1" nameend="c3">
440                <para>Keeps track of all the available debugging interfaces. Currently only holds the local debugging interface, I believe. It could in the future also hold remote debugging connections.</para>
441              </entry>
442            </row>
443            <row>
444              <entry namest="c1" nameend="c3">
445                <para/>
446              </entry>
447            </row>
448          </tbody>
449        </tgroup>
450      </table>
451    </section>
452    <section>
453      <title>Team</title>
454      <table frame="all">
455        <title/>
456        <tgroup cols="3" align="left" colsep="1" rowsep="1">
457          <colspec colname="c1"/>
458          <colspec colname="c2"/>
459          <colspec colname="c3"/>
460          <thead>
461            <row>
462              <entry role="class-title">Class</entry>
463              <entry role="class-name" namest="c2" nameend="c3">Team</entry>
464            </row>
465          </thead>
466          <tbody>
467            <row>
468              <entry role="comment" namest="c1" nameend="c3">
469                <para>Stores information about the current team such as its threads, breakpoints, etc. It does not actually do anything: it simply stores information.</para>
470              </entry>
471            </row>
472            <row>
473              <entry namest="c1" nameend="c3">
474                <para/>
475              </entry>
476            </row>
477          </tbody>
478        </tgroup>
479      </table>
480    </section>
481    <section>
482      <title>Thread</title>
483      <table frame="all">
484        <title/>
485        <tgroup cols="3" align="left" colsep="1" rowsep="1">
486          <colspec colname="c1"/>
487          <colspec colname="c2"/>
488          <colspec colname="c3"/>
489          <thead>
490            <row>
491              <entry role="class-title">Class</entry>
492              <entry role="class-name" namest="c2" nameend="c3">Thread</entry>
493            </row>
494          </thead>
495          <tbody>
496            <row>
497              <entry namest="c1" nameend="c3">
498                <para/>
499              </entry>
500            </row>
501          </tbody>
502        </tgroup>
503      </table>
504    </section>
505    <section>
506      <title>DebuggerInterface</title>
507      <table frame="all">
508        <title/>
509        <tgroup cols="3" align="left" colsep="1" rowsep="1">
510          <colspec colname="c1"/>
511          <colspec colname="c2"/>
512          <colspec colname="c3"/>
513          <thead>
514            <row>
515              <entry role="class-title">Class</entry>
516              <entry role="class-name" namest="c2" nameend="c3">DebuggerInterface</entry>
517            </row>
518          </thead>
519          <tbody>
520            <row>
521              <entry role="comment" namest="c1" nameend="c3">
522                <para>Communicates to the system to tell it what should be done. Can set breakpoints, watchpoints, single step and resume threads, read and write memory, and get information.</para>
523              </entry>
524            </row>
525            <row>
526              <entry namest="c1" nameend="c3">
527                <para/>
528              </entry>
529            </row>
530          </tbody>
531        </tgroup>
532      </table>
533    </section>
534    <section>
535      <title>WatchpointManager</title>
536      <table frame="all">
537        <title/>
538        <tgroup cols="3" align="left" colsep="1" rowsep="1">
539          <colspec colname="c1"/>
540          <colspec colname="c2"/>
541          <colspec colname="c3"/>
542          <thead>
543            <row>
544              <entry role="class-title">Class</entry>
545              <entry role="class-name" namest="c2" nameend="c3">WatchpointManager</entry>
546            </row>
547          </thead>
548          <tbody>
549            <row>
550              <entry namest="c1" nameend="c3">
551                <para/>
552              </entry>
553            </row>
554          </tbody>
555        </tgroup>
556      </table>
557    </section>
558    <section>
559      <title>BreakpointManager</title>
560      <table frame="all">
561        <title/>
562        <tgroup cols="3" align="left" colsep="1" rowsep="1">
563          <colspec colname="c1"/>
564          <colspec colname="c2"/>
565          <colspec colname="c3"/>
566          <thead>
567            <row>
568              <entry role="class-title">Class</entry>
569              <entry role="class-name" namest="c2" nameend="c3">BreakpointManager</entry>
570            </row>
571          </thead>
572          <tbody>
573            <row>
574              <entry namest="c1" nameend="c3">
575                <para/>
576              </entry>
577            </row>
578          </tbody>
579        </tgroup>
580      </table>
581    </section>
582    <section>
583      <title>CommandLineUserInterface</title>
584      <table frame="all">
585        <title/>
586        <tgroup cols="3" align="left" colsep="1" rowsep="1">
587          <colspec colname="c1"/>
588          <colspec colname="c2"/>
589          <colspec colname="c3"/>
590          <thead>
591            <row>
592              <entry role="class-title">Class</entry>
593              <entry role="class-name" namest="c2" nameend="c3">CommandLineUserInterface</entry>
594            </row>
595          </thead>
596          <tbody>
597            <row>
598              <entry role="comment" namest="c1" nameend="c3">
599                <para>Controls the output to the terminal when the Debugger is launched with the -c option.</para>
600              </entry>
601            </row>
602            <row>
603              <entry namest="c1" nameend="c3">
604                <para/>
605              </entry>
606            </row>
607            <section>
608              <title>Supertypes:</title>
609            </section>
610          </tbody>
611        </tgroup>
612      </table>
613    </section>
614    <section>
615      <title>CliContext</title>
616      <table frame="all">
617        <title/>
618        <tgroup cols="3" align="left" colsep="1" rowsep="1">
619          <colspec colname="c1"/>
620          <colspec colname="c2"/>
621          <colspec colname="c3"/>
622          <thead>
623            <row>
624              <entry role="class-title">Class</entry>
625              <entry role="class-name" namest="c2" nameend="c3">CliContext</entry>
626            </row>
627          </thead>
628          <tbody>
629            <row>
630              <entry role="comment" namest="c1" nameend="c3">
631                <para>Holds information and functions that each of the commands might want to use.</para>
632              </entry>
633            </row>
634            <row>
635              <entry namest="c1" nameend="c3">
636                <para/>
637              </entry>
638            </row>
639          </tbody>
640        </tgroup>
641      </table>
642    </section>
643  </section>
644  <section id="diagrams">
645    <title>Diagrams</title>
646    <!--diagrambegin1namebeginclass diagramnameend-->
647    <!--diagram1documentationbegindocumentationend-->
648    <section>
649      <title>class diagram</title>
650      <para/>
651      <mediaobject>
652        <imageobject>
653          <imagedata format="PNG" fileref="class diagram.png"/>
654        </imageobject>
655      </mediaobject>
656    </section>
657    <section>
658      <title>Classes:</title>
659      <para/>
660    </section>
661    <!--diagramend1-->
662  </section>
663</article>
664