From 025b9d0f2e6a0edf512a5138fc646b8deadca9ad Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 16 Apr 2019 14:51:47 +0000 Subject: Breakpad: Match the new UUID algorithm in minidumps D59433 and D60501 changed the way UUIDs are computed from minidump files. This was done to synchronize the U(G)UID representation with the native tools of given platforms, but it created a mismatch between minidumps and breakpad files. This updates the breakpad algorithm to match the one found in minidumps, and also adds a couple of tests which should fail if these two ever get out of sync. Incidentally, this means that the module id in the breakpad files is almost identical to our notion of UUIDs, so the computation algorithm can be somewhat simplified. llvm-svn: 358500 --- .../test/functionalities/postmortem/minidump/TestMiniDump.py | 10 ++++++++++ .../test/functionalities/postmortem/minidump/fizzbuzz.syms | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.syms (limited to 'lldb/packages/Python/lldbsuite/test/functionalities') 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 f6a7d7c7ff3..7800c2802f7 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py @@ -80,6 +80,16 @@ class MiniDumpTestCase(TestBase): self.assertEqual(module.file.fullpath, expected['filename']) self.assertEqual(module.GetUUIDString(), expected['uuid']) + def test_breakpad_uuid_matching(self): + """Test that the uuid computation algorithms in minidump and breakpad + files match.""" + self.target = self.dbg.CreateTarget("") + self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp") + self.assertTrue(self.process, PROCESS_IS_VALID) + self.expect("target symbols add fizzbuzz.syms", substrs=["symbol file", + "fizzbuzz.syms", "has been added to", "fizzbuzz.exe"]), + self.assertTrue(self.target.modules[0].FindSymbol("main")) + def test_stack_info_in_mini_dump(self): """Test that we can see a trivial stack in a VS-generate mini dump.""" # target create -c fizzbuzz_no_heap.dmp diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.syms b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.syms new file mode 100644 index 00000000000..cab06c1c9d5 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.syms @@ -0,0 +1,2 @@ +MODULE windows x86 0F45B7919A9646F9BF8F2D6076EA421A11 fizzbuzz.pdb +PUBLIC 1000 0 main -- cgit v1.2.3