llvm-project/lldb/unittests/Core/CMakeLists.txt
nerix d6fcaef281
[LLDB][Value] Require type size when reading a scalar (#153386)
When reading a value as a scalar, the type size is required. It's
returned as a `std::optional`. This optional isn't checked for scalar
values, where it is unconditionally accessed.

This came up in the
[Shell/Process/Windows/msstl_smoke.cpp](4e10b62442/lldb/test/Shell/Process/Windows/msstl_smoke.cpp)
test. There, LLDB breaks at the function entry, so all locals aren't
initialized yet. Most values will contain garbage. The [`std::list`
synthetic
provider](4e10b62442/lldb/source/Plugins/Language/CPlusPlus/GenericList.cpp (L517))
tries to read the value using `GetData`. However, in
[`ValueObject::GetData`](4e10b62442/lldb/source/ValueObject/ValueObject.cpp (L766)),
[`ValueObjectChild::UpdateValue`](88c993fbc5/lldb/source/ValueObject/ValueObjectChild.cpp (L102))
fails because the parent already failed to read its data, so `m_value`
won't have a compiler type, thus the size can't be read.
2025-08-22 12:26:03 +02:00

37 lines
759 B
CMake

add_lldb_unittest(LLDBCoreTests
DebuggerTest.cpp
CommunicationTest.cpp
DiagnosticEventTest.cpp
DumpDataExtractorTest.cpp
DumpRegisterInfoTest.cpp
FormatEntityTest.cpp
MangledTest.cpp
ModuleSpecTest.cpp
PluginManagerTest.cpp
ProgressReportTest.cpp
RichManglingContextTest.cpp
SourceLocationSpecTest.cpp
SourceManagerTest.cpp
TelemetryTest.cpp
UniqueCStringMapTest.cpp
Value.cpp
LINK_COMPONENTS
Support
Telemetry
LINK_LIBS
lldbCore
lldbHost
lldbPluginCPlusPlusLanguage
lldbPluginObjectFileELF
lldbPluginObjectFileMachO
lldbPluginObjectFilePECOFF
lldbPluginPlatformMacOSX
lldbPluginSymbolFileSymtab
lldbSymbol
lldbUtilityHelpers
lldbHostHelpers
LLVMTestingSupport
)