Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
b0b9605a |
| 12-Jun-2023 |
Kazuki Sakamoto <sakamoto@splhack.org> |
[lldb][ObjectFileELF] Set ModuleSpec file offset and size
In Android API level 23 and above, dynamic loader is able to load .so file directly from APK. https://android.googlesource.com/platform/bion
[lldb][ObjectFileELF] Set ModuleSpec file offset and size
In Android API level 23 and above, dynamic loader is able to load .so file directly from APK. https://android.googlesource.com/platform/bionic/+/master/ android-changes-for-ndk-developers.md# opening-shared-libraries-directly-from-an-apk
ObjectFileELF::GetModuleSpecifications will load a .so file, which is page aligned and uncompressed, directly from a zip file. However it does not set the .so file offset and size to the ModuleSpec. Also crc32 calculation uses more data than the .so file size.
Set the .so file offset and size to the ModuleSpec, and set the size to MapFileData length argument. For normal file, file_offset should be zero, and length should be the size of the file.
Differential Revision: https://reviews.llvm.org/D152757
show more ...
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
a996cc21 |
| 05-Dec-2022 |
Fangrui Song <i@maskray.me> |
Remove unused #include "llvm/ADT/Optional.h"
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init |
|
#
a4a00ced |
| 09-Jul-2020 |
Fred Riss <friss@apple.com> |
[lldb/Module] Allow for the creation of memory-only modules
Summary: This patch extends the ModuleSpec class to include a DataBufferSP which contains the module data. If this data is provided, LLDB
[lldb/Module] Allow for the creation of memory-only modules
Summary: This patch extends the ModuleSpec class to include a DataBufferSP which contains the module data. If this data is provided, LLDB won't try to hit the filesystem to create the Module, but use only the data stored in the ModuleSpec.
Reviewers: labath, espindola
Subscribers: emaste, MaskRay, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D83512
show more ...
|
Revision tags: llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
1beffc18 |
| 01-Jun-2020 |
Jaroslav Sevcik <jarin@google.com> |
Support build-ids of other sizes than 16 in UUID::SetFromStringRef
SBTarget::AddModule currently handles the UUID parameter in a very weird way: UUIDs with more than 16 bytes are trimmed to 16 bytes
Support build-ids of other sizes than 16 in UUID::SetFromStringRef
SBTarget::AddModule currently handles the UUID parameter in a very weird way: UUIDs with more than 16 bytes are trimmed to 16 bytes. On the other hand, shorter-than-16-bytes UUIDs are completely ignored. In this patch, we change the parsing code to handle UUIDs of arbitrary size.
To support arbitrary size UUIDs in SBTarget::AddModule, this patch changes UUID::SetFromStringRef to parse UUIDs of arbitrary length. We subtly change the semantics of SetFromStringRef - SetFromStringRef now only succeeds if the entire input is consumed to prevent some prefix-parsing confusion. This is up for discussion, but I believe this is more consistent - we always return false for invalid UUIDs rather than sometimes truncating to a valid prefix. Also, all the call-sites except the API and interpreter seem to expect to consume the entire input.
This also adds tests for adding existing modules 4-, 16-, and 20-byte build-ids. Finally, we took the liberty of testing the minidump scenario we care about - removing placeholder module from minidump and replacing it with the real module.
Reviewed By: labath, friss
Differential Revision: https://reviews.llvm.org/D80755
show more ...
|
Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
#
80814287 |
| 24-Jan-2020 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Fix all formatting errors in .cpp file headers
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp ----------------------------------------
[lldb][NFC] Fix all formatting errors in .cpp file headers
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp -------------------------------------------------===// ``` However in LLDB most of our source files have arbitrary changes to this format and these changes are spreading through LLDB as folks usually just use the existing source files as templates for their new files (most notably the unnecessary editor language indicator `-*- C++ -*-` is spreading and in every review someone is pointing out that this is wrong, resulting in people pointing out that this is done in the same way in other files).
This patch removes most of these inconsistencies including the editor language indicators, all the different missing/additional '-' characters, files that center the file name, missing trailing `===//` (mostly caused by clang-format breaking the line).
Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D73258
show more ...
|
Revision tags: llvmorg-11-init |
|
#
5dca0596 |
| 23-Dec-2019 |
Raphael Isemann <teemperor@gmail.com> |
[lldb] Add a SubsystemRAII that takes care of calling Initialize and Terminate in the unit tests
Summary: Many of our tests need to initialize certain subsystems/plugins of LLDB such as `FileSystem`
[lldb] Add a SubsystemRAII that takes care of calling Initialize and Terminate in the unit tests
Summary: Many of our tests need to initialize certain subsystems/plugins of LLDB such as `FileSystem` or `HostInfo` by calling their static `Initialize` functions before the test starts and then calling `::Terminate` after the test is done (in reverse order). This adds a lot of error-prone boilerplate code to our testing code.
This patch adds a RAII called SubsystemRAII that ensures that we always call ::Initialize and then call ::Terminate after the test is done (and that the Terminate calls are always in the reverse order of the ::Initialize calls). It also gets rid of all of the boilerplate that we had for these calls.
Per-fixture initialization is still not very nice with this approach as it would require some kind of static unique_ptr that gets manually assigned/reseted from the gtest SetUpTestCase/TearDownTestCase functions. Because of that I changed all per-fixture setup to now do per-test setup which can be done by just having the SubsystemRAII as a member of the test fixture. This change doesn't influence our normal test runtime as LIT anyway runs each test case separately (and the Initialize/Terminate calls are anyway not very expensive). It will however make running all tests in a single executable slightly slower.
Reviewers: labath, JDevlieghere, martong, espindola, shafik
Reviewed By: labath
Subscribers: mgorny, rnkovacs, emaste, MaskRay, abidh, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71630
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
ad6690af |
| 08-Oct-2019 |
Antonio Afonso <antonio.afonso@gmail.com> |
Explicitly set entry point arch when it's thumb [Second Try]
Summary: This is a redo of D68069 because I reverted it due to some concerns that were now addressed along with the new comments that @la
Explicitly set entry point arch when it's thumb [Second Try]
Summary: This is a redo of D68069 because I reverted it due to some concerns that were now addressed along with the new comments that @labath added.
I found a case where the main android binary (app_process32) had thumb code at its entry point but no entry in the symbol table indicating this. This made lldb set a 4 byte breakpoint at that address (we default to arm code) instead of a 2 byte one (like we should for thumb). The big deal with this is that the expression evaluator uses the entry point as a way to know when a JITed expression has finished executing by putting a breakpoint there. Because of this, evaluating expressions on certain android devices (Google Pixel something) made the process crash. This was fixed by checking this specific situation when we parse the symbol table and add an artificial symbol for this 2 byte range and indicating that it's arm thumb.
I created 2 unit tests for this, one to check that now we know that the entry point is arm thumb, and the other to make sure we didn't change the behaviour for arm code.
I also run the following on the command line with the `app_process32` where I found the issue: **Before:** ``` (lldb) dis -s 0x1640 -e 0x1644 app_process32[0x1640]: .long 0xf0004668 ; unknown opcode ``` **After:** ``` (lldb) dis -s 0x1640 -e 0x1644 app_process32`: app_process32[0x1640] <+0>: mov r0, sp app_process32[0x1642]: andeq r0, r0, r0 ```
Reviewers: clayborg, labath, wallace, espindola
Reviewed By: labath
Subscribers: labath, lldb-commits, MaskRay, kristof.beyls, arichardson, emaste, srhines
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68533
llvm-svn: 374132
show more ...
|
#
ae08e479 |
| 04-Oct-2019 |
Antonio Afonso <antonio.afonso@gmail.com> |
Revert "Explicitly set entry point arch when it's thumb"
Backing out because SymbolFile/Breakpad/symtab.test is failing and it seems to be a legit issue. Will investigate.
This reverts commit 72153
Revert "Explicitly set entry point arch when it's thumb"
Backing out because SymbolFile/Breakpad/symtab.test is failing and it seems to be a legit issue. Will investigate.
This reverts commit 72153f95ee4c1b52d2f4f483f0ea4f650ec863be.
llvm-svn: 373687
show more ...
|
#
ac146958 |
| 04-Oct-2019 |
Antonio Afonso <antonio.afonso@gmail.com> |
Explicitly set entry point arch when it's thumb
Summary: I found a case where the main android binary (app_process32) had thumb code at its entry point but no entry in the symbol table indicating th
Explicitly set entry point arch when it's thumb
Summary: I found a case where the main android binary (app_process32) had thumb code at its entry point but no entry in the symbol table indicating this. This made lldb set a 4 byte breakpoint at that address (we default to arm code) instead of a 2 byte one (like we should for thumb). The big deal with this is that the expression evaluator uses the entry point as a way to know when a JITed expression has finished executing by putting a breakpoint there. Because of this, evaluating expressions on certain android devices (Google Pixel something) made the process crash. This was fixed by checking this specific situation when we parse the symbol table and add an artificial symbol for this 2 byte range and indicating that it's arm thumb.
I created 2 unit tests for this, one to check that now we know that the entry point is arm thumb, and the other to make sure we didn't change the behaviour for arm code.
I also run the following on the command line with the `app_process32` where I found the issue: **Before:** ``` (lldb) dis -s 0x1640 -e 0x1644 app_process32[0x1640]: .long 0xf0004668 ; unknown opcode ``` **After:** ``` (lldb) dis -s 0x1640 -e 0x1644 app_process32`: app_process32[0x1640] <+0>: mov r0, sp app_process32[0x1642]: andeq r0, r0, r0 ```
Reviewers: clayborg, labath, wallace, espindola
Subscribers: srhines, emaste, arichardson, kristof.beyls, MaskRay, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68069
llvm-svn: 373680
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3 |
|
#
a2e270fa |
| 20-Aug-2019 |
Pavel Labath <pavel@labath.sk> |
unittests: Use yaml2obj as a library instead of an external process
Summary: Recently, yaml2obj has been turned into a library. This means we can use it from our unit tests directly, instead of shel
unittests: Use yaml2obj as a library instead of an external process
Summary: Recently, yaml2obj has been turned into a library. This means we can use it from our unit tests directly, instead of shelling out to an external process. This patch does just that.
Reviewers: JDevlieghere, aadsm, espindola, jdoerfert
Subscribers: emaste, mgorny, arichardson, MaskRay, jhenderson, abrachet, lldb-commits
Differential Revision: https://reviews.llvm.org/D65949
llvm-svn: 369374
show more ...
|
Revision tags: llvmorg-9.0.0-rc2 |
|
#
88c77d67 |
| 08-Aug-2019 |
Pavel Labath <pavel@labath.sk> |
ObjectFileELF: Convert a unit test to a lit test
It is much easier to test this functionality via lldb-test.
llvm-svn: 368289
|
Revision tags: llvmorg-9.0.0-rc1 |
|
#
84a68569 |
| 26-Jul-2019 |
Pavel Labath <pavel@labath.sk> |
SymbolVendor: Move Symtab construction into the SymbolFile
Summary: Instead of having SymbolVendor coordinate Symtab construction between Symbol and Object files, make the SymbolVendor function a pa
SymbolVendor: Move Symtab construction into the SymbolFile
Summary: Instead of having SymbolVendor coordinate Symtab construction between Symbol and Object files, make the SymbolVendor function a passthrough, and put all of the logic into the SymbolFile.
Reviewers: clayborg, JDevlieghere, jingham, espindola
Subscribers: emaste, mgorny, arichardson, MaskRay, lldb-commits
Differential Revision: https://reviews.llvm.org/D65208
llvm-svn: 367086
show more ...
|
Revision tags: llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1 |
|
#
8a777920 |
| 06-May-2019 |
Greg Clayton <clayborg@gmail.com> |
Include inlined functions when figuring out a contiguous address range
Checking this in for Antonio Afonso:
This diff changes the function LineEntry::GetSameLineContiguousAddressRange so that it al
Include inlined functions when figuring out a contiguous address range
Checking this in for Antonio Afonso:
This diff changes the function LineEntry::GetSameLineContiguousAddressRange so that it also includes function calls that were inlined at the same line of code.
My motivation is to decrease the step over time of lines that heavly rely on inlined functions. I have multiple examples in the code base I work that makes a step over stop 20 or mote times internally. This can easly had up to step overs that take >500ms which I was able to lower to 25ms with this new strategy.
The reason the current code is not extending the address range beyond an inlined function is because when we resolve the symbol at the next address of the line entry we will get the entry line corresponding to where the original code for the inline function lives, making us barely extend the range. This then will end up on a step over having to stop multiple times everytime there's an inlined function.
To check if the range is an inlined function at that line I also get the block associated with the next address and check if there is a parent block with a call site at the line we're trying to extend.
To check this I created a new function in Block called GetContainingInlinedBlockWithCallSite that does exactly that. I also added a new function to Declaration for convinence of checking file/line named CompareFileAndLine.
To avoid potential issues when extending an address range I added an Extend function that extends the range by the AddressRange given as an argument. This function returns true to indicate sucess when the rage was agumented, false otherwise (e.g.: the ranges are not connected). The reason I do is to make sure that we're not just blindly extending complete_line_range by whatever GetByteSize() we got. If for some reason the ranges are not connected or overlap, or even 0, this could be an issue.
I also added a unit tests for this change and include the instructions on the test itself on how to generate the yaml file I use for testing.
Differential Revision: https://reviews.llvm.org/D61292
llvm-svn: 360071
show more ...
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3 |
|
#
05620d8e |
| 06-Nov-2018 |
Davide Italiano <davide@freebsd.org> |
[ObjectFile] Prefer reinterpret_cast<>
llvm-svn: 346247
|
#
b37f1ec8 |
| 06-Nov-2018 |
Davide Italiano <davide@freebsd.org> |
[ObjectFileELF] Fix misaligned read/writes caught by UBSan.
llvm-svn: 346244
|
#
6868d2dd |
| 05-Nov-2018 |
Nathan Lanza <nathan@lanza.io> |
Add a relocation to ObjectFileELF::ApplyRelocations and a test
Summary: pcm files can end up being processed by lldb with relocations to be made for the .debug_info section. When a R_AARCH64_ABS64 r
Add a relocation to ObjectFileELF::ApplyRelocations and a test
Summary: pcm files can end up being processed by lldb with relocations to be made for the .debug_info section. When a R_AARCH64_ABS64 relocation was required lldb would hit an `assert(false)` and die.
Add R_AARCH64_ABS64 relocations to the S+A 64 bit width code path. Add a test for R_AARCH64_ABS64 and R_AARCH64_ABS32 .rela.debug_info relocations in a pcm file.
Reviewers: sas, xiaobai, davide, javed.absar, espindola
Reviewed By: davide
Subscribers: labath, zturner, emaste, mgorny, arichardson, kristof.beyls
Differential Revision: https://reviews.llvm.org/D51566
llvm-svn: 346171
show more ...
|
Revision tags: llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
#
8f3be7a3 |
| 01-Nov-2018 |
Jonas Devlieghere <jonas@devlieghere.com> |
[FileSystem] Move path resolution logic out of FileSpec
This patch removes the logic for resolving paths out of FileSpec and updates call sites to rely on the FileSystem class instead.
Differential
[FileSystem] Move path resolution logic out of FileSpec
This patch removes the logic for resolving paths out of FileSpec and updates call sites to rely on the FileSystem class instead.
Differential revision: https://reviews.llvm.org/D53915
llvm-svn: 345890
show more ...
|
#
46376966 |
| 31-Oct-2018 |
Jonas Devlieghere <jonas@devlieghere.com> |
[FileSystem] Extend file system and have it use the VFS.
This patch extends the FileSystem class with a bunch of functions that are currently implemented as methods of the FileSpec class. These meth
[FileSystem] Extend file system and have it use the VFS.
This patch extends the FileSystem class with a bunch of functions that are currently implemented as methods of the FileSpec class. These methods will be removed in future commits and replaced by calls to the file system.
The new functions are operated in terms of the virtual file system which was recently moved from clang into LLVM so it could be reused in lldb. Because the VFS is stateful, we turned the FileSystem class into a singleton.
Differential revision: https://reviews.llvm.org/D53532
llvm-svn: 345783
show more ...
|
Revision tags: llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3 |
|
#
87fb24dd |
| 13-Jun-2018 |
Jonas Devlieghere <jonas@devlieghere.com> |
[FileSpec] Make style argument mandatory for SetFile. NFC
Update SetFile uses in the unittests.
llvm-svn: 334668
|
#
08426e1f |
| 12-Jun-2018 |
Zachary Turner <zturner@google.com> |
Refactor ExecuteAndWait to take StringRefs.
This simplifies some code which had StringRefs to begin with, and makes other code more complicated which had const char* to begin with.
In the end, I th
Refactor ExecuteAndWait to take StringRefs.
This simplifies some code which had StringRefs to begin with, and makes other code more complicated which had const char* to begin with.
In the end, I think this makes for a more idiomatic and platform agnostic API. Not all platforms launch process with null terminated c-string arrays for the environment pointer and argv, but the api was designed that way because it allowed easy pass-through for posix-based platforms. There's a little additional overhead now since on posix based platforms we'll be takign StringRefs which were constructed from null terminated strings and then copying them to null terminate them again, but from a readability and usability standpoint of the API user, I think this API signature is strictly better.
llvm-svn: 334518
show more ...
|
Revision tags: llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2 |
|
#
bca95f8a |
| 05-Feb-2018 |
Pavel Labath <labath@google.com> |
Add a comment explaining how the input for GetModuleSpecifications_EarlySectionHeaders was generated
Davide pointed out this would be useful if the file ever needs to be regenerated (and I certainly
Add a comment explaining how the input for GetModuleSpecifications_EarlySectionHeaders was generated
Davide pointed out this would be useful if the file ever needs to be regenerated (and I certainly agree).
I also replace the test binary with a slightly smaller one -- I intended to do this in the original commit, but I forgot to add it to the patch as I was juggling several things at the same time.
llvm-svn: 324256
show more ...
|
#
4f033125 |
| 05-Feb-2018 |
Pavel Labath <labath@google.com> |
Fix parsing of object files with "early" section headers
ObjectFileELF::GetModuleSpecifications contained a lot of tip-toing code which was trying to avoid loading the full object file into memory.
Fix parsing of object files with "early" section headers
ObjectFileELF::GetModuleSpecifications contained a lot of tip-toing code which was trying to avoid loading the full object file into memory. It did this by trying to load data only up to the offset if was accessing. However, in practice this was useless, as 99% of object files we encounter have section headers at the end, so we would load the whole file as soon as we start parsing the section headers.
In fact, this would break as soon as we encounter a file which does *not* have section headers at the end (yaml2obj produces these), as the access to .strtab (which we need to get the section names) was not guarded by this offset check.
As this strategy was completely ineffective anyway, I do not attempt to proliferate it further by guarding the .strtab accesses. Instead I just lead the full file as soon as we are reasonably sure that we are indeed processing an elf file.
If we really care about the load size here, we would need to reimplement this to just load the bits of the object file we need, instead of loading everything from the start of the object file to the given offset. However, given that the OS will do this for us for free when using mmap, I think think this is really necessary.
For testing this I check a (tiny) SO file instead of yaml2obj-ing it because the fact that they come out first is an implementation detail of yaml2obj that can change in the future.
llvm-svn: 324254
show more ...
|
Revision tags: llvmorg-6.0.0-rc1 |
|
#
e2867bc4 |
| 15-Dec-2017 |
Pavel Labath <labath@google.com> |
ObjectFileELF: Add support for compressed sections
Summary: We use the llvm decompressor to decompress SHF_COMPRESSED sections. This enables us to read data from debug info sections, which are somet
ObjectFileELF: Add support for compressed sections
Summary: We use the llvm decompressor to decompress SHF_COMPRESSED sections. This enables us to read data from debug info sections, which are sometimes compressed, particuarly in the split-dwarf case. This functionality is only available if llvm is compiled with zlib support.
Reviewers: clayborg, zturner
Subscribers: emaste, mgorny, aprantl, lldb-commits
Differential Revision: https://reviews.llvm.org/D40616
llvm-svn: 320813
show more ...
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1 |
|
#
a6db4167 |
| 03-Oct-2017 |
Tim Hammerquist <penryu@apple.com> |
cmake + xcode: prevent gtests from using includes from project root
Summary: At present, several gtests in the lldb open source codebase are using #include statements rooted at $(SOURCE_ROOT)/${LLDB
cmake + xcode: prevent gtests from using includes from project root
Summary: At present, several gtests in the lldb open source codebase are using #include statements rooted at $(SOURCE_ROOT)/${LLDB_PROJECT_ROOT}.
This patch cleans up this directory/include structure for both CMake and Xcode build systems.
rdar://problem/33835795
Reviewers: zturner, jingham, beanz
Reviewed By: beanz
Subscribers: emaste, lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D36598
llvm-svn: 314849
show more ...
|