diff options
author | Greg Clayton <gclayton@apple.com> | 2015-06-25 21:46:34 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2015-06-25 21:46:34 +0000 |
commit | 358cf1ea302ebc9c2f307aa710c22821a4ab670a (patch) | |
tree | 6107730cfdba431365534feddc2af4c36d12facc /lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp | |
parent | aed187c76e884dcb96e55312c16e1335580a2ed9 (diff) | |
download | bcm5719-llvm-358cf1ea302ebc9c2f307aa710c22821a4ab670a.tar.gz bcm5719-llvm-358cf1ea302ebc9c2f307aa710c22821a4ab670a.zip |
Resubmitting 240466 after fixing the linux test suite failures.
A few extras were fixed
- Symbol::GetAddress() now returns an Address object, not a reference. There were places where people were accessing the address of a symbol when the symbol's value wasn't an address symbol. On MacOSX, undefined symbols have a value zero and some places where using the symbol's address and getting an absolute address of zero (since an Address object with no section and an m_offset whose value isn't LLDB_INVALID_ADDRESS is considered an absolute address). So fixing this required some changes to make sure people were getting what they expected.
- Since some places want to access the address as a reference, I added a few new functions to symbol:
Address &Symbol::GetAddressRef();
const Address &Symbol::GetAddressRef() const;
Linux test suite passes just fine now.
<rdar://problem/21494354>
llvm-svn: 240702
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp index 5f7935e1275..8189f10bd30 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -574,7 +574,7 @@ ObjectFilePECOFF::GetSymtab() if ((int16_t)symbol.sect >= 1) { Address symbol_addr(sect_list->GetSectionAtIndex(symbol.sect-1), symbol.value); - symbols[i].GetAddress() = symbol_addr; + symbols[i].GetAddressRef() = symbol_addr; } if (symbol.naux > 0) @@ -633,7 +633,7 @@ ObjectFilePECOFF::GetSymtab() Address symbol_addr(m_coff_header_opt.image_base + function_rva, sect_list); symbols[i].GetMangled().SetValue(ConstString(symbol_name.c_str())); - symbols[i].GetAddress() = symbol_addr; + symbols[i].GetAddressRef() = symbol_addr; symbols[i].SetType(lldb::eSymbolTypeCode); symbols[i].SetDebug(true); } |