This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CCSTUDIO: Loaded symbos but cannot map to file names and line numbers in a non stripped ELF file

Part Number: CCSTUDIO

Tool/software: Code Composer Studio

I am trying to debug Jailhouse on CCS v8 for an A72 core

I can load the symbols and I can see all funtions listed when trying to set breakpoints.

But when the breakpoint is hit, the CCS cannot trace back the file name and line number, so I cannot see the breakpoint in the source file.

Which means, I cannot step through line-by-line, cannot view local, global variables, I cannot even write expressions with data structure pointers.

I made sure that the binary is built with -g debug options and confirmed by running an objdump on that file.

objdump can disassemble and describe all the source code lines easily.

Attaching the file for your reference. Just load the symbols and try to set the PC to any of the functions(e.g. arch_cell_create)

hypervisor.tar.gz

CCS should ideally start looking for the source file in which that function is defined. But this won't happen.

Please help

Nikhil D

  • Hello,

    Nikhil Devshatwar said:
    I made sure that the binary is built with -g debug options and confirmed by running an objdump on that file.

    The bigger question is what optimization settings do you have enabled? Optimization can have a great impact on debug visibility.

    Thanks

    ki

  • Hello,

    The Jailhouse project has -Os flag in the compilation.

    But I can track the filename and code snippet when I run the objdump -D -S to disassemble the code.

    Which means enough info is present in the binary. Somehow, CCS is not able to decode that.

    Nikhil D

  • I assume you are using GCC since you mention -Os. -Os is basically -O2 with an emphasis on code size. That is a fair amount of optimization and could impact debug visibility. One thing to try is to lower the optimization setting to see if debug visibility is improved. If not, then it could be that the debugger is not handling the debug symbols properly.

    Thanks
    ki
  • Hi Ki,

     did try with -O0 as well, but no change in the behavior

    You should be able to reproduce this. Just load the binary and try to set the PC at some place, CCS should start looking for the source code corresponding to this address

    Nikhil D

  • Nikhil Devshatwar said:
    You should be able to reproduce this. Just load the binary and try to set the PC at some place, CCS should start looking for the source code corresponding to this address

    What exact target are you using?

  • Hello,
    I haven’t heard back from you, hence this issue is being closed. If you wish to continue the discussion, please post a reply with an update below (or create a new thread).

    Thanks,
    ki