I compiled my program with armclang with -g option. When I try to debug it with Keil it doesn't recognize the source files ( I cannot set breakpoints in them, or see in which function I currently am). I checked the compiled .o files with objdump and it seems that the PATHs to c files are wrong. For example I have:
The problem is that the file is not in F:/MyProject/build/obj\main.c but in F:/MyProject/src/main.c. What can be a reason for the wrong paths? I double-checked with different projects and all paths are correct there
Ok, I found the issue. The problem was that I used flag --save-temps=obj. Without it the paths are correct