Debugging Self-Relocating Programs - 2025.2 English - UG1400

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
UG1400
Release Date
2025-11-20
Version
2025.2 English

A self-relocating program relocates its own code and data sections during runtime to help you load and relocation applications. The debug information available in the ELF file does not specify where the program sections are to be relocated. Therefore, you must provide the debugger with the relative address so it can relocate the program sections. You can do this either through the Vitis Unified IDE or CLI.

To perform the process in the Vitis Unified IDE, update the launch.json file of the application you want to debug. Check the box Is Self Relocating Application and provide the relative address as shown in the screenshot below.

Figure 1. Debugging Self-Relocating Programs

Use the following command to perform the process for XSDB by providing the address where the program sections reside: memmap -reloc <addr> -file <path-to-elf>.