]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb, amd64: return after amd64_analyze_register_saves if current_pc reached
authorPawel Kupczak <pawel.kupczak@intel.com>
Thu, 28 Aug 2025 11:50:16 +0000 (11:50 +0000)
committerChristina Schimpe <christina.schimpe@intel.com>
Thu, 4 Sep 2025 20:44:48 +0000 (20:44 +0000)
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>
gdb/amd64-tdep.c

index 1afdaa8869a8a0ed1dab32a28c740f86f3522a5d..9245889210b35ead0a29998449f11de24827858b 100755 (executable)
@@ -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);
 }