Skip to content

Commit 78ac8f8

Browse files
pawel-kupczaklgaver2
authored andcommitted
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 <[email protected]>
1 parent 8768f94 commit 78ac8f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gdb/amd64-tdep.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,6 +2591,9 @@ amd64_analyze_prologue (gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR current_pc,
25912591
else
25922592
pc = amd64_analyze_stack_align (pc, current_pc, cache);
25932593

2594+
if (current_pc <= pc)
2595+
return current_pc;
2596+
25942597
return amd64_analyze_frame_setup (gdbarch, pc, current_pc, cache);
25952598
}
25962599

0 commit comments

Comments
 (0)