| #
ede7c02b |
| 15-Jul-2020 |
Pavel Labath <[email protected]> |
[lldb/COFF] Remove strtab zeroing hack
Summary: This code (recently responsible for a unaligned access sanitizer failure) claims that the string table offset zero should result in an empty string.
[lldb/COFF] Remove strtab zeroing hack
Summary: This code (recently responsible for a unaligned access sanitizer failure) claims that the string table offset zero should result in an empty string.
I cannot find any mention of this detail in the Microsoft COFF documentation, and the llvm COFF parser also does not handle offset zero specially. This code was introduced in 0076e7159, which also does not go into specifics, citing "various bugfixes".
Given that this is obviously a hack, and does not cause tests to fail, I think we should just delete it.
Reviewers: amccarth, markmentovai
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D83881
show more ...
|
|
Revision tags: llvmorg-12-init |
|
| #
61cf9f4e |
| 15-Jul-2020 |
Davide Italiano <[email protected]> |
[ObjectFilePECOFF] Try to avoid unaligned access.
Fixes an UBSAN error.
|
| #
a4a00ced |
| 09-Jul-2020 |
Fred Riss <[email protected]> |
[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 ...
|
| #
d372a8e8 |
| 10-Jul-2020 |
Pavel Labath <[email protected]> |
[lldb/pecoff] Use a different llvm createBinary overload for parsing
Change the code the use the version which accepts a memory buffer, instead of the one taking a file name.
This ensures we are no
[lldb/pecoff] Use a different llvm createBinary overload for parsing
Change the code the use the version which accepts a memory buffer, instead of the one taking a file name.
This ensures we are not loading the file into memory twice (ObjectFilePECOFF also loads a copy), reducing our memory footprint, as well as enabling additional goodies in the future, like being able to open files which don't exist on disk (D83512).
show more ...
|
|
Revision tags: llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
| #
06412dae |
| 25-Jun-2020 |
Jonas Devlieghere <[email protected]> |
[lldb] Use std::make_unique<> (NFC)
Update the rest of lldb to use std::make_unique<>. I used clang-tidy to automate this, which probably missed cases that are wrapped in ifdefs.
|
| #
1c03389c |
| 11-Jun-2020 |
Reid Kleckner <[email protected]> |
Re-land "Migrate the rest of COFFObjectFile to Error"
This reverts commit 101fbc01382edd89ea7b671104c68b30b2446cc0.
Remove leftover debugging attribute.
Update LLDB as well, which was missed befor
Re-land "Migrate the rest of COFFObjectFile to Error"
This reverts commit 101fbc01382edd89ea7b671104c68b30b2446cc0.
Remove leftover debugging attribute.
Update LLDB as well, which was missed before.
show more ...
|
|
Revision tags: llvmorg-10.0.1-rc1 |
|
| #
3a168297 |
| 13-May-2020 |
Pavel Labath <[email protected]> |
[lldb] Switch Section-dumping code to raw_ostream
Also, add a basic test for dumping sections.
|
| #
aa786b88 |
| 28-Mar-2020 |
Martin Storsjö <[email protected]> |
[lldb] [PECOFF] Only use PECallFrameInfo on the one supported architecture
The RuntimeFunction struct, which PECallFrameInfo interprets, has a different layout and differnet semantics on all archite
[lldb] [PECOFF] Only use PECallFrameInfo on the one supported architecture
The RuntimeFunction struct, which PECallFrameInfo interprets, has a different layout and differnet semantics on all architectures.
Differential Revision: https://reviews.llvm.org/D77000
show more ...
|
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
| #
bba9ba8d |
| 14-Feb-2020 |
Jonas Devlieghere <[email protected]> |
[lldb/Plugin] s/LLDB_PLUGIN/LLDB_PLUGIN_DEFINE/ (NFC)
Rename LLDB_PLUGIN to LLDB_PLUGIN_DEFINE as Pavel suggested in D73067 to avoid name conflict.
|
|
Revision tags: llvmorg-10.0.0-rc2 |
|
| #
6115bd9b |
| 10-Feb-2020 |
Martin Storsjö <[email protected]> |
[LLDB] Fix GCC warnings about extra semicolons. NFC.
|
| #
fbb4d1e4 |
| 07-Feb-2020 |
Jonas Devlieghere <[email protected]> |
[lldb/Plugins] Use external functions to (de)initialize plugins
This is a step towards making the initialize and terminate calls be generated by CMake, which in turn is towards making it possible to
[lldb/Plugins] Use external functions to (de)initialize plugins
This is a step towards making the initialize and terminate calls be generated by CMake, which in turn is towards making it possible to disable plugins at configuration time.
Differential revision: https://reviews.llvm.org/D74245
show more ...
|
|
Revision tags: llvmorg-10.0.0-rc1 |
|
| #
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <[email protected]> |
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly m
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
show more ...
|
| #
80814287 |
| 24-Jan-2020 |
Raphael Isemann <[email protected]> |
[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, llvmorg-9.0.1, llvmorg-9.0.1-rc3 |
|
| #
a0f72441 |
| 06-Dec-2019 |
Martin Storsjö <[email protected]> |
[LLDB] [PECOFF] Make sure to set the address byte size in m_data after parsing headers
If not set, the address byte size was implied to be the one of the host process.
This allows reverting the fun
[LLDB] [PECOFF] Make sure to set the address byte size in m_data after parsing headers
If not set, the address byte size was implied to be the one of the host process.
This allows reverting the functional change from 31087b2ae9154, since now PECOFF does the same as ELF and MachO wrt setting both byte order and address size on m_data within ParseHeader.
Differential Revision: https://reviews.llvm.org/D71108
show more ...
|
|
Revision tags: llvmorg-9.0.1-rc2 |
|
| #
28e4942b |
| 28-Nov-2019 |
Pavel Labath <[email protected]> |
[lldb] Remove FileSpec(FileSpec*) constructor
This constructor was the cause of some pretty weird behavior. Remove it, and update all code to properly dereference the argument instead.
|
|
Revision tags: llvmorg-9.0.1-rc1 |
|
| #
934c025e |
| 15-Oct-2019 |
Martin Storsjö <[email protected]> |
[LLDB] [PECOFF] Look for the truncated ".eh_fram" section name
COFF section names can either be stored truncated to 8 chars, in the section header, or as a longer section name, stored separately in
[LLDB] [PECOFF] Look for the truncated ".eh_fram" section name
COFF section names can either be stored truncated to 8 chars, in the section header, or as a longer section name, stored separately in the string table.
libunwind locates the .eh_frame section by runtime introspection, which only works for section names stored in the section header (as the string table isn't mapped at runtime). To support this behaviour, lld always truncates the section names for sections that will be mapped, like .eh_frame.
Differential Revision: https://reviews.llvm.org/D70745
show more ...
|
| #
2e5bb6d8 |
| 27-Nov-2019 |
Martin Storsjö <[email protected]> |
[LLDB] [PECOFF] Factorize mapping section names to types using StringSwitch. NFCI.
Keep the existing special cases based on combinations of section name, flags and sizes/offsets.
Differential Revis
[LLDB] [PECOFF] Factorize mapping section names to types using StringSwitch. NFCI.
Keep the existing special cases based on combinations of section name, flags and sizes/offsets.
Differential Revision: https://reviews.llvm.org/D70778
show more ...
|
| #
3db1d138 |
| 30-Oct-2019 |
Martin Storsjö <[email protected]> |
[LLDB] [PECOFF] Fix error handling for executables that object::createBinary errors out on
llvm::object::createBinary returns an Expected<>, which requires not only checking the object for success,
[LLDB] [PECOFF] Fix error handling for executables that object::createBinary errors out on
llvm::object::createBinary returns an Expected<>, which requires not only checking the object for success, but also requires consuming the Error, if one was set.
Use LLDB_LOG_ERROR for this case, and change an existing similar log statement to use it as well, to make sure the Error is consumed even if the log channel is disabled.
Differential Revision: https://reviews.llvm.org/D69646
show more ...
|
| #
7e1a3076 |
| 28-Oct-2019 |
Martin Storsjö <[email protected]> |
[LLDB] [PECOFF] Don't crash in ReadImageDataByRVA for addresses out of range
This can happen e.g. when unwinding doesn't work perfectly.
Differential Revision: https://reviews.llvm.org/D69502
|
| #
f1e0ae34 |
| 16-Oct-2019 |
Pavel Labath <[email protected]> |
COFF: Set section permissions
Summary: This enables us to reason about whether a given address can be executable, for instance during unwinding.
Reviewers: amccarth, mstorsjo
Subscribers: lldb-com
COFF: Set section permissions
Summary: This enables us to reason about whether a given address can be executable, for instance during unwinding.
Reviewers: amccarth, mstorsjo
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D69102
show more ...
|
| #
4394b5be |
| 21-Oct-2019 |
Martin Storsjö <[email protected]> |
[LLDB] [PECOFF] Use FindSectionByID to associate symbols to sections
The virtual container/header section caused the section list to be offset by one, but by using FindSectionByID, the layout of the
[LLDB] [PECOFF] Use FindSectionByID to associate symbols to sections
The virtual container/header section caused the section list to be offset by one, but by using FindSectionByID, the layout of the section list shouldn't matter.
Differential Revision: https://reviews.llvm.org/D69366
show more ...
|
| #
73a7a55c |
| 25-Oct-2019 |
Pavel Labath <[email protected]> |
lldb/COFF: Create a separate "section" for the file header
In an attempt to ensure that every part of the module's memory image is accounted for, D56537 created a special "container section" spannin
lldb/COFF: Create a separate "section" for the file header
In an attempt to ensure that every part of the module's memory image is accounted for, D56537 created a special "container section" spanning the entire image. While that seemed reasonable at the time (and it still mostly does), it did create a problem of what to put as the "file size" of the section, because the image is not continuous on disk, as we generally assume (which is why I put zero there). Additionally, this arrangement makes it unclear what kind of permissions should be assigned to that section (which is what my next patch does).
To get around these, this patch partially reverts D56537, and goes back to top-level sections. Instead, what I do is create a new "section" for the object file header, which is also being loaded into memory, though its not considered to be a section in the strictest sense. This makes it possible to correctly assign file size section, and we can later assign permissions to it as well.
Reviewers: amccarth, mstorsjo
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D69100
show more ...
|
| #
674d5543 |
| 15-Oct-2019 |
Martin Storsjo <[email protected]> |
[LLDB] [PECOFF] Use a "pc" vendor name in aarch64 triples
This matches all other architectures listed in the same file.
This fixes debugging aarch64 executables with lldb-server, which otherwise fa
[LLDB] [PECOFF] Use a "pc" vendor name in aarch64 triples
This matches all other architectures listed in the same file.
This fixes debugging aarch64 executables with lldb-server, which otherwise fails, with log messages like these:
Target::SetArchitecture changing architecture to aarch64 (aarch64-pc-windows-msvc) Target::SetArchitecture Trying to select executable file architecture aarch64 (aarch64-pc-windows-msvc)
ArchSpec::SetArchitecture sets the vendor to llvm::Triple::PC for any coff/win32 combination, and if this doesn't match the triple set by the PECOFF module, things doesn't seem to work with when using lldb-server.
Differential Revision: https://reviews.llvm.org/D68939
llvm-svn: 374867
show more ...
|
| #
30c2441a |
| 11-Oct-2019 |
Aleksandr Urakov <[email protected]> |
[Windows] Use information from the PE32 exceptions directory to construct unwind plans
This patch adds an implementation of unwinding using PE EH info. It allows to get almost ideal call stacks on 6
[Windows] Use information from the PE32 exceptions directory to construct unwind plans
This patch adds an implementation of unwinding using PE EH info. It allows to get almost ideal call stacks on 64-bit Windows systems (except some epilogue cases, but I believe that they can be fixed with unwind plan disassembly augmentation in the future).
To achieve the goal the CallFrameInfo abstraction was made. It is based on the DWARFCallFrameInfo class interface with a few changes to make it less DWARF-specific.
To implement the new interface for PECOFF object files the class PECallFrameInfo was written. It uses the next helper classes:
- UnwindCodesIterator helps to iterate through UnwindCode structures (and processes chained infos transparently); - EHProgramBuilder with the use of UnwindCodesIterator constructs EHProgram; - EHProgram is, by fact, a vector of EHInstructions. It creates an abstraction over the low-level unwind codes and simplifies work with them. It contains only the information that is relevant to unwinding in the unified form. Also the required unwind codes are read from the object file only once with it; - EHProgramRange allows to take a range of EHProgram and to build an unwind row for it.
So, PECallFrameInfo builds the EHProgram with EHProgramBuilder, takes the ranges corresponding to every offset in prologue and builds the rows of the resulted unwind plan. The resulted plan covers the whole range of the function except the epilogue.
Reviewers: jasonmolenda, asmith, amccarth, clayborg, JDevlieghere, stella.stamenova, labath, espindola
Reviewed By: jasonmolenda
Subscribers: leonid.mashinskiy, emaste, mgorny, aprantl, arichardson, MaskRay, lldb-commits, llvm-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D67347
llvm-svn: 374528
show more ...
|
| #
544c8f48 |
| 24-Sep-2019 |
Martin Storsjo <[email protected]> |
[LLDB] Add tests for PECOFF arm architecture identification
Add a test case for the change from SVN r372657, and for the preexisting ARM identification.
Add a missing ArchDefinitionEntry for PECOFF
[LLDB] Add tests for PECOFF arm architecture identification
Add a test case for the change from SVN r372657, and for the preexisting ARM identification.
Add a missing ArchDefinitionEntry for PECOFF/arm64, and tweak the ArmNt case to set the architecture to armv7 (ArmNt never ran on anything lower than that). (This avoids a case where ArchSpec::MergeFrom would override the arch from arm to armv7 and ArchSpec::CoreUpdated would reset the OS to unknown at the same time.)
Differential Revision: https://reviews.llvm.org/D67951
llvm-svn: 372741
show more ...
|