Discussion:
[Bug gdb/23436] New: aarch64 nexti broken (when after BL and before label)
wughetta at princeton dot edu
2018-07-20 15:33:16 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23436

Bug ID: 23436
Summary: aarch64 nexti broken (when after BL and before label)
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: wughetta at princeton dot edu
Target Milestone: ---

There is a specific case when debugging aarch64 assembly code when "nexti"
finishes execution and the inferior exits normally instead of running just the
next instruction. On amd64 the expected behavior occurs, which is to always
continue to the next instruction.

The case is when a "BL" instruction is eventually followed by a label in the
same routine. For example:

``` aarch64
.section .rodata
hello: .string "hello, world\n"
.text
.global main
main:
stp x29, x30, [sp, #-16]!
adr x0, hello
bl printf // The BL instruction (i.e. CALL in
amd64)

mov w0, #0 // nexti does not work on this
instruction
fauxLabel: // The label after the BL instruction
ldp x29, x30, [sp], #16
ret
```

GDB built 2018-07-19 on amd64 with Debian. Compiled with `aarch64-linux-gnu-gcc
-static -g hello.s -o hello`. Run with `qemu-aarch64 -g 1234 hello &`. Bug also
occurs natively on Cortex-A53 with OpenSUSE compiling with clang or gcc.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-07-27 14:09:57 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23436

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
Component|gdb |tdep
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...