summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
Commit message (Collapse)AuthorAgeFilesLines
...
* <rdar://problem/11975483> Removing user-visible references to 'dict' as a ↵Enrico Granata2012-08-081-6/+6
| | | | | | parameter name for Python summary-generating functions since it is a Python keyword. llvm-svn: 161467
* Made "call" another alias for "expression --",Sean Callanan2012-08-081-0/+2
| | | | | | | | for people used to the GDB command. <rdar://problem/12052072> llvm-svn: 161466
* <rdar://problem/11576169> Better documentation string for the -Y option to ↵Enrico Granata2012-08-081-1/+1
| | | | | | frame variable llvm-svn: 161464
* <rdar://problem/11862570> Fixing a potential crasher related to Python lockingEnrico Granata2012-07-311-2/+2
| | | | llvm-svn: 161054
* Handle backslash protection inside unquoted commands like:Jim Ingham2012-07-211-1/+12
| | | | | | | | | (lldb) file hello\ world correctly. <rdar://problem/11093911> llvm-svn: 160591
* Ran the static analyzer on the codebase and found a few things.Greg Clayton2012-07-171-2/+0
| | | | llvm-svn: 160338
* <rdar://problem/11672978> Fixing an issue where an ObjC object might come ↵Enrico Granata2012-07-161-1/+2
| | | | | | out without a description because the expression used to obtain it would timeout before running to completion llvm-svn: 160326
* <rdar://problem/11791234>Greg Clayton2012-07-121-31/+8
| | | | | | | | | | Fixed a case where the python interpreter could end up holding onto a previous lldb::SBProcess (probably in lldb.process) when run under Xcode. Prior to this fix, the lldb::SBProcess held onto a shared pointer to a lldb_private::Process. This in turn could cause the process to still have a thread list with stack frames. The stack frames would have module shared pointers in the lldb_private::SymbolContext objects. We also had issues with things staying in the shared module list too long when we found things by UUID (we didn't remove the out of date ModuleSP from the global module cache). Now all of this is fixed and everything goes away between runs. llvm-svn: 160140
* Turning the interpreter mutex into a static global to avoid a potential ↵Enrico Granata2012-07-101-2/+2
| | | | | | leak. Might need to be turned back into a pointer if it causes issues with the destructor chain. llvm-svn: 160012
* <rdar://problem/11751427> Fixing an issue where multiple threads could ↵Enrico Granata2012-07-101-0/+10
| | | | | | concurrently try and initialize Python and cause crashes llvm-svn: 160008
* Change the "run" / "r" command alias to not use --shell for lldbJason Molenda2012-07-061-0/+4
| | | | | | | | running natively on arm - on iOS we have to do some extra work to track the inferior process if we launch with a shell intermediary. <rdar://problem/11719396> llvm-svn: 159803
* Make raw & parsed commands subclasses of CommandObject rather than having ↵Jim Ingham2012-06-085-100/+73
| | | | | | | | | | | | | | | | 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
* <rdar://problem/11538779> Fixing issues where Python scripts were not able ↵Enrico Granata2012-06-073-20/+293
| | | | | | to read user input and/or display output to the user in certain situations - This fix introduces a Python InputReader manager class that mimics the behavior of the interactive interpreter in terms of access to I/O and ensures access to the input and output flows llvm-svn: 158124
* Give more explicit error messages when watchpoint creation command ↵Johnny Chen2012-06-041-0/+13
| | | | | | | | (watchpoint set) fails, like number of supported hardware watchpoints reached or the watch size is not allowed. llvm-svn: 157948
* Added "kill" as an alias for "process kill".Sean Callanan2012-06-011-0/+4
| | | | llvm-svn: 157856
* <rdar://problem/11328896> Fixing a bug where regex commands were saved in ↵Enrico Granata2012-05-312-8/+19
| | | | | | the history even if they came from a 'command sourced' file - this fix introduces a command sourcing depth and disables history for all levels of depth > 0, which means no commands go into history when being sourced from a file. we need an integer depth because command files might themselves source other command files, ... llvm-svn: 157727
* Fix arch_helper() to return the list of supported architectures.Johnny Chen2012-05-291-2/+2
| | | | llvm-svn: 157643
* Commit Charles Davis' patch with some additional modifications.Filipe Cabecinhas2012-05-291-12/+124
| | | | llvm-svn: 157621
* Fixed memory management issues introduced by revision 157507. Greg Clayton2012-05-261-6/+9
| | | | | | | | | A local std::string was being filled in and then the function would return "s.c_str()". A local StreamString (which contains a std::string) was being filled in, and essentially also returning the c string from the std::string, though it was in a the StreamString class. The fix was to not do this by passing a stream object into StringList::Join() and fix the "arch_helper()" function to do what it should: cache the result in a global. llvm-svn: 157519
* rdar://problem/11535045Johnny Chen2012-05-261-1/+13
| | | | | | | | Make 'help arch' return the list of supported architectures. Add a convenience method StringList::Join(const char *separator) which is called from the help function for 'arch'. Also add a simple test case. llvm-svn: 157507
* Added an "rb" alias that sets breakpoints bySean Callanan2012-05-211-0/+9
| | | | | | regular expression. llvm-svn: 157202
* <rdar://problem/11405850> Greg Clayton2012-05-181-1/+1
| | | | | | | | | | | | | The "run" and "r" aliases were for gdb compatability, so make then do what GDB does by default: launch in a shell. For those that don't want launching with a shell by default, add the following to your ~/.lldbinit file: command unalias run command unalias r command alias r process launch -- command alias run process launch -- llvm-svn: 157028
* Warn the user when several commands match the input given.Filipe Cabecinhas2012-05-161-2/+22
| | | | | | Added a testcase. llvm-svn: 156961
* Include llvm/ADT/STLExtras.h from lldb/Utility/Utils.h and use ↵Johnny Chen2012-05-157-9/+9
| | | | | | llvm::array_lengthof(), instead. llvm-svn: 156876
* Fixed an issue in the platform options where if no architecture was ↵Greg Clayton2012-05-111-1/+1
| | | | | | | | specified where the platform would fail to select itself with something like: (lldb) platfrom select remote-ios llvm-svn: 156626
* <rdar://problem/11358639>Greg Clayton2012-05-081-2/+15
| | | | | | | | Switch over to the "*-apple-macosx" for desktop and "*-apple-ios" for iOS triples. Also make the selection process for auto selecting platforms based off of an arch much better. llvm-svn: 156354
* Added an "attach" alias as promised on the web page.Sean Callanan2012-05-041-0/+6
| | | | llvm-svn: 156223
* When the current thread state is NULL, PyThreadState_Get() issues a fatal error.Johnny Chen2012-05-041-1/+4
| | | | | | | | Use a gentler API PyThreadState_GetDict(), instead. rdar://problem/11292882 llvm-svn: 156200
* Patch from Viktor Kutuzov: changes the method declarations to const for the ↵Greg Clayton2012-04-251-2/+2
| | | | | | Args::GetCommandString and Agrs::GetQuotedCommandString methods. It allows using of these methods within the other const methods. llvm-svn: 155593
* Returning data formatters to their previous working condition - Plus fixing ↵Enrico Granata2012-04-251-1/+1
| | | | | | an issue that was preventing Python oneliners from executing llvm-svn: 155563
* Now that we have an LLDB package, make the "lldb.macosx.crashlog" module ↵Greg Clayton2012-04-251-1/+1
| | | | | | work with all of the new module paths. llvm-svn: 155528
* Making the Cocoa formatters comply with the new on-disk layout of the Python ↵Enrico Granata2012-04-251-1/+1
| | | | | | resources - This is one of the steps towards making the data formatters work again llvm-svn: 155526
* Maked LLDB into a package so we can import things without poluting the ↵Greg Clayton2012-04-251-9/+4
| | | | | | | | global namespace. Enrico will follow this up with fixing the data formatter test cases that are failing. llvm-svn: 155514
* Report the command error when we are in "stop on error mode."Jim Ingham2012-04-241-4/+7
| | | | llvm-svn: 155422
* Fixing a potential crasher where Python would assume we have no thread state ↵Enrico Granata2012-04-041-8/+15
| | | | | | while clearing out an SBDebugger which was acquiring input from the interactive interpreter llvm-svn: 154027
* Added a "add-dsym" alias to "target symbols add" to keep gdb converts happy.Greg Clayton2012-03-291-0/+6
| | | | llvm-svn: 153695
* Part 1 of a series of fixes meant to improve reliability and increase ease ↵Enrico Granata2012-03-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of bug fixing for data formatter issues. We are introducing a new Logger class on the Python side. This has the same purpose, but is unrelated, to the C++ logging facility The Pythonic logging can be enabled by using the following scripting commands: (lldb) script Logger._lldb_formatters_debug_level = {0,1,2,...} 0 = no logging 1 = do log 2 = flush after logging each line - slower but safer 3 or more = each time a Logger is constructed, log the function that has created it more log levels may be added, each one being more log-active than the previous by default, the log output will come out on your screen, to direct it to a file: (lldb) script Logger._lldb_formatters_debug_filename = 'filename' that will make the output go to the file - set to None to disable the file output and get screen logging back Logging has been enabled for the C++ STL formatters and for Cocoa class NSData - more logging will follow synthetic children providers for classes list and map (both libstdcpp and libcxx) now have internal capping for safety reasons this will fix crashers where a malformed list or map would not ever meet our termination conditions to set the cap to a different value: (lldb) script {gnu_libstdcpp|libcxx}.{map|list}_capping_size = new_cap (by default, it is 255) you can optionally disable the loop detection algorithm for lists (lldb) script {gnu_libstdcpp|libcxx}.list_uses_loop_detector = False llvm-svn: 153676
* adding a summary for Objective-C type 'Class'Enrico Granata2012-03-271-1/+1
| | | | llvm-svn: 153541
* Synthetic values are now automatically enabled and active by default. ↵Enrico Granata2012-03-271-0/+23
| | | | | | | | | | | | SBValue is set up to always wrap a synthetic value when one is available. A new setting enable-synthetic-value is provided on the target to disable this behavior. There also is a new GetNonSyntheticValue() API call on SBValue to go back from synthetic to non-synthetic. There is no call to go from non-synthetic to synthetic. The test suite has been changed accordingly. Fallout from changes to type searching: an hack has to be played to make it possible to use maps that contain std::string due to the special name replacement operated by clang Fixing a test case that was using libstdcpp instead of libc++ - caught as a consequence of said changes to type searching llvm-svn: 153495
* Platforms can now auto-select themselves if you specify a full target triple ↵Greg Clayton2012-03-201-16/+22
| | | | | | | | when doing a "target create" command. Each platform now knows if it can handle an architecture and a platform can be found using an architecture. Each platform can look at the arch, vendor and OS and know if it should be used or not. llvm-svn: 153104
* Massive enumeration name changes: a number of enums in ValueObject were not ↵Enrico Granata2012-03-191-7/+9
| | | | | | | | | | | | | | | | | | following the naming pattern Changes to synthetic children: - the update(self): function can now (optionally) return a value - if it returns boolean value True, ValueObjectSyntheticFilter will not clear its caches across stop-points this should allow better performance for Python-based synthetic children when one can be sure that the child ValueObjects have not changed - making a difference between a synthetic VO and a VO with a synthetic value: now a ValueObjectSyntheticFilter will not return itself as its own synthetic value, but will (correctly) claim to itself be synthetic - cleared up the internal synthetic children architecture to make a more consistent use of pointers and references instead of shared pointers when possible - major cleanup of unnecessary #include, data and functions in ValueObjectSyntheticFilter itself - removed the SyntheticValueType enum and replaced it with a plain boolean (to which it was equivalent in the first place) Some clean ups to the summary generation code Centralized the code that clears out user-visible strings and data in ValueObject More efficient summaries for libc++ containers llvm-svn: 153061
* <rdar://problem/11052829>Greg Clayton2012-03-151-0/+8
| | | | | | | | Fixed a case where if you have a argument stirng that ends with a '\' character, it would infinite loop while consuming all of your memory. Also fixed a case where non-quote terminated strings would inefficiently be handled. llvm-svn: 152809
* Added formatters for libc++ (http://libcxx.llvm.org):Enrico Granata2012-03-121-1/+1
| | | | | | | | | | | | | std::string has a summary provider std::vector std::list and std::map have both a summary and a synthetic children provider Given the usage of a custom namespace (std::__1::classname) for the implementation of libc++, we keep both libstdcpp and libc++ formatters enabled at the same time since that raises no conflicts and enabled for seamless transition between the two The formatters for libc++ reside in a libcxx category, and are loaded from libcxx.py (to be found in examples/synthetic) The formatters-stl test cases have been divided to be separate for libcxx and libstdcpp. This separation is necessary because (a) we need different compiler flags for libc++ than for libstdcpp (b) libc++ inlines a lot more than libstdcpp and some code changes were required to accommodate this difference llvm-svn: 152570
* Fixed a crasher when Xcode calls into ↵Johnny Chen2012-03-081-6/+15
| | | | | | | | | ScriptInterpreterPython::ResetOutputFileHandle(). The Locker should only perform acquire/free lock operation, but no enter/leave session at all. Also added sanity checks for items passed to the PyDict_SetItemString() calls. llvm-svn: 152337
* Using the new ScriptInterpreterObject in the implementation of synthetic ↵Enrico Granata2012-03-061-321/+156
| | | | | | | | | children to enhance type safety Several places in the ScriptInterpreter interface used StringList objects where an std::string would suffice - Fixed Refactoring calls that generated special-purposes functions in the Python interpreter to use helper functions instead of duplicating blobs of code llvm-svn: 152164
* Add a command and an SB API to create exception breakpoints. Make the break ↵Jim Ingham2012-03-061-0/+1
| | | | | | output prettier for Exception breakpoints. llvm-svn: 152081
* added a new formatter for CF(Mutable)BitVectorEnrico Granata2012-03-031-1/+1
| | | | | | | | fixed a few potential NULL-pointer derefs in ValueObject we have a way to provide docstrings for properties we add to the SWIG layer - a few of these properties have a docstring already, more will come in future commits added a new bunch of properties to SBData to make it more natural and Python-like to access the data they contain llvm-svn: 151962
* (a) adding formatters for:Enrico Granata2012-03-021-1/+1
| | | | | | | | NSTimeZone and CFTimeZonRef SEL and related types CFGregorianDate llvm-svn: 151866
* (a) adding an introspection formatter for NS(Mutable)IndexSetEnrico Granata2012-03-011-1/+1
| | | | | | | | | (b) fixes and improvements to the formatters for NSDate and NSString (c) adding an introspection formatter for NSCountedSet (d) making the Objective-C formatters test cases pass on both 64 and 32 bit one of the test cases is marked as expected failure on i386 - support needs to be added to the LLDB core for it to pass llvm-svn: 151826
* <rdar://problem/10605072>Greg Clayton2012-02-292-14/+26
| | | | | | | | | | | | | Added the ability to override command line commands. In some cases GUI interfaces might want to intercept commands like "quit" or "process launch" (which might cause the process to re-run). They can now do so by overriding/intercepting commands by using functions added to SBCommandInterpreter using a callback function. If the callback function returns true, the command is assumed to be handled. If false is returned the command should be evaluated normally. Adopted this up in the Driver.cpp for intercepting the "quit" command. llvm-svn: 151708
OpenPOWER on IntegriCloud