summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
Commit message (Collapse)AuthorAgeFilesLines
...
* Added a new "lldb" log channel named "os" for the OperatingSystem plug-ins ↵Greg Clayton2013-05-221-1/+26
| | | | | | | | to use. Added logging for the OS plug-in python objects in OperatingSystemPython so we can see the python dictionary returned from the plug-in when logging is enabled. llvm-svn: 182530
* Apropos should search user commands as well as built-in commands.Jim Ingham2013-05-171-14/+39
| | | | | | rdar://problem/13916722 llvm-svn: 182068
* <rdar://problem/11158023>Enrico Granata2013-05-161-2/+8
| | | | | | Make type summary add and breakpoint command add show an helpful prototype + argument reference when manually typing Python code for these elements llvm-svn: 181968
* <rdar://problem/13892319>Greg Clayton2013-05-151-1/+1
| | | | | | The command "po" by itself yields odd errors. I fixed the alias. llvm-svn: 181856
* <rdar://problem/13854277>Greg Clayton2013-05-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <rdar://problem/13594769> Main changes in this patch include: - cleanup plug-in interface and use ConstStrings for plug-in names - Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp - Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging The plug-in interface changes: Modified the lldb_private::PluginInterface class that all plug-ins inherit from: Changed: virtual const char * GetPluginName() = 0; To: virtual ConstString GetPluginName() = 0; Removed: virtual const char * GetShortPluginName() = 0; - Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names. - Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc. llvm-svn: 181631
* Test case added for importing packagesEnrico Granata2013-05-081-8/+10
| | | | llvm-svn: 181472
* Improvements to the package importing feature - test case will followEnrico Granata2013-05-081-4/+14
| | | | llvm-svn: 181461
* Remove the UUID::GetAsCString() method which required a buffer to save the Jason Molenda2013-05-031-3/+4
| | | | | | | UUID string in; added UUID::GetAsString() which returns the uuid string in a std::string. Updated callers to use the new method. llvm-svn: 181078
* Fixed 'command script import' by eliminating the shadowing of basename.Ashok Thirumurthi2013-05-031-2/+1
| | | | | | Reviewed by: Daniel Malea llvm-svn: 181027
* <rdar://problem/11558812>Enrico Granata2013-05-021-27/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow command script import to load packages. e.g.: egranata$ ./lldb (lldb) command script import lldb.macosx.crashlog "crashlog" and "save_crashlog" command installed, use the "--help" option for detailed help "malloc_info", "ptr_refs", "cstr_refs", and "objc_refs" commands have been installed, use the "--help" options on these commands for detailed help. The "unwind-diagnose" command has been installed, type "help unwind-diagnose" for detailed help. (lldb) ./lldb (lldb) command script import theFoo I am happy (lldb) fbc àèìòù (lldb) egranata$ ls theFoo/ __init__.py theBar.py egranata$ cat theFoo/__init__.py import lldb import theBar def __lldb_init_module(debugger, internal_dict): print "I am happy" debugger.HandleCommand("command script add -f theFoo.theBar.theCommand fbc") return None egranata$ cat theFoo/theBar.py #encoding=utf-8 def theCommand(debugger, command, result, internal_dict): result.PutCString(u"àèìòù") return None llvm-svn: 180975
* If HandleCommands is called with add_to_history set to false, turn on the ↵Jim Ingham2013-05-021-1/+7
| | | | | | | | m_command_source_depth so that when we forget the value for regex & alias commands it still stays off. <rdar://problem/13795202> llvm-svn: 180971
* Recommitting r180831 with trivial fix - remember to return errors if you ↵Jim Ingham2013-05-021-1/+0
| | | | | | compute. llvm-svn: 180898
* Reverting 180831 as it crashes TestDefaultConstructorForAPIObjects.pyDaniel Malea2013-05-011-0/+1
| | | | llvm-svn: 180868
* Change CommandReturnObject::AppendMessage to print an empty line ifJason Molenda2013-05-011-1/+1
| | | | | | | | | AppendMessage("") is called. This idiom is used in a handful of places right now (e.g. to put space between different threads in 'bt all') but the empty newline is being omitted instead of emitted. <rdar://problem/13753830> llvm-svn: 180841
* Added an option to "process detach" to keep the process stopped, if the ↵Jim Ingham2013-04-301-1/+0
| | | | | | | | | | process plugin (or in the case of ProcessGDBRemote the stub we are talking to) know how to do that. rdar://problem/13680832 llvm-svn: 180831
* Avoiding a potentially memory allocating code path in the Python ↵Enrico Granata2013-04-291-17/+36
| | | | | | InputReader's CTRL+C handling code path - this can potentially cause a deadlock while interrupting a user-made Python command llvm-svn: 180726
* Cleanup logging to use the new "std::string FileSpec::GetPath()" function. ↵Greg Clayton2013-04-291-11/+1
| | | | | | | | | | | Also added a similar function for modules: std::string Module::GetSpecificationDescription () const; This returns the module as "/usr/lib/libfoo.dylib" for normal files (calls "std::string FileSpec::GetPath()" on m_file) but it also might include the object name in case the module is for a .o file in a BSD archive ("/usr/lib/libfoo.a(bar.o)"). Cleaned up necessary logging code to use it. llvm-svn: 180717
* Look for an inexact match in just the commands before searching the alias ↵Matt Kopec2013-04-231-2/+7
| | | | | | commands as well. llvm-svn: 180117
* Fix linux argument completion with for "--" options (llvm.org/bugs/pr14425)Daniel Malea2013-04-231-2/+1
| | | | | | | | | | | | | | | | | | | Patch by Yacine Belkadi! When __GLIBC__ is defined, optind gets initialized to 0. So for the first parsed option, parse_start is 0, too. If this option has no argument (Like "--continue" of "process attach"), then the position stored is 0, instead of 1. This prevents the completion later on in Options::HandleOptionCompletion() because the opt_pos doesn't match the cursor_index. Fix that by getting the option's position from the value of optind, as it's done for the other types of options. Re-enable test_process_attach_dash_dash_con() on Linux. No regressions detected on Mac OS X (in TestCompletion.py) llvm-svn: 180114
* Fixed some linux buildbot warnings.Greg Clayton2013-04-192-3/+6
| | | | llvm-svn: 179892
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-184-21/+21
| | | | | | the macros and just use C++11. llvm-svn: 179805
* Since we use C++11, we should switch over to using std::unique_ptr when ↵Greg Clayton2013-04-184-21/+21
| | | | | | | | C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++. Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. llvm-svn: 179779
* Removed the "expr" alias for "expression," whichSean Callanan2013-04-171-3/+1
| | | | | | | is entirely unnecessary and confuses the command interpreter when the user types "exp". llvm-svn: 179691
* <rdar://problem/13457391>Greg Clayton2013-04-043-21/+24
| | | | | | LLDB now can use a single dash for all long options for all commands form the command line and from the command interpreter. This involved just switching all calls from getopt_long() to getopt_long_only(). llvm-svn: 178789
* <rdar://problem/13384801>Greg Clayton2013-04-032-7/+10
| | | | | | Make lldb_private::RegularExpression thread safe everywhere. This was done by removing the m_matches array from the lldb_private::RegularExpression class and putting it into the new lldb_private::RegularExpression::Match class. When executing a regular expression you now have the option to create a lldb_private::RegularExpression::Match object and pass a pointer in if you want to get parenthesized matching. If you don't want any matching, you pass in NULL. The lldb_private::RegularExpression::Match object is initialized with the number of matches you desire. Any matching strings are now extracted from the lldb_private::RegularExpression::Match objects. This makes the regular expression objects thread safe and as a result many more regex objects were turned into static objects that end up using a local lldb_private::RegularExpression::Match object when executing. llvm-svn: 178702
* <rdar://problem/13506727> Greg Clayton2013-04-031-2/+2
| | | | | | | | | | | | Symbol table function names should support lookups like symbols with debug info. To fix this I: - Gutted the way FindFunctions is used, there used to be way too much smarts only in the DWARF plug-in - Made it more efficient by chopping the name up once and using simpler queries so that SymbolFile and Symtab plug-ins don't need to do as much - Filter the results at a higher level - Make the lldb_private::Symtab able to chop up C++ mangled names and make as much sense out of them as possible and also be able to search by basename, fullname, method name, and selector name. llvm-svn: 178608
* Allow partial matching for alias commands as well as regular commands.Jim Ingham2013-04-031-6/+37
| | | | | | <rdar://problem/13552724> llvm-svn: 178597
* Added "rb" and "rbr" aliases to fix regressionsSean Callanan2013-04-021-0/+4
| | | | | | | | when we changed "rb" to "rbreak". <rdar://problem/13552724> llvm-svn: 178573
* <rdar://problem/13131838>Greg Clayton2013-03-291-1/+1
| | | | | | Platform select documents a -S option but doesn't accept it, now it does. llvm-svn: 178384
* <rdar://problem/12022060>Greg Clayton2013-03-292-19/+62
| | | | | | Enable tab completion for regular expression commands. llvm-svn: 178348
* <rdar://problem/13521159>Greg Clayton2013-03-272-10/+10
| | | | | | | | LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down. All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down. llvm-svn: 178191
* Implementing the notion of externally-acquirable ScriptInterpreter lockEnrico Granata2013-03-272-0/+16
| | | | | | | | | | | | | | With this notion, if parties outside the ScriptInterpreter itself need to acquire a lock on script APIs, they can do so by a pattern like this: { auto lock = interpeter->AcquireInterpreterLock(); // do whatever you need to do... } // lock will automatically be released here This might be useful for classes that use the Python convenience objects (e.g. PythonDictionary) to ensure they keep the underlying interpreter in a safe and controlled condition while they call through the C API functions Of course, the ScriptInterpreter still manages its internal locking correctly when necessary :-) llvm-svn: 178189
* Our commands that end up displaying a ValueObject as part of their workflow ↵Enrico Granata2013-03-261-0/+33
| | | | | | | | | | | use OptionGroupValueObjectDisplay as their currency for deciding the final representation ValueObjects themselves use DumpValueObjectOptions as the currency for the same purpose The code to convert between these two units was replicated (to varying degrees of correctness) in several spots in the code This checkin provides one and only one (and hopefully correct :-) entry point for this conversion llvm-svn: 178044
* This checkin removes the last Cocoa formatters that were implemented in ↵Enrico Granata2013-03-191-1/+1
| | | | | | Python and reimplements them in C++. The Python Cocoa formatters are not shipped as part of LLDB anymore, but still exist in the source repository for user reference. Python formatters still exist for STL classes and users can still define their own Python formatters llvm-svn: 177366
* The regular expression command object was resetting the execution context of theJim Ingham2013-03-151-1/+3
| | | | | | | | | | | resolved command, which it should not do. It should adopt whatever context the regular expression command was called with. This was causing regular expression commands run inside breakpoint commands to adopt the currently selected context, not the one coming from the breakpoint that we hit. <rdar://problem/13411771> llvm-svn: 177195
* Rolled back r176719 because settings with fileSean Callanan2013-03-151-2/+11
| | | | | | | | names were broken. <rdar://problem/13422580> llvm-svn: 177139
* <rdar://problem/13404189>Greg Clayton2013-03-131-0/+1
| | | | | | | | | | | | | | Made the "--reverse" option to "source list" also be able to use the "--count". This helps us implement support for regexp source list command: (lldb) l -10 Which gets turned into: (lldb) source list --reverse --count 10 Also simplified the code that is used to track showing more source from the last file and line. llvm-svn: 176961
* OptionValueFileSpec shouldn't be doing argumentSean Callanan2013-03-081-11/+2
| | | | | | | | | parsing on the file name it gets. That confuses it if there are spaces in the file name. <rdar://problem/13380392> llvm-svn: 176719
* Now that "settings set" will strip leading and trailing spaces, we need a ↵Greg Clayton2013-03-061-0/+22
| | | | | | | | way to be able to specify string values that contain spaces. So now settings setting <property> <value>" can have a <value> that is quoted: settings set prompt "(lldb2) " llvm-svn: 176545
* <rdar://problem/13184855>Greg Clayton2013-03-051-0/+27
| | | | | | Spaces in "settings set" value strings no longer cause setting failures. llvm-svn: 176532
* Convert from the C-based LLVM Disassembler shim to the full MC Disassembler ↵Jim Ingham2013-03-021-0/+1
| | | | | | | | | | | | API's. Calculate "can branch" using the MC API's rather than our hand-rolled regex'es. As extra credit, allow setting the disassembly flavor for x86 based architectures to intel or att. <rdar://problem/11319574> <rdar://problem/9329275> llvm-svn: 176392
* Correct the logic in DumpCommandHistory when the end index is UINT32_MAX.Jim Ingham2013-02-221-1/+1
| | | | | | <rdar://problem/13270229> llvm-svn: 175927
* <rdar://problem/13265017>Enrico Granata2013-02-211-33/+0
| | | | | | | | | | | | | | | The notion of Crossref command has long been forgotten, and there is nothing using CommandObjectCrossref in the current LLDB codebase However, this was causing a conflict with process plugins and command aliases ending up in an infinite loop under situations such as: (lldb) command alias monitor process plugin packet monitor (lldb) process att -n Calendar Process 28709 stopped Executable module set to "/Applications/Calendar.app/Contents/MacOS/Calendar". Architecture set to: x86_64-apple-macosx. (lldb) command alias monitor process plugin packet monitor This fixes the loop (and consequent crash) by disposing of Crossref commands and related code llvm-svn: 175831
* Fix clang warnings related to python macro redefinition and printf format ↵Matt Kopec2013-02-211-0/+2
| | | | | | specifiers. llvm-svn: 175829
* Adding CMake build system to LLDB. Some known issues remain:Daniel Malea2013-02-211-0/+45
| | | | | | | | | | | | | | - generate-vers.pl has to be called by cmake to generate the version number - parallel builds not yet supported; dependency on clang must be explicitly specified Tested on Linux. - Building on Mac will require code-signing logic to be implemented. - Building on Windows will require OS-detection logic and some selective directory inclusion Thanks to Carlo Kok (who originally prepared these CMakefiles for Windows) and Ben Langmuir who ported them to Linux! llvm-svn: 175795
* *ahem* Enrico.Jason Molenda2013-02-201-1/+1
| | | | llvm-svn: 175691
* <rdar://problem/13147878>Enrico Granata2013-02-191-0/+14
| | | | | | | | | | Be more user-friendly about not having scripting enabled: a) if Python was built-out then tell people about it explicitly b) if we are told to use none as a scripting language, then tell people about that too This should limit the cases where the semi-cryptic error message "there is no embedded script interpreter in this mode." actually shows llvm-svn: 175570
* <rdar://problem/13178743>Greg Clayton2013-02-121-0/+21
| | | | | | Added a new "env" regular expression alias. If "env" is typed on its own "settings show target.env-vars" will be run. Otherwise it can be used to set and environment variable: "env FOO=BAR". llvm-svn: 174991
* <rdar://problem/13184389>Greg Clayton2013-02-121-0/+1
| | | | | | _regexp-list needs to treat "list -" as "source list -r" llvm-svn: 174987
* Added the ability to specify a breakpoint using the GDB '*ADDRESS' format:Greg Clayton2013-02-081-1/+2
| | | | | | | | | | | | | | | | | | | | (lldb) b *0x1234 You can still of course just specify an address: (lldb) b 0x1234 Also now we accept the '&' before function names to indicate to not to skip the function prologue like GDB supports. To see how this works: (lldb) settings set interpreter.expand-regex-aliases 1 (lldb) b &main breakpoint set --name 'main' --skip-prologue=0 Breakpoint 1: where = a.out`main at main.c:20, address = 0x0000000100000b60 (lldb) b main breakpoint set --name 'main' Breakpoint 2: where = a.out`main + 54 at main.c:21, address = 0x0000000100000b96 llvm-svn: 174695
OpenPOWER on IntegriCloud