summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
Commit message (Collapse)AuthorAgeFilesLines
...
* Renaming the "--wipe" option to "command history" to "--clear" (-C) for ↵Enrico Granata2013-06-171-8/+8
| | | | | | coherence with the rest of the LLDB command-line interface llvm-svn: 184147
* <rdar://problem/14134716>Enrico Granata2013-06-171-24/+106
| | | | | | | | | | | | This is a rewrite of the command history facility of LLDB It takes the history management out of the CommandInterpreter into its own CommandHistory class It reimplements the command history command to allow more combinations of options to work correctly (e.g. com hist -c 1 -s 5) It adds a new --wipe (-w) option to command history to allow clearing the history on demand It extends the lldbtest runCmd: and expect: methods to allow adding commands to history if need be It adds a test case for the reimplemented facility llvm-svn: 184140
* <rdar://problem/11914077>Enrico Granata2013-06-123-85/+22
| | | | | | | If you type help command <word> <word> <word> <missingSubCommand> (e.g. help script import or help type summary fake), you will get help on the deepest matched command word (i.e. script or type summary in the examples) Also, reworked the logic for commands to produce their help to make it more object-oriented llvm-svn: 183822
* <rdar://problem/13779789>Enrico Granata2013-06-111-8/+22
| | | | | | Allow memory read -t to take persistent types (those defined with expression struct $....) llvm-svn: 183766
* Remove eFormatHalfFloat as it isn't needed. eFormatFloat should be used and ↵Greg Clayton2013-06-111-4/+0
| | | | | | the byte size will tell us how to display it. llvm-svn: 183755
* <rdar://problem/12876503>Enrico Granata2013-06-111-6/+9
| | | | | | | Adding a new setting interpreter.stop-command-source-on-error that dictates a default behavior for whether command source should stop upon hitting an error You can still override the setting for each individual invocation with the usual -e setting llvm-svn: 183719
* <rdar://problem/12783351>Enrico Granata2013-06-111-0/+4
| | | | | | | | | | Add support for half-floats, as specified by IEEE-754-2008 With this checkin, you can now say: (lldb) x/7hf foo to read 7 half-floats at address foo llvm-svn: 183716
* Make the "SearchFilterByModuleListAndCU" work correctly for searches at the ↵Jim Ingham2013-06-071-1/+3
| | | | | | | | | | | | | CompUnit level. Fixes a bug in "break set --source-pattern-regexp" when a shared library is specified. Also cleaned up the help text for --source-pattern-regexp so it is a little clearer. <rdar://problem/14084261> llvm-svn: 183476
* <rdar://problem/14086944>Greg Clayton2013-06-071-10/+26
| | | | | | lldb doesn't autocomplete objective C class methods. The regular expression was looking for strings that started with the completion string that was passed in. For objective C class methods, this string starts with "+" which wasn't being escaped. Added many other escapes that were missing just in case. llvm-svn: 183470
* <rdar://problem/13239809>Enrico Granata2013-06-041-6/+8
| | | | | | | | Two things: 1) fixing a bug where memory read was not clearing the m_force flag after it was passed, so that subsequent memory reads would not need to be forced even if over boundary 2) adding a setting target.max-memory-read-size that you can set instead of the hardcoded 1024 bytes limit we had before llvm-svn: 183276
* <rdar://problem/12582328>Enrico Granata2013-06-041-9/+54
| | | | | | | | | | If you want to define a formatter for "array of Foo of any size", ordinarily you would say -x "Foo \[[0-9]+\]" this checkin allows you to instead say "Foo[]" (or "Foo []") and LLDB will automatically create the regular expression and add the -x flag on your behalf llvm-svn: 183272
* <rdar://problem/11109316>Enrico Granata2013-05-311-2/+2
| | | | | | | | | | | | | | | | | command script import now does reloads - for real If you invoke command script import foo and it detects that foo has already been imported, it will - invoke reload(foo) to reload the module in Python - re-invoke foo.__lldb_init_module This second step is necessary to ensure that LLDB does not keep cached copies of any formatter, command, ... that the module is providing Usual caveats with Python imports persist. Among these: - if you have objects lurking around, reloading the module won't magically update them to reflect changes - if module A imports module B, reloading A won't reload B These are Python-specific issues independent of LLDB that would require more extensive design work The --allow-reload (-r) option is maintained for compatibility with existing scripts, but is clearly documented as redundant - reloading is always enabled whether you use it or not llvm-svn: 182977
* For "expr", say what the timeout units are in the help string.Jim Ingham2013-05-291-1/+1
| | | | llvm-svn: 182873
* <rdar://problem/13925432>Enrico Granata2013-05-211-2/+15
| | | | | | | A user request such as: memory read -fc -s10 -c1 *charPtrPtr would cause us to crash upon trying to read 1 char of size 10 from memory This request is now translated into: memory read -fc -s1 -c10 *charPtrPtr (i.e. read 10 chars of size 1 from memory) which is probably also what the user originally wanted llvm-svn: 182398
* Improving the previous checkin about target.load-script-from-symbol-fileEnrico Granata2013-05-211-1/+4
| | | | | | | | | | There are two settings: target.load-script-from-symbol-file is a boolean that says load or no load (default: false) target.warn-on-script-from-symbol-file is also a boolean, it says whether you want to be warned when a script file is not loaded due to security (default: true) the auto loading on change for target.load-script-from-symbol-file is preserved llvm-svn: 182336
* Forgot to check for empty error strings in the previous checkinEnrico Granata2013-05-201-1/+1
| | | | llvm-svn: 182325
* <rdar://problem/13878726>Enrico Granata2013-05-201-1/+8
| | | | | | | | | | | | | | This changes the setting target.load-script-from-symbol-file to be a ternary enum value: default (the default value) will NOT load the script files but will issue a warning suggesting workarounds yes will load the script files no will not load the script files AND will NOT issue any warning if you change the setting value from default to yes, that will then cause the script files to be loaded (the assumption is you didn't know about the setting, got a warning, and quickly want to remedy it) if you have a settings set command for this in your lldbinit file, be sure to change "true" or "false" into an appropriate "yes" or "no" value llvm-svn: 182323
* <rdar://problem/11398407>Greg Clayton2013-05-181-1/+1
| | | | | | | | Name matching was working inconsistently across many places in LLDB. Anyone doing name lookups where you want to look for all types of names should used "eFunctionNameTypeAuto" as the sole name type mask. This will ensure that we get consistent "lookup function by name" results. We had many function calls using as mask like "eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector". This was due to the function lookup by name evolving over time, but as it stands today, use eFunctionNameTypeAuto when you want general name lookups. Either ModuleList::FindFunctions() or Module::FindFunctions() will figure out the right kinds of names to lookup and remove the "eFunctionNameTypeAuto" and replace it with the exact subset of what the name can be. This checkin also changes eFunctionNameTypeAny over to use eFunctionNameTypeAuto to reflect this. llvm-svn: 182179
* Apropos should search user commands as well as built-in commands.Jim Ingham2013-05-171-16/+46
| | | | | | rdar://problem/13916722 llvm-svn: 182068
* <rdar://problem/13217784>Greg Clayton2013-05-171-103/+171
| | | | | | "source list -n <func>" can now show more than one location that matches a function name. It will unique multiple of the same source locations so they don't get displayed. It also handles inline functions correctly. llvm-svn: 182067
* Note in the documentation about the fact that Python callbacks can return a ↵Enrico Granata2013-05-161-0/+6
| | | | | | value and if that value is False, LLDB won’t stop at the breakpoint llvm-svn: 182059
* <rdar://problem/11158023>Enrico Granata2013-05-161-1/+3
| | | | | | Make type summary add and breakpoint command add show an helpful prototype + argument reference when manually typing Python code for these elements llvm-svn: 181968
* <rdar://problem/13128331>Greg Clayton2013-05-151-1/+48
| | | | | | | | Fixed "target symbols add" to correctly extract all module specifications from a dSYM file that is supplied and match the symbol file to a current target module using the UUID values if they are available. This fixes the case where you add a dSYM file (like "foo.dSYM") which is for a renamed executable (like "bar"). In our case it was "mach_kernel.dSYM" which didn't match "mach_kernel.sys". llvm-svn: 181916
* <rdar://problem/13883385>Enrico Granata2013-05-151-1/+2
| | | | | | | | | | | Python breakpoint actions can return False to say that they don't want to stop at the breakpoint to which they are associated Almost all of the work to support this notion of a breakpoint callback was in place, but two small moving parts were missing: a) the SWIG wrapper was not checking the return value of the script b) when passing a Python function by name, the call statement was dropping the return value of the function This checkin addresses both concerns and makes this work Care has been taken that you only keep running when an actual value of False has been returned, and that any other value (None included) means Stop! llvm-svn: 181866
* A first pass at auto completion for variables and their children. This is ↵Greg Clayton2013-05-142-0/+41
| | | | | | currently hooked up for "frame variable" only. With a little work we can also enable it for the "expression" command and also for other things. llvm-svn: 181850
* <rdar://problem/13183720>Enrico Granata2013-05-131-0/+4
| | | | | | | | Provide a mechanism through which users can disable loading the Python scripts from dSYM files This relies on a target setting: target.load-script-from-symbol-file which defaults to false ("do NOT load the script") You need to set it to true before creating your target (or in your lldbinit file if you constantly rely on this feature) to allow the scripts to load llvm-svn: 181709
* A couple of small fixes to make core file debugging less noisy.Jason Molenda2013-05-111-3/+4
| | | | | | | | | | Don't want about being unable to find a needed objective-c runtime function when we're core file debugging and can't jit anything anyway. Don't warn when quitting a debug session on a core file, the program state can be reconstructed by re-running lldb on the same core file again. llvm-svn: 181653
* <rdar://problem/13700260>Greg Clayton2013-05-101-6/+3
| | | | | | Avoid a deadlock when using the OperatingSystemPython code and typing "process interrupt". There was a possible lock inversion between the target API lock and the process' thread list lock due to code trying to discard the thread list. This was fixed by adding a boolean to Process::Halt() that indicates if the thread plans should be discarded and doing it in the private state thread when we process the stopped state. llvm-svn: 181651
* <rdar://problem/13854277>Greg Clayton2013-05-103-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <rdar://problem/13594769> Main changes in this patch include: - cleanup plug-in interface and use ConstStrings for plug-in names - Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp - Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging The plug-in interface changes: Modified the lldb_private::PluginInterface class that all plug-ins inherit from: Changed: virtual const char * GetPluginName() = 0; To: virtual ConstString GetPluginName() = 0; Removed: virtual const char * GetShortPluginName() = 0; - Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names. - Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc. llvm-svn: 181631
* <rdar://problem/13831149>Enrico Granata2013-05-091-0/+7
| | | | | | | | Recursive commands invocations are not currently supported by our CommandInterpreter CommandScriptImport can actually be made to invoke itself recursively, so we need to work around that by clearing the m_exe_ctx This is a short-term workaround, a more interesting solution would be to actually make sure recursive command invocations work properly llvm-svn: 181537
* A few small fixes to make things like image list notJason Molenda2013-05-061-6/+3
| | | | | | | print "//mach_kernel" if you are debugging an executable in the top level directory. llvm-svn: 181190
* Remove the UUID::GetAsCString() method which required a buffer to save the Jason Molenda2013-05-031-8/+6
| | | | | | | UUID string in; added UUID::GetAsString() which returns the uuid string in a std::string. Updated callers to use the new method. llvm-svn: 181078
* <rdar://problem/13788674>Greg Clayton2013-05-021-1/+1
| | | | | | TestPlatformCommand failing on buildbot. llvm-svn: 180963
* Recommitting r180831 with trivial fix - remember to return errors if you ↵Jim Ingham2013-05-021-3/+98
| | | | | | compute. llvm-svn: 180898
* Reverting 180831 as it crashes TestDefaultConstructorForAPIObjects.pyDaniel Malea2013-05-011-98/+3
| | | | llvm-svn: 180868
* Added an option to "process detach" to keep the process stopped, if the ↵Jim Ingham2013-04-301-3/+98
| | | | | | | | | | process plugin (or in the case of ProcessGDBRemote the stub we are talking to) know how to do that. rdar://problem/13680832 llvm-svn: 180831
* Cleanup logging to use the new "std::string FileSpec::GetPath()" function. ↵Greg Clayton2013-04-291-34/+21
| | | | | | | | | | | Also added a similar function for modules: std::string Module::GetSpecificationDescription () const; This returns the module as "/usr/lib/libfoo.dylib" for normal files (calls "std::string FileSpec::GetPath()" on m_file) but it also might include the object name in case the module is for a .o file in a BSD archive ("/usr/lib/libfoo.a(bar.o)"). Cleaned up necessary logging code to use it. llvm-svn: 180717
* <rdar://problem/13209140>Enrico Granata2013-04-241-1/+4
| | | | | | “plugin load” tries to be more helpful when it fails to load a plugin llvm-svn: 180218
* Add a new -a / --address argument to image show-unwind to get theJason Molenda2013-04-231-60/+82
| | | | | | | | | | | unwind instructions for a function/symbol which contains that address. Update the unwind_diagnose.py script to use this instead of doing image show-unwind by name to avoid cases where there are multiple name definitions. llvm-svn: 180079
* Fixed some linux buildbot warnings.Greg Clayton2013-04-191-4/+3
| | | | llvm-svn: 179892
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-185-8/+8
| | | | | | the macros and just use C++11. llvm-svn: 179805
* <rdar://problem/13627061>Greg Clayton2013-04-181-15/+15
| | | | | | Fixed an issue where "platform process list" help message has options displayed a couple dozen times. llvm-svn: 179792
* <rdar://problem/13678882>Greg Clayton2013-04-181-1/+2
| | | | | | Disable "source info" until actually implemented. llvm-svn: 179787
* Since we use C++11, we should switch over to using std::unique_ptr when ↵Greg Clayton2013-04-184-6/+6
| | | | | | | | C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++. Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. llvm-svn: 179779
* Change the disassemble option to specify the architecture from '-a'Jason Molenda2013-04-112-4/+54
| | | | | | | | | | | to '-A'. Add option '-a' / '--address' to disassemble which will find the function that contains that address, and disassemble the entire function. <rdar://problem/13436207> llvm-svn: 179258
* Fix the help for unwind-on-error, it no longer controls what happens when an ↵Jim Ingham2013-04-091-1/+1
| | | | | | expression hits a breakpoint. llvm-svn: 179133
* Fix the help message for “one-shot”.Jim Ingham2013-04-091-1/+1
| | | | llvm-svn: 179110
* <rdar://problem/13563628>Enrico Granata2013-04-051-1/+1
| | | | | | | | | | Introducing a negative cache for ObjCLanguageRuntime::LookupInCompleteClassCache() This helps speed up the (common) case of us looking for classes that are hidden deep within Cocoa internals and repeatedly failing at finding type information for them. In order for this to work, we need to clean this cache whenever debug information is added. A new symbols loaded event is added that is triggered with add-dsym (before modules loaded would be triggered for both adding modules and adding symbols). Interested parties can register for this event. Internally, we make sure to clean the negative cache whenever symbols are added. Lastly, ClassDescriptor::IsTagged() has been refactored to GetTaggedPointerInfo() that also (optionally) returns info and value bits. In this way, data formatters can share tagged pointer code instead of duplicating the required arithmetic. llvm-svn: 178897
* Change CommandObjectPlatform commands to get the current platformJason Molenda2013-04-051-5/+42
| | | | | | | | | | | from the current Target, if there is one, else back off to getting the currently selected platform from the Debugger (as it ws doing previously.) Remove code from DynamicLoaderDarwinKernel that was setting the platform in both the Target and in the Debugger. llvm-svn: 178836
* 1 breakpoint is a breakpoint not a breakpoints.Jim Ingham2013-03-291-1/+1
| | | | | | rdar://problem/13536544 llvm-svn: 178367
OpenPOWER on IntegriCloud