summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Move the launch-as-root xpc service from lldb to xcode, toJason Molenda2015-10-229-900/+36
| | | | | | | | | | | make it easier to run hand-built lldb roots and retain those entitlements. This is currently only used by Xcode; command line lldb doesn't expose the SBLaunchInfo::SetUserID() launch option. <rdar://problem/23154486> llvm-svn: 250981
* Change ModuleList::GetSharedModule so that it will reject "stubJason Molenda2015-10-221-12/+43
| | | | | | | | | | | | | | | | | | | libraries" altogether. On Mac/iOS, these are libraries which have a UUID and nlist records but no text or data. If one of these gets into the global module list, every time we try to search for a given filename/arch/UUID, we'll get this stub library back. We need to prevent them from getting added to the module list altogether. I thought about doing this down in ObjectFileMachO -- just rejecting the file as a valid binary file altogether -- but Greg didn't want to take that hard line approach at this point, he wanted to keep the ability for lldb to read one of these if someone wanted to in the future. <rdar://problem/23035075> llvm-svn: 250979
* Add some verbose lldb host logging so lldb will show what SDKJason Molenda2015-10-221-1/+23
| | | | | | directories it is searching for files. llvm-svn: 250978
* Fix Clang-tidy modernize-use-override warnings in some files in ↵Eugene Zelenko2015-10-2210-425/+363
| | | | | | | | source/Plugins/LanguageRuntime; other minor fixes. Differential Revision: http://reviews.llvm.org/D13966 llvm-svn: 250966
* Fix libstdc++ data formatters on Ubuntu 15.10 x86_64Todd Fiala2015-10-227-29/+195
| | | | | | See http://reviews.llvm.org/D13964 for details. llvm-svn: 250965
* Fix lldb-server - write null terminating symbol along with port number.Oleksiy Vyalov2015-10-211-1/+1
| | | | llvm-svn: 250953
* Fix typo so that "./dotest.py --results-formatter=curses_results.Curses ↵Greg Clayton2015-10-211-1/+1
| | | | | | --results-file=/dev/stdout" works again. llvm-svn: 250952
* Revert r250925 in source/Plugins/OperatingSystem/Go to fix MSVC builds failures.Eugene Zelenko2015-10-212-51/+54
| | | | llvm-svn: 250937
* Add domain socket support to gdb-remote protocol and lldb-server.Oleksiy Vyalov2015-10-2121-317/+505
| | | | | | http://reviews.llvm.org/D13881 llvm-svn: 250933
* Fix error handling when there are no REPLs installed.Sean Callanan2015-10-212-1/+28
| | | | | | | | Before, in the absence of any configured REPLs, LLDB would act as if there were multiple possible REPL options, whereas actually no REPL language is supported. Now we make a better error. llvm-svn: 250931
* [SBValue] Add a method GetNumChildren(uint32_t max)Siva Chandra2015-10-2131-61/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Along with this, support for an optional argument to the "num_children" method of a Python synthetic child provider has also been added. These have been added with the following use case in mind: Synthetic child providers currently have a method "has_children" and "num_children". While the former is good enough to know if there are children, it does not give any insight into how many children there are. Though the latter serves this purpose, calculating the number for children of a data structure could be an O(N) operation if the data structure has N children. The new method added in this change provide a middle ground. One can call GetNumChildren(K) to know if a child exists at an index K which can be as large as the callers tolerance can be. If the caller wants to know about children beyond K, it can make an other call with 2K. If the synthetic child provider maintains state about it counting till K previosly, then the next call is only an O(K) operation. Infact, all calls made progressively with steps of K will be O(K) operations. Reviewers: vharron, clayborg, granata.enrico Subscribers: labath, lldb-commits Differential Revision: http://reviews.llvm.org/D13778 llvm-svn: 250930
* Fixed version of r250913, which actually implements all the static functions.Sean Callanan2015-10-217-8/+69
| | | | | | Thanks to Siva Chandra and Oleksiy Vyalov for pouncing on this. llvm-svn: 250928
* Revert "Made the REPL choose a default language if only one REPL can be chosen."Siva Chandra2015-10-217-40/+8
| | | | | | | | | | | | Summary: This reverts commit babd6dd74e316b1fcd9d171d7d8c83845d51a487. Reviewers: spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13952 llvm-svn: 250927
* Fix Clang-tidy modernize-use-override warnings in some files in ↵Eugene Zelenko2015-10-2112-345/+325
| | | | | | | | source/Plugins; other minor fixes. Differential Revision: http://reviews.llvm.org/D13951 llvm-svn: 250925
* Use six to portably handle module renames in Python 2 and 3Zachary Turner2015-10-2116-46/+68
| | | | llvm-svn: 250915
* Made the REPL choose a default language if only one REPL can be chosen.Sean Callanan2015-10-217-8/+40
| | | | | | This requires REPLs to enumerate the languages they support. llvm-svn: 250913
* Skip TestMultithreaded on Windows.Adrian McCarthy2015-10-211-14/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D13923 llvm-svn: 250899
* Clean up more .dwo files after the tests runPavel Labath2015-10-214-6/+3
| | | | llvm-svn: 250896
* [RenderScript] Fix out of bounds warning.Ewan Crawford2015-10-211-3/+3
| | | | llvm-svn: 250891
* [DataFormatters] Make libc++ list loop detection linearPavel Labath2015-10-214-88/+204
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Loop detection code is being called before every element access. Although it tries to cache some of the data by remembering the loop-free initial segment, every time it needs to increase this segment, it will start from scratch. For the typical usage pattern, where one accesses the elements in order, the loop detection will need to be run after every access, resulting in quadratic behavior. This behavior is noticable even for the default 255 element limit. In this commit, I rewrite the algorithm to be truly incremental -- it maintains the state of its loop-detection runners between calls, and reuses them when it needs to check another segment. This way, each part of the list is scanned only once, resulting in linear behavior. Also note that I have changed the operator== of ListEntry to do the comparison based on the value() function (instead of relying on ValueObjectSP equality). In my experiments, I kept getting different ValueObjectSPs when going through the same element twice. Reviewers: granata.enrico Subscribers: lldb-commits, sivachandra Differential Revision: http://reviews.llvm.org/D13902 llvm-svn: 250890
* [RenderScript] New commands to save/load RS allocations to file.Ewan Crawford2015-10-212-40/+410
| | | | | | | | | | | | | | Patch adds command 'language renderscript allocation save' to store the contents of an allocation in a binary file. And 'language renderscript allocation load' to restore an allocation with the saved data from a binary file. Binary file format contains a header FileHeader with meta information preceding the raw data. Reviewed by: jingham, clayborg Subscribers: lldb-commits, domipheus Differential Revision: http://reviews.llvm.org/D13903 llvm-svn: 250886
* Revert r250872 in source/Plugins/Disassembler to fix MSVC builds failures.Eugene Zelenko2015-10-212-45/+53
| | | | llvm-svn: 250874
* Fix Clang-tidy modernize-use-override warnings in some files in ↵Eugene Zelenko2015-10-2116-348/+342
| | | | | | | | source/Plugins; other minor fixes. Differential Revision: http://reviews.llvm.org/D13916 llvm-svn: 250872
* When a REPL creates a new target for itself, it is that target's REPL.Sean Callanan2015-10-212-0/+12
| | | | | | | | To allow that, I've added a SetREPL call to the Target, which allows a REPL that just created a target to install itself as the go-to REPL for the corresponding language. llvm-svn: 250870
* When target is NULL, provide a debugger so that REPLs can use that to createSean Callanan2015-10-215-7/+11
| | | | | | their own target. llvm-svn: 250869
* Use six to portably assign metaclasses in Python 2 and 3.Zachary Turner2015-10-202-6/+7
| | | | llvm-svn: 250859
* Introduce a mechanism for reusing Python modules out of tree.Zachary Turner2015-10-204-0/+41
| | | | | | | | | | | | | | | | | | Right now our Python code does not all share a common root. Tests and scripts both contain python code that cannot take advantage of reusability since they are unrelated siblings of each other. In particular, this presents a problem for wanting to use third party packages from both sides, since it does not make sense to copy the module into both places. This patch solves this by introducing a script lldb_shared.py which is a very lightweight script that just searches up the tree until it finds a root, and then imports a module from there. That module knows how to find all of the shared code that LLDB uses, and adjusts sys.path accordingly to make them all visible. llvm-svn: 250858
* Add `six` Python module to lldb/third_party.Zachary Turner2015-10-202-0/+886
| | | | | | | | | | | | | | Six is a python module designed to smooth the process of porting Python 2 code to Python 3. Specifically, six provides a consistent interface to some of the breaking changes between 2 and 3. For example, the syntax for assigning a metaclass differs in Python 2 and 3. Six addresses this by providing a single class decorator that will do the right thing depending on which version of Python is being run. There are other examples too, such as dealing with renamed modules, unicode literals, etc. llvm-svn: 250857
* Fix potential file i/o problem with python handles.Zachary Turner2015-10-204-37/+50
| | | | llvm-svn: 250838
* Fix MSVC build after 250820Tamas Berghammer2015-10-201-0/+8
| | | | | | | | Work around a bug in MSVC 12 where _HAS_EXCEPTIONS=0 don't eliminate all usage of __uncaught_exception with including eh.h what declares that function. llvm-svn: 250833
* Revert "Make dwarf parsing multi-threaded"Tamas Berghammer2015-10-203-71/+23
| | | | | | | | | Revert it bacuse it introduces several race condition detected by the build bots. This reverts commit 5107a5ebdb7c4571a30a7098b40bf8098b678447. llvm-svn: 250832
* Make dwarf parsing multi-threadedTamas Berghammer2015-10-203-23/+71
| | | | | | | | | | | | Loading the debug info from a large application is the slowest task LLDB do. This CL makes most of the dwarf parsing code multi-threaded. As a result the speed of "attach; backtrace; exit;" when the inferior is an LLDB with full debug info increased by a factor of 2 (on my machine). Differential revision: http://reviews.llvm.org/D13662 llvm-svn: 250821
* Add a new task pool class to LLDBTamas Berghammer2015-10-206-0/+359
| | | | | | | | | | | | | | | | | | | | | | The purpose of the class is to make it easy to execute tasks in parallel Basic design goals: * Have a very lightweight and easy to use interface where a list of lambdas can be executed in parallel * Use a global thread pool to limit the number of threads used (std::async don't do it on Linux) and to eliminate the thread creation overhead * Destroy the thread currently not in use to avoid the confusion caused by them during debugging LLDB Possible future improvements: * Possibility to cancel already added, but not yet started tasks * Parallel for_each implementation * Optimizations in the thread creation destroyation code Differential revision: http://reviews.llvm.org/D13727 llvm-svn: 250820
* Increase default memory cache line size for androidPavel Labath2015-10-207-1/+83
| | | | | | | | | | | | | | | | Summary: ADB packets have a maximum size of 4k. This means the size of memory reads does not affect speed too much (as long as it fits in one packet). Therefore, I am increasing the default memory read size for android to 2k. This value is used only if the user has not modified the default memory-cache-line-size setting. Reviewers: clayborg, tberghammer Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D13812 llvm-svn: 250814
* Fix build and some warnings after r250798Tamas Berghammer2015-10-204-5/+5
| | | | llvm-svn: 250810
* [LLDB] Insert names with same signo as alias instead of a new entryMohit K. Bhakkad2015-10-206-255/+259
| | | | | | | | Reviewers: clayborg, labath. Subscribers: jaydeep, dsanders, bhushan, sagar, nitesh.jain, emaste,lldb-commits. Differential Revision: http://reviews.llvm.org/D13646 llvm-svn: 250801
* Rationalization of includes in the data formatters codeEnrico Granata2015-10-2019-47/+27
| | | | llvm-svn: 250798
* Fix Clang-tidy modernize-use-override warnings in source/Plugins/Language; ↵Eugene Zelenko2015-10-2014-468/+480
| | | | | | | | other minor fixes. Differential Revision: http://reviews.llvm.org/D13876 llvm-svn: 250789
* Adjust TestCompletion.py and TestDumpDynamic.py after recent changes.Siva Chandra2015-10-202-2/+2
| | | | | | | | | | Reviewers: zturner, spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13882 llvm-svn: 250782
* Added support to the expression command for dropping into the REPL at will.Sean Callanan2015-10-202-1/+68
| | | | | | | | "expr -r" does this. It also returns to a REPL if the LLDB command interpreter is neseted inside it, for example in cases where a REPL command resulted in a breakpoint being hit or a crash. llvm-svn: 250780
* Added support for the "--repl" argument to LLDB. Sean Callanan2015-10-2012-85/+209
| | | | | | | | | This makes LLDB launch and create a REPL, specifying no target so that the REPL can create one for itself. Also added the "--repl-language" option, which specifies the language to use. Plumbed the relevant arguments and errors through the REPL creation mechanism. llvm-svn: 250773
* Fixed PlatformDarwin to locate Xcode by using ↵Greg Clayton2015-10-201-48/+55
| | | | | | | | HostInfo::GetProgramFileSpec(). This function returns the FileSpec to the program that is running the LLDB.framework or lldb.so and is more reliable than checking the path of LLDB.framework/lldb.so itself since it might not exist within the Xcode.app bundle (DYLD_FRAMEWORK_PATH). Then we check DEVELOPER_DIR, then check the currently installed Xcode with xcrun. <rdar://problem/23167253> llvm-svn: 250772
* When calling FileSpec::AppendPathComponent() we don't need to include "." in ↵Greg Clayton2015-10-201-1/+1
| | | | | | | | | | | | | | | | | | | the path if m_filename is set to exactly '.'. Previously this would cause a FileSpec object that looked like: m_directory = "/tmp" m_filename = "." To look like: m_directory = "/tmp/." m_filename = "foo.txt" if "foo.txt" was appended to it. With this fix it will be: m_directory = "/tmp" m_filename = "foo.txt" llvm-svn: 250770
* Make sure we restore the process events so they aren't hijacked when using ↵Greg Clayton2015-10-201-11/+18
| | | | | | | | the async attach when attaching to a process by name and with waitfor. <rdar://problem/22821480> llvm-svn: 250768
* Introduce the concept of a type that is meaningless without dynamic ↵Enrico Granata2015-10-205-18/+41
| | | | | | | | resolution, which are essentially placeholder types meant to appease a language's type system but do not offer any actual information to the debugger, unless further resolved This is currently meant for data formatters to know to ignore such types in caching and lookup llvm-svn: 250767
* Convert print statements to print function calls.Zachary Turner2015-10-1911-168/+191
| | | | | | | | | This patch was generating by running `2to3` on the files in the lldb/test directory. This patch should be NFC, but it does introduce the `from __future__ import print_function` line, which will break future uses of the print statement. llvm-svn: 250763
* Run py2to3 on lldb/scripts folder.Zachary Turner2015-10-196-36/+36
| | | | | | | This mostly fixes some print statements, but there were also some instances of dict.iteritems() lingering that this found. llvm-svn: 250762
* Added REPL.cpp to the relevant CMakeLists.txtSean Callanan2015-10-191-0/+1
| | | | llvm-svn: 250755
* Added the concept of a Read-Eval-Print-Loop to LLDB.Sean Callanan2015-10-1919-7/+1219
| | | | | | | | | | | | | | | | A REPL takes over the command line and typically treats input as source code. REPLs can also do code completion. The REPL class allows its subclasses to implement the language-specific functionality without having to know about the IOHandler-specific internals. Also added a PluginManager-based way of getting to a REPL given a language and a target. Also brought in some utility code and expression options that are useful for REPLs, such as line offsets for expressions, ANSI terminal coloring of errors, and a few IOHandler convenience functions. llvm-svn: 250753
* Revert r248047 and fix the problem properlyKeno Fischer2015-10-192-1/+1
| | | | | | | | | | | | In r248047, I attempted to fix a build breakage introduced by using llvm's regex support from lldb-mi. However, my approach was flawed when LLVM and lldb are dynamically linked, in which case two copies of LLVMSupport would end up in memory, causing crashes on lldb start up. Instead, use LINK_COMPONENTS to make sure lldb-mi has access to the LLVMSupport symbols without causing duplication in the dynamic library case. llvm-svn: 250751
OpenPOWER on IntegriCloud