summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
Commit message (Collapse)AuthorAgeFilesLines
...
* Move CommandAlias to its own file; alsoEnrico Granata2016-03-081-1/+1
| | | | | | Store std::unique_ptr<CommandAlias> instead of instances llvm-svn: 262958
* A few more improvements on the way to the command alias refactoringEnrico Granata2016-03-082-38/+35
| | | | | | | | - move alias help generation to CommandAlias, out of CommandInterpreter - make alias creation use argument strings instead of OptionArgVectorSP; the former is a more reasonable currency than the latter - remove m_is_alias from CommandObject, it wasn't actually being used llvm-svn: 262912
* Attempt to fix the Ubuntu buildbot by making FindLongestCommandWord a free ↵Enrico Granata2016-03-081-1/+1
| | | | | | template function in lldb_private llvm-svn: 262905
* Move ProcessAliasOptionsArgs to be a static on CommandAlias; it wasn't using ↵Enrico Granata2016-03-081-5/+3
| | | | | | | | any instance data on the CommandInterpreter anyway This small step removes one piece of alias machinery from the CommandInterpreter into the CommandAlias llvm-svn: 262901
* Change the way command aliases are stored. Go from a model where a map holds ↵Enrico Granata2016-03-082-23/+7
| | | | | | | | | | | the alias -> underlying command binding and another map holds the alias -> options, to a model where one single map holds the alias -> (all useful data) combination Right now, obviously, this is just the pair of (CommandObjectSP,OptionArgVectorSP), so NFC This is step one of a larger - and tricky - refactoring which will turn command aliases into interesting objects instead of passive storage that the command interpreter does smart things to This refactoring, in turn, will allow us to do interesting things with aliases, such as intelligent and customizable help llvm-svn: 262900
* When 'help' cannot find a command, produce additional help text that also ↵Enrico Granata2016-02-294-19/+78
| | | | | | | | | | | | | | | | | | points the user to the apropos and type lookup commands This is useful in cases such as, e.g. (lldb) help NSString (the user meant type lookup) or (lldb) help kill (the user is looking for process kill) Fixes rdar://24868537 llvm-svn: 262271
* Add the "block" keyword to "thread step-in -e", and an alias that uses it: ↵Jim Ingham2016-02-261-1/+34
| | | | | | | | | "sif <target function>" - i.e. step-into-function to allow you to step through a complex calling sequence into a particular function that may span multiple lines. Also some test cases for this and the --step-target feature. llvm-svn: 261953
* Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in ↵Eugene Zelenko2016-02-251-305/+194
| | | | | | source/Commands/CommandObjectThread.cpp; other minor fixes. llvm-svn: 261936
* Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in ↵Eugene Zelenko2016-02-251-412/+295
| | | | | | source/Commands/CommandObjectTarget.cpp; other minor fixes. llvm-svn: 261920
* Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in ↵Eugene Zelenko2016-02-251-357/+233
| | | | | | source/Commands/CommandObjectType.cpp; other minor fixes. llvm-svn: 261817
* Fix "target modules add -s <filename>" to work if the file doesn't exist ↵Greg Clayton2016-02-251-1/+1
| | | | | | | | locally on the current machine. <rdar://problem/24807382> llvm-svn: 261812
* Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in ↵Eugene Zelenko2016-02-243-326/+290
| | | | | | some files in source/Commands; other minor fixes. llvm-svn: 261716
* Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in ↵Eugene Zelenko2016-02-233-285/+178
| | | | | | some files in source/Commands; other minor fixes. llvm-svn: 261602
* Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in ↵Eugene Zelenko2016-02-221-263/+192
| | | | | | source/Commands/CommandObjectCommands.cpp; other minor fixes. llvm-svn: 261593
* Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in ↵Eugene Zelenko2016-02-221-274/+197
| | | | | | | | source/Commands/CommandObjectPlatform.cpp; other minor fixes. Add missing break for permissions-string case. llvm-svn: 261555
* Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in ↵Eugene Zelenko2016-02-208-309/+206
| | | | | | some files in source/Commands; other minor fixes. llvm-svn: 261389
* Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in ↵Eugene Zelenko2016-02-196-362/+250
| | | | | | some files in source/Commands; other minor fixes. llvm-svn: 261356
* Fix Clang-tidy modernize-use-nullptr and modernize-use-default warnings in ↵Eugene Zelenko2016-02-181-191/+147
| | | | | | source/Commands/CommandObjectBreakpoint.cpp; other minor fixes. llvm-svn: 261272
* Fix buildbot failure because I got an include path wrong.Jason Molenda2016-02-161-1/+1
| | | | llvm-svn: 260932
* Add -Wimplicit-fallthrough command line option to clang inJason Molenda2016-02-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the xcode project file to catch switch statements that have a case that falls through unintentionally. Define LLVM_FALLTHROUGH to indicate instances where a case has code and intends to fall through. This should be in llvm/Support/Compiler.h; Peter Collingbourne originally checked in there (r237766), then reverted (r237941) because he didn't have time to mark up all the 'case' statements that were intended to fall through. I put together a patch to get this back in llvm http://reviews.llvm.org/D17063 but it hasn't been approved in the past week. I added a new lldb-private-defines.h to hold the definition for now. Every place in lldb where there is a comment that the fall-through is intentional, I added LLVM_FALLTHROUGH to silence the warning. I haven't tried to identify whether the fallthrough is a bug or not in the other places. I haven't tried to add this to the cmake option build flags. This warning will only work for clang. This build cleanly (with some new warnings) on macosx with clang under xcodebuild, but if this causes problems for people on other configurations, I'll back it out. llvm-svn: 260930
* Adding an SBThread::StepInto that takes an end-line, also moved the code ↵Jim Ingham2016-02-131-60/+15
| | | | | | | | that figures out the address range for the step to SymbolContext. llvm-svn: 260772
* Revert 260436. I pretty consistently upper-case the letter I use for theJim Ingham2016-02-101-2/+2
| | | | | | | | | short option as an aid to memory. Like it's w because of the W in throW. That helps me remember. If we are going to take these out we should take them all out. But I kind of like them. llvm-svn: 260452
* No reason for these two letters to be uppercaseEnrico Granata2016-02-101-2/+2
| | | | llvm-svn: 260436
* Now that SymbolFileDWARF supports having types in completely separate .pcm ↵Greg Clayton2016-02-102-4/+10
| | | | | | | | | | | | | | file with "-fmodules -gmodules", each SymbolFileDWARF can reference module DWARF info by looking in other DWARF files. Then if you have 1000 .o files that each reference one or more .pcm files in their debug info, a simple Module::FindTypes(...) call can end up searching the same .pcm file over and over and over. Now all internal FindTypes methods in classes (ModuleList, Module, SymbolFile) now take an extra argument: llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files Each time a SymbolFile::FindTypes() is called, it needs to check the searched_symbol_files list to make sure it hasn't already been asked to find the type and return immediately if it has been checked. This will stop circular dependencies from also crashing LLDB during type queries. This has proven to be an issue when debugging large applications on MacOSX that use DWARF in .o files. <rdar://problem/24581488> llvm-svn: 260434
* This is an idea to make "thread step-in --target" work for the commonJim Ingham2016-02-101-2/+85
| | | | | | | | | | | | | | | | | | | | | | | | | case where you have: 1 -> foo (bar(), 2 baz(), 3 lala()); 4 You are sitting on line 1, and want to step into foo, but not bar, baz & lala. Unfortunately there are line table entries for lines 1-3, and lldb doesn't know anything about the nesting of statement in these lines. So we'll have to use the user's intelligence... This patch adds: (lldb) thread step-in -t foo --end-line 4 That tells lldb to keep stepping in till line 4, but stop if you step into foo. I think I would remember to use this when faced with some of the long gnarly call sequences in lldb. But there might be ways I haven't thought of to make it more convenient. Jason suggests having "end" as a special token for --end-line which just means keep going to the end of the function, I really want to get into this thing... There should be an SB API and tests, which will come if this seems useful. llvm-svn: 260352
* Mention the --all-files option in the -p help string.Jim Ingham2016-02-091-1/+2
| | | | llvm-svn: 260247
* Per Jim's suggestion, move checks that we're not mixing and matching ↵Enrico Granata2016-02-061-0/+3
| | | | | | | | Debuggers and Commands deeper in the bowels of LLDB NFC llvm-svn: 259972
* Fix "thread backtrace -s": option was misparsed because of a missing break.Jim Ingham2016-02-061-0/+1
| | | | | | <rdar://problem/24525106> llvm-svn: 259962
* Fix a bug where type <formatter> list would ignore the -w argumentEnrico Granata2016-01-291-0/+3
| | | | | | rdar://24379879 llvm-svn: 259135
* Remove autoconf support from source directories.Eugene Zelenko2016-01-281-16/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* Fix an issue where the type <formatter> list command would not accept a ↵Enrico Granata2016-01-281-1/+1
| | | | | | | | valid argument and instead error out complaining about a malformed regex rdar://problem/24380025 llvm-svn: 259078
* Commands: silence dumb -Wextra warning from GCCSaleem Abdulrasool2016-01-221-5/+5
| | | | | | | | | This is a rather unhelpful warning indicating that the ternary operator return types are mismatched, returning an integer and an enumeral type. Since the integeral type is shorter to type, cast the enumeral type to `int`. Silences the -Wextra warning from GCC. llvm-svn: 258548
* Replace accidental DOS (and mixed) line endings in a few text filesDimitry Andric2016-01-111-41/+41
| | | | | | | | | | | | | | Summary: Similar to rL256704 and rL256707, fix a few text files which were accidentally checked in with DOS line endings, or mixed line endings. Reviewers: jingham, emaste Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16027 llvm-svn: 257361
* Fix a glitch in the Driver's batch mode when used with "attach". Jim Ingham2016-01-081-0/+1
| | | | | | | | | | | | | | Batch mode is supposed to stop execution and return control to the user when an exceptional stop occurs (crash, signal or instrumentation). But attach always stops with a SIGSTOP on OSX (maybe on Linux too?) which would short circuit the rest of the commands given. This change allows a command result object to indicate that it expected to leave the process stopped with an exceptional stop reason, and it is okay for batch mode to keep going. <rdar://problem/22243143> llvm-svn: 257120
* Add support for "source info" and use it to fix MI's -symbol-list-lines.Dawn Perchik2016-01-052-49/+627
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support the command 'source info' as follows: (lldb) help source info Display source line information (as specified) based on the current executable's debug info. Syntax: source info <cmd-options> Command Options Usage: source info [-c <count>] [-s <shlib-name>] [-f <filename>] [-l <linenum>] [-e <linenum>] source info [-c <count>] [-s <shlib-name>] [-n <symbol>] source info [-c <count>] [-a <address-expression>] -a <address-expression> ( --address <address-expression> ) Lookup the address and display the source information for the corresponding file and line. -c <count> ( --count <count> ) The number of line entries to display. -e <linenum> ( --end-line <linenum> ) The line number at which to stop displaying lines. -f <filename> ( --file <filename> ) The file from which to display source. -l <linenum> ( --line <linenum> ) The line number at which to start the displaying lines. -n <symbol> ( --name <symbol> ) The name of a function whose source to display. -s <shlib-name> ( --shlib <shlib-name> ) Look up the source in the given module or shared library (can be specified more than once). For example: (lldb) source info --file x.h Lines for file x.h in compilation unit x.cpp in `x [0x0000000100000d00-0x0000000100000d10): /Users/dawn/tmp/./x.h:10 [0x0000000100000d10-0x0000000100000d1b): /Users/dawn/tmp/./x.h:10 The new options are used to fix the MI command: -symbol-list-lines <file> which didn't work for header files because it called: target modules dump line-table <file> which only dumps line tables for a compilation unit. The patch also fixes a bug in the error reporting when no files were supplied to the command. Previously you'd get: (lldb) target modules dump line-table error: Syntax: error: no source filenames matched any command arguments Now you get: error: file option must be specified. Reviewed by: clayborg, jingham, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15593 llvm-svn: 256863
* [Commands] Get rid of unused typedefs.Davide Italiano2016-01-041-5/+0
| | | | llvm-svn: 256766
* Improve error handling for `frame select` command when there are too many ↵Adrian McCarthy2015-12-221-1/+3
| | | | | | | | | | arguments. Bug: https://llvm.org/bugs/show_bug.cgi?id=25847 It now gives a more specific error message and then returns instead of trying to select the wrong frame. llvm-svn: 256251
* Enable the 'type X list' formatters commands to list formatters in language ↵Enrico Granata2015-12-151-34/+56
| | | | | | categories llvm-svn: 255687
* When constructing an address range to "step" or "next" through,Jason Molenda2015-12-151-2/+2
| | | | | | | | | | | | | | find the largest address range (possibly combining multiple LineEntry's for this line number) that is contiguous. This allows lldb's fast-step stepping algorithm to potentially run for a longer address range than if we have to stop at every LineEntry indicating a subexpression in the source line. http://reviews.llvm.org/D15407 <rdar://problem/23270882> llvm-svn: 255590
* Modify "platform connect" to connect to processes as wellTamas Berghammer2015-12-082-63/+38
| | | | | | | | | | | | | | | | | | | | | | | | The standard remote debugging workflow with gdb is to start the application on the remote host under gdbserver (e.g.: gdbserver :5039 a.out) and then connect to it with gdb. The same workflow is supported by debugserver/lldb-gdbserver with a very similar syntax but to access all features of lldb we need to be connected also to an lldb-platform instance running on the target. Before this change this had to be done manually with starting a separate lldb-platform on the target machine and then connecting to it with lldb before connecting to the process. This change modifies the behavior of "platform connect" with automatically connecting to the process instance if it was started by the remote platform. With this command replacing gdbserver in a gdb based worflow is usually as simple as replacing the command to execute gdbserver with executing lldb-platform. Differential revision: http://reviews.llvm.org/D14952 llvm-svn: 255016
* Add a new option to Platform::LoadImage to install the imageTamas Berghammer2015-12-081-8/+88
| | | | | | | | | | | | | | | | | | | | | This change introduce 3 different working mode for Platform::LoadImage depending on the file specs specified. * If only a remote file is specified then the remote file is loaded on the target (same behavior as before) * If only a local file is specified then the local file is installed to the current working directory and then loaded from there. * If both local and remote file is specified then the local file is installed to the specified location and then loaded from there. The same options are exposed on the SB API with a new method LoadImage method while the old signature presers its meaning. On the command line the installation of the shared library can be specified with the "--install" option of "process load". Differential revision: http://reviews.llvm.org/D15152 llvm-svn: 255014
* Fix "process load/unload" on androidTamas Berghammer2015-12-021-3/+4
| | | | | | | | | | | On android the symbols exposed by libdl (dlopen, dlclose, dlerror) prefixed by "__dl_". This change moves the handling of process load/unload to the platform object and override it for android to handle the special prefix. Differential revision: http://reviews.llvm.org/D11465 llvm-svn: 254504
* Enable saving of mini dumps with lldb process save-core.Adrian McCarthy2015-11-201-1/+1
| | | | | | | | Also adds SB API to save a core and tests that use it. Differential Revision: http://reviews.llvm.org/D14793 llvm-svn: 253734
* Revert "FOO"Adrian McCarthy2015-11-201-1/+1
| | | | | | | | Accidentally commited before I was done. This reverts commit 2ec2da4ee52780582d5e9c88b2e982a688fbdbe1. llvm-svn: 253685
* FOOAdrian McCarthy2015-11-201-1/+1
| | | | llvm-svn: 253684
* Fix up LLDB for a change in the way clang represents anonymous unions such ↵Enrico Granata2015-11-191-1/+2
| | | | | | that the 'frame variable' command can still find the members of such union as if they were top-level variables in the current scope llvm-svn: 253613
* Reapply r253423 and r253424 (which cleanup the data formatters iteration ↵Enrico Granata2015-11-181-779/+188
| | | | | | model, as well as the type X list commands), along with a change by Zachary Turner to bypass a MSVC bug with SFINAE llvm-svn: 253493
* Revert 2 commits breaking the MSVC buildTamas Berghammer2015-11-181-182/+779
| | | | | | | | | | Revert "Remove a few vestigial typedefs from the old world" This reverts commit 05872cda2a00fbd988c4fc761b1f87fe9edce224. Revert "Cleanup the type X list commands to use the new ForEach goodness" This reverts commit 85b1d83819a22cdc9ef12f58fd4fa92b473a4f81. llvm-svn: 253455
* Cleanup the type X list commands to use the new ForEach goodnessEnrico Granata2015-11-181-779/+182
| | | | llvm-svn: 253423
* Cleanup indentationEnrico Granata2015-11-171-2/+4
| | | | llvm-svn: 253383
OpenPOWER on IntegriCloud