summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't crash if the TypeSP is empty.Greg Clayton2016-03-151-1/+4
| | | | llvm-svn: 263593
* Improve the 'type lookup' command such that it guesses to use the current's ↵Enrico Granata2016-03-153-2/+52
| | | | | | frame language as the one to start searching from. llvm-svn: 263592
* Remove unnecessary <limits> includes.Jim Ingham2016-03-157-9/+4
| | | | llvm-svn: 263588
* Add regression test for expressions calling functions taking anonymous ↵Ewan Crawford2016-03-153-0/+78
| | | | | | | | | | | | struct typedef arguments This CL adds a regression test for the bug listed at https://llvm.org/bugs/show_bug.cgi?id=26790 Functionality was implemented in commit r263544 Author: Luke Drummond <luke.drummond@codeplay.com> Differential Revision: http://reviews.llvm.org/D17777 llvm-svn: 263547
* Fix expression evaluation for resolving anonymous aggregrate types with a ↵Ewan Crawford2016-03-151-0/+14
| | | | | | | | | | | | | | | | | typedefed name This fixes a recently reported a bug(https://llvm.org/bugs/show_bug.cgi?id=26790) relating to the clang expression evaluator no longer being able to resolve calls to functions with arguments to typedefed anonymous structs, unions, or enums after a cleanup to the expression parsing code in r260768 This fixes the issue by attaching the tagged name to the original clang::TagDecl object when generating the typedef in lldb::ClangAstContext::CreateTypeDef. This also fixes the issue for anonymous typedefs for non-struct types (unions and enums) where we have a tag name. Author: Luke Drummond <luke.drummond@codeplay.com> Differential Revision: http://reviews.llvm.org/D18099 llvm-svn: 263544
* Bump the lldb version # in the xcode project files fromJason Molenda2016-03-153-48/+48
| | | | | | 350.99.0 to 360.99.0. llvm-svn: 263529
* Workaround the fact that "b" is now a separate command object from ↵Enrico Granata2016-03-152-6/+6
| | | | | | | | | | "_regexp-break", and thus "help b" doesn't show the possible syntaxes It would be nice to have a longer-term plan for how to handle help for regular expression commands, since their syntax is highly irregular. I can see a few options (*), but for now this is a reasonable stop-gag measure for the most blatant regression. (*) the simplest is, of course, to detect a regex command and inherit the syntax for any aliases thereof; it would be nice if this also didn't show the underlying regex command name when the alias is used llvm-svn: 263523
* Add some test coverage for the changes in alias helpEnrico Granata2016-03-151-0/+18
| | | | llvm-svn: 263520
* Improve the way we decide whether an alias is a dashdash aliasEnrico Granata2016-03-151-1/+2
| | | | llvm-svn: 263519
* This was printing arguments twice in dash-dash aliases; don't do thatEnrico Granata2016-03-151-24/+24
| | | | llvm-svn: 263517
* Lots of progress on the CommandAlias refactoringEnrico Granata2016-03-147-136/+299
| | | | | | | | | This cleans things up such CommandAlias essentially can work as its own object; the aliases still live in a separate map, but are now just full-fledged CommandObjectSPs This patch also cleans up help generation for aliases, allows aliases to vend their own help, and adds a tweak such that "dash-dash aliases", such as po, don't show the list of options for their underlying command, since those can't be provided anyway I plan to fix up a few more things here, and then add a test case and proclaim victory llvm-svn: 263499
* Shuffle an #undef to avoid a warning on FreeBSDEd Maste2016-03-141-2/+1
| | | | | | | | | | On FreeBSD _LIBCPP_EXTERN_TEMPLATE is being defined from something included by lldb/lldb-private.h. Undefine it after the #include to avoid the redefinition warning. Differential Revision: http://reviews.llvm.org/D17402 llvm-svn: 263486
* More of the alias refactoring work! CommandAlias is now a CommandObjectEnrico Granata2016-03-145-35/+75
| | | | llvm-svn: 263468
* Enable expectedFailure for all Clang versions in TestRegisterVariablesEd Maste2016-03-141-1/+1
| | | | | | | | | | In r262970 this was changed from xfail Clang < 3.5 to > 3.5, but it still fails on FreeBSD 10's system Clang 3.4.1 so assume it fails on all versions. llvm.org/pr26937 llvm-svn: 263467
* [test] Correctly retry connections on android targetsPavel Labath2016-03-141-5/+31
| | | | | | | | | | | | | | | | | Summary: Normally, when the remote stub is not ready, we will get ECONNREFUSED during the connect() attempt. However, due to the way how ADB forwarding works, on android targets the connect() will always be successful, but the connection will be immediately dropped if ADB could not connect on the remote side. This commit tries to detect this situation, and report it as "connection refused" so that the upper test layers attempt the connection again. Reviewers: tfiala, tberghammer Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D18146 llvm-svn: 263439
* Allow any build-id length between 4 and 20 bytes inclusiveEd Maste2016-03-141-2/+3
| | | | | | | | | | | | Build-id support is being added to lld and by default it may produce a 64-bit build-id. Prior to this change lldb would reject such a build-id. However, it then falls back to a 4-byte crc32, which is a poorer quality identifier. Differential Revision: http://reviews.llvm.org/D18096 llvm-svn: 263432
* Extend XFlaky in TestProcessIO to linux as wellPavel Labath2016-03-141-5/+5
| | | | | | The test sometimes fails on local linux as well. The cause is the same. llvm-svn: 263421
* Let's not convert from UINT32_MAX to the std::numeric_limits version.Jim Ingham2016-03-124-22/+24
| | | | llvm-svn: 263333
* This change introduces a "ExpressionExecutionThread" to the ThreadList. Jim Ingham2016-03-1215-22/+146
| | | | | | | | | | | | | | | | | | | Turns out that most of the code that runs expressions (e.g. the ObjC runtime grubber) on behalf of the expression parser was using the currently selected thread. But sometimes, e.g. when we are evaluating breakpoint conditions/commands, we don't select the thread we're running on, we instead set the context for the interpreter, and explicitly pass that to other callers. That wasn't getting communicated to these utility expressions, so they would run on some other thread instead, and that could cause a variety of subtle and hard to reproduce problems. I also went through the commands and cleaned up the use of GetSelectedThread. All those uses should have been trying the thread in the m_exe_ctx belonging to the command object first. It would actually have been pretty hard to get misbehavior in these cases, but for correctness sake it is good to make this usage consistent. <rdar://problem/24978569> llvm-svn: 263326
* Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; ↵Eugene Zelenko2016-03-125-428/+165
| | | | | | other minor fixes. llvm-svn: 263312
* Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; ↵Eugene Zelenko2016-03-113-293/+199
| | | | | | other minor fixes. llvm-svn: 263300
* Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; ↵Eugene Zelenko2016-03-113-318/+253
| | | | | | other minor fixes. llvm-svn: 263289
* Remove the skip if Darwin since I fixed the crash.Jim Ingham2016-03-111-1/+0
| | | | llvm-svn: 263283
* Check for a NULL input filehandle before referencing it.Jim Ingham2016-03-111-8/+11
| | | | | | <rdar://problem/25105824> llvm-svn: 263274
* Fixed MemoryCache L1 cache flushMarianne Mailhot-Sarrasin2016-03-114-1/+86
| | | | | | | | Use the same method to find the cache line as in Read(). Differential Revision: http://reviews.llvm.org/D18050 llvm-svn: 263233
* Fix a bunch of signedness warnings in unittestsPavel Labath2016-03-112-16/+17
| | | | llvm-svn: 263209
* Fix a couple of cornercases in FileSpec + testsPavel Labath2016-03-113-24/+117
| | | | | | | | | | | | | | | | | | | Summary: This fixes a couple of corner cases in FileSpec, related to AppendPathComponent and handling of root directory (/) file spec. I add a bunch of unit tests for the new behavior. Summary of changes: FileSpec("/bar").GetCString(): before "//bar", after "/bar". FileSpec("/").CopyByAppendingPathComponent("bar").GetCString(): before "//bar", after "/bar". FileSpec("C:", ePathSyntaxWindows).CopyByAppendingPathComponent("bar").GetCString(): before "C:/bar", after "C:\bar". Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18044 llvm-svn: 263207
* skip newly segfaulting test on OS X public CITodd Fiala2016-03-111-0/+1
| | | | llvm-svn: 263205
* Fix SBDebugger.GetOutputFileHandle() on OS X.Jim Ingham2016-03-114-3/+10
| | | | | | | | | | | | | | | | | | | | | | | The swig typemaps had some magic for output File *'s on OS X that made: SBDebugger.GetOutputFileHandle() actually work. That was protected by a "#ifdef __MACOSX__", but the corresponding define got lost going from the Darwin shell scripts to the python scripts for running swig, so the code was elided. I need to pass the define to SWIG, but only when targetting Darwin. So I added a target-platform argument to prepare_bindings, and if that is Darwin, I pass -D__APPLE__ to swig, and that activates this code again, and GetOutputFileHandle works again. Note, I only pass that argument for the Xcode build. I'm sure it is possible to do that for cmake, but my cmake-foo is weak. I should have been able to write a test for this by creating a debugger, setting the output file handle to something file, writing to it, getting the output file handle and reading it. But SetOutputFileHandle doesn't seem to work from Python, so I'd have to write a pexpect test to test this, which I'd rather not do. llvm-svn: 263183
* Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; ↵Eugene Zelenko2016-03-106-273/+184
| | | | | | other minor fixes. llvm-svn: 263174
* Fixed ValueObject::GetExpressionPath() for paths including anonymous ↵Marianne Mailhot-Sarrasin2016-03-102-1/+12
| | | | | | | | | | struct/union When the parent of an expression is anonymous, skip adding '.' or '->' before the expression name. Differential Revision: http://reviews.llvm.org/D18005 llvm-svn: 263166
* Fixed the python interpreter so that it correctly inherits the top ↵Greg Clayton2016-03-104-96/+41
| | | | | | | | | | IOHandler's files instead of always using stdin/out/err. Removed lldb_private::File::Duplicate() and the copy constructor and the assignment operator that used to duplicate the file handles and made them private so no one uses them. Previously the lldb_private::File::Duplicate() function duplicated files that used file descriptors, (int) but not file streams (FILE *), so the lldb_private::File::Duplicate() function only worked some of the time. No one else excep thee ScriptInterpreterPython was using these functions, so that aren't needed nor desired. Previously every time you would drop into the python interpreter we would duplicate files, and now we avoid this file churn. <rdar://problem/24877720> llvm-svn: 263161
* [Renderscript] Add stack argument reading code for Mipsel 3Aidan Dodds2016-03-101-7/+7
| | | | | | | | Fix a problem raised with the previous patches being applied in the wrong order. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263134
* [Renderscript] Add stack argument reading code for Mipsel 2Aidan Dodds2016-03-101-2/+9
| | | | | | | | This commit implements the reading of stack spilled function arguments for little endian MIPS targets. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263131
* [Renderscript] Add stack argument reading code for MipselAidan Dodds2016-03-101-6/+17
| | | | | | | | This commit implements the reading of stack spilled function arguments for little endian MIPS targets. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263130
* [Renderscript] Explicitly set the language to evaluate allocationsAidan Dodds2016-03-101-1/+3
| | | | | | | | | | | | | | | | | | | | Currently it is not specified, and since allocations are usually requested once we hit a renderscript breakpoint, the language will be inferred being as renderscript by the ExpressionParser. Actually allocations attempt to invoke functions part of the RS runtime, written in C/C++, so evaluating the calls in RenderScript could be misleading. In particular, in MIPS, the ABI between C/C++ (mips o32) and renderscript (arm) might introduce subtle bugs when evaluating such expressions. This change explicitly sets the language used to evaluate the allocations as C++. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263129
* Eliminate the TestStarted-XXX and TestFinished-XXX files from check-lldb runs.Adrian McCarthy2016-03-101-11/+0
| | | | | | | | Nobody seems to know what purpose these files serve, yet they were accumulating by the thousands in the test traces directory. I'm proposing we delete them. Creating these files accounted for about 2.5% of the time to run ninja check-lldb on my machine, which isn't a lot, but it's something. llvm-svn: 263122
* Revert "Track expression language from one place in ClangExpressionParser"Ewan Crawford2016-03-102-9/+9
| | | | | | r263099 seems to have broken some OSX tests llvm-svn: 263107
* Track expression language from one place in ClangExpressionParserEwan Crawford2016-03-102-9/+9
| | | | | | | | | | The current expression language is currently tracked in a few places within the ClangExpressionParser constructor. This patch adds a private lldb::LanguageType attribute to the ClangExpressionParser class and tracks the expression language from that one place. Author: Luke Drummond <luke.drummond@codeplay.com> Differential Revision: http://reviews.llvm.org/D17719 llvm-svn: 263099
* [DWARFASTParserClang] Start with member offset of 0 for members of union types.Siva Chandra2016-03-104-1/+70
| | | | | | | | | | | | | | | Summary: GCC does not emit DW_AT_data_member_location for members of a union. Starting with a 0 value for member locations helps is reading union types in such cases. Reviewers: clayborg Subscribers: ldrumm, lldb-commits Differential Revision: http://reviews.llvm.org/D18008 llvm-svn: 263085
* Certain hardware architectures have registers of 256 bits in sizeEnrico Granata2016-03-105-29/+442
| | | | | | This patch extends Scalar such that it can support data living in such registers (e.g. float values living in the XMM registers) llvm-svn: 263079
* Fix SymbolFilePDB for discontiguous functions.Zachary Turner2016-03-101-29/+53
| | | | | | | | | Previously line table parsing code assumed that the only gaps would occur at the end of functions. In practice this isn't true, so this patch makes the line table parsing more robust in the face of functions with non-contiguous byte arrangements. llvm-svn: 263078
* Fix "ninja check-lldb" crash in IRExecutionUnit.cppTed Woodward2016-03-091-6/+16
| | | | | | | | | | | | | | | Summary: From Adrian McCarthy: "Running ninja check-lldb now has one crash in a Python process, due to deferencing a null pointer in IRExecutionUnit.cpp: candidate_sc.symbol is null, which leads to a call with a null this pointer." Reviewers: zturner, spyffe, amccarth Subscribers: ted, jingham, lldb-commits Differential Revision: http://reviews.llvm.org/D17860 llvm-svn: 263066
* Add an "offset" option to "break set -n" and "break set -f -l". Jim Ingham2016-03-0921-56/+256
| | | | | | | | | | | | That way you can set offset breakpoints that will move as the function they are contained in moves (which address breakpoints can't do...) I don't align the new address to instruction boundaries yet, so you have to get this right yourself for now. <rdar://problem/13365575> llvm-svn: 263049
* Last round of preliminary cleanup in my refactoring of aliases.Enrico Granata2016-03-094-107/+124
| | | | | | | | | | | | | | The next step is to actually turn CommandAlias into a full-blown CommandObject citizen. This is tricky given the current architecture of the CommandInterpreter but I think I have found a reasonable path forward. The current plan is to make class CommandAlias : public CommandObject, and have all the several GetCommand calls not actually traverse through the alias to the underlying command object The only times that an alias will be traversed are: a) execution; when time comes to run an alias, I will just grab the underlying command and options, and make the interpreter execute that according to its current algorithm b) subcommand traversal; if one has an alias to a multiword command, grabbing a subcommand will see through to the subcommand Other operations, e.g. command listing, command names, command helps, ..., will all use the alias directly. This will, in turn, lead to the removal of the separate alias dictionary, and just mix user commands and aliases in one map llvm-svn: 262986
* [TestRegisterVariables] Adjust compiler range in expected failure decorator.Siva Chandra2016-03-091-2/+2
| | | | | | | | Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17972 llvm-svn: 262970
* Add CommandAlias.cpp to CMakeListsEnrico Granata2016-03-081-0/+1
| | | | llvm-svn: 262959
* Move CommandAlias to its own file; alsoEnrico Granata2016-03-087-75/+109
| | | | | | Store std::unique_ptr<CommandAlias> instead of instances llvm-svn: 262958
* Made self.expect() errors a little more readable in the testsuite.Sean Callanan2016-03-081-7/+8
| | | | | | | | | | | | | | | | | self.expect() had two problems: - If there was a substrs argument, then it overwrote the variable containing the command to run with the last substr. That meant nonsense command text in testsuite errors. - The actual output is not printed, which makes fixing testsuite failures a bit annoying (you end up having to use the -tv arguments to dotest). This fixes both of these issues. We could do even better, pretty-printing the criteria for "correct" output, but this at least makes dealing with errors a bit better. llvm-svn: 262950
* Support floating point values in 128-bit SSE vector registersAdrian Prantl2016-03-085-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | The System-V x86_64 ABI requires floating point values to be passed in 128-but SSE vector registers (xmm0, ...). When printing such a variable this currently yields an <invalid load address>. This patch makes LLDB's DWARF expression evaluator accept 128-bit registers as scalars. It also relaxes the check that the size of the result of the DWARF expression be equal to the size of the variable to a greater-than. DWARF defers to the ABI how smaller values are being placed in a larger register. Implementation note: I found the code in Value::SetContext() that changes the m_value_type after the fact to be questionable. I added a sanity check that the Value's memory buffer has indeed been written to (this is necessary, because we may have a scalar value in a vector register), but really I feel like this is the wrong place to be setting it. Reviewed by Greg Clayton. http://reviews.llvm.org/D17897 rdar://problem/24944340 llvm-svn: 262947
OpenPOWER on IntegriCloud