summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Avoid a -Wreorder warning in ScriptInterpreterPython.cpp.Stephane Sezer2015-10-141-2/+2
| | | | llvm-svn: 250322
* Fix Python initialization for Python 3.Zachary Turner2015-10-141-46/+91
| | | | | | | | | | | | | Python 3 reverses the order in which you must call Py_InitializeEx and PyEval_InitThreads. Since that log is in itself already a little nuanced, it is refactored into a function so that the reversal is more clear. At the same time, there's a lot of logic during Python initialization to save off a bunch of state and then restore it after initialization is complete. To express this more cleanly, it is refactored to an RAII-style pattern where state is saved off on acquisition and restored on release. llvm-svn: 250306
* Minor cleanup on PythonDataObject constructors.Zachary Turner2015-10-142-5/+13
| | | | | | | | Added a constructor that takes list_size for `PythonList`. Made all single-argument constructors explicit. Re-ordered constructors to be consistent with other classes. llvm-svn: 250304
* Change swig interface files to use PythonDataObjects.Zachary Turner2015-10-145-87/+101
| | | | llvm-svn: 250303
* cmake: provide flag that enables 'log enable --stack' to provide useful ↵Todd Fiala2015-10-143-1/+40
| | | | | | | | | | | | | | | | | | | | file/function info on POSIX systems Adding the following flag to a cmake line: -DLLDB_EXPORT_ALL_SYMBOLS=TRUE will cause all symbols to be exported from liblldb. This enables the llvm backtrace mechanism to see and report backtrace symbols properly when using (lldb) log enable --stack ... Prior to this change, only the SB API symbols would show up on Linux and other systems that use a public-symbols-based backtrace lookup mechanism. log enable --stack ... is a very handy, quick way to understand the flow of how some log lines are getting hit within lldb without having to hook up a top-level debugger over your current debug session. llvm-svn: 250299
* lldb-server: add support for binary memory readsPavel Labath2015-10-146-14/+72
| | | | | | | | | | | | | | | | | Summary: This commit adds support for binary memory reads ($x) to lldb-server. It also removes the "0x" prefix from the $x client packet, to make it more compatible with the old $m packet. This allows us to use almost the same code for handling both packet types. I have verified that debugserver correctly handles $x packets even without the leading "0x". I have added a test which verifies that the stub returns the same memory contents for both kinds of memory reads ($x and $m). Reviewers: tberghammer, jasonmolenda Subscribers: iancottrell, lldb-commits Differential Revision: http://reviews.llvm.org/D13695 llvm-svn: 250295
* Revert "RenderScript command for printing allocation contents"Pavel Labath2015-10-145-471/+0
| | | | | | This commit breaks TestDataFormatterSmartArray on all buildbots. llvm-svn: 250290
* Change ConstString to support massive multi-threaded accessTamas Berghammer2015-10-141-54/+46
| | | | | | | | | | | | | | | | | Previously ConstString had a single mutex guarding the global string pool for each access what become a bottleneck when using it with a large number of threads. This CL distributes the strings to 256 individual string pools based on a simple hash function to eliminate the bottleneck and speed up the multi-thread access. The goal of the change is to prepare to multi-threaded symbol parsing code to speed up the symbol parsing speed. Differential revision: http://reviews.llvm.org/D13652 llvm-svn: 250289
* Fix warning in CommandObjectMemoryTamas Berghammer2015-10-141-0/+1
| | | | llvm-svn: 250287
* Make use of lldv::Triple::isAndroidTamas Berghammer2015-10-143-13/+7
| | | | | | | | It is a new function added to the llvm::Triple class to simplify the checking if we are targeting android to clean up the confusion between android being an OS or an environment. llvm-svn: 250286
* Fix compiler warnings in ScriptInterpreterPythonPavel Labath2015-10-141-1/+1
| | | | llvm-svn: 250282
* RenderScript command for printing allocation contentsEwan Crawford2015-10-144-0/+470
| | | | | | | | | | | | | | | | | | | This patch adds the command 'language renderscript allocation dump <ID>' for printing the contents of a RS allocation. Displaying the coordinate of each element as well as its formatted value e.g (lldb) language renderscript allocation dump 1 Data (X, Y, Z): (0, 0, 0) = {0 1} (1, 0, 0) = {2 3} (2, 0, 0) = {4 5} A --file <filename> option is also included, since for large allocations it may be more helpful to view this text as a file. Reviewed by: jingham, clayborg Subscribers: lldb-commits, ADodds, domipheus, brucem Differential Revision: http://reviews.llvm.org/D13699 llvm-svn: 250281
* Mark TestBatchMode as flaky on linuxPavel Labath2015-10-141-0/+1
| | | | llvm-svn: 250280
* [LLDB] Adding mips32 in the list of archs with ↵Mohit K. Bhakkad2015-10-141-1/+3
| | | | | | watchpoint_exceptions_received=before llvm-svn: 250272
* [LLDB][MIPS64] Adding mips64 reaturn address register for unwind planMohit K. Bhakkad2015-10-141-0/+1
| | | | llvm-svn: 250267
* ArchSpec: fix unintentional promotion of unspecified unknowns to specified ↵Todd Fiala2015-10-1310-27/+85
| | | | | | | | | | | | | | | | | | | | | unknowns * ArchSpec::MergeFrom() would erroneously promote an unspecified unknown to a specified unknown when both the ArchSpec and the merged in ArchSpec were both unspecified unknowns. This no longer happens, which fixes issues with global module cache lookup in some situations. * Added ArchSpec::DumpTriple(Stream&) that now properly prints unspecified unknowns as '*' and specified unknows as 'unknown'. This makes it trivial to tell the difference between the two. Converted printing code over ot using DumpTriple() rather than building from scratch. * Fixed up a couple places that were not guaranteeing that an unspecified unknown was recorded as such. llvm-svn: 250253
* Remove definition of ~PlatformNetBSD(), since its declaration is marked as ↵Bruce Mitchener2015-10-131-13/+0
| | | | | | | | | | | | | | | | '= default' Summary: Local definition of ~PlatformNetBSD() results with a compiler error. Patch by Kamil Rytarowski. Thanks! Reviewers: joerg, brucem Subscribers: brucem, lldb-commits Differential Revision: http://reviews.llvm.org/D13707 llvm-svn: 250249
* Added tree panels.Greg Clayton2015-10-131-15/+281
| | | | llvm-svn: 250248
* Change PyFile_FromFile to use PyFile_FromFd when using Py3.Zachary Turner2015-10-131-5/+17
| | | | llvm-svn: 250213
* Fix ref counting of Python objects.Zachary Turner2015-10-135-813/+753
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PythonObjects were being incorrectly ref-counted. This problem was pervasive throughout the codebase, leading to an unknown number of memory leaks and potentially use-after-free. The issue stems from the fact that Python native methods can either return "borrowed" references or "owned" references. For the former category, you *must* incref it prior to decrefing it. And for the latter category, you should not incref it before decrefing it. This is mostly an issue when a Python C API method returns a `PyObject` to you, but it can also happen with a method accepts a `PyObject`. Notably, this happens in `PyList_SetItem`, which is documented to "steal" the reference that you give it. So if you pass something to `PyList_SetItem`, you cannot hold onto it unless you incref it first. But since this is one of only two exceptions in the entire API, it's confusing and difficult to remember. Our `PythonObject` class was indiscriminantely increfing every object it received, which means that if you passed it an owned reference, you now have a dangling reference since owned references should not be increfed. We were doing this in quite a few places. There was also a fair amount of manual increfing and decrefing prevalent throughout the codebase, which is easy to get wrong. This patch solves the problem by making any construction of a `PythonObject` from a `PyObject` take a flag which indicates whether it is an owned reference or a borrowed reference. There is no way to construct a `PythonObject` without this flag, and it does not offer a default value, forcing the user to make an explicit decision every time. All manual uses of `PyObject` have been cleaned up throughout the codebase and replaced with `PythonObject` in order to make RAII the predominant pattern when dealing with native Python objects. Differential Revision: http://reviews.llvm.org/D13617 Reviewed By: Greg Clayton llvm-svn: 250195
* Xfail a watchpoint test on Windows, until Windows implements watchpoints.Adrian McCarthy2015-10-131-0/+1
| | | | llvm-svn: 250189
* Fix TestTargetAPI.py test for users who use Swig 3.0.5 or greater.Adrian McCarthy2015-10-132-0/+5
| | | | | DifferentialRevision: http://reviews.llvm.org/D13679 llvm-svn: 250188
* Fix cast in arm watchpoint handling codeTamas Berghammer2015-10-131-1/+1
| | | | | | | We had an incorrect sign extension when castion from a pointer to an lldb::addr_t what broke the watchpoint hit detection on arm. llvm-svn: 250180
* Symbols::LocateExecutableSymbolFile() shouldn't try to look for files in ↵Vadim Macagon2015-10-131-0/+2
| | | | | | | | | | | | | | | | /usr/lib/debug on Windows Summary: /usr/lib/debug doesn't exist on Windows so there's no point even attempting to look for symbol files in there. Reviewers: zturner, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13636 llvm-svn: 250175
* Preliminary NetBSD supportBruce Mitchener2015-10-1313-1/+1460
| | | | | | | | | | | | | | | | | | | Summary: This adds platform code without the cmake/gmake glue to the existing infrastructure. The missing and incompatibility ptrace(2) bits (existing in FreeBSD) are under active research and development and will be submitted once verified to work. This code was tested to build and run on NetBSD-current/amd64. Proper build scripts will be integrated separately as a new commit. Reviewers: joerg Subscribers: tfiala, brucem, labath, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D13334 llvm-svn: 250146
* [libstdc++ data-formatters] Remove size limits.Siva Chandra2015-10-131-11/+0
| | | | | | | | | | Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13682 llvm-svn: 250131
* Support RHEL 7 and similar systems that use architecture-specific Python lib ↵Todd Fiala2015-10-124-1/+83
| | | | | | | | dirs This change commits: http://reviews.llvm.org/D13625 llvm-svn: 250093
* Fix a misunderstanding of the ThreadPlan::OkayToDiscard flag in ↵Jim Ingham2015-10-122-18/+84
| | | | | | | | | | | | | InferiorCallPOSIX. It was set to true, but all plans run by RunThreadPlan need to have this set to false so they will return control to RunThreadPlan without consulting plans higher on the stack. Since this seems like a common error, I also modified RunThreadPlan to enforce this behavior. <rdar://problem/22543166> llvm-svn: 250084
* Return the right answer for ShouldStop for the RunToAddress plan. This isn'tJim Ingham2015-10-121-1/+1
| | | | | | | strictly necessary because RunToAddress is always used as a subsidiary plan, so it's ShouldStop seldom matters. But get it right anyway. llvm-svn: 250083
* Add a doc string for ReturnFromFrame.Jim Ingham2015-10-121-0/+7
| | | | llvm-svn: 250082
* Fix test for change in a summary string (objects -> elements).Jim Ingham2015-10-121-6/+6
| | | | llvm-svn: 250081
* TestAttachResume is still flaky on linux. mark it as suchPavel Labath2015-10-121-0/+1
| | | | llvm-svn: 250069
* Switch threading mode for tests on Windows when there are lots of cores.Adrian McCarthy2015-10-121-4/+7
| | | | | | | | This prevents a "too many files" error. Differential Revision: http://reviews.llvm.org/D13555 llvm-svn: 250044
* dotest.py: Remove useless AttributeError catchesPavel Labath2015-10-121-45/+18
| | | | | | | | | | | | | | | Summary: Test decorators were ignoring AttributeError exceptions. These were introduced three years ago, and copied to all decorators. They seem to serve no purpose and removing them produces no errors. Given that they have prevented us from noticing the problem in r249819, I am removing them. Reviewers: zturner, tfiala Subscribers: iancottrell, lldb-commits Differential Revision: http://reviews.llvm.org/D13583 llvm-svn: 250038
* Improve TestValueOfVectorVariableTamas Berghammer2015-10-121-10/+3
| | | | | | | * XFAIL it for android arm/aarch64 as watchpoints aren't supported there * Remove the dwarf/dsym test separation as they will be generated automatically llvm-svn: 250024
* X86: Change FTAG register size in FXSAVE structureAbhishek Aggarwal2015-10-126-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Changed from 16 bits to 8 bits for Intel Architecture -- FXSAVE structure now conforms with the layout of FXSAVE area specified by IA Architecture Software Developer Manual - Modified Linux and FreeBSD specific files to support this change -- MacOSX already uses 8 bits for ftag register - Modified TestRegisters.py and a.cpp: -- Change allows 8 bit comparison of ftag values -- Change resolves Bug 24733: Removed XFAIL for Clang as the test works and passes for Clang compiler as well -- Change provides a Generic/Better way of testing Bug 24457 and Bug 25050 by using 'int3' inline assembly in inferior Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: ovyalov, jingham, clayborg Subscribers: tfiala, emaste Differential Revision: http://reviews.llvm.org/D13587 llvm-svn: 250022
* Fixup log enable --stack so it works on Linux.Todd Fiala2015-10-101-0/+1
| | | | | | | | The underlying raw_string_stream buffer was not being flushed after asking llvm to collect the backtrace. This worked fine on OS X but was failing to print anything on Linux. llvm-svn: 249930
* [LLDB] Fix Clang-tidy misc-use-override warnings in some files in ↵Bruce Mitchener2015-10-1014-319/+276
| | | | | | | | | | | | | | | | | | | | | include/lldb/Core; other minor fixes. Summary: This is second attempt based on current code. I checked this patch on my own build on RHEL 6. Please check it in if it's OK, because I don't have SVN write access. Patch by Eugene Zelenko. Reviewers: labath, brucem, clayborg Subscribers: amccarth, lldb-commits Differential Revision: http://reviews.llvm.org/D13574 llvm-svn: 249928
* Fix namespace closing comment.Bruce Mitchener2015-10-101-1/+1
| | | | | | This is closing namespace lldb_utility, not lldb. llvm-svn: 249924
* [TestValueOfVectorVariable] Reduce the vector size to 4.Siva Chandra2015-10-092-4/+6
| | | | | | | | | | | | Summary: On x86, we only have 4 watchpoint registers. Reviewers: mohit.bhakkad Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13608 llvm-svn: 249916
* Fix build broken by r249885Zachary Turner2015-10-092-3/+3
| | | | llvm-svn: 249900
* Correction in rL249838: Moving test to appropriate directoryMohit K. Bhakkad2015-10-093-0/+0
| | | | llvm-svn: 249897
* Port native Python-API to 3.xZachary Turner2015-10-097-99/+648
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, liblldb is 95% of the way towards being able to work under both Python 2.x and Python 3.x. This should introduce no functional change for Python 2.x, but for Python 3.x there are some important changes. Primarily, these are: 1) PyString doesn't exist in Python 3. Everything is a PyUnicode. To account for this, PythonString now stores a PyBytes instead of a PyString. In Python 2, this is equivalent to a PyUnicode, and in Python 3, we do a conversion from PyUnicode to PyBytes and store the PyBytes. 2) PyInt doesn't exist in Python 3. Everything is a PyLong. To account for this, PythonInteger stores a PyLong instead of a PyInt. In Python 2.x, this requires doing a conversion to PyLong when creating a PythonInteger from a PyInt. In 3.x, there is no PyInt anyway, so we can assume everything is a PyLong. 3) PyFile_FromFile doesn't exist in Python 3. Instead there is a PyFile_FromFd. This is not addressed in this patch because it will require quite a large change to plumb fd's all the way through the system into the ScriptInterpreter. This is the only remaining piece of the puzzle to get LLDB supporting Python 3.x. Being able to run the test suite is not addressed in this patch. After the extension module can compile and you can enter an embedded 3.x interpreter, the test suite will be addressed in a followup. llvm-svn: 249886
* Have CMake translate LLDB_PYTHON_HOME to forward slashes.Zachary Turner2015-10-091-1/+2
| | | | | | | Using backslashes causes the compiler to interpret them as escape sequences. llvm-svn: 249885
* Don't blindly use C for eLanguageTypeUnknown when getting a scratch TypeSystem.Sean Callanan2015-10-091-1/+20
| | | | | | | | | | Instead check what languages are supported for expressions; use C if available, but otherwise pick one of the supported languages. This can be overridden using the target settings. <rdar://problem/22290878> llvm-svn: 249864
* [debugserver,cmake] Add DEPENDS to custom commands.Bruce Mitchener2015-10-091-1/+5
| | | | | | | | | | | | | | Summary: Add dependencies to the custom commands so that they get re-executed as needed. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13580 llvm-svn: 249860
* Remove long-forgotten plugin virtuals.Bruce Mitchener2015-10-096-80/+0
| | | | | | | | | | | | | | | Summary: EnablePluginLogging, GetPluginCommandHelp and ExecutePluginCommand aren't implemented or used anywhere, so remove them from the Hexagon and POSIX Dynamic Loaders as well as the FreeBSD process. Reviewers: clayborg, labath, emaste Subscribers: lldb-commits, emaste Differential Revision: http://reviews.llvm.org/D13581 llvm-svn: 249840
* [LLDB] Fix display of value of a vector variables in watchpoint operationsMohit K. Bhakkad2015-10-094-3/+95
| | | | | | | | Reviewers: clayborg, zturner. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits. Differential Revision: http://reviews.llvm.org/D13202 llvm-svn: 249838
* [LLDB][MIPS] fix watchpoint searched on client side for same masked variablesMohit K. Bhakkad2015-10-091-0/+2
| | | | | | | | Reviewers: clayborg, jingham. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits. Differential Revision: http://reviews.llvm.org/D13548 llvm-svn: 249837
* dotest.py: Fail if we detect multiple tests with the same namePavel Labath2015-10-091-0/+9
| | | | | | | | | | | | | | | | Summary: Log files produced by dotest have names derived from the test name, and this produces errors in case we have multiple tests with the same name. Additionally, it's good if the test name explains what the test is testing (which it clearly doesn't do well if there are multiple tests with identical names). This commit makes the presence of such tests a hard error. Reviewers: tberghammer, zturner Subscribers: iancottrell, lldb-commits Differential Revision: http://reviews.llvm.org/D13588 llvm-svn: 249828
OpenPOWER on IntegriCloud