summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
Commit message (Collapse)AuthorAgeFilesLines
...
* Jim told me about a cleaner way to include headers from plug-ins.Sean Callanan2015-09-032-2/+2
| | | | | | | | This is still something I need to fix, but at least it's not so ugly, and it's consistent with the other code that does that so we will catch it when we purge all such code. llvm-svn: 246738
* In preparation for factoring persistent variables into a generic part and aSean Callanan2015-09-032-2/+2
| | | | | | | | | | | | Clang-specific part, create the ExpressionVariable source/header file and move ClangExpressionVariable into the Clang expression parser plugin. It is expected that there are some ugly #include paths... these will be resolved by either (1) making that code use generic expression variables (once they're separated appropriately) or (2) moving that code into a plug-in, often the expression parser plug-in. llvm-svn: 246737
* Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify ↵Pavel Labath2015-09-0228-194/+130
| | | | | | | | | | closing inclusion guards patch by Eugene Zelenko. Differential Revision: http://reviews.llvm.org/D12207 llvm-svn: 246628
* Move things from the LanguageRuntime that obviously belong in the new ↵Jim Ingham2015-09-023-5/+7
| | | | | | Language plugin instead. llvm-svn: 246611
* Remove class Language - the only thing it was actually being used for is ↵Enrico Granata2015-08-271-1/+0
| | | | | | provided by LanguageRuntime already llvm-svn: 246177
* Final bit of type system cleanup that abstracts declaration contexts into ↵Greg Clayton2015-08-244-10/+10
| | | | | | | | | | | | | | | | | | | | 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
* ClangASTType is now CompilerType.Greg Clayton2015-08-114-7/+7
| | | | | | This is more preparation for multiple different kinds of types from different compilers (clang, Pascal, Go, RenderScript, Swift, etc). llvm-svn: 244689
* First step in getting LLDB ready to support multiple different type systems.Greg Clayton2015-08-111-1/+2
| | | | | | | | This is the work done by Ryan Brown from http://reviews.llvm.org/D8712 that makes a TypeSystem class and abstracts types to be able to use a type system. All tests pass on MacOSX and passed on linux the last time this was submitted. llvm-svn: 244679
* Jim suggested to use eArgTypeAddressOrExpression for the addresses that ↵Enrico Granata2015-08-031-3/+3
| | | | | | 'memory find' takes llvm-svn: 243902
* Fix the memory find command such that it can actually take an expressionEnrico Granata2015-08-031-21/+11
| | | | llvm-svn: 243893
* Add another log to the Host channel for loggingJason Molenda2015-07-311-0/+6
| | | | | | the actions taken when trying to locate binaries. llvm-svn: 243732
* Specify a language to use when parsing expressions.Dawn Perchik2015-07-252-7/+15
| | | | | | | | | | | | This patch adds the option -l/--language to the expression command, for use when setting the language options or choosing an alternate FE. If not specified, the target.language setting is used. Reviewed by: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11447 llvm-svn: 243187
* Add option eTypeOptionHideEmptyAggregates.Siva Chandra2015-07-241-0/+4
| | | | | | | | | | | | | | | | | | Summary: For certain data structures, when the synthetic child provider returns zero children, a summary like "Empty instance of <typename>" could be more appropriate than something like "size=0 {}". This new option helps hide the trailing "{}". This is also exposed with a -h option for the command "type summary add". Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11473 llvm-svn: 243166
* Clean up wording in help for breakpoint --language option.Dawn Perchik2015-07-221-1/+1
| | | | llvm-svn: 242866
* Add support for specifying a language to use when parsing breakpoints.Dawn Perchik2015-07-211-0/+14
| | | | | | | | | | | | | | | | | | | | 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
* Fixed line wrapping for the "long help" content in LLDB commands. Content ↵Kate Stone2015-07-1410-525/+554
| | | | | | | | | | is now dynamically wrapped for the column width of the current terminal. Lines that begin with whitespace will be indented identically on subsequent lines to maintain formatting. Existing commands supplying this type of help content have been reworked to take advantage of the changes. In addition to formatting changes, content was changes for accuracy and clarity purposes. <rdar://problem/21269977> llvm-svn: 242122
* Refactor Unix signals.Chaoren Lin2015-07-141-22/+22
| | | | | | | | | | | | | | | | | | Summary: - Consolidate Unix signals selection in UnixSignals. - Make Unix signals available from platform. - Add jSignalsInfo packet to retrieve Unix signals from remote platform. - Get a copy of the platform signal for each remote process. - Update SB API for signals. - Update signal utility in test suite. Reviewers: ovyalov, clayborg Subscribers: chaoren, jingham, labath, emaste, tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D11094 llvm-svn: 242101
* Add new bugreport command to lldbTamas Berghammer2015-07-023-0/+182
| | | | | | | | | | | The new command add functionality to print out domain specific information for reporting a bug. Currently the only supported domain is stack unwinding (with "bugreport unwind") but adding new domains is fairly easy. Differential revision: http://reviews.llvm.org/D10868 llvm-svn: 241252
* When the user specifies a corefile that is not readable,Jason Molenda2015-06-261-0/+6
| | | | | | | | | | | give them a meaningful error message instead of "Unable to find process plug-in for core file ...". <rdar://problem/21255759> <rdar://problem/21091522> http://blog.ignoranthack.me/?p=204 llvm-svn: 240753
* Resubmitting 240466 after fixing the linux test suite failures.Greg Clayton2015-06-252-10/+9
| | | | | | | | | | | | | | | 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
* Improve instruction emulation based stack unwinding on ARMTamas Berghammer2015-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * Add and fix the emulation of several instruction. * Disable frame pointer usage on Android. * Specify return address register for the unwind plan instead of explict tracking the value of RA. * Replace prologue detection heuristics (unreliable in several cases) with a logic to follow the branch instructions and restore the CFI value based on them. The target address for a branch should have the same CFI as the source address (if they are in the same function). * Handle symbols in ELF files where the symbol size is not specified with calcualting their size based on the next symbol (already done in MachO files). * Fix architecture in FuncUnwinders with filling up the inforamtion missing from the object file with the architecture of the target. * Add code to read register wehn the value is set to "IsSame" as it meanse the value of a register in the parent frame is the same as the value in the current frame. Differential revision: http://reviews.llvm.org/D10447 llvm-svn: 240533
* Fix a variety of typos.Bruce Mitchener2015-06-182-4/+4
| | | | | | No functional change. llvm-svn: 239995
* Correct type in for loop to remove signedness warningEd Maste2015-06-171-1/+1
| | | | llvm-svn: 239918
* Enable 'command script import' to accept multiple modules to import in one ↵Enrico Granata2015-06-161-26/+29
| | | | | | | | invocation Fixes rdar://21388472 llvm-svn: 239839
* Revert "Introduce a TypeSystem interface to support adding non-clang languages."Pavel Labath2015-06-081-2/+1
| | | | | | This seems to break expression evaluation on the linux build. llvm-svn: 239366
* Introduce a TypeSystem interface to support adding non-clang languages.Pavel Labath2015-06-081-1/+2
| | | | | | | | | | | | | Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8712 Original Author: Ryan Brown <ribrdb@google.com> llvm-svn: 239360
* Refactor many file functions to use FileSpec over strings.Chaoren Lin2015-05-291-3/+3
| | | | | | | | | | | | | | | | | Summary: This should solve the issue of sending denormalized paths over gdb-remote if we stick to GetPath(false) in GDBRemoteCommunicationClient, and let the server handle any denormalization. Reviewers: ovyalov, zturner, vharron, clayborg Reviewed By: clayborg Subscribers: tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D9728 llvm-svn: 238604
* Don't #include "lldb-python.h" from anywhere.Zachary Turner2015-05-2929-58/+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
* Improve LLDB prompt handlingPavel Labath2015-05-272-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There is an issue in lldb where the command prompt can appear at the wrong time. The partial fix we have in for this is not working all the time and is introducing unnecessary delays. This change does: - Change Process:SyncIOHandler to use integer start id's for synchronization to avoid it being confused by quick start-stop cycles. I picked this up from a suggested patch by Greg to lldb-dev. - coordinates printing of asynchronous text with the iohandlers. This is also based on a (different) Greg's patch, but I have added stronger synchronization to it to avoid races. Together, these changes solve the prompt problem for me on linux (both with and without libedit). I think they should behave similarly on Mac and FreeBSD and I think they will not make matters worse for windows. Test Plan: Prompt comes out alright. All tests still pass on linux. Reviewers: clayborg, emaste, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9823 llvm-svn: 238313
* Add support for custom commands to set flags on themselvesEnrico Granata2015-05-2712-126/+128
| | | | | | | | | This works for Python commands defined via a class (implement get_flags on your class) and C++ plugin commands (which can call SBCommand::GetFlags()/SetFlags()) Flags allow features such as not letting the command run if there's no target, or if the process is not stopped, ... Commands could always check for these things themselves, but having these accessible via flags makes custom commands more consistent with built-in ones llvm-svn: 238286
* Add real time signals support to LinuxSignalsPavel Labath2015-05-221-3/+3
| | | | | | | | | | | | | | Summary: This enables correct handling of real time signals by lldb. Test Plan: Added a test that verifies handling of SIGRTMIN Reviewers: tberghammer, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9911 llvm-svn: 238009
* Default dst value for platform put-file.Chaoren Lin2015-05-201-2/+2
| | | | | | | | | | | | | | Summary: It should default to working-dir/src-filename if dst is not specified. Reviewers: clayborg, flackr Reviewed By: flackr Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9890 llvm-svn: 237831
* Add --move-to-nearest-code / target.move-to-nearest-code options (attempt 2)Ilia K2015-05-181-3/+28
| | | | | | | | | | | | This patch initially was committed in r237460 but later it was reverted (r237479) due to 4 new failures: * TestExitDuringStep.py * TestNumThreads.py * TestThreadExit.py * TestThreadStates.py This patch also fixes these tests. llvm-svn: 237566
* Reverting r237460 to fix test failures introduced on OSX & LinuxVince Harron2015-05-151-28/+3
| | | | | | | | | TestExitDuringStep.py TestNumThreads.py TestThreadExit.py TestThreadStates.py llvm-svn: 237479
* Add --move-to-nearest-code / target.move-to-nearest-code optionsIlia K2015-05-151-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This option forces to only set a source line breakpoint when there is an exact-match This patch includes the following commits: # Add the -m/--exact-match option in "breakpoint set" command ## Add exact_match arg in BreakpointResolverFileLine ctor ## Add m_exact_match field in BreakpointResolverFileLine ## Add exact_match arg in BreakpointResolverFileRegex ctor ## Add m_exact_match field in BreakpointResolverFileRegex ## Add exact_match arg in Target::CreateSourceRegexBreakpoint ## Add exact_match arg in Target::CreateBreakpoint ## Add -m/--exact-match option in "breakpoint set" command # Add target.exact-match option to skip BP if source line doesn't match ## Add target.exact-match global option ## Add Target::GetExactMatch ## Refactor Target::CreateSourceRegexBreakpoint to accept LazyBool exact_match (was bool) ## Refactor Target::CreateBreakpoint to accept LazyBool exact_match (was bool) # Add target.exact-match test in SettingsCommandTestCase # Add BreakpointOptionsTestCase tests to test --skip-prologue/--exact-match options # Fix a few typos in lldbutil.check_breakpoint_result func # Rename --exact-match/m_exact_match/exact_match/GetExactMatch to --move-to-nearest-code/m_move_to_nearest_code/move_to_nearest_code/GetMoveToNearestCode # Add exact_match field in BreakpointResolverFileLine::GetDescription and BreakpointResolverFileRegex::GetDescription, for example: was: ``` 1: file = '/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c', line = 12, locations = 1, resolved = 1, hit count = 2 1.1: where = a.out`main + 20 at main.c:12, address = 0x0000000100000eb4, resolved, hit count = 2 ``` now: ``` 1: file = '/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c', line = 12, exact_match = 0, locations = 1, resolved = 1, hit count = 2 1.1: where = a.out`main + 20 at main.c:12, address = 0x0000000100000eb4, resolved, hit count = 2 ``` Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb functionalities/breakpoint/ ./dotest.py -v --executable $BUILDDIR/bin/lldb settings/ ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/breakpoint/ Reviewers: jingham, clayborg Reviewed By: clayborg Subscribers: lldb-commits, clayborg, jingham Differential Revision: http://reviews.llvm.org/D9273 llvm-svn: 237460
* Remote Non-Stop SupportEwan Crawford2015-05-131-0/+6
| | | | | | | | | | | | | | | | | | | | Summary: This patch is the beginnings of support for Non-stop mode in the remote protocol. Letting a user examine stopped threads, while other threads execute freely. Non-stop mode is enabled using the setting target.non-stop-mode, which sends a QNonStop packet when establishing the remote connection. Changes are also made to treat the '?' stop reply packet differently in non-stop mode, according to spec https://sourceware.org/gdb/current/onlinedocs/gdb/Remote-Non_002dStop.html#Remote-Non_002dStop. A setting for querying the remote for default thread on setup is also included. Handling of '%' async notification packets will be added next. Reviewers: clayborg Subscribers: lldb-commits, ADodds, ted, deepak2427 Differential Revision: http://reviews.llvm.org/D9656 llvm-svn: 237239
* 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
* Platform settings doesn't need permission options.Chaoren Lin2015-05-121-3/+0
| | | | | | | | | | | | | | | | Summary: Also removes conflict error message for '-w' between --user-write and --working-dir. Reviewers: flackr, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9711 llvm-svn: 237178
* Don't call the Process::SyncIOHandler in Target::LaunchIlia K2015-05-071-1/+6
| | | | | | | | | | | | | | Summary: This patch moves synchronization of iohandler to CommandObjectProcessLaunch::DoExecute like it was done in CommandObjectProcessContinue::DoExecute. Reviewers: jingham, clayborg Reviewed By: clayborg Subscribers: lldb-commits, clayborg, jingham Differential Revision: http://reviews.llvm.org/D9373 llvm-svn: 236699
* Add language command and LanguageRuntime plugin changes to allow vending of ↵Colin Riley2015-05-043-0/+88
| | | | | | | | command objects. Differential Revision: http://reviews.llvm.org/D9402 llvm-svn: 236443
* Change process kill to call Process::Destroy (force_kill = true);Jason Molenda2015-05-011-1/+1
| | | | | | | | follow-up to the change in r235158. Right now if you attach to a process and type "kill", lldb doesn't kill it, it detaches. <rdar://problem/20691198> llvm-svn: 236363
* Factor resolution of abbreviations and aliases so that they can be tested ↵Adrian McCarthy2015-04-231-1/+1
| | | | | | directly. http://reviews.llvm.org/D9033 llvm-svn: 235633
* This is some groundwork for filtering the language ExceptionJim Ingham2015-04-221-9/+31
| | | | | | | | | | | | | | breakpoints, for instance on the class of the thrown object. This change doesn't actually make that work, the part where we extract the thrown object type from the throw site isn't done yet. This provides a general programmatic "precondition" that you can add to breakpoints to give them the ability to do filtering on the LLDB side before we pass the stop on to the user-provided conditions & callbacks. llvm-svn: 235538
* Add a "force_kill" arg to Process::Destroy(). This is needed afterJason Molenda2015-04-171-2/+2
| | | | | | | | | | | | | | | | | | the changes in r233255/r233258. Normally if lldb attaches to a running process, when we call Process::Destroy, we want to detach from the process. If lldb launched the process itself, ::Destroy should kill it. However, if we attach to a process and the driver calls SBProcess::Kill() (which calls Destroy), we need to kill it even if we didn't launch it originally. The force_kill param allows for the SBProcess::Kill method to force the behavior of Destroy. <rdar://problem/20424439> llvm-svn: 235158
* The last argument to CreateExceptionBreakpoint is "internal" not Hardware.Jim Ingham2015-04-161-1/+1
| | | | llvm-svn: 235122
* Adds lldb support for querying the register mapping from gdbserver remote ↵Colin Riley2015-04-161-1/+1
| | | | | | | | targets using qXfer:features:read packet. Only enabled if libxml2 enabled in build. Differential Revision: http://reviews.llvm.org/D8999 llvm-svn: 235109
* If memory read does not find a NULL terminator, still print whatever it ↵Enrico Granata2015-04-061-2/+10
| | | | | | | | | | gathered instead of just NOP'ing out However, remark that this is an incomplete chunk of data by still emitting the "no NULL found" warning rdar://20330073 llvm-svn: 234194
* Fix -Wsign-compare warningDavid Blaikie2015-03-271-1/+1
| | | | llvm-svn: 233408
* Add an assertion for frame[0] being valid in CommandObjectThread.cpp.Stephane Sezer2015-03-261-1/+2
| | | | | | | | | | | | | | | | | | Summary: This should always be true but sometimes is not, during platform bring up. As recommended by Jim Ingham, an assertion should be enough here to help. This addresses post commit comments in http://reviews.llvm.org/D8554. Test Plan: Run unit tests. Reviewers: jasonmolenda, emaste, jingham, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8574 llvm-svn: 233298
* Add a --all command option to "target delete".Zachary Turner2015-03-261-55/+64
| | | | llvm-svn: 233283
OpenPOWER on IntegriCloud