💾 Archived View for lofi.haiku-os.org › docs › develop › kits › debugger › index.gmi captured on 2024-08-25 at 00:20:22. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-28)

-=-=-=-=-=-=-

The Debugger kit

Classes

TargetHostInterface

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| Keeps track of how many TeamDebuggers there are, starts new ones,      |
| finds existing ones, and removes old ones.                             |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

RemoteTargetHostInterface

+--------------------------------------------------+
| Class                                            |
|==================================================|
| Operates on remote computers. Not implemented.   |
+--------------------------------------------------+
|                                                  |
+--------------------------------------------------+

LocalTargetHostInterface

+---------------------------+---------------------------+-----------------+
| Class                     | L ocalTargetHostInterface |                 |
|===========================|===========================|=================|
| Operates on the local     |                           |                 |
| computer. Creates teams,  |                           |                 |
| attaches to existing      |                           |                 |
| teams, and finds teams by |                           |                 |
| threads. It is            |                           |                 |
| responsible for keeping   |                           |                 |
| its instance of           |                           |                 |
| TargetHost up-to-date.    |                           |                 |
+---------------------------+---------------------------+-----------------+
| Operations:               |                           |                 |
+---------------------------+---------------------------+-----------------+
| visibility                | return                    | name            |
+---------------------------+---------------------------+-----------------+
|                           | void                      | GetTargetHost   |
+---------------------------+---------------------------+-----------------+
|                           |                           |                 |
+---------------------------+---------------------------+-----------------+

TargetHost

+---------------------------------------------+
| Class                                       |
|=============================================|
| Stores wich teams are on the target host.   |
+---------------------------------------------+
|                                             |
+---------------------------------------------+

TeamDebugger

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| Acts as the backend for UserInterface. Receives the UserInterface’s    |
| requests through the UserInterfaceListener.                            |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

UserInterfaceListener

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| 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.                                                                 |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

UserInterface

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| Similar to BApplication class. States the existence of Show,           |
| Terminate, Init, LoadSettings, SaveSettings, etc.                      |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

Debugger

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| Main class of the Debugger GUI. Usually starts the TeamsDebugger       |
| window when run.                                                       |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

BApplication

+---------+
| Class   |
|=========|
|         |
+---------+

GraphicalUserInterface

+-------------------------------------------------------------+
| Class                                                       |
|=============================================================|
| The GUI of a single debugger attached to a single process   |
+-------------------------------------------------------------+
|                                                             |
+-------------------------------------------------------------+

TeamWindow

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| The window shown when the debugger is attached to the process. Allows  |
| stepping through code, setting breakpoints, etc.                       |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

TeamsWindow

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| 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. |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

BFilePanel

+---------+
| Class   |
|=========|
|         |
+---------+

TargetHostInterfaceRoster

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| 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.                                |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

Team

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| Stores information about the current team such as its threads,         |
| breakpoints, etc. It does not actually do anything: it simply stores   |
| information.                                                           |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

Thread

+---------+
| Class   |
|=========|
|         |
+---------+

DebuggerInterface

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| 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.                                     |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

WatchpointManager

+---------+
| Class   |
|=========|
|         |
+---------+

BreakpointManager

+---------+
| Class   |
|=========|
|         |
+---------+

CommandLineUserInterface

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| Controls the output to the terminal when the Debugger is launched with |
| the -c option.                                                         |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

CliContext

+------------------------------------------------------------------------+
| Class                                                                  |
|========================================================================|
| Holds information and functions that each of the commands might want   |
| to use.                                                                |
+------------------------------------------------------------------------+
|                                                                        |
+------------------------------------------------------------------------+

Diagrams

Classes:

diagram.png