Created attachment 6969 [details] Elf file, which causes gdb crash gdb crashes when trying to set a breakpoint in an assembler file compiled by ARM tool chain. This happens for part of assembler code inside some assembler macro. Here are the steps to reproduce the problem: **** Use the following file gdb_crash.s: MACRO MY_MACRO AREA | Header CODE|, CODE Start MOV r1, #1 MOV r2, #1 MOV r3, #1 B Entry AREA |Main CODE|, CODE, ALIGN=12 Entry MOV r0, #0 MEND MY_MACRO END *** Compile it with ARM tool chain. I see the problem when using ARM tool chain RVD4.0 or DS-5/v5.12 on Linux RedHat 4. Compile the above file with the following commands: * armasm --arm -g gdb_crash.s * armlink --elf --noremove \ --ro-base 0x00000000 --entry 0x00000000 gdb_crash.o -o gdb_crash.elf The file gdb_crash.elf is attached. *** Run gdb Use gdb 7.5.1 configured as "--host=x86_64-unknown-linux-gnu --target=arm-unknown-elf". * gdb gdb_crash.elf * br *0x0 Segmentation fault Apparently ARM assembler doesn't generate any debug line information for included assembler macro and gdb fails to handle such situation. This bug is probably the same issue as described in http://sourceware.org/bugzilla/show_bug.cgi?id=14983 I also see the crash in latest gdb 7.6 sources. I will submit a patch for this crash.
Proposed patch for this issue: http://sourceware.org/ml/gdb-patches/2013-04/msg00171.html
Duplicate. *** This bug has been marked as a duplicate of bug 14983 ***