From: Pawel Kupczak Date: Tue, 17 Jun 2025 14:08:16 +0000 (+0000) Subject: gdb: return after stack alignment skip if current_pc is reached X-Git-Tag: binutils-2_45~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70d93c10482c13c5480175f18dad0bddc8d551d9;p=thirdparty%2Fbinutils-gdb.git gdb: return after stack alignment skip if current_pc is reached Make sure we bail out early from amd64_analyze_prologue if CURRENT_PC is reached to avoid unnecessary call to amd64_analyze_frame_setup. Approved-By: Andrew Burgess --- diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 7c3f5c2808a..ec15189883e 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -2591,6 +2591,9 @@ amd64_analyze_prologue (gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR current_pc, else pc = amd64_analyze_stack_align (pc, current_pc, cache); + if (current_pc <= pc) + return current_pc; + return amd64_analyze_frame_setup (gdbarch, pc, current_pc, cache); }