From dfaafbcf4cefb6632768af23fef43babbba24a98 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 4 Apr 2019 13:23:25 +0000 Subject: Breakpad: Refine record classification code Previously we would classify all STACK records into a single bucket. This is not really helpful, because there are three distinct types of records beginning with the token "STACK" (STACK CFI INIT, STACK CFI, STACK WIN). To be consistent with how we're treating other records, we should classify these as three different record types. It also implements the logic to put "STACK CFI INIT" and "STACK CFI" records into the same "section" of the breakpad file, as they are meant to be read together (similar to how FUNC and LINE records are treated). The code which performs actual parsing of these records will come in a separate patch. llvm-svn: 357691 --- lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp') diff --git a/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp b/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp index ab68985691b4..e68d80cdc72d 100644 --- a/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp +++ b/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp @@ -148,11 +148,14 @@ void ObjectFileBreakpad::CreateSections(SectionList &unified_section_list) { llvm::StringRef line; std::tie(line, text) = text.split('\n'); - Record::Kind next_section = Record::classify(line); + llvm::Optional next_section = Record::classify(line); if (next_section == Record::Line) { // Line records logically belong to the preceding Func record, so we put // them in the same section. next_section = Record::Func; + } else if (next_section == Record::StackCFI) { + // Same goes for StackCFI and StackCFIInit + next_section = Record::StackCFIInit; } if (next_section == current_section) continue; -- cgit v1.2.3