Intel® System Debugger User Guide

ID 648476
Date 06/13/2024
Confidential
Document Table of Contents

Perform Basic Debugging Tasks

If you are not prompted to the debug_view Debug perspective automatically, click the open_perspective_iconOpen Perspective button on the top right corner of the Eclipse* toolbar:

open_perspective_context

Select debug_viewDebug and click Open.

Load Application

To load an application, you must be in the ROM space address. The target needs to be reset for that. There are some preconditions for that: https://psefdk.app.intel.com/_zephyr_code_base.html#autotoc_md5.

Execute the monitor command as follows:

monitor load
si

If the debugger breaks into 0x700… address, you can load the program as follows:

load <path-to-binary>/zephyr.elf

If the address is still 0x600…, execute the instructions again.

Note: This issue is also present in OpenOCD. For more information, read:

Run Control

To run control from GUI, use suspendSuspend and resumeResume buttons in the toolbar.

Alternatively, you can run or resume the application by executing the c command from the console. To suspend the execution, use GUI suspendSuspend button.

Check Registers

After starting a new debug session, do a step and display registers to ensure that you are on a start function.

In consoleDebugger console, execute the following commands:

si
info registers

Registers are now displayed in the registers_viewRegisters view. To open it, go to Window > Show view > Registers.

Program counter register must be pointing to the start address close to 0x6000xxx _​_​start()+2. Now you are ready to start debugging.

Step Through Code

To step through the disassembled code (displayed in the disassembly_view Disassembly view), click the instruction_stepping_modeInstruction Stepping Mode button in the Debug view. Now you can use stepping functions:

  • step_intoStep Into - executes the current line, including any routines, and proceeds to the next statement.

  • step_overStep Over - executes the current line, following execution inside a routine.

  • step_returnStep Return - continues execution to the end of the current routine, then follows execution to the caller of the routine.

Alternatively, execute the si command from the console to step.

Set Breakpoints

From GUI
  1. In the Disassembly view, right-click the required address in the source code. Select Add breakpoint.

  2. Set the type Regular or Hardware.

  3. Set additional parameters:

    • Enabled box (checked by default) - uncheck if you want to keep the breakpoint disabled now.

    • Condition - a custom condition for hitting the breakpoint.

    • Ignore count - the number of times a breakpoint hit must be ignored.

  4. Click Apply and Close.

From the console

To set a software breakpoint, execute the command:

break <filename.extension:line>

To set a hardware breakpoint, execute the command:

hbreak <filename.extension:line>

New breakpoint is displayed in the breakpoints_view Breakpoints view.

See also:

Setting Breakpoints with GDB*

Enable Interrupts

By default, interrupts in Intel® Programmable Services Engine (Intel® PSE) are disabled. You can enable and disable them and also see the status by using these commands in the debugger console:

monitor enable_interrupts

monitor disable_interrupts

monitor status_interrupts