Skip to content

Ada and Seer

Ernie Pasveer edited this page Apr 17, 2023 · 7 revisions

Introduction

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 its gui. Here's an image of Seer debugging a simple Ada program that uses Ada tasks.

image

Ada Exceptions

The Ada Exception browser is located in the top-left part of Seer's gui, which is basically all the program's debug information.

image

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.

image

The catchpoint will then appear in the Catchpoints tab.

image

Ada Tasks

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.

image

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.

image

Ada Catchpoints

The Ada Catchpoint browser is located in the bottom-middle part of Seer's gui, which is basically all the breakpoints and logging information.

image

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.

image

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.

Feedback.

Send me email or create a task for errors/suggestions/etc.

Clone this wiki locally