[lldb/Module] Allow for the creation of memory-only modulesSummary:This patch extends the ModuleSpec class to include aDataBufferSP which contains the module data. If thisdata is provided, LLDB
[lldb/Module] Allow for the creation of memory-only modulesSummary:This patch extends the ModuleSpec class to include aDataBufferSP which contains the module data. If thisdata is provided, LLDB won't try to hit the filesystemto create the Module, but use only the data stored inthe ModuleSpec.Reviewers: labath, espindolaSubscribers: emaste, MaskRay, lldb-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D83512
show more ...
[lldb][NFC] Fix all formatting errors in .cpp file headersSummary:A *.cpp file header in LLDB (and in LLDB) should like this:```//===-- TestUtilities.cpp ----------------------------------------
[lldb][NFC] Fix all formatting errors in .cpp file headersSummary: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 andthese changes are spreading through LLDB as folks usually just use the existingsource files as templates for their new files (most notably the unnecessaryeditor language indicator `-*- C++ -*-` is spreading and in every reviewsomeone is pointing out that this is wrong, resulting in people pointing out that thisis 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, missingtrailing `===//` (mostly caused by clang-format breaking the line).Reviewers: aprantl, espindola, jfb, shafik, JDevlieghereReviewed By: JDevlieghereSubscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D73258
[lldb] Add a SubsystemRAII that takes care of calling Initialize and Terminate in the unit testsSummary: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 testsSummary:Many of our tests need to initialize certain subsystems/plugins of LLDB such as`FileSystem` or `HostInfo` by calling their static `Initialize` functions before thetest 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 Terminatecalls are always in the reverse order of the ::Initialize calls). It also gets rid ofall of the boilerplate that we had for these calls.Per-fixture initialization is still not very nice with this approach as it wouldrequire some kind of static unique_ptr that gets manually assigned/resetedfrom the gtest SetUpTestCase/TearDownTestCase functions. Because of thatI changed all per-fixture setup to now do per-test setup which can be doneby just having the SubsystemRAII as a member of the test fixture. This change doesn'tinfluence our normal test runtime as LIT anyway runs each test case separately(and the Initialize/Terminate calls are anyway not very expensive). It will howevermake running all tests in a single executable slightly slower.Reviewers: labath, JDevlieghere, martong, espindola, shafikReviewed By: labathSubscribers: mgorny, rnkovacs, emaste, MaskRay, abidh, lldb-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D71630
[Windows] Use information from the PE32 exceptions directory to construct unwind plansThis patch adds an implementation of unwinding using PE EH info. It allows toget almost ideal call stacks on 6
[Windows] Use information from the PE32 exceptions directory to construct unwind plansThis patch adds an implementation of unwinding using PE EH info. It allows toget almost ideal call stacks on 64-bit Windows systems (except some epiloguecases, but I believe that they can be fixed with unwind plan disassemblyaugmentation in the future).To achieve the goal the CallFrameInfo abstraction was made. It is based on theDWARFCallFrameInfo class interface with a few changes to make it lessDWARF-specific.To implement the new interface for PECOFF object files the class PECallFrameInfowas 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 rangescorresponding to every offset in prologue and builds the rows of the resultedunwind plan. The resulted plan covers the whole range of the function except theepilogue.Reviewers: jasonmolenda, asmith, amccarth, clayborg, JDevlieghere, stella.stamenova, labath, espindolaReviewed By: jasonmolendaSubscribers: leonid.mashinskiy, emaste, mgorny, aprantl, arichardson, MaskRay, lldb-commits, llvm-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D67347llvm-svn: 374528