]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb, amd64: return after amd64_analyze_frame_setup if current_pc reached
authorPawel Kupczak <pawel.kupczak@intel.com>
Thu, 28 Aug 2025 11:50:14 +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_register_saves.

Reviewed-By: Guinevere Larsen <guinevere@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/amd64-tdep.c

index 47eb2ec30260380df25c421cba3a699faa4fa64e..b69256509d91b813351544de5372d30c2a85eae5 100755 (executable)
@@ -2681,6 +2681,9 @@ amd64_analyze_prologue (gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR current_pc,
     return current_pc;
 
   pc = amd64_analyze_frame_setup (gdbarch, pc, current_pc, cache);
+  if (current_pc <= pc)
+    return current_pc;
+
   return amd64_analyze_register_saves (pc, current_pc, cache);
 }