Skip to content

Commit a230bb0

Browse files
committed
Revert "[lldb] Provide lr value in faulting frame on arm64 (#138805)"
This test is failing on the LLDB Incremental bot (arm64), which is running an older set of tools (Xcode 15.2) and OS (macOS 14.1) and the CFI directives must not be emitted correctly by either the tools or the OS. I will need to reproduce how this is compiling on that older setup and see what the issue is. Reverting for now so the bots are not blocked. This reverts commit e897cb1.
1 parent d2f6ac2 commit a230bb0

File tree

5 files changed

+4
-285
lines changed

5 files changed

+4
-285
lines changed

lldb/source/Target/RegisterContextUnwind.cpp

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ void RegisterContextUnwind::InitializeZerothFrame() {
248248
active_row =
249249
m_full_unwind_plan_sp->GetRowForFunctionOffset(m_current_offset);
250250
row_register_kind = m_full_unwind_plan_sp->GetRegisterKind();
251-
PropagateTrapHandlerFlagFromUnwindPlan(m_full_unwind_plan_sp);
252251
if (active_row && log) {
253252
StreamString active_row_strm;
254253
active_row->Dump(active_row_strm, m_full_unwind_plan_sp.get(), &m_thread,
@@ -1376,7 +1375,6 @@ RegisterContextUnwind::SavedLocationForRegister(
13761375
}
13771376
}
13781377

1379-
// Check if the active_row has a register location listed.
13801378
if (regnum.IsValid() && active_row &&
13811379
active_row->GetRegisterInfo(regnum.GetAsKind(unwindplan_registerkind),
13821380
unwindplan_regloc)) {
@@ -1390,10 +1388,11 @@ RegisterContextUnwind::SavedLocationForRegister(
13901388
// This is frame 0 and we're retrieving the PC and it's saved in a Return
13911389
// Address register and it hasn't been saved anywhere yet -- that is,
13921390
// it's still live in the actual register. Handle this specially.
1391+
13931392
if (!have_unwindplan_regloc && return_address_reg.IsValid() &&
1394-
return_address_reg.GetAsKind(eRegisterKindLLDB) !=
1395-
LLDB_INVALID_REGNUM) {
1396-
if (IsFrameZero()) {
1393+
IsFrameZero()) {
1394+
if (return_address_reg.GetAsKind(eRegisterKindLLDB) !=
1395+
LLDB_INVALID_REGNUM) {
13971396
lldb_private::UnwindLLDB::ConcreteRegisterLocation new_regloc;
13981397
new_regloc.type = UnwindLLDB::ConcreteRegisterLocation::
13991398
eRegisterInLiveRegisterContext;
@@ -1407,17 +1406,6 @@ RegisterContextUnwind::SavedLocationForRegister(
14071406
return_address_reg.GetAsKind(eRegisterKindLLDB),
14081407
return_address_reg.GetAsKind(eRegisterKindLLDB));
14091408
return UnwindLLDB::RegisterSearchResult::eRegisterFound;
1410-
} else if (BehavesLikeZerothFrame()) {
1411-
// This function was interrupted asynchronously -- it faulted,
1412-
// an async interrupt, a timer fired, a debugger expression etc.
1413-
// The caller's pc is in the Return Address register, but the
1414-
// UnwindPlan for this function may have no location rule for
1415-
// the RA reg.
1416-
// This means that the caller's return address is in the RA reg
1417-
// when the function was interrupted--descend down one stack frame
1418-
// to retrieve it from the trap handler's saved context.
1419-
unwindplan_regloc.SetSame();
1420-
have_unwindplan_regloc = true;
14211409
}
14221410
}
14231411

@@ -1934,7 +1922,6 @@ void RegisterContextUnwind::PropagateTrapHandlerFlagFromUnwindPlan(
19341922
}
19351923

19361924
m_frame_type = eTrapHandlerFrame;
1937-
UnwindLogMsg("This frame is marked as a trap handler via its UnwindPlan");
19381925

19391926
if (m_current_offset_backed_up_one != m_current_offset) {
19401927
// We backed up the pc by 1 to compute the symbol context, but

lldb/test/API/functionalities/unwind/frameless-faulted/Makefile

Lines changed: 0 additions & 13 deletions
This file was deleted.

lldb/test/API/functionalities/unwind/frameless-faulted/TestUnwindFramelessFaulted.py

Lines changed: 0 additions & 122 deletions
This file was deleted.

lldb/test/API/functionalities/unwind/frameless-faulted/interrupt-and-trap-funcs.c

Lines changed: 0 additions & 126 deletions
This file was deleted.

lldb/test/API/functionalities/unwind/frameless-faulted/main.c

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)