I cannot figure out how to get GAS to emit line number debugging information for gdb in assembly. Note that I'm using the avr-gcc cross compiler, but doubt that is relevant.
I'm using the following command line options to assemble: avr-gcc -g -ggdb -Os -mmcu=atmega644 -ffunction-sections -fsigned-char -Winvalid-pch -Wall -Wno-long-long -x assembler-with-cpp -Wa,-ggdb -c -o z813.o z813.s
When I use a nearly identical set of arguments to compile C code, I can see the line number and source file augmentation using 'objdump -l -d'.
However the assembly objects have none. ie
000000d4 <run_timetable>:
d4: 0e 94 57 00 call 0xae ; 0xae <run_timetable_row>
d8: 0e 94 b4 00 call 0x168 ; 0x168 <delay>
vs
00000f9c :
main():
/home/braddock/work/tviki/tviki/scratch/z813-vid.c:68
f9c: 0e 94 ae 07 call 0xf5c ; 0xf5c <init>
/home/braddock/work/tviki/tviki/scratch/z813-vid.c:70
fa0: 0e 94 6a 00 call 0xd4 ; 0xd4 <run_timetable>
When in avr-gdb (via simulavr remote gdb connection), I cannot get the debugger to single step through my assemble code, although it does recognize the symbol names and information. I assume this is related.
I put in good effort trying to find this in info/man/google and permuting the likely flags. Any help appreciated!