summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Add a null check against the ThreadPlanZachary Turner2015-11-131-1/+1
| | | | | | | | I'm seeing some cases where the ThreadPlan is null. It could be a sign of a valid race condition, but at least we shouldn't crash. llvm-svn: 253086
* Modernize FormatBacktrace() and make portable for Python 3.Zachary Turner2015-11-133-21/+26
| | | | llvm-svn: 253085
* Another fix for LLDB_DISABLE_PYTHON=1Zachary Turner2015-11-131-1/+5
| | | | llvm-svn: 253073
* Make PythonDataObjects.h work when LLDB_DISABLE_PYTHON=1Zachary Turner2015-11-132-0/+8
| | | | llvm-svn: 253054
* Fix multiple symbol lookup in the same namespaceEugene Leviant2015-11-131-1/+2
| | | | llvm-svn: 253028
* Remove a broken hack from Scalar::ULongLong and fix a testTamas Berghammer2015-11-131-2/+0
| | | | | | | | | | | | | | | | Change Test-rdar-12481949.py to expect GetValueAsUnsigned() to return 0xffffffff if the variable is an int32_t (signed, 4 byte integer) with value of -1. The previous expectation where we expected the value to be 0xffffffffffffffff doesn't make sense as nothing explains why we would treat it as an 8 byte value. This CL also removes a hack from Scalar::ULongLong what was most likely added to get this test passing as it only worked in case the value of the variable is -1 and didn't make any sense even in that case. Differential revision: http://reviews.llvm.org/D14611 llvm-svn: 253027
* Fix to solve Bug 23139 & Bug 23560Abhishek Aggarwal2015-11-132-1/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Reason of both bugs: 1. For the very first frame, Unwinder doesn't check the validity of Full UnwindPlan before creating StackFrame from it: When 'process launch' command is run after setting a breakpoint in inferior, the Unwinder runs and saves only Frame 0 (the frame in which breakpoint was set) in thread's StackFrameList i.e. m_curr_frames_sp. However, it doesn't check the validity of the Full UnwindPlan for this frame by unwinding 2 more frames further. 2. Unwinder doesn't update the CFA value of Cursor when Full UnwindPlan fails and FallBack UnwindPlan succeeds in providing valid CFA values for frames: Sometimes during unwinding of stack frames, the Full UnwindPlan inside the RegisterContextLLDB object may fail to provide valid CFA values for these frames. Then the Fallback UnwindPlan is used to unwind the frames. If the Fallback UnwindPlan succeeds, then it provides a valid new CFA value. The RegisterContextLLDB::m_cfa field of Cursor object is updated during the Fallback UnwindPlan execution. However, UnwindLLDB misses the implementation to update the 'cfa' field of this Cursor with this valid new CFA value. - This patch fixes both these issues. - Remove XFAIL in test files corresponding to these 2 Bugs Change-Id: I932ea407545ceee2d628f946ecc61a4806d4cc86 Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: jingham, lldb-commits, jasonmolenda Subscribers: lldb-commits, ovyalov, tberghammer Differential Revision: http://reviews.llvm.org/D14226 llvm-svn: 253026
* Fix commit 252963 to work around a bug on some platforms where they don't Jim Ingham2015-11-131-3/+13
| | | | | | | | correctly handle stepping over one breakpoint directly onto another breakpoint. This isn't fixing that bug, but rather just changing 252963 to not use breakpoints if it is only stepping one instruction. llvm-svn: 253008
* Fix a bug in PythonExceptionState and add unittest coverage.Zachary Turner2015-11-132-0/+13
| | | | | | | I forgot to reset the restore flag when calling member function `Acquire`. The newly added unittest should cover this case. llvm-svn: 253002
* Introduce a `PythonExceptionState` class.Zachary Turner2015-11-134-85/+263
| | | | | | | | | | | | This is a helper class which supports a number of features including exception to string formatting with backtrace handling and auto-restore of exception state upon scope exit. Additionally, unit tests are included to verify the feature set of the class. llvm-svn: 252994
* Revert "Another little stepping optimization: if any of the source step ↵Ying Chen2015-11-131-9/+2
| | | | | | | | | | commands are running through a range " - Revert because this commit introduce several failures in lldb test suite - http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/8391 - This reverts commit 78943bb678c2893703ee4e8b41969372740c8a6f. llvm-svn: 252980
* Another little stepping optimization: if any of the source step commands are ↵Jim Ingham2015-11-121-2/+9
| | | | | | | | | | | | | | | | | | | | | running through a range of addresses, and the range has no branches, instead of running to the last instruction and single-stepping over that, run to the first instruction after the end of the range. If there are no branches in the current range, then the bytes right after it have to be in the current function, and have to be instructions not data in code, so this is safe. And it cuts down one extra stepi per source range step. Incidentally, this also works around a bug in the llvm Intel assembler where it treats the "rep" prefix as a separate instruction from the repeated instruction. If that were at the end of a line range, then we would put a trap in place of the repeated instruction, which is undefined behavior. Current processors just ignore the repetition in this case, which changes program behavior. Since there would never be a line range break after the rep prefix, always doing the range stepping to the beginning of the new range avoids this problem. <rdar://problem/23461686> llvm-svn: 252963
* Implement RegisterContext for Mini Dumps.Adrian McCarthy2015-11-1215-307/+290
| | | | | | Differential Revision: http://reviews.llvm.org/D14591 llvm-svn: 252950
* Allow renderscript runtime to read MIPS target arguments.Aidan Dodds2015-11-121-1/+41
| | | | llvm-svn: 252914
* Fix non-Windows build after r252906.Zachary Turner2015-11-122-3/+3
| | | | llvm-svn: 252909
* Begin converting uses of PyCallable to PythonCallable.Zachary Turner2015-11-122-15/+49
| | | | | | | | | | | | | | | | PyCallable is a class that exists solely within the swig wrapper code. PythonCallable is a more generic implementation of the same idea that can be used by any Python-related interop code, and lives in PythonDataObjects.h The CL is mostly mechanical, and it doesn't cover every possible user of PyCallable, because I want to minimize the impact of this change (as well as making it easier to figure out what went wrong in case this causes a failure). I plan to finish up the rest of the changes in a subsequent patch, culminating in the removal of PyCallable entirely. llvm-svn: 252906
* Use uniqueness of C++ fully-qualified names to resolve conflictsRamkumar Ramachandra2015-11-121-55/+67
| | | | | | | | | | | | | | | | | | A very expected layout: source tree is in ~/src/llvm, the build directory is in ~/src/llvm-build, and the install location is in /usr/local/{lib,include}. The DWARF information in /usr/local/lib/libLLVM.a for ilist.h points to ~/src/llvm-build/include/llvm/ADT/ilist.h. Now, when someone includes "llvm/ADT/ilist.h" and links against /usr/local/lib/libLLVM.a. Disaster. The DWARF information in libUser.so for ilist.h points to two locations: the one in /usr/include, and the one in ~/src/llvm-build/include. LLDB gets confused. Let's uniquify fully-qualified names and never trip on such a thing. Differential Revision: http://reviews.llvm.org/D14549 llvm-svn: 252898
* Create `PythonTuple` and `PythonCallable` wrapper classes.Zachary Turner2015-11-112-6/+322
| | | | | | | | | | | | | | This adds PythonTuple and PythonCallable classes to PythonDataObjects. Additionally, unit tests are provided that exercise this functionality, including invoking manipulating and checking for validity of tuples, and invoking and checking for validity of callables using a variety of different syntaxes. The goal here is to eventually replace the code in python-wrapper.swig that directly uses the Python C API to deal with callables and name resolution with this code that can be more easily tested and debugged. llvm-svn: 252787
* Add a `PythonModule` class, and a root-level method for resolving names.Zachary Turner2015-11-112-12/+136
| | | | llvm-svn: 252765
* Made the ClangASTImporter into a shared pointer, eliminating a race condition.Sean Callanan2015-11-105-60/+57
| | | | | | | | | | | | | | | It used to be a unique pointer, and there could be a case where ClangASTSource held onto a copy of the pointer but Target::Destroy destroyed the unique pointer in the mean time. I also ensured that there is a validity check on the target (which confirms that a ClangASTImporter can be generated) before the target's shared pointer is copied into ClangASTSource. This race condition caused a crash if Target::Destroy was called and then later the target objecct was deleted. llvm-svn: 252665
* Introduce a way for Languages to specify whether values of "reference types" ↵Enrico Granata2015-11-105-15/+65
| | | | | | | | | | are "nil" (not pointing to anything) or uninitialized (never made to point at anything) This latter determination may or may not be possible on a per-language basis; and neither is mandatory to implement for any language Use this knowledge in the ValueObjectPrinter to generalize the notion of IsObjCNil() and the respective printout llvm-svn: 252663
* Fixed a bug where the size of a type was used instead of the size of a pointer.Sean Callanan2015-11-101-1/+1
| | | | llvm-svn: 252655
* Upstream changes to the ValueObjectPrinter; nfcEnrico Granata2015-11-102-43/+147
| | | | llvm-svn: 252638
* Fixed TypeMemberFunctionImpl to not use clang types directly but use the new ↵Greg Clayton2015-11-106-72/+236
| | | | | | | | | | CompilerDecl class to do the job in an abstract way. Fixed a crash that would happen if you tried to get the name of a constructor or destructor by calling "getDeclName()" instead of calling getName() (which would assert and crash). Added the ability to get function arguments names from SBFunction. llvm-svn: 252622
* Differential Revision: http://reviews.llvm.org/D14538Aidan Dodds2015-11-101-1/+1
| | | | llvm-svn: 252605
* Add support for tvos and watchos to ObjectFileMachO.Jason Molenda2015-11-103-147/+242
| | | | | | | | Add support for the new dyld shared cache format on ios etc devices. Small changes for classifying ObjC metadata symbols. llvm-svn: 252588
* Upstream a small change from Greg Clayton for the REPL support:Jason Molenda2015-11-101-0/+6
| | | | | | | | | | "Modify internal breakpoints so they resolve just like external breakpoints do. This allow you to set symbol and file + line internal breakpoints and have them get updated correctly." <rdar://problem/16931767> llvm-svn: 252584
* The other half of a change made by Enrico for trying to get a correctJason Molenda2015-11-101-31/+57
| | | | | | | | | | | | | | | | | triple for a process. He writes, "Changes to the way setting the triple works on a target so that if the target has passed a fully specified triple, and the newly passed triple is not a revamp of the current one, and the current one is fully specified, then do not replace the existing triple." Triple handling got a bit more complicated on mac with the addition of ios/watchos/tvos and their simulators, and tracking the correct os versions for them so expressions are compiled with the expected APIs available to the user. <rdar://problem/19820698> llvm-svn: 252583
* The MacOSXi386 ABI should be used for watchos simulator debug sessions.Jason Molenda2015-11-102-1/+6
| | | | | | | | | | Also, add an async error message if the dyld solib loaded callback function can't find an ABI (which results in no solibs being loaded in the process). This is a big error and we should call attention to it. <rdar://problem/23471384> llvm-svn: 252581
* More rework of the updating logic for ValueObjectChild. Still just ↵Enrico Granata2015-11-091-24/+43
| | | | | | refactoring with no feature change llvm-svn: 252553
* Rework the way in which ValueObjectChild decides how to update itself; this ↵Enrico Granata2015-11-092-1/+9
| | | | | | is a slight refactoring that I need as part of a larger master plan. As such, should be NFC llvm-svn: 252529
* Avoid sending bare '*' and '}' in an lldb-server packetTim Northover2015-11-091-0/+1
| | | | | | | | | | They get treated as special RLE encoding symbols and packets get corrupted. Most other packet types already know about this apparently, but QEnvironment missed these two. Should fix PR25300. llvm-svn: 252521
* Extend the TypeSystem's ShouldPrintAsOneLiner implementation so that the ↵Enrico Granata2015-11-093-4/+21
| | | | | | ValueObject itself also gets a say in the process; NFC llvm-svn: 252516
* Add a way for source languages to "mark" ValueObjects with language-specific ↵Enrico Granata2015-11-099-24/+99
| | | | | | | | | | flags In this way, when a language needs to tell itself things that are not bound to a type but to a value (imagine a base-class relation, this is not about the type, but about the ValueObject), it can do so in a clean and general fashion The interpretation of the values of the flags is, of course, up to the language that owns the value (the value object's runtime language, that is) llvm-svn: 252503
* autotools: Also link the new go librariesSylvestre Ledru2015-11-081-0/+1
| | | | llvm-svn: 252429
* Fix pessimizing moves. Found by clang.Davide Italiano2015-11-072-2/+2
| | | | llvm-svn: 252409
* Add more NetBSD platform glue for lldbBruce Mitchener2015-11-072-1/+2
| | | | | | | | | | | | | | | | | | Summary: These changes are still incomplete, but we are almost there. Changes: - CMake and gmake code - SWIG code - minor code additions Reviewers: emaste, joerg Subscribers: youri, akat1, brucem, lldb-commits, joerg Differential Revision: http://reviews.llvm.org/D14042 llvm-svn: 252403
* Make lldb::endian::InlHostByteOrder() private.Bruce Mitchener2015-11-0726-96/+96
| | | | | | | | | | | | | | | | | | Summary: Since this is within the lldb namespace, the compiler tries to export a symbol for it. Unfortunately, since it is inlined, the symbol is hidden and this results in a mess of warnings when building on OS X with cmake. Moving it to the lldb_private namespace eliminates that problem. Reviewers: clayborg Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D14417 llvm-svn: 252396
* Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.Chaoren Lin2015-11-071-1/+5
| | | | | | | | | | | | | | | | | Summary: On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the previous stop. Reviewers: sivachandra, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14472 llvm-svn: 252391
* Add SBType::IsAnonymousType() and relative plumbing in the debugger internalsEnrico Granata2015-11-074-0/+54
| | | | | | | | For language that support such a thing, this API allows to ask whether a type is anonymous (i.e. has been given no name) Comes with test case llvm-svn: 252390
* lldb/ADT: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-11-072-14/+14
| | | | | | | Remove implicit ilist iterator conversions before reapplying r252372 (which will disallow them). llvm-svn: 252378
* Fix some Clang-tidy warnings and formatting in recently added code.Eugene Zelenko2015-11-079-203/+185
| | | | | | | | | | | Fixed Clang-tidy warnings: * modernize-use-override; * modernize-use-nullptr; * modernize-use-default; * readability-simplify-boolean-expr. llvm-svn: 252374
* Make the language specifier to "break set" actually filter the names by ↵Jim Ingham2015-11-065-46/+118
| | | | | | | | | | | | | their language. So for instance: break set -l c++ -r Name will only break on C++ symbols that match Name, not ObjC or plain C symbols. This also works for "break set -n" and there are SB API's to pass this as well. llvm-svn: 252356
* Another optimization to keep down gdb-remote traffic. If we have suspended ↵Jim Ingham2015-11-062-6/+25
| | | | | | | | a thread while running, don't request the thread status when deciding why we stopped. llvm-svn: 252355
* Fix for AArch64 watchpoint cache corruption in case of ptrace failureOmair Javaid2015-11-061-1/+49
| | | | | | | | | | Same fix has been submitted for Arm. Review can be found here: Differential revision: http://reviews.llvm.org/D14051 llvm-svn: 252298
* Change the way we read data from the ObjC runtimeEnrico Granata2015-11-061-18/+20
| | | | llvm-svn: 252272
* Add data formatters for NSError and NSExceptionEnrico Granata2015-11-065-0/+457
| | | | llvm-svn: 252269
* A little more careful handling of platforms and unspecified unknownJason Molenda2015-11-061-43/+74
| | | | | | | vendors & oses, especially on Apple, to handle the new environment where we have more than macosx or ios (now we have watchos and tvos). llvm-svn: 252264
* Jim thinks we shouldn't bother to pollute the svn repo with theseJason Molenda2015-11-061-2/+2
| | | | | | | internal details, so I'll pull it back to just our own branch of the sources. llvm-svn: 252254
* Upstream a change to MemoryHistoryASan from Sean:Jason Molenda2015-11-061-2/+11
| | | | | | | | | | | | Author: Sean Callanan <scallanan@apple.com> Date: Tue Jun 23 13:52:24 2015 -0700 Memory history should not crash if it can't inspect its data. Added error handling. <rdar://problem/21231304> llvm-svn: 252252
OpenPOWER on IntegriCloud