summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
Commit message (Collapse)AuthorAgeFilesLines
...
* Append a missing \nEnrico Granata2016-04-081-1/+1
| | | | llvm-svn: 265818
* Update watchpoint help to use new -s flagStephane Sezer2016-04-051-7/+7
| | | | | | | | | | | | | | Summary: Flag updated in D233237 Reviewers: spyffe, jingham, Eugene.Zelenko Subscribers: lldb-commits, sas Differential Revision: http://reviews.llvm.org/D18660 Change by Francis Ricci <fjricci@fb.com> llvm-svn: 265421
* Implement `target modules dump objfile`Adrian McCarthy2016-04-041-6/+106
| | | | | | Differential Revision: http://reviews.llvm.org/D18464 llvm-svn: 265349
* Add --help and --long-help options to 'command alias' such that one can now ↵Enrico Granata2016-03-311-7/+155
| | | | | | specify a help string for an alias as they are defining it llvm-svn: 264980
* Enhance the 'type X list' commands such that they actually alert the user if ↵Enrico Granata2016-03-301-10/+22
| | | | | | no formatters matching the constraints could be found llvm-svn: 264957
* Figure out what the fixed expression is, and print it. Added another target ↵Jim Ingham2016-03-292-1/+29
| | | | | | | | | | | | | setting to quietly apply fixits for those who really trust clang's fixits. Also, moved the retry into ClangUserExpression::Evaluate, where I can make a whole new ClangUserExpression to do the work. Reusing any of the parts of a UserExpression in situ isn't supported at present. <rdar://problem/25351938> llvm-svn: 264793
* Expose top-level Clang expressions via the command line and the API.Sean Callanan2016-03-282-0/+10
| | | | | | | | | | | | | | | | | | Top-level Clang expressions are expressions that act as new translation units, and define their own symbols. They do not have function wrappers like regular expressions do, and declarations are persistent regardless of use of the dollar sign in identifiers. Names defined by these are given priority over all other symbol lookups. This patch adds a new expression option, '-p' or '--top-level,' which controls whether the expression is treated this way. It also adds a flag controlling this to SBExpressionOptions so that this API is usable externally. It also adds a test that validates that this works. (The test requires a fix to the Clang AST importer which I will be committing shortly.) <rdar://problem/22864976> llvm-svn: 264662
* Use Clang's FixItHints to correct expressions with "trivial" mistakes (e.g. ↵Jim Ingham2016-03-252-1/+23
| | | | | | | | | | | | | | | "." for "->".) This feature is controlled by an expression command option, a target property and the SBExpressionOptions setting. FixIt's are only applied to UserExpressions, not UtilityFunctions, those you have to get right when you make them. This is just a first stage. At present the fixits are applied silently. The next step is to tell the user about the applied fixit. <rdar://problem/25351938> llvm-svn: 264379
* Make it possible for language plugins to provide additional custom help for ↵Enrico Granata2016-03-241-2/+28
| | | | | | 'type lookup' llvm-svn: 264356
* Get rid of a global constructor and also make this code safe to use after ↵Greg Clayton2016-03-241-14/+30
| | | | | | the global destructor chain has been run on the main thread. llvm-svn: 264348
* Make 'type lookup' print an error message instead of complete radio silence ↵Enrico Granata2016-03-241-0/+3
| | | | | | | | when it can't find a type matching user input It would be fun to make it provide suggestions (e.g. 'can't find NString, did you mean NSString instead?'), but this worries me a little bit on the account of just how thorough of a type system scan it would have to do llvm-svn: 264343
* Change 'apropos' such that it doesn't look into the "long help/syntax" ↵Enrico Granata2016-03-231-28/+3
| | | | | | | | | | strings for commands This solves issues such as 'apropos foo' returning valid matches just because syntax examples happen to use 'foo' as a placeholder token Fixes rdar://9043025 llvm-svn: 264123
* Make it so that a command alias can actually remove the help/long help from ↵Enrico Granata2016-03-221-3/+3
| | | | | | its parent command by setting itself to an empty help string llvm-svn: 264108
* Unicode support on Win32.Zachary Turner2016-03-221-4/+6
| | | | | | | | | | | | | Win32 API calls that are Unicode aware require wide character strings, but LLDB uses UTF8 everywhere. This patch does conversions wherever necessary when passing strings into and out of Win32 API calls. Patch by Cameron Differential Revision: http://reviews.llvm.org/D17107 Reviewed By: zturner, amccarth llvm-svn: 264074
* Handle any persistent Decl in the Clang expression parser, not just types.Sean Callanan2016-03-191-1/+1
| | | | | | | | | | Persistent decls have traditionally only been types. However, we want to be able to persist more things, like functions and global variables. This changes some of the nomenclature and the lookup rules to make this possible. <rdar://problem/22864976> llvm-svn: 263864
* Fix deadlock due to thread list locking in 'bt all' with obj-cStephane Sezer2016-03-171-38/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The gdb-remote async thread cannot modify thread state while the main thread holds a lock on the state. Don't use locking thread iteration for bt all. Specifically, the deadlock manifests when lldb attempts to JIT code to symbolicate objective c while backtracing. As part of this code path, SetPrivateState() is called on an async thread. This async thread will block waiting for the thread_list lock held by the main thread in CommandObjectIterateOverThreads. The main thread will also block on the async thread during DoResume (although with a timeout), leading to a deadlock. Due to the timeout, the deadlock is not immediately apparent, but the inferior will be left in an invalid state after the bt all completes, and objective-c symbols will not be successfully resolved in the backtrace. Reviewers: andrew.w.kaylor, jingham, clayborg Subscribers: sas, lldb-commits Differential Revision: http://reviews.llvm.org/D18075 Change by Francis Ricci <fjricci@fb.com> llvm-svn: 263735
* Improve the 'type lookup' command such that it guesses to use the current's ↵Enrico Granata2016-03-151-1/+28
| | | | | | frame language as the one to start searching from. llvm-svn: 263592
* Lots of progress on the CommandAlias refactoringEnrico Granata2016-03-141-0/+2
| | | | | | | | | This cleans things up such CommandAlias essentially can work as its own object; the aliases still live in a separate map, but are now just full-fledged CommandObjectSPs This patch also cleans up help generation for aliases, allows aliases to vend their own help, and adds a tweak such that "dash-dash aliases", such as po, don't show the list of options for their underlying command, since those can't be provided anyway I plan to fix up a few more things here, and then add a test case and proclaim victory llvm-svn: 263499
* This change introduces a "ExpressionExecutionThread" to the ThreadList. Jim Ingham2016-03-123-6/+15
| | | | | | | | | | | | | | | | | | | Turns out that most of the code that runs expressions (e.g. the ObjC runtime grubber) on behalf of the expression parser was using the currently selected thread. But sometimes, e.g. when we are evaluating breakpoint conditions/commands, we don't select the thread we're running on, we instead set the context for the interpreter, and explicitly pass that to other callers. That wasn't getting communicated to these utility expressions, so they would run on some other thread instead, and that could cause a variety of subtle and hard to reproduce problems. I also went through the commands and cleaned up the use of GetSelectedThread. All those uses should have been trying the thread in the m_exe_ctx belonging to the command object first. It would actually have been pretty hard to get misbehavior in these cases, but for correctness sake it is good to make this usage consistent. <rdar://problem/24978569> llvm-svn: 263326
* Add an "offset" option to "break set -n" and "break set -f -l". Jim Ingham2016-03-091-0/+23
| | | | | | | | | | | | That way you can set offset breakpoints that will move as the function they are contained in moves (which address breakpoints can't do...) I don't align the new address to instruction boundaries yet, so you have to get this right yourself for now. <rdar://problem/13365575> llvm-svn: 263049
* Last round of preliminary cleanup in my refactoring of aliases.Enrico Granata2016-03-091-1/+1
| | | | | | | | | | | | | | The next step is to actually turn CommandAlias into a full-blown CommandObject citizen. This is tricky given the current architecture of the CommandInterpreter but I think I have found a reasonable path forward. The current plan is to make class CommandAlias : public CommandObject, and have all the several GetCommand calls not actually traverse through the alias to the underlying command object The only times that an alias will be traversed are: a) execution; when time comes to run an alias, I will just grab the underlying command and options, and make the interpreter execute that according to its current algorithm b) subcommand traversal; if one has an alias to a multiword command, grabbing a subcommand will see through to the subcommand Other operations, e.g. command listing, command names, command helps, ..., will all use the alias directly. This will, in turn, lead to the removal of the separate alias dictionary, and just mix user commands and aliases in one map llvm-svn: 262986
* 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
OpenPOWER on IntegriCloud