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]

gdb/2205: nexti command does not work when debugging ARM assembly language


>Number:         2205
>Category:       gdb
>Synopsis:       nexti command does not work when debugging ARM assembly language
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 23 08:28:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     guillaume.savaton@eseo.fr
>Release:        6.5.0
>Organization:
>Environment:
Host: PC running Debian Etch ; Target: arm-elf
>Description:
I am using GDB as part of Insight, compiled as a cross-debugger for ARM targets.

The programs I want to debug are written directly in assembly language and the executable is generated by GNU AS and LD (arm-elf target).

When debugging, the 'nexti' command works fine until I get to a subprogram call (ARM instruction BL).
Instead of stepping over the subprogram call, GDB seems to do 'continue'.
At that point GDB hangs and does not respond to Ctrl-C.

It seems that the bug depends on the contents of the called subprogram: inserting dummy instructions at the beginning of the subprogram maked 'nexti' work again.

This bug does not occur when debugging C programs using the 'nexti' command.

This bug has been observed when using GDB with the following targets :
- built-in simulator (target sim) for ARM
- remote/tcp (the target is an ARM7TDMI board connected to the host PC via a BDI2000 JTAG probe).
>How-To-Repeat:
The attached file contains everything needed to rebuild the test program using GNU AS and LD for target ARM-ELF.
Alternatively, the executable ELF file (appli.elf) is provided.

Run arm-elf-gdb for target 'sim'.
Load file appli.elf and step over each instruction using command 'nexti'.

The bug occurs when reaching line 37 ("bl sum") in source file "main.s".
Command 'nexti' makes GDB hang.

Edit file 'sum.s' uncomment line 22 and rebuild appli.elf.
This will insert a NOP instruction at the beginning of the subprogram.

After doing this, command 'nexti' works correctly.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="arm-elf-gdb-bug-nexti.tar.gz"
Content-Transf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g+K3lFQjJI35WCp18XgN+DYUr9bsEH/P0G2Tux2lEDhQ
3RjyBFyNV5TIfdq36uuD8e//nu+8I81x2Pd/vTn4/1/Ulkbvv9qWv/+fCJTVxe7a0p3bq8pDBZ/B
2ha+qj0bQN1Oo4MP3kO4Wko4ZXgUy9FfYundTOXqmRxxUin6S+1AqpGTIk4q1QtDGEi1clLIIaFH
8kRLSEhISEhISEhISEhISBwF/wFcgusqAHgAAA==


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