This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug symtab/15343] New: Crash when setting a breakpoint in assembler file compiled by ARM tool chain


http://sourceware.org/bugzilla/show_bug.cgi?id=15343

             Bug #: 15343
           Summary: Crash when setting a breakpoint in assembler file
                    compiled by ARM tool chain
           Product: gdb
           Version: 7.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
        AssignedTo: unassigned@sourceware.org
        ReportedBy: Andreas.Kaufmann@gmx.de
    Classification: Unclassified


Created attachment 6969
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6969
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.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]