Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: CSS fails to load debug info for asm files

$
0
0

I have a problem with CSS. For some binaries I build, it fails to load debugging information for assembly files (the source file/line number info). Even though the debugging information is included in the ELF file.

I created a small sample project (attached) demonstrating the problem.

The debugging format used is strict DWARF-3.
Tools in use: arm-none-eabi-gcc 4.8.1 (vanilla), binutils 2.23.2 (vanilla), CSS 5.4.0

Build log
arm-none-eabi-gcc -c --std=gnu99 -mcpu=cortex-a8 -mfpu=vfpv3 -mfloat-abi=hard -g -gdwarf-3 -gstrict-dwarf -mlong-calls -fdata-sections -ffunction-sections -Wall -pedantic main.c -o obj/main.o

arm-none-eabi-gcc -c -x assembler-with-cpp -mcpu=cortex-a8 -mfpu=vfpv3 -mfloat-abi=hard -g -gdwarf-3 -gstrict-dwarf -mlong-calls -fdata-sections -ffunction-sections -Wall -pedantic boot.asm -o obj/boot.o

arm-none-eabi-gcc -Wl,--gc-sections,--fatal-warnings -static -mcpu=cortex-a8 -mfpu=vfpv3 -mfloat-abi=hard -g -gdwarf-3 -gstrict-dwarf -mlong-calls -fdata-sections -ffunction-sections -Wall -pedantic -Wl,-Map,obj/sample1.map -Wl,-T,sample1.lds -o obj/sample1.out obj/main.o obj/boot.o -Wl,--start-group -Wl,-lgcc -Wl,-lg -Wl,-lm -Wl,-lnosys -Wl,--end-group

Running objdump shows the source file info is included in the ELF:
arm-none-eabi-objdump.exe -dl obj/sample1.out


...
8000022c <_c_int00>:
$a():
/c/TI/workspace_v5_4/sample1/boot.asm:18
8000022c:    e10f0000     mrs    r0, CPSR
/c/TI/workspace_v5_4/sample1/boot.asm:19
80000230:    e380c080     orr    ip, r0, #128    ; 0x80
/c/TI/workspace_v5_4/sample1/boot.asm:20
80000234:    e129f00c     msr    CPSR_fc, ip
...

However, when I load the ELF file in CSS, the following message is displayed: No source available for "0x8000022c"

The problem only appears for some builds. For example if I reduce the ELF file size of the above project by adding "-nostartfiles" linker flag, CSS does loads the debugging info properly.

I would greatly appriciate your advice. Is this a problem with my compiler or with the CSS?
What can I do, I do need the debugging info for all my files.

(Please visit the site to view this file)


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>