diff options
author | Leonard Mosescu <mosescu@google.com> | 2018-05-02 20:06:17 +0000 |
---|---|---|
committer | Leonard Mosescu <mosescu@google.com> | 2018-05-02 20:06:17 +0000 |
commit | 9fecd37220578515775f1b5e724bd5932b26b08e (patch) | |
tree | 174de8e432dc25ac2277b58ceaff5e2faf1f28b2 /lldb/packages/Python/lldbsuite/test | |
parent | fac26cf4ca4abd9142a4ed8939c167a6856f656e (diff) | |
download | bcm5719-llvm-9fecd37220578515775f1b5e724bd5932b26b08e.tar.gz bcm5719-llvm-9fecd37220578515775f1b5e724bd5932b26b08e.zip |
Use the UUID from the minidump's CodeView Record for placeholder modules
This change adds support for two types of Minidump CodeView records:
PDB70 (reference: https://crashpad.chromium.org/doxygen/structcrashpad_1_1CodeViewRecordPDB70.html)
This is by far the most common record type.
ELF BuildID (found in Breakpad/Crashpad generated minidumps)
This would set a proper UUID for placeholder modules, in turn enabling
an accurate match with local module images.
Differential Revision: https://reviews.llvm.org/D46292
llvm-svn: 331394
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
2 files changed, 68 insertions, 9 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py index 4cf4a9052d4..0153f563cc8 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py @@ -77,9 +77,49 @@ class MiniDumpNewTestCase(TestBase): self.target = self.dbg.GetSelectedTarget() self.process = self.target.LoadCore("linux-x86_64.dmp") self.assertTrue(self.process, PROCESS_IS_VALID) - self.assertEqual(self.target.GetNumModules(), 9) - for module in self.target.modules: + expected_modules = [ + { + 'filename' : 'linux-gate.so', + 'uuid' : '4EAD28F8-88EF-3520-872B-73C6F2FE7306-C41AF22F', + }, + { + 'filename' : 'libm-2.19.so', + 'uuid' : 'D144258E-6149-00B2-55A3-1F3FD2283A87-8670D5BC', + }, + { + 'filename' : 'libstdc++.so.6.0.19', + 'uuid' : '76190E92-2AF7-457D-078F-75C9B15FA184-E83EB506', + }, + { + 'filename' : 'libc-2.19.so', + 'uuid' : 'CF699A15-CAAE-64F5-0311-FC4655B86DC3-9A479789', + }, + { + 'filename' : 'linux-x86_64', + 'uuid' : 'E35C283B-C327-C287-62DB-788BF5A4078B-E2351448', + }, + { + 'filename' : 'libgcc_s.so.1', + 'uuid' : '36311B44-5771-0AE5-578C-4BF00791DED7-359DBB92', + }, + { + 'filename' : 'libpthread-2.19.so', + 'uuid' : '31E9F21A-E8C1-0396-171F-1E13DA157809-86FA696C', + }, + { + 'filename' : 'ld-2.19.so', + 'uuid' : 'D0F53790-4076-D73F-29E4-A37341F8A449-E2EF6CD0', + }, + { + 'filename' : 'libbreakpad.so', + 'uuid' : '784FD549-332D-826E-D23F-18C17C6F320A', + }, + ] + self.assertEqual(self.target.GetNumModules(), len(expected_modules)) + for module, expected in zip(self.target.modules, expected_modules): self.assertTrue(module.IsValid()) + self.assertEqual(module.file.basename, expected['filename']) + self.assertEqual(module.GetUUIDString(), expected['uuid']) def test_thread_info_in_minidump(self): """Test that lldb can read the thread information from the Minidump.""" diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py index 7b24d5b01fb..2cd4614e281 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py @@ -49,17 +49,36 @@ class MiniDumpTestCase(TestBase): self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp") self.assertTrue(self.process, PROCESS_IS_VALID) expected_modules = [ - r"C:\Windows\System32/MSVCP120D.dll", - r"C:\Windows\SysWOW64/kernel32.dll", - r"C:\Users\amccarth\Documents\Visual Studio 2013\Projects\fizzbuzz\Debug/fizzbuzz.exe", - r"C:\Windows\System32/MSVCR120D.dll", - r"C:\Windows\SysWOW64/KERNELBASE.dll", - r"C:\Windows\SysWOW64/ntdll.dll", + { + 'filename' : r"C:\Windows\System32/MSVCP120D.dll", + 'uuid' : '6E51053C-E757-EB40-8D3F-9722C5BD80DD-01000000', + }, + { + 'filename' : r"C:\Windows\SysWOW64/kernel32.dll", + 'uuid' : '1B7ECBE5-5E00-1341-AB98-98D6913B52D8-02000000', + }, + { + 'filename' : r"C:\Users\amccarth\Documents\Visual Studio 2013\Projects\fizzbuzz\Debug/fizzbuzz.exe", + 'uuid' : '91B7450F-969A-F946-BF8F-2D6076EA421A-11000000', + }, + { + 'filename' : r"C:\Windows\System32/MSVCR120D.dll", + 'uuid' : '86FB8263-C446-4640-AE42-8D97B3F91FF2-01000000', + }, + { + 'filename' : r"C:\Windows\SysWOW64/KERNELBASE.dll", + 'uuid' : '4152F90B-0DCB-D44B-AC5D-186A6452E522-01000000', + }, + { + 'filename' : r"C:\Windows\SysWOW64/ntdll.dll", + 'uuid' : '6A84B0BB-2C40-5240-A16B-67650BBFE6B0-02000000', + }, ] self.assertEqual(self.target.GetNumModules(), len(expected_modules)) for module, expected in zip(self.target.modules, expected_modules): self.assertTrue(module.IsValid()) - self.assertEqual(module.file.fullpath, expected) + self.assertEqual(module.file.fullpath, expected['filename']) + self.assertEqual(module.GetUUIDString(), expected['uuid']) @expectedFailureAll(bugnumber="llvm.org/pr35193", hostoslist=["windows"]) def test_stack_info_in_mini_dump(self): |