summaryrefslogtreecommitdiff
path: root/lldb/tools
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2018-12-12 15:46:18 +0000
committerPavel Labath <pavel@labath.sk>2018-12-12 15:46:18 +0000
commit392d582085c4b8e50c63bc8802df2a13718d2f66 (patch)
tree55d41a43c23df4136606c8ef65d6d8c726b1a739 /lldb/tools
parent4b0c5a57a8d428ab7a96597fcc9ad27f781546ed (diff)
ELF: Clean up section type computation
Move code into a separate function, and replace the if-else chain with llvm::StringSwitch. A slight behavioral change is that now I use the section flags (SHF_TLS) instead of the section name to set the thread-specific property. There is no explanation in the original commit introducing this (r153537) as to why that was done this way, but the new behavior should be more correct.
Diffstat (limited to 'lldb/tools')
-rw-r--r--lldb/tools/lldb-test/lldb-test.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/tools/lldb-test/lldb-test.cpp b/lldb/tools/lldb-test/lldb-test.cpp
index 08ad0158fc3..a37f8c5c897 100644
--- a/lldb/tools/lldb-test/lldb-test.cpp
+++ b/lldb/tools/lldb-test/lldb-test.cpp
@@ -733,6 +733,7 @@ static void dumpSectionList(LinePrinter &Printer, const SectionList &List, bool
Printer.formatLine("Index: {0}", I);
Printer.formatLine("Name: {0}", S->GetName().GetStringRef());
Printer.formatLine("Type: {0}", S->GetTypeAsCString());
+ Printer.formatLine("Thread specific: {0:y}", S->IsThreadSpecific());
Printer.formatLine("VM size: {0}", S->GetByteSize());
Printer.formatLine("File size: {0}", S->GetFileSize());