Why are there wrong paths in DWARF table

66 Views Asked by At

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:

Objdump from main.o

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

1

There are 1 best solutions below

0
On

Ok, I found the issue. The problem was that I used flag --save-temps=obj. Without it the paths are correct