[Lldb-commits] [PATCH] D35784: [LLD][MIPS] Fix Address::GetAddressClass() to return correct AddressClass based on the load address

Nitesh Jain via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 24 00:04:22 PDT 2017


nitesh.jain created this revision.
Herald added subscribers: arichardson, sdardis.

The implementation of Address::GetAddressClass() is based on file address. Those it will give incorrect result if there are more than one section for a particular file address. For example (see attach log), there are two sections (.text and .debug_ranges) for the file address 0xbcf0. Hence the Address::GetAddressClass() will return "eAddressClassDebug" instead of "eAddressClassCode". This will cause breakpoint failure and incorrect disassembly view. In these patch, the Address::GetAddressClass() will return AddressClass based on the loaded Section and fall back to file address if its failed.

F3765058: log <https://reviews.llvm.org/F3765058>


https://reviews.llvm.org/D35784

Files:
  include/lldb/Symbol/ObjectFile.h
  include/lldb/lldb-enumerations.h
  source/Core/Address.cpp
  source/Symbol/ObjectFile.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35784.107847.patch
Type: text/x-patch
Size: 7261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170724/8370bdd9/attachment-0001.bin>


More information about the lldb-commits mailing list