diff options
author | Pawel Kupczak <pawel.kupczak@intel.com> | 2025-08-28 11:50:14 +0000 |
---|---|---|
committer | Christina Schimpe <christina.schimpe@intel.com> | 2025-09-04 20:44:48 +0000 |
commit | 8862ee58868fc018b6fe179c3b6d61c30867d541 (patch) | |
tree | 38e53f278a834d7b480a0ac9dcae5fcb60b2671c | |
parent | f9aa48dc545ef511e19f4dfab88a196b820fd2da (diff) | |
download | binutils-8862ee58868fc018b6fe179c3b6d61c30867d541.zip binutils-8862ee58868fc018b6fe179c3b6d61c30867d541.tar.gz binutils-8862ee58868fc018b6fe179c3b6d61c30867d541.tar.bz2 |
gdb, amd64: return after amd64_analyze_frame_setup if current_pc reached
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>
-rwxr-xr-x | gdb/amd64-tdep.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 47eb2ec..b692565 100755 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -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); } |