0

I am trying to debug my project on trace32, I am loading the ELF which has been cross compiled for RISC-V. While running the binary I see only the assembly code and not my source code which makes it harder to debug and adding breakpoints.

According to the Lauterbach I should add the source path, but I have a large project with multiple directories and files. How should I add them should add all the source files individually?

I am simply using this script to load my binary:

system.down 
system.reset 
system.up 
Data.Load.elf <pathtoelf>
Holger
  • 3,920
  • 1
  • 13
  • 35

1 Answers1

1

Please compile your ELF with debug information. E.g. in case of GCC add the compiler flag -g

When your ELF contains debug information it will contain links to all of your source files and the debugger will open those files automatically for your and display the source code in the List window.

The button "mode" of the List window allows you to toggle between "HLL mode" (C code only) and "Mixed mode" (C code plus assembler)

Holger
  • 3,920
  • 1
  • 13
  • 35