Skip to content

Commit d29a50f

Browse files
committed
Revert "[lldb] Allow fetching of RA register when above fault handler (#98566)"
This reverts commit fd42417. This patch has two problems. First, it is unnecessary, Pavel landed a fix a week or so before mine which solves this problem in bbd54e0 . Second, the fix is incorrect; for a function above a trap handler, where all registers are available, this patch would have lldb fetch the return address register from frame 0. This might be 10 frames up in the stack; the frame 0 return address register is incorrect. The change would have been correct a short bit later than this, but Pavel's fix is executed earlier in the function and none of this is needed.
1 parent 21df325 commit d29a50f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Target/RegisterContextUnwind.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,7 @@ RegisterContextUnwind::SavedLocationForRegister(
14021402
// it's still live in the actual register. Handle this specially.
14031403

14041404
if (!have_unwindplan_regloc && return_address_reg.IsValid() &&
1405-
BehavesLikeZerothFrame()) {
1405+
IsFrameZero()) {
14061406
if (return_address_reg.GetAsKind(eRegisterKindLLDB) !=
14071407
LLDB_INVALID_REGNUM) {
14081408
lldb_private::UnwindLLDB::ConcreteRegisterLocation new_regloc;

0 commit comments

Comments
 (0)