summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* - Support for Python namespaces:Enrico Granata2011-08-225-216/+143
| | | | | | | | | | | If you have a Python module foo, in order to use its contained objects in LLDB you do not need to use 'from foo import *'. You can use 'import foo', and then refer to items in foo as 'foo.bar', and LLDB will know how to resolve bar as a member of foo. Accordingly, GNU libstdc++ formatters have been moved from the global namespace to gnu_libstdcpp and a few test cases are also updated to reflect the new convention. Python docs suggest using a plain 'import' en lieu of 'from-import'. llvm-svn: 138244
* Fixing a startup errorEnrico Granata2011-08-221-1/+1
| | | | llvm-svn: 138237
* Exception-awareness for gnu_libstdcpp formatters ; Documentation updateEnrico Granata2011-08-223-117/+224
| | | | llvm-svn: 138236
* Added a new plug-in type: lldb_private::OperatingSystem. The operating system Greg Clayton2011-08-2244-429/+2189
| | | | | | | | | | | | | | | | | | | | plug-ins are add on plug-ins for the lldb_private::Process class that can add thread contexts that are read from memory. It is common in kernels to have a lot of threads that are not currently executing on any cores (JTAG debugging also follows this sort of thing) and are context switched out whose state is stored in memory data structures. Clients can now subclass the OperatingSystem plug-ins and then make sure their Create functions correcltly only enable themselves when the right binary/target triple are being debugged. The operating system plug-ins get a chance to attach themselves to processes just after launching or attaching and are given a lldb_private::Process object pointer which can be inspected to see if the main executable, target triple, or any shared libraries match a case where the OS plug-in should be used. Currently the OS plug-ins can create new threads, define the register contexts for these threads (which can all be different if desired), and populate and manage the thread info (stop reason, registers in the register context) as the debug session goes on. llvm-svn: 138228
* Fix typos in comment.Johnny Chen2011-08-201-1/+1
| | | | llvm-svn: 138179
* Use os.walk(), available since 2.3, instead of os.path.walk(), removed in 3.0,Johnny Chen2011-08-201-37/+28
| | | | | | to walk the directory tree. Plus, we can concentrate only on leaf nodes, i.e., files. llvm-svn: 138178
* Further fix for SWIG interoperability; making sure the Release() method of ↵Enrico Granata2011-08-201-13/+30
| | | | | | SBCommandReturnObject is called at all times llvm-svn: 138169
* No need to look further if the file is a symbolic link. Look for the real file.Johnny Chen2011-08-201-0/+8
| | | | | | Plus add some comments. llvm-svn: 138159
* Fixed some SWIG interoperability issuesEnrico Granata2011-08-196-19/+40
| | | | llvm-svn: 138154
* Fixed an issue where even if the communication object had Clear() called onGreg Clayton2011-08-191-1/+2
| | | | | | it, it could try and call through to an installed callback. llvm-svn: 138146
* Added the ability to create a SBCommandReturnObject object from a pointerGreg Clayton2011-08-192-2/+20
| | | | | | | and also to later release the ownership of the pointer object. This was needed for SWIG interaction. llvm-svn: 138133
* Taking care of an issue with using lldb_private types in ↵Enrico Granata2011-08-196-9/+9
| | | | | | SBCommandInterpreter.cpp ; Making NSString test case work on Snow Leopard ; Removing an unused variable warning llvm-svn: 138105
* - Now using ${var} as the summary for an aggregate type will produce ↵Enrico Granata2011-08-1914-29/+613
| | | | | | | | | | | | | | | | "name-of-type @ object-location" instead of giving an error e.g. you may get "foo_class @ 0x123456" when typing "type summary add -f ${var} foo_class" - Added a new special formatting token %T for summaries. This shows the type of the object. Using it, the new "type @ location" summary could be manually generated by writing ${var%T} @ ${var%L} - Bits and pieces required to support "frame variable array[n-m]" The feature is not enabled yet because some additional design and support code is required, but the basics are getting there - Fixed a potential issue where a ValueObjectSyntheticFilter was not holding on to its SyntheticChildrenSP Because of the way VOSF are being built now, this has never been an actual issue, but it is still sensible for a VOSF to hold on to the SyntheticChildrenSP as well as to its FrontEnd llvm-svn: 138080
* Add a Python script to locate each binary file under a root directory which ↵Johnny Chen2011-08-192-18/+148
| | | | | | | | | | | | | | | | matches some pathname pattern and to invoke lldb-disasm.py on the binary file to disassemble its symbols. The number of symbols can be specified by, for example, '-n 10000', to specify 10,000 symbols to disassemble for each module. By default, only 1000 symbols from each module are disassembled. Example: utils/test/run-dis.py -r '/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3/Symbols' -p '^/System/Library/.*Frameworks/.*\.framework/[^/]+$' tries to disassemble every public/private frameworks (by default only 1000 symbols are disassembled) under iOS4.3. llvm-svn: 138078
* Revert the workaround patch in the last check in. With the local patch to ↵Johnny Chen2011-08-191-30/+1
| | | | | | LLVM, it is no longer necessary. llvm-svn: 138046
* Fix TypeError exception for re.compile().Johnny Chen2011-08-191-1/+2
| | | | llvm-svn: 138045
* Whoops, accidentally committed my local scheme.Sean Callanan2011-08-191-14/+3
| | | | llvm-svn: 138044
* Refined the rollback to LLVM, picking up a newerSean Callanan2011-08-195-9/+41
| | | | | | | | | | | | | revision and adding a patch that fixes an AsmParser crash on ARM. One feature that we unfortunately lost (for the moment!) is the ability to cast unknown code symbols to arbitrary function types and put the resulting function pointer in a result variable. This feature will be back, though. llvm-svn: 138036
* More thorough fix for the spaces-in-typename issueEnrico Granata2011-08-192-7/+24
| | | | llvm-svn: 138026
* Minor change for the @expectedFailureClang logic. For the non-clang test ↵Johnny Chen2011-08-191-2/+2
| | | | | | | | failure, re-raise the exception to get more stack trace information. llvm-svn: 138021
* Third round of code cleanups:Enrico Granata2011-08-199-168/+165
| | | | | | | | | | | - reorganizing the PTS (Partial Template Specializations) in FormatManager.h - applied a patch by Filipe Cabecinhas to make LLDB compile with GCC Functional changes: - fixed an issue where command type summary add for type "struct Foo" would not match any types. currently, "struct" will be stripped off and type "Foo" will be matched. similar behavior occurs for class, enum and union specifiers. llvm-svn: 138020
* Add a decorator for marking clang only expectedFailure. Use it for the ↵Johnny Chen2011-08-192-1/+25
| | | | | | | | | | | | | | | | | | | | test_step_over_3_times_with_dsym/dwarf() test cases in TestThreadAPI.py by decorating it with @expectedFailureClang. Example: @expectedFailureClang @python_api_test def test_step_over_3_times_with_dwarf(self): """Test Python SBThread.StepOver() API.""" # We build a different executable than the default buildDwarf() does. d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name} self.buildDwarf(dictionary=d) self.setTearDownCleanup(dictionary=d) self.step_over_3_times(self.exe_name) llvm-svn: 138019
* Revert the previous addition of expectedFailure decorators, it was a mistake.Johnny Chen2011-08-191-4/+0
| | | | llvm-svn: 138013
* Add expectedFailure decorator.Johnny Chen2011-08-181-0/+4
| | | | | | Failed possibly due to rollback of llvm/clang. llvm-svn: 138011
* Add an option (-p regexp-pattern) to specify the regular expression symbol ↵Johnny Chen2011-08-181-9/+28
| | | | | | | | | | | | pattern we're interested in disassembling. An example: utils/test/lldb-disasm.py -C "platform select remote-ios" -o "-b -n" -e '~/CoreFoundation' -n 20 -p '-\[NSArray .+\]' disassembles the first 20 NSArray instance methods found in the CoreFoundation module. llvm-svn: 138002
* Apply some workaround for known crashers.Johnny Chen2011-08-181-1/+30
| | | | llvm-svn: 137991
* Add an option '-q' to have quiet disassembly by not printing out the ↵Johnny Chen2011-08-181-11/+22
| | | | | | | | | | | | disassembled result. This could be useful by reducing the strain on standard output. Example: utils/test/lldb-disasm.py -C "platform select remote-ios" -o "-b -n" -e '~/CoreFoundation' -n 50 -q llvm-svn: 137988
* Because of disassembler crashes, I rolled backSean Callanan2011-08-181-7/+9
| | | | | | | | | | | | | LLVM to pull in the older ARM disassembler. I also modified our build scripts to support building LLVM from one SVN revision and Clang from another. These are temporary measures; as soon as we get some solid testing in with the new ARM disassembler, we plan to switch right back. llvm-svn: 137965
* Second round of code cleanups:Enrico Granata2011-08-1812-498/+647
| | | | | | | | | | | | | | | - reorganizing classes layout to have public part first Typedefs that we want to keep private, but must be defined for some public code to work correctly are an exception - avoiding methods in the form T foo() { code; } all on one-line - moving method implementations from .h to .cpp whenever feasible Templatized code is an exception and so are very small methods - generally, adhering to coding conventions followed project-wide Functional changes: - fixed an issue where using ${var} in a summary for an aggregate, and then displaying a pointer-to-aggregate would lead to no summary being displayed The issue was not a major one because all ${var} was meant to do in that context was display an error for invalid use of pointer Accordingly fixed test cases and added a new test case llvm-svn: 137944
* Fix the "command alias" help string to make clear that the $<N> ↵Jim Ingham2011-08-181-2/+10
| | | | | | substitutions should be whole words in the output command. llvm-svn: 137921
* First round of code cleanups:Enrico Granata2011-08-1714-646/+610
| | | | | | | | | | | | | | | | | | - all instances of "vobj" have been renamed to "valobj" - class Debugger::Formatting has been renamed to DataVisualization (defined in FormatManager.h/cpp) The interface to this class has not changed - FormatCategory now uses ConstString's as keys to the navigators instead of repeatedly casting from ConstString to const char* and back all the time Next step is making the same happen for categories themselves - category gnu-libstdc++ is defined in the constructor for a FormatManager The source code for it is defined in gnu_libstdcpp.py, drawn from examples/synthetic at compile time All references to previous 'osxcpp' name have been removed from both code and file names Functional changes: - the name of the option to use a summary string for 'type summary add' has changed from the previous --format-string to the new --summary-string. It is expected that the short option will change from -f to -s, and -s for --python-script will become -o llvm-svn: 137886
* New category "gnu-libstdc++" provides summary for std::string and synthetic ↵Enrico Granata2011-08-179-16/+338
| | | | | | | | | | children for types std::map, std::list and std::vector The category is enabled by default. If you run into issues with it, disable it and the previous behavior of LLDB is restored ** This is a temporary solution. The general solution to having formatters pulled in at startup should involve going through the Platform. Fixed an issue in type synthetic list where a category with synthetic providers in it was not shown if all the providers were regex-based llvm-svn: 137850
* When defining a scripted command, it is possible to provide a docstring and ↵Enrico Granata2011-08-179-8/+107
| | | | | | | | | | that will be used as the help text for the command If no docstring is provided, a default help text is created LLDB will refuse to create scripted commands if the scripting language is anything but Python Some additional comments in AppleObjCRuntimeV2.cpp to describe the memory layout expected by the dynamic type lookup code llvm-svn: 137801
* Add "--" before providing the file & command args when launching lldb from ↵Jim Ingham2011-08-171-1/+1
| | | | | | the command line. llvm-svn: 137790
* Better help string for "lldb -- file arg1 arg2..."Jim Ingham2011-08-161-2/+7
| | | | llvm-svn: 137789
* Changes to Python commands:Enrico Granata2011-08-1621-404/+695
| | | | | | | | | | | | - They now have an SBCommandReturnObject instead of an SBStream as third argument - The class CommandObjectPythonFunction has been merged into CommandObjectCommands.cpp - The command to manage them is now: command script with subcommands add, list, delete, clear command alias is returned to its previous functionality - Python commands are now part of an user dictionary, instead of being seen as aliases llvm-svn: 137785
* Document how to pass program args to lldb command-line.Jim Ingham2011-08-161-3/+11
| | | | llvm-svn: 137784
* Bumped Xcode project versions for lldb-73 and debugserver-144.Greg Clayton2011-08-163-22/+22
| | | | llvm-svn: 137782
* Add comment about recent change.Johnny Chen2011-08-161-0/+2
| | | | llvm-svn: 137776
* Comment change.Johnny Chen2011-08-161-0/+1
| | | | llvm-svn: 137749
* Add comment on known restrictions of the current implementation.Johnny Chen2011-08-161-0/+7
| | | | llvm-svn: 137748
* The redo script did not take into account the compiler and architecture ↵Johnny Chen2011-08-161-3/+24
| | | | | | configuration of the failed tests. llvm-svn: 137741
* Take clang output into account.Johnny Chen2011-08-161-1/+1
| | | | llvm-svn: 137739
* Re-enable the test for ValueAsUnsigned on a register Value.Jim Ingham2011-08-161-5/+3
| | | | llvm-svn: 137738
* Fixed an issue where we could end up creating multipleGreg Clayton2011-08-161-29/+59
| | | | | | | | | | | C++ methods for a function depending on how the DWARF was created. Now we parse the class type from the definition, and all methods that use DW_AT_specification or DW_AT_abstract_origin attributes to point to the definition, now won't create duplicate entries. This is in response to how clang++ creates much different DWARF than gcc. llvm-svn: 137737
* Fixed the logging output that appears when doing a:Greg Clayton2011-08-161-6/+4
| | | | | | (lldb) target modules dump symfile llvm-svn: 137732
* Fixed a performance problem where functions wereSean Callanan2011-08-161-4/+18
| | | | | | | | | being searched for in too heavyweight a way. Now, when asking for the address of a function, the expression parser just asks for a corresponding data symbol. llvm-svn: 137731
* Fix the test suite error of:Johnny Chen2011-08-161-1/+1
| | | | | | | | | | ... File "/Volumes/data/lldb/svn/trunk/test/lldbtest.py", line 243, in __init__ self.session = test.session if test else None AttributeError: 'StdCXXDisassembleTestCase' object has no attribute 'session' llvm-svn: 137724
* Python commands:Enrico Granata2011-08-1613-8/+754
| | | | | | | | | | | | | It is now possible to use 'command alias --python' to define a command name that actually triggers execution of a Python function (e.g. command alias --python foo foo_impl makes a command named 'foo' that runs Python function 'foo_impl') The Python function foo_impl should have as signature: def foo_impl(debugger, args, stream, dict): where debugger is an object wrapping an LLDB SBDebugger args is the command line arguments, as an unparsed Python string stream is an SBStream that represents the standard output dict is an internal utility parameter and should be left untouched The function should return None on no error, or an error string to describe any problems llvm-svn: 137722
* Fixed register value objects to be able to return their values as unsignedGreg Clayton2011-08-163-1/+13
| | | | | | and signed integers. llvm-svn: 137710
OpenPOWER on IntegriCloud