summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-04-05 08:06:26 +0000
committerPavel Labath <pavel@labath.sk>2019-04-05 08:06:26 +0000
commit51d9fa0a22b1abff619613800fa14df80341d0d0 (patch)
treef590ef32d2d4e92252c17d7785934eb47587a3b6 /llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp
parent98edcd9b9c28adf36b085c1a33e10328552ae1d4 (diff)
downloadbcm5719-llvm-51d9fa0a22b1abff619613800fa14df80341d0d0.tar.gz
bcm5719-llvm-51d9fa0a22b1abff619613800fa14df80341d0d0.zip
Minidump: Add support for reading/writing strings
Summary: Strings in minidump files are stored as a 32-bit length field, giving the length of the string in *bytes*, which is followed by the appropriate number of UTF16 code units. The string is also supposed to be null-terminated, and the null-terminator is not a part of the length field. This patch: - adds support for reading these strings out of the minidump file (this implementation does not depend on proper null-termination) - adds support for writing them to a minidump file - using the previous two pieces implements proper (de)serialization of the CSDVersion field of the SystemInfo stream. Previously, this was only read/written as hex, and no attempt was made to access the referenced string -- now this string is read and written correctly. The changes are tested via yaml2obj|obj2yaml round-trip as well as a unit test which checks the corner cases of the string deserialization logic. Reviewers: jhenderson, zturner, clayborg Subscribers: llvm-commits, aprantl, markmentovai, amccarth, lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59775 llvm-svn: 357749
Diffstat (limited to 'llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp')
-rw-r--r--llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp b/llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp
index d172ccf9301..66d44e06759 100644
--- a/llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp
+++ b/llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp
@@ -33,7 +33,6 @@ Streams:
- Type: SystemInfo
Processor Arch: ARM64
Platform ID: Linux
- CSD Version RVA: 0x01020304
CPU:
CPUID: 0x05060708
- Type: LinuxMaps
@@ -54,7 +53,6 @@ Streams:
const SystemInfo &SysInfo = *ExpectedSysInfo;
EXPECT_EQ(ProcessorArchitecture::ARM64, SysInfo.ProcessorArch);
EXPECT_EQ(OSPlatform::Linux, SysInfo.PlatformId);
- EXPECT_EQ(0x01020304u, SysInfo.CSDVersionRVA);
EXPECT_EQ(0x05060708u, SysInfo.CPU.Arm.CPUID);
EXPECT_EQ(StreamType::LinuxMaps, File.streams()[1].Type);
OpenPOWER on IntegriCloud