llvm-c166/lldb/source/Target
Jonas Devlieghere 2e38be8333
[lldb] Allow generic operands in DWARF binary type check (#209641)
fc298ccbc52a's CheckScalarOperandsHaveSameType also rejects legitimate
generic-typed operands, breaking breakpad STACK WIN / raSearch unwinding
on 32-bit targets. For `DW_OP_breg7 +0, DW_OP_consts +80, DW_OP_plus`,
DW_OP_breg yields a register-sized (8-byte) scalar while DW_OP_const*
yields an address-sized (4-byte) generic one. The strict size gate ran
before the genericness escape, and the escape only checked the left
operand, so the CFA expression was rejected and the unwind failed.

Reorder so two integers that are each at least as wide as the generic
type are accepted before the size/signedness gate. The commit's own
type-check unit tests still pass.

Also fix a latent crash the failure exposed: ReadFrameAddress and
GetReturnAddressHint only consumed the error inside an UNWIND_LOG
argument, which is skipped when the log is off, so the errored Expected
was destroyed unchecked and aborted. Consume it via LLDB_LOG_ERROR /
LLDB_LOG_ERRORV instead.
2026-07-14 22:15:26 +00:00
..
ABI.cpp
AssertFrameRecognizer.cpp
BorrowedStackFrame.cpp
CMakeLists.txt
CoreFileMemoryRanges.cpp
DynamicRegisterInfo.cpp
ExecutionContext.cpp
InstrumentationRuntime.cpp
InstrumentationRuntimeStopInfo.cpp
JITLoader.cpp
JITLoaderList.cpp
Language.cpp
LanguageRuntime.cpp
Memory.cpp
MemoryHistory.cpp
MemoryRegionInfo.cpp
MemoryRegionInfoCache.cpp
MemoryTagMap.cpp
ModuleCache.cpp
OperatingSystem.cpp
PathMappingList.cpp
Platform.cpp
Process.cpp
ProcessIOHandler.cpp
ProcessTrace.cpp
Queue.cpp
QueueItem.cpp
QueueList.cpp
RegisterContext.cpp
RegisterContextUnwind.cpp [lldb] Allow generic operands in DWARF binary type check (#209641) 2026-07-14 22:15:26 +00:00
RegisterNumber.cpp
RemoteAwarePlatform.cpp
ScriptedThreadPlan.cpp
SectionLoadHistory.cpp
SectionLoadList.cpp
StackFrame.cpp
StackFrameList.cpp
StackFrameRecognizer.cpp
StackID.cpp
Statistics.cpp
StopInfo.cpp
StructuredDataPlugin.cpp
SyntheticFrameProvider.cpp
SystemRuntime.cpp
Target.cpp [lldb] Unify ScriptedStopHookInterface with ScriptedHookInterface (#209341) 2026-07-13 17:40:35 -07:00
TargetList.cpp
TargetProperties.td
Thread.cpp
ThreadCollection.cpp
ThreadList.cpp
ThreadPlan.cpp
ThreadPlanBase.cpp
ThreadPlanCallFunction.cpp
ThreadPlanCallFunctionUsingABI.cpp
ThreadPlanCallOnFunctionExit.cpp
ThreadPlanCallUserExpression.cpp
ThreadPlanRunToAddress.cpp
ThreadPlanShouldStopHere.cpp
ThreadPlanSingleThreadTimeout.cpp
ThreadPlanStack.cpp
ThreadPlanStepInRange.cpp
ThreadPlanStepInstruction.cpp
ThreadPlanStepOut.cpp
ThreadPlanStepOverBreakpoint.cpp
ThreadPlanStepOverRange.cpp
ThreadPlanStepRange.cpp
ThreadPlanStepThrough.cpp
ThreadPlanStepUntil.cpp
ThreadPlanTracer.cpp
ThreadSpec.cpp
Trace.cpp
TraceCursor.cpp
TraceDumper.cpp
TraceExporter.cpp
UnixSignals.cpp
UnwindAssembly.cpp
UnwindLLDB.cpp