Skip to content

Commit 911b46c

Browse files
committed
Revert "[lldb] Allow fetching of RA register when above fault handler (llvm#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. (cherry picked from commit d29a50f)
1 parent c426bec commit 911b46c

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
@@ -1401,7 +1401,7 @@ RegisterContextUnwind::SavedLocationForRegister(
14011401
// it's still live in the actual register. Handle this specially.
14021402

14031403
if (!have_unwindplan_regloc && return_address_reg.IsValid() &&
1404-
BehavesLikeZerothFrame()) {
1404+
IsFrameZero()) {
14051405
if (return_address_reg.GetAsKind(eRegisterKindLLDB) !=
14061406
LLDB_INVALID_REGNUM) {
14071407
lldb_private::UnwindLLDB::RegisterLocation new_regloc;

0 commit comments

Comments
 (0)