summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
Commit message (Collapse)AuthorAgeFilesLines
* Add support for DW_FORM_GNU_[addr,str]_indexTamas Berghammer2015-08-2512-108/+178
| | | | | | | | | These are 2 new value currently in experimental status used when split debug info is enabled. Differential revision: http://reviews.llvm.org/D12238 llvm-svn: 245931
* Fix buffer overflow for fixed_form_sizesTamas Berghammer2015-08-257-25/+67
| | | | | | | | | | The array is indexed by the value in the DW_FORM filed what can be bigger then the size of the array. This CL add bound checking to avoid buffer overflows Differential revision: http://reviews.llvm.org/D12239 llvm-svn: 245930
* Fix build on mipsSagar Thakur2015-08-251-10/+3
| | | | | | | | | | Setting and getting register values as bytes instead of depending on the 128 bit integer support in register value. This patch will fix the build failure in the release branch. Reviewers: tberghammer, clayborg, hans Subscribers: bhushan, nitesh.jain, jaydeep, lldb-commits Differential: http://reviews.llvm.org/D12275 llvm-svn: 245927
* Final bit of type system cleanup that abstracts declaration contexts into ↵Greg Clayton2015-08-2429-457/+519
| | | | | | | | | | | | | | | | | | | | 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
* Reorg code to allow Windows Process Plugins to share some common code.Adrian McCarthy2015-08-2428-1406/+1406
| | | | | | Differential Revision: http://reviews.llvm.org/D12252 llvm-svn: 245850
* Simplify NativeThreadLinux includesPavel Labath2015-08-241-4/+1
| | | | | | | there is no need to include architecture-specific register contexts when the generic one will suffice. llvm-svn: 245839
* Add absolute load address support for the DynamicLoader pluginsTamas Berghammer2015-08-245-51/+74
| | | | | | | | | | | | 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
* [NativeProcessLinux] Pass around threads by referencePavel Labath2015-08-242-249/+185
| | | | | | | | | | | | | | | | Summary: Most NPL private functions took (shared) pointers to threads as arguments. This meant that the callee could not be sure if the pointer was valid and so most functions were peppered with null-checks. Now, I move the check closer to the source, and pass around the threads as references (which are then assumed to be valid). Reviewers: tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12237 llvm-svn: 245831
* 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
* Implement handling of `library:` keys in thread stop replies.Stephane Sezer2015-08-211-0/+4
| | | | | | | | | | | | | | | | | | | | Summary: When a windows remote stops because of a DLL load/unload, the debug server sends a stop reply packet that contains a `library` key with any value (usually just `library:1`). This indicates to the debugger that a library has been loaded or unloaded and that the list of libraries should be refreshed (usually with `qXfer:libraries:read`). This change just triggers a call to `LoadModules()` which in turns will send a remote library read command when a stop reply that requests it is received. Reviewers: clayborg, zturner, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12218 llvm-svn: 245708
* Fix BuildAddressRangeTable function when no debug arranges presentTamas Berghammer2015-08-211-2/+4
| | | | llvm-svn: 245696
* Fix assertion failure caused by r245546Tamas Berghammer2015-08-212-11/+25
| | | | | | | | Change the way EmulateInstruction::eContextPopRegisterOffStack handled in UnwindAssemblyInstEmulation::WriteRegister to accomodate for additional cases when eContextPopRegisterOffStack (pop PC/FLAGS). llvm-svn: 245690
* [NativeProcessLinux] Reduce the number of castsPavel Labath2015-08-212-68/+61
| | | | | | | | | | | | | | | Summary: NPL used to be peppered with casts of the NativeThreadProtocol objects into NativeThreadLinux. I move these closer to the source where we obtain these objects. This way, the rest of the code can assume we are working with the correct type of objects. Reviewers: ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12187 llvm-svn: 245681
* The llvm Triple for an armv6m now comes back as llvm::Triple::thumb.Jason Molenda2015-08-215-7/+14
| | | | | | | | | | | | | | This was breaking disassembly for arm machines that we force to be thumb mode all the time because we were only checking for llvm::Triple::arm. i.e. armv6m (ARM Cortex-M0) armv7m (ARM Cortex-M3) armv7em (ARM Cortex-M4) <rdar://problem/22334522> llvm-svn: 245645
* Make UriParser to support [$HOSTNAME] notation.Oleksiy Vyalov2015-08-204-17/+58
| | | | | | http://reviews.llvm.org/D12025 llvm-svn: 245639
* 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
* [ProcessWindows] Fix rare crash on shutdown.Zachary Turner2015-08-201-0/+3
| | | | | | | | There might be an underlying race condition here that should be figured out, but this at least prevents the crash for the time being and doesn't appear to have any adverse effects. llvm-svn: 245626
* Understand absolute base addresses in ProcessGDBRemote::GetLoadedModuleList.Stephane Sezer2015-08-202-8/+28
| | | | | | | | | | | | | | | | Summary: This is useful when dealing with Windows remote that use only the qXfer:libraries command which returns absolute base addresses, as opposed to qXfer:libraries-svr4 which returns relative offsets for module bases. Reviewers: clayborg, zturner, ADodds Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12204 llvm-svn: 245625
* Fix some format strings in ProcessGDBRemote.cpp.Stephane Sezer2015-08-201-2/+2
| | | | | | | | | | | | Summary: Size specifier should come after `%` not before. Reviewers: clayborg, ADodds Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12203 llvm-svn: 245608
* Improve instruction emulation based stack unwindingTamas Berghammer2015-08-203-10/+24
| | | | | | | | | | | On ARM there is no difference petween a pop and a load instruction so a register can be loaded multiple times during the function. Add check to threat the load as a restore only if it do the restore from the same location where the register was saved. Differential revision: http://reviews.llvm.org/D11947 llvm-svn: 245546
* [NativeProcessLinux] Fix a bug in instruction-stepping over thread creationPavel Labath2015-08-204-257/+107
| | | | | | | | | | | | | | | | | | | | | | | Summary: There was a bug in NativeProcessLinux, where doing an instruction-level single-step over the thread-creation syscall resulted in loss of control over the inferior. This happened because after the inferior entered the thread-creation maintenance stop, we unconditionally performed a PTRACE_CONT, even though the original intention was to do a PTRACE_SINGLESTEP. This is fixed by storing the original state of the thread before the stop (stepping or running) and then performing the appropriate action when resuming. I also get rid of the callback in the ThreadContext structure, which stored the lambda used to resume the thread, but which was not used consistently. A test verifying the correctness of the new behavior is included. Reviewers: ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12104 llvm-svn: 245545
* If the filename specified by plugin.process.gdb-remote.target-definition-file,Jason Molenda2015-08-201-0/+5
| | | | | | doesn't exist, see if it needs tilde expansion before we ignore it completely. llvm-svn: 245537
* When the target definition is unparseable, print an error messageJason Molenda2015-08-201-0/+7
| | | | | | | | | to the user. e.g. specified via the plugin.process.gdb-remote.target-definition-file setting. Currently we silently ignore the target definition if there is a parse error. llvm-svn: 245536
* Read exception records from Windows mini dumpAdrian McCarthy2015-08-193-25/+86
| | | | | | Differential Revision: http://reviews.llvm.org/D12126 llvm-svn: 245495
* On Linux, clear the signal mask of the launched inferiorPavel Labath2015-08-191-1/+11
| | | | | | | | | | | | | | | | | | | Summary: Due to fork()/execve(), the launched inferior inherits the signal mask of its parent (lldb-server). But because lldb-server modifies its signal mask (It blocks SIGCHLD, for example), the inferior starts with some signals being initially blocked. One consequence is that TestCallThatRestarts.ExprCommandThatRestartsTestCase (test/expression_command/call-restarts) fails because sigchld_handler() in lotta-signals.c is not called, due to the SIGCHLD signal being blocked. To prevent the signal masking done by lldb-server from affecting the created inferior, the signal mask of the inferior is now cleared before the execve(). Patch by: Yacine Belkadi Reviewers: ovyalov, labath Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12138 llvm-svn: 245436
* Fix lldb-server arm-linux-g++ buildOmair Javaid2015-08-191-1/+1
| | | | llvm-svn: 245428
* Fix resolution conflict between global and class static variables in C++Paul Herman2015-08-181-2/+5
| | | | llvm-svn: 245381
* More abstraction to get almost all clang specific DWARF parsing code into ↵Greg Clayton2015-08-186-308/+33
| | | | | | ClangASTContext. llvm-svn: 245376
* Fix Clang-tidy misc-use-override warnings in some files in ↵Pavel Labath2015-08-181-4/+4
| | | | | | | | | | include/lldb/Core, unify closing inclusion guards patch by Eugene Zelenko Differential Revision: http://reviews.llvm.org/D11695 llvm-svn: 245275
* Fix AArch64 watchpoint exception handlingOmair Javaid2015-08-181-1/+3
| | | | | | http://reviews.llvm.org/D11987 llvm-svn: 245273
* [LLGS] Avoid misrepresenting log lines as inferior outputPavel Labath2015-08-181-1/+4
| | | | | | | | | | | | | | | | Summary: in case we are logging to stdout, any log lines from the forked child can be misconstrued to be inferior output. To avoid this, we disable all logging immediately after forking. I also fix the implementatoion of DisableAllLogChannels, which was a no-op before this commit. Reviewers: clayborg, ovyalov Subscribers: dean, lldb-commits Differential Revision: http://reviews.llvm.org/D12083 llvm-svn: 245272
* Remove unintentional ;'s.Jason Molenda2015-08-181-2/+2
| | | | llvm-svn: 245261
* Make sure to save the types we parse in our SymbolFile's type list so they ↵Greg Clayton2015-08-171-3/+11
| | | | | | don't get deleted. llvm-svn: 245237
* [LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 ↵Sagar Thakur2015-08-1716-345/+1172
| | | | | | | | | | | | | | | | mode support This patch : - Fixes offsets of all register sets for Mips. - Adds MSA register set and FRE=1 mode support for FP register set. - Separates lldb register numbers and register infos of freebsd/mips64 from linux/mips64. - Re-orders the register numbers of all kinds for mips to be consistent with freebsd order of register numbers. Reviewers: jaydeep, clayborg, jasonmolenda, ovyalov, emaste Subscribers: tberghammer, ovyalov, emaste, mohit.bhakkad, nitesh.jain, bhushan Differential: http://reviews.llvm.org/D10919 llvm-svn: 245217
* Update DynamicRegisterInfo::SetRegisterInfo to accept eh_frame registerJason Molenda2015-08-151-1/+7
| | | | | | | | numbers in the key name "ehframe" or "eh_frame" in addition to the deprecated "gcc" name (e.g. from a plugin.process.gdb-remote.target-definition-file python file). llvm-svn: 245151
* A messy bit of cleanup: Move towards more descriptive namesJason Molenda2015-08-1532-64/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for eh_frame and stabs register numberings. This is not complete but it's a step in the right direction. It's almost entirely mechanical. lldb informally uses "gcc register numbering" to mean eh_frame. Why? Probably because there's a notorious bug with gcc on i386 darwin where the register numbers in eh_frame were incorrect. In all other cases, eh_frame register numbering is identical to dwarf. lldb informally uses "gdb register numbering" to mean stabs. There are no official definitions of stabs register numbers for different architectures, so the implementations of gdb and gcc are the de facto reference source. There were some incorrect uses of these register number types in lldb already. I fixed the ones that I saw as I made this change. This commit changes all references to "gcc" and "gdb" register numbers in lldb to "eh_frame" and "stabs" to make it clear what is actually being represented. lldb cannot parse the stabs debug format, and given that no one is using stabs any more, it is unlikely that it ever will. A more comprehensive cleanup would remove the stabs register numbers altogether - it's unnecessary cruft / complication to all of our register structures. In ProcessGDBRemote, when we get register definitions from the gdb-remote stub, we expect to see "gcc:" (qRegisterInfo) or "gcc_regnum" (qXfer:features:read: packet to get xml payload). This patch changes ProcessGDBRemote to also accept "ehframe:" and "ehframe_regnum" from these remotes. I did not change GDBRemoteCommunicationServerLLGS or debugserver to send these new packets. I don't know what kind of interoperability constraints we might be working under. At some point in the future we should transition to using the more descriptive names. Throughout lldb we're still using enum names like "gcc_r0" and "gdb_r0", for eh_frame and stabs register numberings. These should be cleaned up eventually too. The sources link cleanly on macosx native with xcode build. I don't think we'll see problems on other platforms but please let me know if I broke anyone. llvm-svn: 245141
* Fix Android build.Oleksiy Vyalov2015-08-141-1/+1
| | | | llvm-svn: 245129
* Unbreak the windows and linux buildbots.Greg Clayton2015-08-141-3/+3
| | | | llvm-svn: 245122
* Don't crash if we don't have a type system for a language.Greg Clayton2015-08-141-1/+1
| | | | llvm-svn: 245121
* Move all clang type system DWARF type parsing into ClangASTContext.cpp.Greg Clayton2015-08-145-3911/+239
| | | | | | Another step towards isolating all language/AST specific code into the files to further abstract specific implementations of parsing types for a given language. llvm-svn: 245090
* Fixed build failures caused by rL245026. Changed occurrences of ClangASTType ↵Bhushan D. Attarde2015-08-141-3/+3
| | | | | | to CompilerType. llvm-svn: 245033
* Handle floating point and aggregate return types in SysV-mips64 ABIBhushan D. Attarde2015-08-141-15/+300
| | | | | | | | | | | SUMMARY: This patch adds support of floating point and aggregate return types in GetReturnValueObjectImpl() for mips64. Reviewers: clayborg, jingham Subscribers: mohit.bhakkad, nitesh.jain, sagar, jaydeep, lldb-commits Differential Revision: http://reviews.llvm.org/D11641 llvm-svn: 245026
* [MIPS]Handle floating point and aggregate return types in SysV-mips [32 bit] ABIBhushan D. Attarde2015-08-141-3/+50
| | | | | | | | | | | SUMMARY: This patch adds support of floating point and aggregate return types in GetReturnValueObjectImpl() for mips32 Reviewers: clayborg Subscribers: mohit.bhakkad, nitesh.jain, sagar, jaydeep, lldb-commits Differential Revision: http://reviews.llvm.org/D11930 llvm-svn: 245020
* Add a better fix for searching for spaces in BSD archive object names where ↵Greg Clayton2015-08-141-5/+7
| | | | | | | | we only trim trailing spaces. I made an example where I had a file named "testtesttestt .o" (16 chars) that I was able to put into a .a file and we would previously truncate the object name to "testtesttestt" since we searched for any space in the name. I believe the BSD archive docs say that filenames with spaces will use the extended format, but our current libtool doesn't so I wanted to fix it by only removing trailing spaces. llvm-svn: 244992
* Don't crash when we have a .a file that contains an object with a 16 ↵Greg Clayton2015-08-131-1/+3
| | | | | | | | character name. Any calls to std::string::erase must be bounds checked. <rdar://problem/22260988> llvm-svn: 244984
* Remove more uses of raw_svector_ostream::flush() call following r244928.Yaron Keren2015-08-131-1/+0
| | | | llvm-svn: 244936
* Removing redundant check from r244875Ravitheja Addepally2015-08-131-12/+6
| | | | llvm-svn: 244886
* Add missing include to RegisterInfoInterface.hTamas Berghammer2015-08-131-0/+2
| | | | llvm-svn: 244881
* Fix Linux build after r244875Tamas Berghammer2015-08-131-10/+2
| | | | llvm-svn: 244877
OpenPOWER on IntegriCloud