[binutils-gdb] gdb: return after stack alignment skip if current_pc is reached
Andrew Burgess
aburgess@sourceware.org
Mon Jun 23 15:49:46 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=70d93c10482c13c5480175f18dad0bddc8d551d9
commit 70d93c10482c13c5480175f18dad0bddc8d551d9
Author: Pawel Kupczak <pawel.kupczak@intel.com>
Date: Tue Jun 17 14:08:16 2025 +0000
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 <aburgess@redhat.com>
Diff:
---
gdb/amd64-tdep.c | 3 +++
1 file changed, 3 insertions(+)
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);
}
More information about the Gdb-cvs
mailing list