gdb, amd64: return after amd64_analyze_register_saves if current_pc reached

Make sure the function bails out early if CURRENT_PC is reached, to
avoid the call to amd64_analyze_stack_alloc.

Reviewed-By: Guinevere Larsen <guinevere@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
Pawel Kupczak
2025-08-28 11:50:16 +00:00
committed by Christina Schimpe
parent 57ce06ac23
commit 95f21c0d25

View File

@@ -2750,6 +2750,9 @@ amd64_analyze_prologue (gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR current_pc,
return current_pc;
pc = amd64_analyze_register_saves (pc, current_pc, cache);
if (current_pc <= pc)
return current_pc;
return amd64_analyze_stack_alloc (gdbarch, pc, current_pc, cache);
}