summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
Commit message (Collapse)AuthorAgeFilesLines
...
* This patch does a couple of things. Jim Ingham2013-11-072-12/+12
| | | | | | | | | | | | | | | | | | | | | | It completes the job of using EvaluateExpressionOptions consistently throughout the inferior function calling mechanism in lldb begun in Greg's patch r194009. It removes a handful of alternate calls into the ClangUserExpression/ClangFunction/ThreadPlanCallFunction which were there for convenience. Using the EvaluateExpressionOptions removes the need for them. Using that it gets the --debug option from Greg's patch to work cleanly. It also adds another EvaluateExpressionOption to not trap exceptions when running expressions. You shouldn't use this option unless you KNOW your expression can't throw beyond itself. This is: <rdar://problem/15374885> At present this is only available through the SB API's or python. It fixes a bug where function calls would unset the ObjC & C++ exception breakpoints without checking whether they were set by somebody else already. llvm-svn: 194182
* Spelling fix.Sean Callanan2013-11-061-1/+1
| | | | llvm-svn: 194163
* Added Iterable, a class that vends standard C++Sean Callanan2013-11-062-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iterators for LLDB's container data structures. Iterable abstracts over the backing data structure, ignoring keys for maps for example. It also provides locking as a service so that the code for (ThreadSP thread_sp : process->Threads()) { // ... use thread_sp } takes the appropriate locks once, without having to do anything else. The salient advantages of this system are: - Much simpler and idiomatic loop code - Lock once instead of each time an element is fetched - Less boilerplate to produce the iterators The intent is that Iterable will replace Get...AtIndex in most places, and that ForEach(), which solves the same problem in a less-idiomatic way, be phased out in favor of this approach. I've added Iterables to ThreadList, TypeList, and Process (which is really just forwarding to ThreadList). llvm-svn: 194159
* Give a better error when the index argument for “frame select” can’t ↵Jim Ingham2013-11-051-1/+8
| | | | | | | | be parsed. <rdar://problem/15390829> llvm-svn: 194087
* Added a "--debug" option to the "expression" command. Greg Clayton2013-11-042-2/+14
| | | | | | | | Cleaned up ClangUserExpression::Evaluate() to have only one variant that takes a "const EvaluateExpressionOptions& options" instead of taking many arguments. The "--debug" option is designed to allow you to debug your expression by stopping at the first instruction (it enables --ignore-breakpoints=true and --unwind-on-error=false) and allowing you to step through your JIT code. It needs to be more integrated with the thread plan, so I am checking this in so Jim Ingham can make it happen. llvm-svn: 194009
* Roll back the changes I made in r193907 which created a new FrameJason Molenda2013-11-049-26/+26
| | | | | | | | | | pure virtual base class and made StackFrame a subclass of that. As I started to build on top of that arrangement today, I found that it wasn't working out like I intended. Instead I'll try sticking with the single StackFrame class -- there's too much code duplication to make a more complicated class hierarchy sensible I think. llvm-svn: 193983
* Add a new base class, Frame. It is a pure virtual function whichJason Molenda2013-11-029-26/+26
| | | | | | | | | | | | | | | | | | | | | defines a protocol that all subclasses will implement. StackFrame is currently the only subclass and the methods that Frame vends are nearly identical to StackFrame's old methods. Update all callers to use Frame*/Frame& instead of pointers to StackFrames. This is almost entirely a mechanical change that touches a lot of the code base so I'm committing it alone. No new functionality is added with this patch, no new subclasses of Frame exist yet. I'll probably need to tweak some of the separation, possibly moving some of StackFrame's methods up in to Frame, but this is a good starting point. <rdar://problem/15314068> llvm-svn: 193907
* Fix the format warnings.Sylvestre Ledru2013-10-313-16/+16
| | | | | | | | | | In almost all cases, the misuse is about "%lu" being used instead of the correct "%zu" (even though these are compatible on 64-bit platforms in practice). There are even a couple of cases where "%ld" (ie., signed int) is used instead of "%zu", and one where "%lu" is used instead of "%" PRIu64. Fixes bug #17551. Patch by "/dev/humancontroller" llvm-svn: 193832
* <rdar://problem/15296388>Enrico Granata2013-10-291-9/+21
| | | | | | | | | | Fix a crasher that would occur if one tried to read memory as characters of some size != 1, e.g. x -f c -s 10 buffer This commit tries to do the right thing and uses the byte-size as the number of elements, unless both are specified and the number of elements is != 1 In this latter case (e.g. x -f c -s 10 -c 3 buffer) one could multiply the two and read 30 characters, but it seems a stretch in mind reading. llvm-svn: 193659
* <rdar://problem/13635174>Greg Clayton2013-10-111-13/+36
| | | | | | | | Added a way to set hardware breakpoints from the "breakpoint set" command with the new "--hardware" option. Hardware breakpoints are not a request, they currently are a requirement. So when breakpoints are specified as hardware breakpoints, they might fail to be set when they are able to be resolved and should be used sparingly. This is currently hooked up for GDB remote debugging. Linux and FreeBSD should quickly enable this feature if possible, or return an error for any breakpoints that are hardware breakpoint sites in the "virtual Error Process::EnableBreakpointSite (BreakpointSite *bp_site);" function. llvm-svn: 192491
* Allow Process::WaitForProcessToStop to return immediately if process is ↵Daniel Malea2013-10-091-1/+1
| | | | | | | | | already in the stopped state - By default, the above function will wait for at least one event - Set wait_always=false to make the function return immediately if the process is already stopped llvm-svn: 192301
* <rdar://problem/11778815>Enrico Granata2013-10-081-18/+364
| | | | | | | Formats (as in "type format") are now included in categories The only bit missing is caching formats along with synthetic children and summaries, which might be now desirable llvm-svn: 192217
* Made all other "operator bool"s explicit and ensuredSean Callanan2013-10-041-1/+1
| | | | | | | | | | that all clients use them explicitly. This will hopefully prevent any future confusion where things get cast to types we don't expect. <rdar://problem/15146458> llvm-svn: 191984
* <rdar://problem/14393032>Enrico Granata2013-09-305-23/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DumpValueObject() 2.0 This checkin restores pre-Xcode5 functionality to the "po" (expr -O) command: - expr now has a new --description-verbosity (-v) argument, which takes either compact or full as a value (-v is the same as -vfull) When the full mode is on, "po" will show the extended output with type name, persistent variable name and value, as in (lldb) expr -O -v -- foo (id) $0 = 0x000000010010baf0 { 1 = 2; 2 = 3; } When -v is omitted, or -vcompact is passed, the Xcode5-style output will be shown, as in (lldb) expr -O -- foo { 1 = 2; 2 = 3; } - for a non-ObjectiveC object, LLDB will still try to retrieve a summary and/or value to display (lldb) po 5 5 -v also works in this mode (lldb) expr -O -vfull -- 5 (int) $4 = 5 On top of that, this is a major refactoring of the ValueObject printing code. The functionality is now factored into a ValueObjectPrinter class for easier maintenance in the future DumpValueObject() was turned into an instance method ValueObject::Dump() which simply calls through to the printer code, Dump_Impl has been removed Test case to follow llvm-svn: 191694
* Display the errno error message instead of the idSylvestre Ledru2013-09-281-1/+1
| | | | llvm-svn: 191621
* Fix a couple of typos in the help text for disassembleBen Langmuir2013-09-261-1/+1
| | | | llvm-svn: 191452
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-251-31/+31
| | | | llvm-svn: 191367
* Adds an option to resolve a symbol from an address that can be usedAshok Thirumurthi2013-09-241-1/+3
| | | | | | | | | | | | | | | | | to build out the symbol table as addresses are used, and implements the mechanism for ELF to add stripped symbols from eh_frame. Uses this mechanism to allow disassembly for addresses corresponding to stripped symbols for ELF, and provide hooks to implement this for PE COFF. Also removes eSymbolContextTailCall in favor of an option for ResolveSymbolContextForAddress for consistency with the documentation for eSymbolContextEverything. Essentially, this is just an option for interpreting the so_addr. llvm-svn: 191307
* Fixing a problem where CommandObjectThreadContinue held the thread list lock ↵Andrew Kaylor2013-09-121-9/+18
| | | | | | while waiting for the process to stop after a continue. llvm-svn: 190626
* Added a 'jump' command, similar to GDBs.Richard Mitton2013-09-121-0/+203
| | | | | | | | | This allows the PC to be directly changed to a different line. It's similar to the example python script in examples/python/jump.py, except implemented as a builtin. Also this version will track the current function correctly even if the target line resolves to multiple addresses. (e.g. debugging a templated function) llvm-svn: 190572
* When target module add/SBTarget::AddModule()'ing, if an architecture isn't ↵Jason Molenda2013-09-111-0/+2
| | | | | | | | | specifically requested, use the Target's architecture to pick the correct slice of a universal file. <rdar://problem/14813869> llvm-svn: 190550
* <rdar://problem/14728845>Enrico Granata2013-09-091-1/+11
| | | | | | Making the --timeout (-t) option to "platform shell" work for real llvm-svn: 190361
* Add OptionParser.hVirgile Bello2013-09-0520-262/+262
| | | | llvm-svn: 190063
* Fix a bunch of compile time warnings and a build failure on ubuntu.Eric Christopher2013-08-301-1/+0
| | | | llvm-svn: 189683
* Cleanup/rearrange includes:Virgile Bello2013-08-281-0/+2
| | | | | | | - factorize unistd.h and stdbool.h in lldb-types.h. - Add <functional> and <string> where required. llvm-svn: 189477
* Fix 'platform shell' command for Linux host and remote lldb-platform connectionsDaniel Malea2013-08-271-2/+2
| | | | | | | - add default timeout of 10s (unil qPlatform_RunCommand supports timeout packets and CommandObjectPlatform is updated to read a timeout flag/setting) - add a few tests for platform shell llvm-svn: 189405
* Remove need of <functional> for CommandObjectCommands.Virgile Bello2013-08-271-3/+3
| | | | llvm-svn: 189365
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-262-30/+1461
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This merge brings in the improved 'platform' command that knows how to interface with remote machines; that is, query OS/kernel information, push and pull files, run shell commands, etc... and implementation for the new communication packets that back that interface, at least on Darwin based operating systems via the POSIXPlatform class. Linux support is coming soon. Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS X Mountain Lion. Additional improvements (not in the source SVN branch 'lldb-platform-work'): - cmake build scripts for lldb-platform - cleanup test suite - documentation stub for qPlatform_RunCommand - use log class instead of printf() directly - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely. - add new logging category 'platform' Reviewers: Matt Kopec, Greg Clayton Review: http://llvm-reviews.chandlerc.com/D1493 llvm-svn: 189295
* unused variable, typedef requires name warning cleanupMichael Sartain2013-08-261-2/+1
| | | | llvm-svn: 189231
* MingW compilation (windows). Includes various refactoring to improve ↵Virgile Bello2013-08-231-53/+76
| | | | | | portability. llvm-svn: 189107
* add error checking and messages to 'target modules show-unwind' commandMichael Sartain2013-08-221-0/+18
| | | | llvm-svn: 189058
* Send a stop event when an expression stops at a breakpointSean Callanan2013-07-301-30/+1
| | | | | | | | | | in an expression and doesn't ignore the stop. Patch by Jim Ingham. <rdar://problem/14583884> llvm-svn: 187434
* Fixed several problems with watchpoint expressions.Sean Callanan2013-07-251-0/+2
| | | | | | | | | | | | | | | | - First, the watchpoint size was being cast to the wrong type. This is primarily cosmetic, but annoying. - Second, the options for the watchpoint command were not being initialized correctly, which led to the watchpoint size sometimes having absurdly large values. This caused watchpoints to fail to be set in some cases. <rdar://problem/12658775> llvm-svn: 187169
* <rdar://problem/14521548>Greg Clayton2013-07-241-0/+13
| | | | | | Fixed a crasher where if you accidentally specify a size that is too large when reading memory, LLDB would crash. llvm-svn: 187060
* This commit does two things. One, it converts the return value of the ↵Jim Ingham2013-07-181-17/+17
| | | | | | | | | | | | | QueueThreadPlanXXX plan providers from a "ThreadPlan *" to a "lldb::ThreadPlanSP". That was needed to fix a bug where the ThreadPlanStepInRange wasn't checking with its sub-plans to make sure they succeed before trying to proceed further. If the sub-plan failed and as a result didn't make any progress, you could end up retrying the same failing algorithm in an infinite loop. <rdar://problem/14043602> llvm-svn: 186618
* Fixed GetModuleSpecifications() to work better overall:Greg Clayton2013-07-121-1/+1
| | | | | | | | | | | - MachO files now correctly extract the UUID all the time - More file size and offset verification done for universal mach-o files to watch for truncated files - ObjectContainerBSDArchive now supports enumerating all objects in BSD archives (.a files) - lldb_private::Module() can not be properly constructed using a ModuleSpec for a .o file in a .a file - The BSD archive plug-in shares its cache for GetModuleSpecifications() and the create callback - Improved printing for ModuleSpec objects llvm-svn: 186211
* Huge change to clean up types.Greg Clayton2013-07-115-23/+28
| | | | | | | | A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error. This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness. llvm-svn: 186130
* Fix "source list -n printf" on Linux (printf is symbol alias for __printf)Michael Sartain2013-07-111-28/+96
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1109 llvm-svn: 186104
* Add a -remote-file option to “target create” to specify the location of ↵Jim Ingham2013-07-111-2/+15
| | | | | | the executable on a remote system (if debugging remotely using debugserver on the target system.) This gets us closer to being able to set up a remote debugging session from the lldb command line. llvm-svn: 186050
* Cleanup on the unified section list changes. Main changes are:Greg Clayton2013-07-101-2/+2
| | | | | | | | | | | | | | | - ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags - Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections. Other cleanups: - Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly - Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently - Modified the Symtab class to store a file address lookup table for more efficient lookups - Removed Section::Finalize() and SectionList::Finalize() as they did nothing - Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs - Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement) llvm-svn: 185990
* Add silent option to command source.Michael Sartain2013-07-091-1/+9
| | | | | | Patch from Matthew Sorrels llvm-svn: 185983
* Revert commits that cause broken builds on GCC buildbotsDaniel Malea2013-07-031-3/+1
| | | | | | | | - build fails due to PyCallable template definition inside an extern "C" scope This commit reverts 185240, 184893 and 184608. llvm-svn: 185560
* Use the "last created watchpoint" rather than asserting on watchpoint ↵Jim Ingham2013-07-023-12/+24
| | | | | | | | commands passing no watchpoint ID. <rdar://problem/14327560> llvm-svn: 185406
* Split symbol support for ELF and Linux.Michael Sartain2013-07-011-18/+14
| | | | llvm-svn: 185366
* <rdar://problem/14266578>Enrico Granata2013-06-261-3/+1
| | | | | | "command source" was not properly setting the stop-on-error option llvm-svn: 184899
* <rdar://problem/14243761>Enrico Granata2013-06-261-5/+5
| | | | | | | | | The argument to -w (--category) in type * list is a regular expression This caused unhappiness with the gnu-libstdc++ category because of the double ++ Now we check for exact textual match as-well-as regexp matching llvm-svn: 184898
* <rdar://problem/14266411>Enrico Granata2013-06-251-1/+3
| | | | | | | | | | | | The semi-unofficial way of returning a status from a Python command was to return a string (e.g. return "no such variable was found") that LLDB would pick as a clue of an error having happened This checkin changes that: - SBCommandReturnObject now exports a SetError() call, which can take an SBError or a plain C-string - script commands now drop any return value and expect the SBCommandReturnObject ("return object") to be filled in appropriately - if you do nothing, a success will be assumed If your commands were relying on returning a value and having LLDB pick that up as an error, please change your commands to SetError() through the return object or expect changes in behavior llvm-svn: 184893
* Sort out a number of mismatched integer types in order to cut down the ↵Andy Gibbs2013-06-193-4/+4
| | | | | | number of compiler warnings. llvm-svn: 184333
* We were getting an assert because somebody was making a watchpoint that wasJim Ingham2013-06-181-7/+8
| | | | | | | | neither read nor write. Tighten up the checking so this isn't possible. <rdar://problem/14111167> llvm-svn: 184245
* Fix the help for "image dump line-table" - its arguments are compilation ↵Jim Ingham2013-06-181-1/+1
| | | | | | units not modules. llvm-svn: 184226
OpenPOWER on IntegriCloud