aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-04-04 13:23:25 +0000
committerPavel Labath <pavel@labath.sk>2019-04-04 13:23:25 +0000
commitdfaafbcf4cefb6632768af23fef43babbba24a98 (patch)
treeed6150883d4d820b5cd01aeba47962c405d231a9 /lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
parentca58078dc67e9d0b75bbf3338936064d94d41ce3 (diff)
downloadllvm-dfaafbcf4cefb6632768af23fef43babbba24a98.tar.gz
llvm-dfaafbcf4cefb6632768af23fef43babbba24a98.tar.bz2
llvm-dfaafbcf4cefb6632768af23fef43babbba24a98.zip
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
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp5
1 files changed, 4 insertions, 1 deletions
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<Record::Kind> 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;