-
Notifications
You must be signed in to change notification settings - Fork 85
Ada and Seer
Ada is an interesting language. So much so, the gdb debugger has extra commands just for it.
Ada Exceptions
Ada Tasks
Ada Catchpoints
Seer has support for these extra command in it's gui. Here's an image of Seer debugging a simple Ada program that uses Ada tasks.
The Ada Exception browser is located in the top-left part of Seer's gui, which is basically all the program's debug information.
There are two columns. The exception name and the exception address. If the list is long, you can narrow down the list by using a regex expression.
A gdb catchpoint can be easily created by selecting an exception and clicking on the 'add' button. A catchpoint will cause gdb to stop the program when that exception is raised.
The catchpoint will then appear in the Catchpoints tab.
The Ada Task browser is located in the bottom-right part of Seer's gui, which is basically all the program's thread and inferior information.
There are 8 columns.
- Active flag (This field exists only for the current thread. It has the value ‘*’.)
- Id (The identifier that GDB uses to refer to the Ada task.)
- Task Id (The identifier that the target uses to refer to the Ada task.)
- Thread Id (The global thread identifier of the thread corresponding to the Ada task.)
- Parent Id (This field exists only when the task was created by another task. In this case, it provides the ID of the parent task.)
- Priority (The base priority of the task.)
- State (The current state of the task.)
- Name (The name of the task.)
For a detailed description of the possible states, see Ada Task States.
Double-clicking on a Ada task will make the thread for that task the current thread. Other parts of Seer will focus on that thread. This is shown in the Stack Info browser and Code manager.
The Ada Catchpoint browser is located in the bottom-middle part of Seer's gui, which is basically all the breakpoints and logging information.
A catchpoint is a method for gdb to stop the program's execution when a certain event occurs. In the case of Ada, there are catchpoints for:
- Ada asserts
- Ada exceptions
- Ada handlers
Click on the 'Add a new catchpoint' button in the Catchpoints tab. It will bring up this dialog.
You can select a Ada catchpoint and enter some other details (catchpoint name, disabled, etc). As well, you can later enable/disable them, or delete them with the other buttons.
Send me email or create a task for errors/suggestions/etc.