summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader
Commit message (Collapse)AuthorAgeFilesLines
...
* Changes for Bug 17384Ravitheja Addepally2015-10-282-2/+33
| | | | | | | | | | | | | | | | | | | | | | | Summary: Virtual dynamic shared objects, or vdso files were not loaded for Linux OS.In Bug 17384 the call stack could not be unwinded from functions residing in the vdso object. This commit adds support for loading such files by reading the Aux vectors since a vdso is invisibily mapped to the inferiors address space and the actual file is not present in the filesystem. The presence of the vdso is detected by inspecting the Aux vector for AT_SYSINFO_EHDR tag. Reviewers: lldb-commits, ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14118 llvm-svn: 251505
* Fix Clang-tidy modernize-use-override warnings in some files in ↵Eugene Zelenko2015-10-216-118/+114
| | | | | | | | source/Plugins; other minor fixes. Differential Revision: http://reviews.llvm.org/D13916 llvm-svn: 250872
* Make use of lldv::Triple::isAndroidTamas Berghammer2015-10-141-11/+5
| | | | | | | | It is a new function added to the llvm::Triple class to simplify the checking if we are targeting android to clean up the confusion between android being an OS or an environment. llvm-svn: 250286
* Remove long-forgotten plugin virtuals.Bruce Mitchener2015-10-094-52/+0
| | | | | | | | | | | | | | | Summary: EnablePluginLogging, GetPluginCommandHelp and ExecutePluginCommand aren't implemented or used anywhere, so remove them from the Hexagon and POSIX Dynamic Loaders as well as the FreeBSD process. Reviewers: clayborg, labath, emaste Subscribers: lldb-commits, emaste Differential Revision: http://reviews.llvm.org/D13581 llvm-svn: 249840
* Restrict the scope of a hack in DYLDRendezvousTamas Berghammer2015-10-011-5/+23
| | | | | | | | | | The hack is there to work around an incorrect load address reported by the android linker on API 21 and 22 devices. This CL restricts the hack to those android API levels. Differential revision: http://reviews.llvm.org/D13288 llvm-svn: 249012
* [cmake] Remove LLVM_NO_RTTI.Bruce Mitchener2015-09-036-12/+0
| | | | | | | | | | | | | | Summary: This doesn't exist in other LLVM projects any longer and doesn't do anything. Reviewers: chaoren, labath Subscribers: emaste, tberghammer, lldb-commits, danalbert Differential Revision: http://reviews.llvm.org/D12586 llvm-svn: 246749
* Major DWARF cleanup.Greg Clayton2015-08-262-2/+2
| | | | | | | | | | Added a new class called DWARFDIE that contains a DWARFCompileUnit and DWARFDebugInfoEntry so that these items always stay together. There were many places where we just handed out DWARFDebugInfoEntry pointers and then use them with a compile unit that may or may not be the correct one. Clients outside of DWARFCompileUnit and DWARFDebugInfoEntry should all be dealing with DWARFDIE instances instead of playing with DWARFCompileUnit/DWARFDebugInfoEntry pairs manually. This paves to the way for some modifications that are coming for DWO. llvm-svn: 246100
* Fix missing override warningsEnrico Granata2015-08-262-15/+15
| | | | llvm-svn: 246084
* Final bit of type system cleanup that abstracts declaration contexts into ↵Greg Clayton2015-08-241-2/+2
| | | | | | | | | | | | | | | | | | | | lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. Create a new "lldb_private::CompilerDeclContext" class that will replace all direct uses of "clang::DeclContext" when used in compiler agnostic code, yet still allow for conversion to clang::DeclContext subclasses by clang specific code. This completes the abstraction of type parsing by removing all "clang::" references from the SymbolFileDWARF. The new "lldb_private::CompilerDeclContext" class abstracts decl contexts found in compiler type systems so they can be used in internal API calls. The TypeSystem is required to support CompilerDeclContexts with new pure virtual functions that start with "DeclContext" in the member function names. Converted all code that used lldb_private::ClangNamespaceDecl over to use the new CompilerDeclContext class and removed the ClangNamespaceDecl.cpp and ClangNamespaceDecl.h files. Removed direct use of clang APIs from SBType and now use the abstract type systems to correctly explore types. Bulk renames for things that used to return a ClangASTType which is now CompilerType: "Type::GetClangFullType()" to "Type::GetFullCompilerType()" "Type::GetClangLayoutType()" to "Type::GetLayoutCompilerType()" "Type::GetClangForwardType()" to "Type::GetForwardCompilerType()" "Value::GetClangType()" to "Value::GetCompilerType()" "Value::SetClangType (const CompilerType &)" to "Value::SetCompilerType (const CompilerType &)" "ValueObject::GetClangType ()" to "ValueObject::GetCompilerType()" many more renames that are similar. llvm-svn: 245905
* Add absolute load address support for the DynamicLoader pluginsTamas Berghammer2015-08-244-25/+36
| | | | | | | | | | | | The POSIX linker generally reports the load bias for the loaded libraries but in some case it is useful to handle a library based on absolute load address. Example usecases: * Windows linker uses absolute addresses * Library list came from different source (e.g. /proc/<pid>/maps) Differential revision: http://reviews.llvm.org/D12233 llvm-svn: 245834
* Revert "Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD."Zachary Turner2015-08-211-28/+0
| | | | | | | | | This reverts commit 7749a10ddbe22767d0e055753c674fcde7f28d39. This commit introduces about 15-20 new test failures with windows local targets. llvm-svn: 245765
* Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD.Stephane Sezer2015-08-211-0/+28
| | | | | | | | | | | | | | | | | | | | Summary: This commit implements basic DidAttach and DidLaunch for the windows DynamicLoader plugin which allow us to load shared libraries from the inferior. At the moment, I'm unsure how we're going to gather the load address of the main module over gdb protocol so I always use an offset of 0, which works well for processes we create ourselves (no randomization). I will address this point later on. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12245 llvm-svn: 245725
* Run clang-format on DynamicLoaderWindowsDYLD.Stephane Sezer2015-08-202-27/+28
| | | | | | | | | | | | | | Summary: This uses the .clang-format at the root of the LLDB repo and is just a mechanical change that precedes more work in this file. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12217 llvm-svn: 245634
* ClangASTType is now CompilerType.Greg Clayton2015-08-111-2/+2
| | | | | | This is more preparation for multiple different kinds of types from different compilers (clang, Pascal, Go, RenderScript, Swift, etc). llvm-svn: 244689
* Add some initial logging for when lldb is searching for binaries,Jason Molenda2015-07-251-0/+10
| | | | | | | | | dSYMs, or reading binaries out of memory to the 'Host' log channel. There's more to be done here, both for Mac and for other platforms, but the initial set of new loggings are useful enough to check in at this point. llvm-svn: 243200
* Add UNUSED_IF_ASSERT_DISABLED and apply it.Bruce Mitchener2015-07-241-1/+1
| | | | | | | | | | | | | | | Summary: This replaces (void)x; usages where they x was subsequently involved in an assertion with this macro to make the intent more clear. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11451 llvm-svn: 243074
* Add support for specifying a language to use when parsing breakpoints.Dawn Perchik2015-07-211-0/+1
| | | | | | | | | | | | | | | | | | | | Target and breakpoints options were added: breakpoint set --language lang --name func settings set target.language pascal These specify the Language to use when interpreting the breakpoint's expression (note: currently only implemented for breakpoints on identifiers). If the breakpoint language is not set, the target.language setting is used. This support is required by Pascal, for example, to set breakpoint at 'ns.foo' for function 'foo' in namespace 'ns'. Tests on the language were also added to Module::PrepareForFunctionNameLookup for efficiency. Reviewed by: clayborg Subscribers: jingham, lldb-commits Differential Revision: http://reviews.llvm.org/D11119 llvm-svn: 242844
* [Makefiles] Align library names with CMake buildKeno Fischer2015-07-142-6/+6
| | | | | | | | | | | | Summary: This aligns the library names used by the Makefile build to be the same as those create by the CMake build to make switching between the two easier. The only major difficulty was lldbHost which was one library in the CMake system and several in the Makefile system. Most of the other changes are trivial renames. Reviewers: labath Subscribers: emaste, tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D11154 llvm-svn: 242196
* Use target.exec-search-paths setting when resolving executable path for ↵Oleksiy Vyalov2015-07-141-1/+3
| | | | | | | | remote target. http://reviews.llvm.org/D11163 llvm-svn: 242183
* Expression evaluation, a new ThreadPlanCallFunctionUsingABI for executing a ↵Ewan Crawford2015-07-142-1/+4
| | | | | | | | | | | | | | | | | | | | function call on target via register manipulation For Hexagon we want to be able to call functions during debugging, however currently lldb only supports this when there is JIT support. Although emulation using IR interpretation is an alternative, it is currently limited in that it can't make function calls. In this patch we have extended the IR interpreter so that it can execute a function call on the target using register manipulation. To do this we need to handle the Call IR instruction, passing arguments to a new thread plan and collecting any return values to pass back into the IR interpreter. The new thread plan is needed to call an alternative ABI interface of "ABI::PerpareTrivialCall()", allowing more detailed information about arguments and return values. Reviewers: jingham, spyffe Subscribers: emaste, lldb-commits, ted, ADodds, deepak2427 Differential Revision: http://reviews.llvm.org/D9404 llvm-svn: 242137
* Avoid dependency on uuid.h in MacOSXDYLDPavel Labath2015-07-131-2/+2
| | | | | | | | | | | | | | | | Summary: r241964 has added a dependency on uuid.h, which (on linux at least) necessitates instalation of a new package. Since the only thing we need from that file is uuid_t (and this is already defined in UuidCompatibility.h), we can avoid this dependency by making this include __APPLE__ specific. If in future, we need more from this library, we can revisit this decision. Reviewers: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11135 llvm-svn: 242022
* Add a another packet to the gdb-remote protocol,Jason Molenda2015-07-102-0/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | jGetLoadedDynamicLibrariesInfos. This packet is similar to qXfer:libraries:read except that lldb supplies the number of solibs that should be reported about, and the start address for the list of them. At the initial process launch we'll read the full list of solibs linked by the process -- at this point we could be using qXfer:libraries:read -- but on subsequence solib-loaded notifications, we'll be fetching a smaller number of solibs, often only one or two. A typical Mac/iOS GUI app may have a couple hundred different solibs loaded - doing all of the loads via memory reads takes a couple of megabytes of traffic between lldb and debugserver. Having debugserver summarize the load addresses of all the solibs and sending it in JSON requires a couple of hundred kilobytes of traffic. It's a significant performance improvement when communicating over a slower channel. This patch leaves all of the logic for loading the libraries in DynamicLoaderMacOSXDYLD -- it only call over ot ProcesGDBRemote to get the JSON result. If the jGetLoadedDynamicLibrariesInfos packet is not implemented, the normal technique of using memory read packets to get all of the details from the target will be used. <rdar://problem/21007465> llvm-svn: 241964
* Unbreak Makefile buildKeno Fischer2015-07-091-0/+14
| | | | llvm-svn: 241820
* Make many mangled functions that might demangle a name be allowed to specify ↵Greg Clayton2015-07-083-4/+4
| | | | | | a language to use in order to soon support Pascal and Java demangling. Dawn Perchik will take care of making this so. llvm-svn: 241751
* Move WindowsDYLD to the Plugins/DynamicLoader directory.Stephane Sezer2015-07-084-1/+151
| | | | | | | | | | | | | | | | | | | | | Summary: This commit moves the Windows DyanamicLoader to the common DynamicLoader directory. This is required to remote debug Windows targets. This commit also initializes the Windows DYLD plugin in SystemInitializerCommon (similarly to both POSIX and MacOSX DYLD plugins) so that we can automatically instantiate this class when connected to a windows process. Test Plan: Build. Reviewers: zturner Subscribers: lldb-commits, abdulras Differential Revision: http://reviews.llvm.org/D10882 llvm-svn: 241697
* Fix [vdso] handling on Android (x86 and aarch64)Tamas Berghammer2015-06-301-6/+8
| | | | | | | | | | | | | | * Add in-memory object file handling to the core dynamic loader * Fix in memory object file handling in ObjectFileELF (previously only part of the file was loaded before parsing) * Fix load address setting in ObjectFileELF for 32-bit targets when the load bias is negative * Change hack in DYLDRendezvous.cpp to be more specific and not to interfere with object files with fixed load address Differential revision: http://reviews.llvm.org/D10800 llvm-svn: 241057
* Unbreak the build.Greg Clayton2015-06-252-2/+2
| | | | llvm-svn: 240711
* Resubmitting 240466 after fixing the linux test suite failures.Greg Clayton2015-06-253-8/+10
| | | | | | | | | | | | | | | 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
* Add comment for workarond in DYLDRendezvous with android versionTamas Berghammer2015-06-191-0/+1
| | | | llvm-svn: 240166
* Fetch object file load address if it isn't specified by the linkerTamas Berghammer2015-06-181-0/+11
| | | | | | Differential revision: http://reviews.llvm.org/D10490 llvm-svn: 240052
* Fix duplicate shared module list entriesAidan Dodds2015-06-181-0/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D10499 llvm-svn: 240007
* Fix TestNamespace and TestThreadJump for remote Windows to Android.Chaoren Lin2015-06-053-29/+27
| | | | | | | | | | | | | | | | Summary: Update DYLDRendezvous and SOEntry to use FileSpecs instead of storing paths as strings, which caused incorrect comparison results due to denormalization. Reviewers: clayborg, vharron, ovyalov Reviewed By: ovyalov Subscribers: jwolfe, emaste, tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10267 llvm-svn: 239195
* Don't #include "lldb-python.h" from anywhere.Zachary Turner2015-05-291-2/+0
| | | | | | | | | | | | | Since interaction with the python interpreter is moving towards being more isolated, we won't be able to include this header from normal files anymore, all includes of it should be localized to the python library which will live under source/bindings/API/Python after a future patch. None of the files that were including this header actually depended on it anyway, so it was just a dead include in every single instance. llvm-svn: 238581
* Fix the logic in DynamicLoaderMacOSXDYLD::Clear that would only remove the ↵Jim Ingham2015-05-211-3/+8
| | | | | | | | | | | | old dyld notification breakpoint only if the process it was for is still alive. We need to always remove this because it has a pointer to the old loader, and if we ever hit it we will crash. I also put in a sanity check in the callback function to make sure we don't invoke it if the process is wrong. <rdar://problem/21006189> llvm-svn: 237866
* Fix a few compile warningsIlia K2015-05-131-1/+1
| | | | llvm-svn: 237238
* Fixed a ton of gcc compile warningsVince Harron2015-05-131-1/+1
| | | | | | | | | | Removed some unused variables, added some consts, changed some casts to const_cast. I don't think any of these changes are very controversial. Differential Revision: http://reviews.llvm.org/D9674 llvm-svn: 237218
* Remove check for object file type from DynamicLoaderPOSIXDYLD::DidAttachTamas Berghammer2015-05-081-4/+0
| | | | | | | | For PIE executables the type of the main executable is shared object so we can't force that the main executable should have the type of executable. llvm-svn: 236870
* Re-enable compute load address for shared modulesTamas Berghammer2015-05-081-3/+0
| | | | | | It is required because of systems using PIE code llvm-svn: 236826
* This patch allows LLDB to use the $qXfer:Libraries: packet.Aidan Dodds2015-05-081-4/+37
| | | | | | Differential Revision: http://reviews.llvm.org/D9471 llvm-svn: 236817
* Replace use of %zu with PRIu64 in DYDL logging message.Aidan Dodds2015-04-231-1/+1
| | | | llvm-svn: 235598
* [LLDB][MIPS] Add MIPS32 and MIPS64 core revisionsMohit K. Bhakkad2015-04-231-3/+4
| | | | | | | | | | | | | | | Patch by Jaydeep Patil Added MIPS32 and MIPS64 core revisions. This would be followed by register context and emulate-instruction for MIPS32. DYLDRendezvous.cpp: On Linux link map struct does not contain extra load offset field. Reviewers: clayborg Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D9190 llvm-svn: 235574
* Fix DynamicLoaderMacOSXDYLD to deal with new shared cache changes.Greg Clayton2015-03-311-1/+1
| | | | | | <rdar://problem/20357466> llvm-svn: 233714
* Fix build on OS X after r233061Ilia K2015-03-241-1/+1
| | | | | | | | This includes following: # Add a missing Process argument when calling GetSharedModule in DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule # Fix PlatformDarwinKernel::GetSharedModule prototype llvm-svn: 233084
* Initialize ObjC runtime at the right location.Stephane Sezer2015-03-231-18/+0
| | | | | | | | | | | | | | | | Summary: Saw this while reading some code in DynamicLoader classes. Looks like this has been a FIXME since 2011 at least. Test Plan: Run unit tests. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8558 llvm-svn: 232983
* Do not assert on POSIXDYLD double-eAdd.Stephane Sezer2015-03-231-1/+6
| | | | | | | | | | | | | | | | Summary: This has been discovered while experimenting with the gecko linker on android. In general, assert()'ing on "user input" is a bad idea. Test Plan: Run unit tests. Reviewers: clayborg, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8495 llvm-svn: 232966
* Extend Platform(s) in order to cache remote executables using ModuleCache ↵Oleksiy Vyalov2015-03-132-21/+40
| | | | | | | | and make POSIX dynamic loader to use this flow when attaching to a remote target. http://reviews.llvm.org/D8306 llvm-svn: 232194
* Fix SO entry is main executable detection on androidTamas Berghammer2015-03-131-5/+8
| | | | | | | | | | | | | * On Android (at least on platfrom-21 x86) the dynamic linker reports the executable with its full path * Use the platform path of the executable when storing it into the cache (used to identify the SO entry for the executable) as this is the path what will be reported by the dynamic linker. If the platform path isn't set (local debugging) then it falls back to the normal file path. Differential revision: http://reviews.llvm.org/D8296 llvm-svn: 232158
* If the user specifies a kernel binary that isn't correct for the currentJason Molenda2015-03-101-11/+12
| | | | | | | | | kernel debug session, instead of issuing a warning (which on one ever sees), drop the user-specified kernel binary Module from the target and try to discover the correct one dynamically. <rdar://problem/19450329> llvm-svn: 231885
* Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer ↵Oleksiy Vyalov2015-03-101-0/+1
| | | | | | | | - in order to allow modules caching from remote targets. http://reviews.llvm.org/D8037 llvm-svn: 231734
* Fix build on OS X after r231202Ilia K2015-03-041-0/+1
| | | | llvm-svn: 231235
OpenPOWER on IntegriCloud