summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface/SBDebugger.i
Commit message (Collapse)AuthorAgeFilesLines
* Start to share SWIG interface files between languages.Bruce Mitchener2015-04-241-382/+0
| | | | | | | | | | | | | | | | | | | | Summary: Move scripts/Python/interface to scripts/interface so that we can start making iterative improvements towards sharing the interface files between multiple languages (each of which would have their own directory as now). Test Plan: Build and see. Reviewers: zturner, emaste, clayborg Reviewed By: clayborg Subscribers: mjsabby, lldb-commits Differential Revision: http://reviews.llvm.org/D9212 llvm-svn: 235676
* [swig] Generate bindings for SBDebugger::*UseColor().Bruce Mitchener2015-02-261-0/+6
| | | | | | | | | | | | | | | | Summary: These functions were added in 2013, but not added to the SWIG bindings. Reviewers: ki.stfu, clayborg Reviewed By: ki.stfu, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7909 llvm-svn: 230646
* This adds a "batch mode" to lldb kinda like the gdb batch mode. It will ↵Jim Ingham2014-10-141-1/+2
| | | | | | | | | | | | | | | | quit the debugger after all the commands have been executed except if one of the commands was an execution control command that stopped because of a signal or exception. Also adds a variant of SBCommandInterpreter::HandleCommand that takes an SBExecutionContext. That way you can run an lldb command targeted at a particular target, thread or process w/o having to select same before running the command. Also exposes CommandInterpreter::HandleCommandsFromFile to the SBCommandInterpreter API, since that seemed generally useful. llvm-svn: 219654
* Rework the way we pass "run multiple command" options to the various API's thatJim Ingham2014-10-111-3/+5
| | | | | | | | | | | | | | | do that (RunCommandInterpreter, HandleCommands, HandleCommandsFromFile) to gather the options into an options class. Also expose that to the SB API's. Change the way the "-o" options to the lldb driver are processed so: 1) They are run synchronously - didn't really make any sense to run the asynchronously. 2) The stop on error 3) "quit" in one of the -o commands will not quit lldb - not the command interpreter that was running the -o commands. I added an entry to the run options to stop-on-crash, but I haven't implemented that yet. llvm-svn: 219553
* Merging the iohandler branch back into main. Greg Clayton2014-01-271-10/+5
| | | | | | | | | | | | The many many benefits include: 1 - Input/Output/Error streams are now handled as real streams not a push style input 2 - auto completion in python embedded interpreter 3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use 4 - it is now possible to use curses to drive LLDB (please try the "gui" command) We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases. llvm-svn: 200263
* Expose SBPlatform through the public API.Greg Clayton2013-11-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example code: remote_platform = lldb.SBPlatform("remote-macosx"); remote_platform.SetWorkingDirectory("/private/tmp") debugger.SetSelectedPlatform(remote_platform) connect_options = lldb.SBPlatformConnectOptions("connect://localhost:1111"); err = remote_platform.ConnectRemote(connect_options) if err.Success(): print >> result, 'Connected to remote platform:' print >> result, 'hostname: %s' % (remote_platform.GetHostname()) src = lldb.SBFileSpec("/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework", False) dst = lldb.SBFileSpec() # copy src to platform working directory since "dst" is empty err = remote_platform.Install(src, dst); if err.Success(): print >> result, '%s installed successfully' % (src) else: print >> result, 'error: failed to install "%s": %s' % (src, err) Implemented many calls needed in lldb-platform to be able to install a directory that contains symlinks, file and directories. The remote lldb-platform can now launch GDB servers on the remote system so that remote debugging can be spawned through the remote platform when connected to a remote platform. The API in SBPlatform is subject to change and will be getting many new functions. llvm-svn: 195273
* Fix document typos, indentation in python code, and API examples.Daniel Malea2013-02-121-1/+1
| | | | | | Patch by Bruce Mitchener! llvm-svn: 175002
* Added SBDebugger's log callbacks to Python-landFilipe Cabecinhas2012-08-251-0/+6
| | | | | | | | | | | | | | | | | | | - Tweaked a parameter name in SBDebugger.h so my typemap will catch it; - Added a SBDebugger.Create(bool, callback, baton) to the swig interface; - Added SBDebugger.SetLoggingCallback to the swig interface; - Added a callback utility function for log callbacks; - Guard against Py_None on both callback utility functions; - Added a FIXME to the SBDebugger API test; - Added a __del__() stub for SBDebugger. We need to be able to get both the log callback and baton from an SBDebugger if we want to protect against memory leaks (or make the user responsible for holding another reference to the callback). Additionally, it's impossible to revert from a callback-backed log mechanism to a file-backed log mechanism. llvm-svn: 162633
* A baton isn't needed to dispatch input.Filipe Cabecinhas2012-08-201-1/+1
| | | | | | I also added a typemap to make DispatchInput usable in Python. llvm-svn: 162204
* Print out a notification when the process of a target other than the ↵Jim Ingham2012-05-081-0/+3
| | | | | | currently selected target stops. llvm-svn: 156433
* Add a logging mode that takes a callback and flush'es to that callback.Jim Ingham2012-02-211-0/+6
| | | | | | Also add SB API's to set this callback, and to enable the log channels. llvm-svn: 151018
* <rdar://problem/10062621>Enrico Granata2012-02-151-0/+31
| | | | | | | | | | | | | | | | | | New public API for handling formatters: creating, deleting, modifying categories, and formatters, and managing type/formatter association. This provides SB classes for each of the main object types involved in providing formatter support: SBTypeCategory SBTypeFilter SBTypeFormat SBTypeSummary SBTypeSynthetic plus, an SBTypeNameSpecifier class that is used on the public API layer to abstract the notion that formatters can be applied to plain type-names as well as to regular expressions For naming consistency, this patch also renames a lot of formatters-related classes. Plus, the changes in how flags are handled that started with summaries is now extended to other classes as well. A new enum (lldb::eTypeOption) is meant to support this on the public side. The patch also adds several new calls to the formatter infrastructure that are used to implement by-index accessing and several other design changes required to accommodate the new API layer. An architectural change is introduced in that backing objects for formatters now become writable. On the public API layer, CoW is implemented to prevent unwanted propagation of changes. Lastly, there are some modifications in how the "default" category is constructed and managed in relation to other categories. llvm-svn: 150558
* <rdar://problem/10584789>Greg Clayton2011-12-151-0/+3
| | | | | | | | | | Added a static memory pressure function in SBDebugger: void SBDebugger::MemoryPressureDetected () This can be called by applications that detect memory pressure to cause LLDB to release cached information. llvm-svn: 146640
* Added to the public API to allow symbolication:Greg Clayton2011-09-241-0/+7
| | | | | | | | | | | | | | | | | - New SBSection objects that are object file sections which can be accessed through the SBModule classes. You can get the number of sections, get a section at index, and find a section by name. - SBSections can contain subsections (first find "__TEXT" on darwin, then us the resulting SBSection to find "__text" sub section). - Set load addresses for a SBSection in the SBTarget interface - Set the load addresses of all SBSection in a SBModule in the SBTarget interface - Add a new module the an existing target in the SBTarget interface - Get a SBSection from a SBAddress object This should get us a lot closer to being able to symbolicate using LLDB through the public API. llvm-svn: 140437
* Adding "-n", "-p" and "-w" flags to the lldb command-line tool toJim Ingham2011-09-131-0/+6
| | | | | | allow attaching from the command line. llvm-svn: 139665
* SBSourceManager now gets the real source manager either from the Debugger or ↵Jim Ingham2011-09-131-1/+1
| | | | | | | | Target. Also, move the SourceManager file cache into the debugger so it can be shared amongst the targets. llvm-svn: 139564
* Add SWIG Python interface files for SBDebugger, SBCompileUnit, and SBEvent.Johnny Chen2011-07-181-0/+310
llvm-svn: 135432
OpenPOWER on IntegriCloud