Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

6.2.1.1.4. Nios® II GDB Console and GDB Commands

The Nios® II GNU Debugger (GDB) console allows you to send GDB commands to the Nios® II processor directly.

To display this console, which allows you to enter your own GDB commands, click the blue monitor icon on the lower right corner of the Nios® II Debug perspective. (If the Nios® II Debug perspective is not displayed, on the Window menu, click Open Perspective, and click Other to view the available perspectives). If multiple consoles are connected, click the black arrow next to the blue monitor icon to list the available consoles. On the list, select the GDB console. The figure below shows the console list icon— the blue monitor icon and black arrow—that allow you to display the GDB console.

Figure 242. Console List Icon
An example of a useful command you can enter in the GDB console is:
dump binary memory <file> <start_addr> <end_addr>

This command dumps the contents of a specified address range in memory to a file on the host computer. The file type is binary. You can view the generated binary file using the HexEdit hexadecimal-format editor that is available from the HexEdit website.