summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
Commit message (Collapse)AuthorAgeFilesLines
...
* Extended the "watchpoint set variable" code toSean Callanan2012-09-141-0/+33
| | | | | | | | support watchpoints on globals. <rdar://problem/12297238> llvm-svn: 163913
* <rdar://problem/11374963>Greg Clayton2012-09-141-2/+3
| | | | | | When attaching on ARM hosted debuggers we were incorrectly setting the triple to "arm-apple-ios". This was happening because in the post attach code, we would lookup the process info through the platform, and if successful, we would get the architecture of the process. This code uses sysctl() calls, but we can only get the CPU type, not the subtype, so we would get ARM for CPU type and nothing for the cpu subtype, so this would map to "arm-apple-ios". I fixed the code to get the cpu subtype from "hw.cpusubtype" which is what we really want for ARM, and not the architecture is already correct. "add-dsym" then works like a charm. I also improved the command output when the architecture changes to show the entire triple instead of just the arch name. llvm-svn: 163868
* Make the unwinding of the stack part of "thread return" work, and add the ↵Jim Ingham2012-09-141-0/+103
| | | | | | thread return command. llvm-svn: 163867
* Made the help for the -n option onSean Callanan2012-09-131-13/+13
| | | | | | | | | | "target image lookup" a bit better documented by indicating that it takes symbols OR functions. <rdar://problem/12281325> llvm-svn: 163839
* <rdar://problem/11374963>Greg Clayton2012-09-121-1/+10
| | | | | | Partial fix for the above radar where we now resolve dsym mach-o files within the dSYM bundle when using "add-dsym" through the platform. llvm-svn: 163676
* Change the NULL to a 0 since we need a uint32_tFilipe Cabecinhas2012-09-117-19/+19
| | | | llvm-svn: 163625
* Fixed a few places where we were doing:Jim Ingham2012-09-102-6/+11
| | | | | | | | | uint32_t size = ThreadList.GetSize(); for (i=0; i < size; ++i) without grabbing the thread list mutex. llvm-svn: 163541
* Implementing an Options class for EvaluateExpression() in order to make the ↵Enrico Granata2012-09-052-15/+15
| | | | | | signature more compact and make it easy to 'just run an expression' llvm-svn: 163239
* <rdar://problem/11757916>Greg Clayton2012-08-2911-19/+35
| | | | | | | | | | | | Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes: - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was. - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile() Cleaned up header includes a bit as well. llvm-svn: 162860
* Fix a redundant computation.Johnny Chen2012-08-281-1/+1
| | | | llvm-svn: 162794
* Remove further outdated "settings" code and also implement a few missing things.Greg Clayton2012-08-221-5/+0
| | | | llvm-svn: 162376
* Reimplemented the code that backed the "settings" in lldb. There were many ↵Greg Clayton2012-08-227-380/+258
| | | | | | | | | | | | | issues with the previous implementation: - no setting auto completion - very manual and error prone way of getting/setting variables - tons of code duplication - useless instance names for processes, threads Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing". llvm-svn: 162366
* rdar://problem/11324515Johnny Chen2012-08-221-1/+20
| | | | | | | 'add-dsym' (aka 'target symbols add') should display error messages when dsym file is not found or the dsym uuid does not match any existing modules. Add TestAddDsymCommand.py test file. llvm-svn: 162332
* Fixed some small formatting issues in the help forSean Callanan2012-08-161-2/+4
| | | | | | | | | "command regex." It's now more readable and grammatically correct. <rdar://problem/12115962> llvm-svn: 162047
* rdar://problem/12096295Johnny Chen2012-08-151-1/+1
| | | | | | | Add an lldb command line option to specify a core file: --core/-c. For consistency, change the "target create" command to also use --core. llvm-svn: 161993
* Fixed a typo.Sean Callanan2012-08-151-1/+1
| | | | | | <rdar://problem/12090979> llvm-svn: 161910
* <rdar://problem/11589605> Making a Enrico Granata2012-08-141-13/+35
| | | | | | | 'type category enable *' command to match 'type category disable *' llvm-svn: 161882
* rdar://problem/12007576Johnny Chen2012-08-131-3/+11
| | | | | | | Record the snapshot of our watched value when the watchpoint is set or hit. And report the old/new values when watchpoint is triggered. Add some test scenarios. llvm-svn: 161785
* Add an option to "process continue" to ignore the next <N> crossings of the ↵Jim Ingham2012-08-111-3/+107
| | | | | | | | | | breakpoint under the currently selected thread. <rdar://problem/10458225> llvm-svn: 161723
* Use the file completer for "process launch" arguments.Jim Ingham2012-08-101-0/+24
| | | | | | <rdar://problem/11274012> llvm-svn: 161704
* rdar://problem/11457143 [ER] need "watchpoint command ..."Johnny Chen2012-08-093-0/+899
| | | | | | Add 'watchpoint command add/delete/list' to lldb, plus two .py test files. llvm-svn: 161638
* <rdar://problem/11578397> Adding a new --summary-string option for the frame ↵Enrico Granata2012-08-091-2/+4
| | | | | | variable command which allows the user to provide a summary string with which he wants to display the variables without having to make a named summary first llvm-svn: 161623
* <rdar://problem/10449092> Adding a new uppercase hex format specifier. This ↵Enrico Granata2012-08-091-0/+1
| | | | | | commit also changes the short names for formats so that uppercase hex can be 'X', which was previously assigned to hex float. hex float now has no short name. llvm-svn: 161606
* LLDB no longer prints <no result> by default ifSean Callanan2012-08-091-5/+5
| | | | | | | | | | | the expression returns nothing. There is now a setting, "notify-void." When the user enables that setting, lldb prints (void) if an expression's result is void. Otherwise, lldb is silent. <rdar://problem/11225150> llvm-svn: 161600
* <rdar://problem/11505459> Stripping off the object's type from the output of ↵Enrico Granata2012-08-091-1/+2
| | | | | | the 'po' command llvm-svn: 161592
* Removed explicit NULL checks for shared pointersSean Callanan2012-08-091-1/+1
| | | | | | | | | and instead made us use implicit casts to bool. This generated a warning in C++11. <rdar://problem/11930775> llvm-svn: 161559
* Added a 'void' format so that the user can manuallySean Callanan2012-08-082-29/+37
| | | | | | | | | suppress all non-error output from the "expression" command. <rdar://problem/11225150> llvm-svn: 161502
* <rdar://problem/11975483> Removing user-visible references to 'dict' as a ↵Enrico Granata2012-08-083-4/+4
| | | | | | parameter name for Python summary-generating functions since it is a Python keyword. llvm-svn: 161467
* Instructions generated by a disassembler can nowSean Callanan2012-08-011-1/+1
| | | | | | | | | | | | | | | | | | keep a shared pointer to their disassembler. This is important for the LLVM-C disassembler because it needs to lock its parent in order to disassemble itself. This means that every interface that returned a Disassembler* needs to return a DisassemblerSP, so that the instructions and any external owners share the same reference count on the object. I changed all clients to use this shared pointer, which also plugged a few leaks. <rdar://problem/12002822> llvm-svn: 161123
* Added an lldb_private & equivalent SB API to send an AsyncInterrupt to the ↵Jim Ingham2012-07-271-0/+1
| | | | | | | | | | | | | | event loop. Convert from calling Halt in the lldb Driver.cpp's input reader's sigint handler to sending this AsyncInterrupt so it can be handled in the event loop. If you are attaching and get an async interrupt, abort the attach attempt. Also remember to destroy the process if get interrupted while attaching. Getting this to work also required handing the eBroadcastBitInterrupt in a few more places in Process WaitForEvent & friends. <rdar://problem/10792425> llvm-svn: 160903
* Add "vAttachOrWait" to debugserver, so you can implement "attach to the ↵Jim Ingham2012-07-201-5/+10
| | | | | | process if it exists OR wait for it" without race conditions. Use that in lldb. llvm-svn: 160578
* Ran the static analyzer on the codebase and found a few things.Greg Clayton2012-07-173-29/+18
| | | | llvm-svn: 160338
* <rdar://problem/11672978> Fixing an issue where an ObjC object might come ↵Enrico Granata2012-07-162-2/+4
| | | | | | out without a description because the expression used to obtain it would timeout before running to completion llvm-svn: 160326
* <rdar://problem/11870357>Greg Clayton2012-07-142-2/+4
| | | | | | Allow "frame variable" to find ivars without the need for "this->" or "self->". llvm-svn: 160211
* Add a new 'target modules show-unwind' command to show the differentJason Molenda2012-07-121-0/+237
| | | | | | | | | | | | UnwindPlans for a function. This specifically does not use any previously-generated UnwindPlans so if any logging is performed while creating the UnwindPlans, it will be repeated. This is useful for when an lldb stack trace is not correct and you want to gather diagnostic information from the user -- they can do log enable -v lldb unwind, image show-unwind of the function, and you'll get the full logging as the UnwindPlans are recreated. llvm-svn: 160095
* Fixed an issue where if you ask to search the global list of modules for a ↵Greg Clayton2012-07-111-21/+22
| | | | | | module with "target modules list", if it found a match in the current target, it would skip looking at the global list. Now if you ask for the global list, we use it and skip the target. llvm-svn: 160072
* <rdar://problem/11852100>Greg Clayton2012-07-111-8/+1
| | | | | | The "stop-line-count-after" and "stop-line-count-before" settings are broken. This fixes them. llvm-svn: 160071
* Fixed a hang which causes LLDB to enter an infiniteSean Callanan2012-07-101-4/+37
| | | | | | | | | | | | | loop if "memory read" is run with the -t option and the type name contains a keyword like "struct" that isn't followed by a space. Now if a keyword isn't followed by a space we continue searching after it, instead of at the beginning of the type name. Also optimized the code to not call strlen() on a fixed set of statically-declared constant strings. llvm-svn: 160016
* Make error messages more user-friendly for the 'target delete' command.Filipe Cabecinhas2012-07-091-3/+15
| | | | llvm-svn: 159927
* <rdar://problem/11357711>Greg Clayton2012-07-071-1/+1
| | | | | | Fixed a crasher where the section load list was not thread safe. llvm-svn: 159884
* <rdar://problem/11800213>Greg Clayton2012-07-031-27/+31
| | | | | | Fixed a crasher in the "thread continue" code. There were many logic errors in the DoExecute function where thread index IDs were being used where the actual zero based thread index should have been used. This could cause crashes to happen since looking up a thread by index ID, when the zero based index of a thread should be used would return an empty thread shared pointer and cause a NULL deref. llvm-svn: 159686
* Make 'watchpoint set' default to write instead of read_write.Johnny Chen2012-06-291-6/+6
| | | | llvm-svn: 159455
* Fixed the "target modules list" to not crash in Debug builds due to an ↵Greg Clayton2012-06-271-2/+4
| | | | | | assertion where the mutex in the "module_list" local variable would assert when the lldb_private::Mutex would destruct. What was happening was the mutex in the module list was being locked by a local locker object and then "module_list" would get destroyed before the locker and the locker still had the mutex locked which would cause the pthread call to destroy the mutex to fail with "Resource busy" and it would cause a mutex leak. llvm-svn: 159291
* Make a way to set the result status for Python defined commands, and don't ↵Jim Ingham2012-06-271-1/+12
| | | | | | | | overwrite the status of the result if the python command has set it. llvm-svn: 159273
* Chnage VerifyWatchpointIDs() from a static function to a class function to ↵Johnny Chen2012-06-192-8/+12
| | | | | | be called from other source files. llvm-svn: 158751
* Make raw & parsed commands subclasses of CommandObject rather than having ↵Jim Ingham2012-06-0837-6221/+5306
| | | | | | | | | | | | | | | | the raw version implement an Execute which was never going to get run and another ExecuteRawCommandString. Took the knowledge of how to prepare raw & parsed commands out of CommandInterpreter and put it in CommandObject where it belongs. Also took all the cases where there were the subcommands of Multiword commands declared in the .h file for the overall command and moved them into the .cpp file. Made the CommandObject flags work for raw as well as parsed commands. Made "expr" use the flags so that it requires you to be paused to run "expr". llvm-svn: 158235
* Added the --all argument to "target modules lookup"Sean Callanan2012-06-061-3/+130
| | | | | | | | | | | | | that forces all matches to be looked up. When --all is not passed, and the current execution frame can be used to narrow down the search, "target modules lookup" will try searching in that specific frame first. Only if nothing is turned up there will it go on to search all modules. This feature is currently enabled only for types. llvm-svn: 158107
* rdar://problem/11598332Johnny Chen2012-06-051-1/+1
| | | | | | | | | | | | | The output of 'register read' should be prettier. Modify RegisterValue::Dump() to take an additional parameter: uint32_t reg_name_right_align_at which defaults to 0 (i.e., no alignment at all). Update the 'register read' command impl to pass 8 as the alignment to RegisterValue::Dump() method. If more sophisticated scheme is desired, we will need to introduce an additional command option to 'register read' later on. llvm-svn: 158039
* rdar://problem/11597911Johnny Chen2012-06-051-2/+3
| | | | | | | | Fix confusing error message about "expression did not evaluate to an address" when doing 'watchpoint set expression". Instead of using 0 as the fail_value when invoking ValueObject::GetValueAsUnsigned(), modify the API to take an addition bool pointer (defaults to NULL) to indicate success/failure of value conversion. llvm-svn: 158016
* rdar://problem/11584012Johnny Chen2012-06-041-28/+8
| | | | | | | | | | | Refactorings of watchpoint creation APIs so that SBTarget::WatchAddress(), SBValue::Watch(), and SBValue::WatchPointee() now take an additional 'SBError &error' parameter (at the end) to contain the reason if there is some failure in the operation. Update 'watchpoint set variable/expression' commands to take advantage of that. Update existing test cases to reflect the API change and add test cases to verify that the SBError mechanism works for SBTarget::WatchAddress() by passing an invalid watch_size. llvm-svn: 157964
OpenPOWER on IntegriCloud