AR# 66591

|

SDK - How to debug self-relocating applications

描述

How can I debug a self-relocating application with Xilinx System Debugger?

解决方案

The System Debugger supports source level debugging of self-relocating programs such as u-boot. 

A self-relocating program is a program which relocates its own code and data sections during run time.

The debug information available in these ELFs does not provide details about where the program sections will be relocated to.

For this reason, you must provide additional information to the debugger about the address to which the program sections will be relocated. 

There are two ways to do this, either through the SDK GUI or the command line (XSDB).

SDK GUI:

Update the System Debugger launch configuration to provide the address to which program sections are relocated.

Check the box for "This is a self-relocating application" and give the address as in the screen capture below:


 

Launch the debug configuration. 

When the program sections are relocated during runtime, the debugger will have enough information to support source level debugging of the relocated sections.

XSDB:

Use the memmap command  to provide the address to which the program sections are allocated.

memmap -reloc <addr> -file <path-to-elf>

There is an example of how to debug U-Boot in the Xilinx wiki page that can be used as an example.

链接问答记录

主要问答记录

Answer Number 问答标题 问题版本 已解决问题的版本
66297 SDK - 设计助手 N/A N/A
AR# 66591
日期 10/18/2018
状态 Active
Type 解决方案中心
Tools
People Also Viewed