summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch "disassemble" with no arguments or options to disassemble the current ↵Greg Clayton2012-12-142-24/+25
| | | | | | frame instead of around the current PC. llvm-svn: 170254
* Fixed a typo.Filipe Cabecinhas2012-12-141-1/+1
| | | | llvm-svn: 170239
* Cleaned up the UUID mismatch just printing itself whenever it wants to by ↵Greg Clayton2012-12-141-1/+1
| | | | | | allowing an optional feedback stream to be passed along when getting the symbol vendor. llvm-svn: 170174
* Removed the == and != operators from ArchSpec, sinceSean Callanan2012-12-131-1/+1
| | | | | | | | | | | | equality can be strict or loose and we want code to explicitly choose one or the other. Also renamed the Compare function to IsEqualTo, to avoid confusion. <rdar://problem/12856749> llvm-svn: 170152
* Made "target modules add" flush the process toSean Callanan2012-12-131-0/+16
| | | | | | | | reset stack frames etc. <rdar://problem/12842024> llvm-svn: 170079
* <rdar://problem/10898363>Enrico Granata2012-12-121-20/+23
| | | | | | | | Emitting a warning when defining a summary or a synthetic provider and the function/class name provided does not correspond to a valid scripting object Also using this chance to edit a few error messages from weird "internal error" markers to actual user-legible data! llvm-svn: 170013
* Fixed a few bugs in the "step in" thread plan logic.Jim Ingham2012-12-121-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added a "step-in-target" flag to "thread step-in" so if you have something like: Process 28464 stopped * thread #1: tid = 0x1c03, function: main , stop reason = breakpoint 1.1 frame #0: 0x0000000100000e08 a.out`main at main.c:62 61 -> 62 int A6 = complex (a(4), b(5), c(6)); // Stop here to step targetting b and hitting breakpoint. 63 and you want to get into "complex" skipping a, b and c, you can do: (lldb) step -t complex Process 28464 stopped * thread #1: tid = 0x1c03, function: complex , stop reason = step in frame #0: 0x0000000100000d0d a.out`complex at main.c:44 41 42 int complex (int first, int second, int third) 43 { -> 44 return first + second + third; // Step in targetting complex should stop here 45 } 46 47 int main (int argc, char const *argv[]) llvm-svn: 170008
* Minor grammar and style fixes in documentation.Sean Callanan2012-12-121-2/+3
| | | | | | | <rdar://problem/12861963> <rdar://problem/12861904> llvm-svn: 169997
* Option changes:Enrico Granata2012-12-121-2/+2
| | | | | | | | | | | | | | | | | the option to print the runtime-specific description has been modified in the frame variable, memory read and expression command. All three commands now support a --object-description option, with a shortcut of -O (uppercase letter o) This is a breaking change: frame variable used --objc as the long option name expression used -o as a shortcut memory read uses --objd as the long option name Hopefully, most users won't be affected by the change since people tend to access "expression --object-description" under the alias "po" which still works The test suite has been tweaked accordingly. llvm-svn: 169961
* <rdar://problem/12780507>Greg Clayton2012-12-121-62/+100
| | | | | | Fix add-dsym ("target symbols add") to correctly add a dSYM file when the target arch doesn't match the arch of the module. llvm-svn: 169952
* Broadcast an event when the selected thread is changed.Jim Ingham2012-12-111-9/+1
| | | | | | <rdar://problem/10976636> llvm-svn: 169810
* Fix a few more clang (3.2) warnings on Linux:Daniel Malea2012-12-071-0/+2
| | | | | | | | | | | | | | | | | - remove unused members - add NO_PEDANTIC to selected Makefiles - fix return values (removed NULL as needed) - disable warning about four-char-constants - remove unneeded const from operator*() declaration - add missing lambda function return types - fix printf() with no format string - change sizeof to use a type name instead of variable name - fix Linux ProcessMonitor.cpp to be 32/64 bit friendly - disable warnings emitted by swig-generated C++ code Patch by Matt Kopec! llvm-svn: 169645
* <rdar://problem/10903854>Greg Clayton2012-12-071-4/+9
| | | | | | log enable now resolves the "--file" option in case it contains ~. llvm-svn: 169623
* <rdar://problem/8908550>Greg Clayton2012-12-071-6/+119
| | | | | | Added "--address" as an available option for "source list". llvm-svn: 169567
* <rdar://problem/12820334>Greg Clayton2012-12-064-40/+39
| | | | | | | | | | | | | I modified the "Args::StringtoAddress(...)" function to be able to evaluate address expressions. This is now used for any command line arguments or options that takes addresses like: memory read <addr> [<end-addr>] memory write <addr> breakpoint set --address <addr> disassemble --start-address <addr> --end-address <addr> It calls the expression parser to evaluate the address expression and will also work around the issue where the compiler doesn't like to add offsets to function pointers (which is what happens when you try to evaluate "main + 12"). So there is a temp fix in the Args::StringtoAddress() to work around this until we can get special compiler support for debug expressions with function pointers. llvm-svn: 169556
* Fix Linux build warnings due to redefinition of macros:Daniel Malea2012-12-0527-0/+53
| | | | | | | | | - add new header lldb-python.h to be included before other system headers - short term fix (eventually python dependencies must be cleaned up) Patch by Matt Kopec! llvm-svn: 169341
* <rdar://problem/12798131> Greg Clayton2012-12-0420-90/+201
| | | | | | | | | | | | Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite. This fix does the following: - make sure all short options are treated as "int" - make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired - fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates - fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value llvm-svn: 169189
* Added new options to "target create" and "target modules add".Greg Clayton2012-11-301-5/+36
| | | | | | | | | | For "target create" you can now specify "--no-dependents" to not track down and add all dependent shared libraries. This can be handy when doing manual symbolication. Also added the "--symfile" or "-s" for short so you can specify a module and a stand alone debug info file: (lldb) target create --symfile /tmp/a.dSYM /usr/bin/a Added the "--symfile" option to the "target modules add" for the same reason. These all help with manualy symbolication and expose functionality that was previously only available through the public API layer. llvm-svn: 169023
* <rdar://problem/12687087>Greg Clayton2012-11-291-6/+85
| | | | | | | | Emit an error when using "target modules add PATH" where PATH points to a debug info only (dSYM) file. Also added a "--uuid" option for "target modules add --uuid UUID" to locate and load a module by UUID if the host supports it. llvm-svn: 168949
* Resolve printf formatting warnings on Linux:Daniel Malea2012-11-297-51/+51
| | | | | | | | - use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
* Fix typeo in example help text for type filter add.Jason Molenda2012-11-081-1/+1
| | | | | | <rdar://problem/12090979> llvm-svn: 167601
* <rdar://problem/12586350>Enrico Granata2012-11-081-4/+4
| | | | | | | | | | | | | | This commit does three things: (a) introduces a new notification model for adding/removing/changing modules to a ModuleList, and applies it to the Target's ModuleList, so that we make sure to always trigger the right set of actions whenever modules come and go in a target. Certain spots in the code still need to "manually" notify the Target for several reasons, so this is a work in progress (b) adds a new capability to the Platforms: locating a scripting resources associated to a module. A scripting resource is a Python file that can load commands, formatters, ... and any other action of interest corresponding to the loading of a module. At the moment, this is only implemented on Mac OS X and only for files inside .dSYM bundles - the next step is going to be letting the frameworks themselves hold their scripting resources. Implementors of platforms for other systems are free to implement "the right thing" for their own worlds (c) hooking up items (a) and (b) so that targets auto-load the scripting resources as the corresponding modules get loaded in a target. This has a few caveats at the moment: - the user needs to manually add the .py file to the dSYM (soon, it will also work in the framework itself) - if two modules with the same name show up during the lifetime of an LLDB session, the second one won't be able to load its scripting resource, but will otherwise work just fine llvm-svn: 167569
* When we were calculating the max byte size of ONE instruction to handle ↵Jim Ingham2012-11-071-1/+1
| | | | | | | | | | | | | | something like x/9i we actually calculated the size of 9 instructions. Then we multiplied it by the count again to get the total amount we should fetch, so we thought 9 x86_64 instructions took over 1K to fetch... <rdar://problem/12649027> llvm-svn: 167520
* Make sure users know that "target variable" can read variables while running ↵Greg Clayton2012-11-031-1/+1
| | | | | | a process by changing the documentation string. llvm-svn: 167343
* Fixed the "--force" option for memory read.Greg Clayton2012-11-021-1/+3
| | | | llvm-svn: 167314
* Updated the "breakpoint command add" documentation and fixed the web site ↵Greg Clayton2012-10-261-109/+124
| | | | | | docs for the signature of the python breakpoint callback functions. llvm-svn: 166789
* <rdar://problem/12570550>Greg Clayton2012-10-251-7/+0
| | | | | | TOT lldb broke finding App in app bundles when launching with shell. llvm-svn: 166733
* Add text to the help to explain how to set user defined variables.Jim Ingham2012-10-251-1/+9
| | | | llvm-svn: 166704
* This is a fix for the command option parser.Sean Callanan2012-10-242-10/+10
| | | | | | | | | | | | | | | | There was a generic catch-all type for path arguments called "eArgTypePath," and a specialized version called "eArgTypeFilename." It turns out all the cases where we used eArgTypePath we could have used Filename or we explicitly meant a directory. I changed Path to DirectoryName, made it use the directory completer, and rationalized the uses of Path. <rdar://problem/12559915> llvm-svn: 166533
* Watchpoints remember the type of the expression or variable they were set ↵Jim Ingham2012-10-231-10/+12
| | | | | | | | | | with, and use it to print the old and new values. Temporarily disable the "out of scope" checking since it didn't work correctly, and was not what people generally expected watchpoints to be doing. llvm-svn: 166472
* <rdar://problem/12491420>Greg Clayton2012-10-181-0/+2
| | | | | | | | | | Added a new setting that allows a python OS plug-in to detect threads and provide registers for memory threads. To enable this you set the setting: settings set target.process.python-os-plugin-path lldb/examples/python/operating_system.py Then run your program and see the extra threads. llvm-svn: 166244
* <rdar://problem/12462048>Greg Clayton2012-10-182-18/+8
| | | | | | | | | | <rdar://problem/12068650> More fixes to how we handle paths that are used to create a target. This modification centralizes the location where and how what the user specifies gets resolved. Prior to this fix, the TargetList::CreateTarget variants took a FileSpec object which meant everyone had the opportunity to resolve the path their own way. Now both CreateTarget variants take a "const char *use_exe_path" which allows the TargetList::CreateTarget to centralize where the resolving happens and "do the right thing". llvm-svn: 166186
* <rdar://problem/12462048>Greg Clayton2012-10-173-11/+25
| | | | | | | | | | | | | | | | | | | LLDB changes argv[0] when debugging a symlink. Now we have the notion of argv0 in the target settings: target.arg0 (string) = There is also the program argument that are separate from the first argument that have existed for a while: target.run-args (arguments) = When running "target create <exe>", we will place the untouched "<exe>" into target.arg0 to ensure when we run, we run with what the user typed. This has been added to the ProcessLaunchInfo and all other needed places so we always carry around the: - resolved executable path - argv0 - program args Some systems may not support separating argv0 from the resolved executable path and the ProcessLaunchInfo needs to carry all of this information along so that each platform can make that decision. llvm-svn: 166137
* Add the ability to set timeout & "run all threads" options both from the ↵Jim Ingham2012-10-164-8/+46
| | | | | | | | | | "expr" command and from the SB API's that evaluate expressions. <rdar://problem/12457211> llvm-svn: 166062
* <rdar://problem/12491387>Greg Clayton2012-10-135-11/+269
| | | | | | | | | | | I added the ability for a process plug-in to implement custom commands. All the lldb_private::Process plug-in has to do is override: virtual CommandObject * GetPluginCommandObject(); This object returned should be a multi-word command that vends LLDB commands. There is a sample implementation in ProcessGDBRemote that is hollowed out. It is intended to be used for sending a custom packet, though the body of the command execute function has yet to be implemented! llvm-svn: 165861
* Bunch of cleanups for warnings found by the llvm static analyzer.Jim Ingham2012-10-121-3/+15
| | | | llvm-svn: 165808
* Change the Thread constructor over to take a Process& rather than a ↵Jim Ingham2012-10-102-4/+5
| | | | | | | | | | | | | ProcessSP. We can't create Threads with a NULL ProcessSP, so it makes no sense to use the SP. Then make the Thread a Broadcaster, and get it to broadcast when the selected frame is changed (but only from the Command Line) and when Thread::ReturnFromFrame changes the stack. Made the Driver use this notification to print the new thread status rather than doing it in the command. Fixed a few places where people were setting their broadcaster class by hand rather than using the static broadcaster class call. <rdar://problem/12383087> llvm-svn: 165640
* Added a new "module" log channel which covers module creation, deletion, and ↵Greg Clayton2012-10-082-1/+3
| | | | | | | | | | common module list actions. Also added a new option for "log enable" which is "--stack" which will print out a stack backtrace for each log line. This was used to track down the leaking module issue I fixed last week. llvm-svn: 165438
* Add one-shot breakpoints (-o option to "break set") and a tbreak alias for ↵Jim Ingham2012-10-051-83/+125
| | | | | | our gdb friends. llvm-svn: 165328
* Ran the sources through the compiler with -Wshadow warningsJason Molenda2012-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | enabled after we'd found a few bugs that were caused by shadowed local variables; the most important issue this turned up was a common mistake of trying to obtain a mutex lock for the scope of a code block by doing Mutex::Locker(m_map_mutex); This doesn't assign the lock object to a local variable; it is a temporary that has its dtor called immediately. Instead, Mutex::Locker locker(m_map_mutex); does what is intended. For some reason -Wshadow happened to highlight these as shadowed variables. I also fixed a few obivous and easy shadowed variable issues across the code base but there are a couple dozen more that should be fixed when someone has a free minute. <rdar://problem/12437585> llvm-svn: 165269
* Add support for debugging KASLR kernels via kdp (the kernel beingJason Molenda2012-09-291-1/+1
| | | | | | | | | | | | | | | | | | loaded at a random offset). To get the kernel's UUID and load address I need to send a kdp packet so I had to implement the kernel relocation (and attempt to find the kernel if none was provided to lldb already) in ProcessKDP -- but this code really properly belongs in DynamicLoaderDarwinKernel. I also had to add an optional Stream to ConnectRemote so ProcessKDP::DoConnectRemote can print feedback about the remote kernel's UUID, load address, and notify the user if we auto-loaded the kernel via the UUID. <rdar://problem/7714201> llvm-svn: 164881
* Implementing plugins that provide commands.Enrico Granata2012-09-282-0/+153
| | | | | | | | | | | | | | | | | | | This checkin adds the capability for LLDB to load plugins from external dylibs that can provide new commands It exports an SBCommand class from the public API layer, and a new SBCommandPluginInterface There is a minimal load-only plugin manager built into the debugger, which can be accessed via Debugger::LoadPlugin. Plugins are loaded from two locations at debugger startup (LLDB.framework/Resources/PlugIns and ~/Library/Application Support/LLDB/PlugIns) and more can be (re)loaded via the "plugin load" command For an example of how to make a plugin, refer to the fooplugin.cpp file in examples/plugins/commands Caveats: Currently, the new API objects and features are not exposed via Python. The new commands can only be "parsed" (i.e. not raw) and get their command line via a char** parameter (we do not expose our internal Args object) There is no unloading feature, which can potentially lead to leaks if you overwrite the commands by reloading the same or different plugins There is no API exposed for option parsing, which means you may need to use getopt or roll-your-own llvm-svn: 164865
* Wrapped up the work I am going to do for now for the "add-dsym" or "target ↵Greg Clayton2012-09-271-111/+233
| | | | | | | | | | | | | | | | | | | | symfile add" command. We can now do: Specify a path to a debug symbols file: (lldb) add-dsym <path-to-dsym> Go and download the dSYM file for the "libunc.dylib" module in your target: (lldb) add-dsym --shlib libunc.dylib Go and download the dSYM given a UUID: (lldb) add-dsym --uuid <UUID> Go and download the dSYM file for the current frame: (lldb) add-dsym --frame llvm-svn: 164806
* Added the ability to download a symboled executable and symbol file given a ↵Greg Clayton2012-09-271-1/+42
| | | | | | UUID. llvm-svn: 164753
* Brought LLDB top-of-tree into sync with LLVM/ClangSean Callanan2012-09-241-1/+1
| | | | | | | | | | | | | top-of-tree. Removed all local patches and llvm.zip. The intent is that fron now on top-of-tree will always build against LLVM/Clang top-of-tree, and that problems building will be resolved as they occur. Stable release branches of LLDB can be constructed as needed and linked to specific release branches of LLVM/Clang. llvm-svn: 164563
* Change the new breakpoint creation output (primarily from "break set") to ↵Jim Ingham2012-09-221-3/+2
| | | | | | | | something more useful. <rdar://problem/11333623> llvm-svn: 164432
* <rdar://problem/12188843> Fixing a problem where a Python command created in ↵Enrico Granata2012-09-181-8/+20
| | | | | | the same module where the target function is defined causes the help string not to come out llvm-svn: 164172
* Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. ↵Greg Clayton2012-09-181-3/+3
| | | | | | Some platforms don't support this modification. llvm-svn: 164148
* "thread step-out" should run all threads by default.Jim Ingham2012-09-141-0/+7
| | | | llvm-svn: 163937
* Use the frame index passed into "thread until" rather than using the ↵Jim Ingham2012-09-141-1/+1
| | | | | | selected frame. llvm-svn: 163936
OpenPOWER on IntegriCloud