diff options
| author | Pavel Labath <pavel@labath.sk> | 2018-12-18 15:56:45 +0000 |
|---|---|---|
| committer | Pavel Labath <pavel@labath.sk> | 2018-12-18 15:56:45 +0000 |
| commit | 0d38e4fd2c0ed5d9a579cf40e2ab8634f9a779f6 (patch) | |
| tree | efead9d3e1fffceb7e917e53f5b1ec1f8a3babe1 /lldb/tools/lldb-test/lldb-test.cpp | |
| parent | 94d2d09c7626dd6642d322da0bb2faf629447a62 (diff) | |
| download | bcm5719-llvm-0d38e4fd2c0ed5d9a579cf40e2ab8634f9a779f6.tar.gz bcm5719-llvm-0d38e4fd2c0ed5d9a579cf40e2ab8634f9a779f6.zip | |
ELF: Don't create sections for section header index 0
Summary:
The first section header does not define a real section. Instead it is
used for various elf extensions. This patch skips creation of a section
for index 0.
This has one furtunate side-effect, in that it allows us to use the section
header index as the Section ID (where 0 is also invalid). This way, we
can get rid of a lot of spurious +1s in the ObjectFileELF code.
Reviewers: clayborg, krytarowski, joerg, espindola
Subscribers: emaste, lldb-commits, arichardson
Differential Revision: https://reviews.llvm.org/D55757
llvm-svn: 349498
Diffstat (limited to 'lldb/tools/lldb-test/lldb-test.cpp')
| -rw-r--r-- | lldb/tools/lldb-test/lldb-test.cpp | 1 |
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 eee664b09c9..d8f4472e2d0 100644 --- a/lldb/tools/lldb-test/lldb-test.cpp +++ b/lldb/tools/lldb-test/lldb-test.cpp @@ -732,6 +732,7 @@ static void dumpSectionList(LinePrinter &Printer, const SectionList &List, bool assert(S); AutoIndent Indent(Printer, 2); Printer.formatLine("Index: {0}", I); + Printer.formatLine("ID: {0:x}", S->GetID()); Printer.formatLine("Name: {0}", S->GetName().GetStringRef()); Printer.formatLine("Type: {0}", S->GetTypeAsCString()); Printer.formatLine("Permissions: {0}", GetPermissionsAsCString(S->GetPermissions())); |

