summaryrefslogtreecommitdiff
path: root/gdb/aarch64-tdep.c
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@arm.com>2022-08-16 09:08:44 +0100
committerLuis Machado <luis.machado@arm.com>2022-08-18 16:42:50 +0100
commit992545e7df523cb923eeeb21a753778a95da420e (patch)
treea2addbc266faaa8061ad3e81190fb2da2e5ae6f7 /gdb/aarch64-tdep.c
parent243cf0f69c36c4ee09c3c2b0bc7a97dc16119c51 (diff)
downloadbinutils-gdb-992545e7df523cb923eeeb21a753778a95da420e.tar.gz
[aarch64] Remove handling of ADR/ADRP from prologue analyzer
As reported by Tom in https://sourceware.org/pipermail/gdb-patches/2022-August/191357.html, the aarch64 prologue analyzer considers the adrp instruction in the gdb.dwarf2/dw2-dir-file-name.exp testcase to be part of a prologue. The function has no prologue though, and it only loads the volatile variable from memory. GDB should not skip any instructions in this case. Doing some archaeology, it seems handling for adr/adrp in prologues was included with the original aarch64 port. It might've been an oversight. In the particular case of gdb.dwarf2/dw2-dir-file-name.exp, the analyzer skips a couple instructions and leaves us in a nice spot where the address to the variable "v" is already in w0. But no prologues exists. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29481
Diffstat (limited to 'gdb/aarch64-tdep.c')
-rw-r--r--gdb/aarch64-tdep.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index ba9b2d896b7..7229b53838e 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -354,14 +354,6 @@ aarch64_analyze_prologue (struct gdbarch *gdbarch,
regs[rd] = pv_subtract (regs[rn], regs[rm]);
}
- else if (inst.opcode->iclass == pcreladdr
- && inst.operands[1].type == AARCH64_OPND_ADDR_ADRP)
- {
- gdb_assert (aarch64_num_of_operands (inst.opcode) == 2);
- gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd);
-
- regs[inst.operands[0].reg.regno] = pv_unknown ();
- }
else if (inst.opcode->iclass == branch_imm)
{
/* Stop analysis on branch. */