cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
wpmoorenasa
Observer
Observer
751 Views
Registered: ‎05-08-2019

XSDK: "step into" debugger button goes to assembly code, can't find source in different file of c++ project

I'm using SDK with ZYNQ FPGA project with C++ application project... 

I noticed that when debugging the elf on the ZYNQ using "System debugger" it has some trouble "single stepping" into function inside of main, especially, when the function is located inside of a different file than the main.cc.  

I can get around this problem by manually loading the source file into the debugger before hitting the "step into" button... however, if I forget to do this, the debugger jumps into assembly code weeds which leads to an _exit infinite loop that has no exit back to the main() function that I stepped from...

how to fix this problem?  All my source code that the Xilinx SDK "system debugger" can't locate is directly placed in the directory where main.cc is located. under "./project.sdk/appname/*.cc".  Where can I set the debugger's source code search path to make sure that System debugger can locate my source files while stepping into functions?. and how to jump back out of the assembly code weeds back to main() if this happens? 

It seems to me in a normal debugger you can just click on your stack window and select the function main() again... but this somehow just gets lost and main() is also lost from the stack after entering assembly code, however, everything works perfecting, if i manually preload the source file into the debugger's editor before "stepping" into that other source file....

0 Kudos
Reply
2 Replies
wpmoorenasa
Observer
Observer
739 Views
Registered: ‎05-08-2019

I found the easiest work around for this problem is to put all your C functions into the same source file as main() like its sometype of cheesy arduino sketch where you can only have one source file.  if you do that then, the debugger "step" function always works correctly.

0 Kudos
Reply
wpmoorenasa
Observer
Observer
709 Views
Registered: ‎05-08-2019

Turn on Indexer in XSDK.

Menu: Project->Properties->C/C++.General->Indexer
"Click Enable project specific settings"

0 Kudos
Reply