diff options
author | Pavel Labath <pavel@labath.sk> | 2019-01-16 16:09:13 +0000 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2019-01-16 16:09:13 +0000 |
commit | 5e726d8516f667362de58da237d270cb2379af03 (patch) | |
tree | 4e617bd2d1ab0b4af7ff3be44f9113321d00977f | |
parent | 86ee8e0ec13157d19a5beb536daed27fed0dabf9 (diff) |
Revert "Teach the default symbol vendor to respect module.GetSymbolFileFileSpec()"
This reverts commit r351330 due to failures on MacOS bots.
-rw-r--r-- | lldb/lit/SymbolFile/Breakpad/Inputs/basic-macho.yaml | 47 | ||||
-rw-r--r-- | lldb/lit/SymbolFile/Breakpad/Inputs/symtab-macho.syms | 2 | ||||
-rw-r--r-- | lldb/lit/SymbolFile/Breakpad/symtab-macho.test | 21 | ||||
-rw-r--r-- | lldb/source/Symbol/SymbolVendor.cpp | 17 |
4 files changed, 5 insertions, 82 deletions
diff --git a/lldb/lit/SymbolFile/Breakpad/Inputs/basic-macho.yaml b/lldb/lit/SymbolFile/Breakpad/Inputs/basic-macho.yaml deleted file mode 100644 index 0e2ae1c04f1..00000000000 --- a/lldb/lit/SymbolFile/Breakpad/Inputs/basic-macho.yaml +++ /dev/null @@ -1,47 +0,0 @@ ---- !mach-o -FileHeader: - magic: 0xFEEDFACF - cputype: 0x01000007 - cpusubtype: 0x00000003 - filetype: 0x00000002 - ncmds: 9 - sizeofcmds: 520 - flags: 0x00000085 - reserved: 0x00000000 -LoadCommands: - - cmd: LC_SEGMENT_64 - cmdsize: 72 - segname: __PAGEZERO - vmaddr: 0 - vmsize: 4294967296 - fileoff: 0 - filesize: 0 - maxprot: 0 - initprot: 0 - nsects: 0 - flags: 0 - - cmd: LC_SEGMENT_64 - cmdsize: 152 - segname: __TEXT - vmaddr: 4294967296 - vmsize: 4096 - fileoff: 0 - filesize: 4096 - maxprot: 7 - initprot: 5 - nsects: 1 - flags: 0 - Sections: - - sectname: __text - segname: __TEXT - addr: 0x0000000100000FF0 - size: 6 - offset: 0x00000FF0 - align: 4 - reloff: 0x00000000 - nreloc: 0 - flags: 0x80000400 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 -... diff --git a/lldb/lit/SymbolFile/Breakpad/Inputs/symtab-macho.syms b/lldb/lit/SymbolFile/Breakpad/Inputs/symtab-macho.syms deleted file mode 100644 index 6dc8904ed23..00000000000 --- a/lldb/lit/SymbolFile/Breakpad/Inputs/symtab-macho.syms +++ /dev/null @@ -1,2 +0,0 @@ -MODULE mac x86_64 601705B3B1227B7D39F9240E077D625B0 mac.out -PUBLIC ff0 0 _start diff --git a/lldb/lit/SymbolFile/Breakpad/symtab-macho.test b/lldb/lit/SymbolFile/Breakpad/symtab-macho.test deleted file mode 100644 index eef417733d3..00000000000 --- a/lldb/lit/SymbolFile/Breakpad/symtab-macho.test +++ /dev/null @@ -1,21 +0,0 @@ -# RUN: yaml2obj %S/Inputs/basic-macho.yaml > %T/symtab-macho.out -# RUN: %lldb %T/symtab-macho.out -o "target symbols add -s symtab-macho.out %S/Inputs/symtab-macho.syms" \ -# RUN: -s %s | FileCheck %s - -image dump symtab symtab-macho.out -# CHECK-LABEL: (lldb) image dump symtab symtab-macho.out -# CHECK: Symtab, file = {{.*}}symtab-macho.out, num_symbols = 1: -# CHECK: Index UserID DSX Type File Address/Value Load Address Size Flags Name -# CHECK: [ 0] 0 X Code 0x0000000100000ff0 0x0000000000000006 0x00000000 _start - -# CHECK-LABEL: (lldb) image lookup -a 0x100000ff0 -v -# CHECK: Address: symtab-macho.out[0x0000000100000ff0] (symtab-macho.out.__TEXT.__text + 0) -# CHECK: Symbol: id = {0x00000000}, range = [0x0000000100000ff0-0x0000000100000ff6), name="_start" - -# CHECK-LABEL: (lldb) image lookup -n _start -v -# CHECK: Address: symtab-macho.out[0x0000000100000ff0] (symtab-macho.out.__TEXT.__text + 0) -# CHECK: Symbol: id = {0x00000000}, range = [0x0000000100000ff0-0x0000000100000ff6), name="_start" - -image lookup -a 0x100000ff0 -v -image lookup -n _start -v -exit diff --git a/lldb/source/Symbol/SymbolVendor.cpp b/lldb/source/Symbol/SymbolVendor.cpp index 94bdf26d76b..a9badc15a5d 100644 --- a/lldb/source/Symbol/SymbolVendor.cpp +++ b/lldb/source/Symbol/SymbolVendor.cpp @@ -43,19 +43,12 @@ SymbolVendor *SymbolVendor::FindPlugin(const lldb::ModuleSP &module_sp, } // The default implementation just tries to create debug information using // the file representation for the module. - ObjectFileSP sym_objfile_sp; - FileSpec sym_spec = module_sp->GetSymbolFileFileSpec(); - if (sym_spec && sym_spec != module_sp->GetObjectFile()->GetFileSpec()) { - DataBufferSP data_sp; - offset_t data_offset = 0; - sym_objfile_sp = ObjectFile::FindPlugin( - module_sp, &sym_spec, 0, FileSystem::Instance().GetByteSize(sym_spec), - data_sp, data_offset); - } - if (!sym_objfile_sp) - sym_objfile_sp = module_sp->GetObjectFile()->shared_from_this(); instance_ap.reset(new SymbolVendor(module_sp)); - instance_ap->AddSymbolFileRepresentation(sym_objfile_sp); + if (instance_ap.get()) { + ObjectFile *objfile = module_sp->GetObjectFile(); + if (objfile) + instance_ap->AddSymbolFileRepresentation(objfile->shared_from_this()); + } return instance_ap.release(); } |