Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -998,11 +998,14 @@ SectionType ObjectFilePECOFF::GetSectionType(llvm::StringRef sect_name,
.Case(".debug", eSectionTypeDebug)
.Case(".stabstr", eSectionTypeDataCString)
.Case(".reloc", eSectionTypeOther)
// .eh_frame can be truncated to 8 chars.
// PE/COFF image-file section names are limited to 8 characters,
// so the linker truncates the longer source names. Match both.
.Cases({".eh_frame", ".eh_fram"}, eSectionTypeEHFrame)
.Case(".gosymtab", eSectionTypeGoSymtab)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming the dot is included, this is 9 characters. So I would move this and anything that is naturally <= 8 up (swiftast?), which puts all the ones with a truncated form next to each other.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dot is included. I trimmed .gotsymtab as well.

I also grouped the Cases and the Case.

I'm not sure why swiftast does not have a leading dot here. According to https://stackoverflow.com/a/44031260, it's not mandatory, just a convention.

.Case(".lldbsummaries", lldb::eSectionTypeLLDBTypeSummaries)
.Case(".lldbformatters", lldb::eSectionTypeLLDBFormatters)
.Cases({".lldbsummaries", ".lldbsum"},
lldb::eSectionTypeLLDBTypeSummaries)
.Cases({".lldbformatters", ".lldbfor"},
lldb::eSectionTypeLLDBFormatters)
.Case("swiftast", eSectionTypeSwiftModules)
.Default(eSectionTypeInvalid);
if (section_type != eSectionTypeInvalid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class TestCase(TestBase):
@skipIfWindows
def test(self):
self.build()
if self.TraceOn():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class TestCase(TestBase):
@skipIfWindows
def test_synthetic(self):
self.build()
if self.TraceOn():
Expand All @@ -22,7 +21,6 @@ def test_synthetic(self):

self.expect("v acc", matching=False, substrs=["password"])

@skipIfWindows
def test_update_reuse(self):
self.build()

Expand Down