summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb][tests] Cleanup '.categories'Tatyana Krasnukha2020-01-106-5/+1
|
* [lldb][test] NFC, re-use _getTestPath() functionTatyana Krasnukha2020-01-101-21/+14
|
* [lldb][tests] Take into account all parent's categories when traverse ↵Tatyana Krasnukha2020-01-102-12/+13
| | | | | | | | | | | | folders upwards This is needed to not re-write parent's categories by categories of a nested folder, e.g. commands/expression/completion specify "cmdline" category, however it still belongs to parent's "expression" category. The sentinel ".categories" in the test-suite root directory is no longer needed. Differential Revision: https://reviews.llvm.org/D71905
* [lldb] Surpress "bitfield too small" gcc warningPavel Labath2020-01-101-3/+3
| | | | | | | Gcc produces this (technically correct) warning when storing an explicitly-sized enum in a bitfield. Surpress that by changing the type of the bitfield to an integer. The same approach is used elsewhere in llvm (e.g. 56b5eab12).
* [lldb/DWARF] Don't automatically search dwo unit attributesPavel Labath2020-01-104-23/+7
| | | | | | | | | | | | This patch removes the code (deep inside DWARFDebugInfoEntry) which automagically returned the attributes of the dwo unit DIE when asking for the attributes of the skeleton unit. This is fairly hacky, and not consistent with how llvm DWARF parser operates. Instead, I change the code the explicitly request (via GetNonSkeletonUnit) the right unit to search (there were just two places that needed this). If it turns out we need this more often, we can create a utility function (external to DWARFUnit) for doing this.
* [lldb/lua] Make convenience_variables.test compatible with lua-5.1Pavel Labath2020-01-101-5/+5
|
* Data formatters: Look through array element typedefsJaroslav Sevcik2020-01-106-6/+54
| | | | | | | | | | | | | | | | | Summary: Motivation: When formatting an array of typedefed chars, we would like to display the array as a string. The string formatter currently does not trigger because the formatter lookup does not resolve typedefs for array elements (this behavior is inconsistent with pointers, for those we do look through pointee typedefs). This patch tries to make the array formatter lookup somewhat consistent with the pointer formatter lookup. Reviewers: teemperor, clayborg Reviewed By: teemperor, clayborg Subscribers: clayborg, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D72133
* When reading Aux file in chunks, read consecutive byte rangesJason Molenda2020-01-092-1/+161
| | | | | | | | | | | | | | | | | | | | | | | qemu has a very small maximum packet size (4096) and it actually only uses half of that buffer for some implementation reason, so when lldb asks for the register target definitions, the x86_64 definition is larger than 4096/2 and we need to fetch it in two parts. This patch and test is fixing a bug in GDBRemoteCommunicationClient::ReadExtFeature when reading a target file in multiple parts. lldb was assuming that it would always get back the maximum packet size response (4096) instead of using the actual size received and asking for the next group of bytes. We now have two tests in gdb_remote_client for unique features of qemu - TestNestedRegDefinitions.py would test the ability of lldb to follow multiple levels of xml includes; I opted to create a separate TestRegDefinitionInParts.py test to test this wrinkle in qemu's gdb remote serial protocol stub implementation. Instead of combining both tests into a single test file. <rdar://problem/49537922>
* [lldb] Remove spurious fileJonas Devlieghere2020-01-091-51/+0
|
* [lldb/Lua] Add lua typemaps for INOUT paramsJonas Devlieghere2020-01-092-0/+2
|
* [lldb/SWIG] Undo incorrect substitutionJonas Devlieghere2020-01-091-1/+1
| | | | The Python directory for the script interpreter is still capitalized.
* [lldb/SWIG] Fix capitalization for case sensitive file systems.Jonas Devlieghere2020-01-091-4/+4
| | | | | When moving the Python directory I renamed it to python (lowercase) but didn't update the python.swig file.
* [lldb/Bindings] Move bindings into their own subdirectoryJonas Devlieghere2020-01-0980-18/+17
| | | | | | | | | | | | All the code required to generate the language bindings for Python and Lua lives under scripts, even though the majority of this code aren't scripts at all, and surrounded by scripts that are totally unrelated. I've reorganized these files and moved everything related to the language bindings into a new top-level directory named bindings. This makes the corresponding files self contained and much more discoverable. Differential revision: https://reviews.llvm.org/D72437
* [lldb/Lua] Make lldb.debugger et al available to LuaJonas Devlieghere2020-01-0910-3/+89
| | | | | | | | The Python script interpreter makes the current debugger, target, process, thread and frame available to interactive scripting sessions through convenience variables. This patch does the same for Lua. Differential revision: https://reviews.llvm.org/D71801
* [lldb/SWIG] Add missing '\' in macros againJonas Devlieghere2020-01-091-2/+2
| | | | | | Making the string conversion operator a macro unintentionally dropped the backslash before '\n' and '\r' and was therefore incorrectly stripping 'n' and 'r' from the object description.
* [lldb] Modernize OptionValue::SetValueChangedCallbackPavel Labath2020-01-0910-132/+70
| | | | | instead of a function pointer + void*, take a std::function. This removes a bunch of repetitive, unsafe void* casts.
* [lldb/DWARF] Fix mixed v4+v5 location listsPavel Labath2020-01-0910-75/+184
| | | | | | | | | | | | | | | | | | | | | | Summary: Our code was expecting that a single (symbol) file contains only one kind of location lists. This is not correct (on non-apple platforms, at least) as a file can compile units with different dwarf versions. This patch moves the deteremination of location list flavour down to the compile unit level, fixing this problem. I have also tried to rougly align the code with the llvm DWARFUnit. Fully matching the API is not possible because of how lldb's DWARFExpression lives separately from the rest of the DWARF code, but this is at least a step in the right direction. Reviewers: JDevlieghere, aprantl, clayborg Subscribers: dblaikie, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71751
* [lldb/DWARF] Add is_dwo member to DWARFUnitPavel Labath2020-01-097-20/+19
| | | | | | | | | | | | | | | | | | | | | | Summary: A skeleton unit can easily be detected by checking the m_dwo_symbol_file member, but we cannot tell a split unit from a normal unit from the "inside", which is sometimes useful. This patch adds a m_is_dwo member to enable this, and align the code with llvm::DWARFUnit. Right now it's only used to avoid creating a split unit inside another split unit (which removes one override from SymbolFileDWARFDwo and brings us a step closer to deleting it), but my main motivation is fixing the handling of location lists in mixed v4&v5 files. This comes in a separate patch. Reviewers: JDevlieghere, aprantl, clayborg Subscribers: dblaikie, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71750
* [lldb] Fix that TestNoSuchArch.py was passing for the wrong reasonRaphael Isemann2020-01-091-2/+2
| | | | | | The command here failed due to the type in 'create' but the expect did not actually check for the error message. This fixes the typo and adds a check for the actuall error message we should see.
* [lldb/SWIG] Refactor extensions to be non Python-specific (3/3)Jonas Devlieghere2020-01-0818-253/+59
| | | | | | | | | | | The current SWIG extensions for the string conversion operator is Python specific because it uses the PythonObjects. This means that the code cannot be reused for other SWIG supported languages such as Lua. This reimplements the extensions in a more generic way that can be reused. It uses a SWIG macro to reduce code duplication. Differential revision: https://reviews.llvm.org/D72377
* Save more descriptive error msg from FBS/BKS, relay it up to lldb.Jason Molenda2020-01-081-20/+26
| | | | | | | | | | | | | | | | | | | When lldb requests an app launch through FrontBoard/BackBoard, we get back an NSError object if there was a problem with an integer error code and a descriptive text string. debugserver would log the descriptive text string to the console, but it would only save the error code value, ask for the much-less-specific name of that error code, and send that very generic error word back to lldb. This patch saves the longer description of the failure when available, and sends that to lldb. If unavailable, it falls back to sending up the generic description of the error code as it was doing before. This only impacts the iOS on-device debugserver. <rdar://problem/49953304>
* [lldb] Remove various dead Compare functionsAlex Langford2020-01-084-139/+0
|
* [lldb/SWIG] Refactor extensions to be non Python-specific (2/2)Jonas Devlieghere2020-01-0825-287/+95
| | | | | | | | | | | The current SWIG extensions for the string conversion operator is Python specific because it uses the PythonObjects. This means that the code cannot be reused for other SWIG supported languages such as Lua. This reimplements the extensions in a more generic way that can be reused. It uses a SWIG macro to reduce code duplication. Differential revision: https://reviews.llvm.org/D72377
* Delete dead code.Adrian Prantl2020-01-081-48/+0
| | | | https://reviews.llvm.org/D58856
* [lldb/CMake] Only auto-enable Lua when SWIG is foundJonas Devlieghere2020-01-082-1/+32
| | | | | | Just like Python, Lua should only be auto-enabled if SWIG is found as well. This moves the logic of finding SWIG and Lua as a whole into a new CMake package.
* [lldb/SWIG] Refactor extensions to be non Python-specificJonas Devlieghere2020-01-084-14/+18
| | | | | | | | | | | The current SWIG extensions for the string conversion operator is Python specific because it uses the PythonObjects. This means that the code cannot be reused for other SWIG supported languages such as Lua. This reimplements the extensions in a more generic way that can be reused. Differential revision: https://reviews.llvm.org/D72377
* [lldb/CMake] Use LLDB's autodetection logic for libxml2Jonas Devlieghere2020-01-082-12/+17
| | | | | | | Libxml2 is already an optional dependency. It should use the same infrastructure as the other dependencies. Differential revision: https://reviews.llvm.org/D72290
* [lldb] Remove default llvm::Triple argument from ClangASTContext constructorRaphael Isemann2020-01-082-3/+4
| | | | | | | | | | | Creating an ASTContext with an unknown triple is rarely a good idea (as usually all our ASTs have a valid triple that is either from the host or the target) and the default argument makes it far to easy to implicitly create such an AST. Let's remove it and force people to pass a triple. The only place where we don't pass a triple is a DWARFASTParserClangTests where we now just pass the host triple instead (the test doesn't depend on any triple so this shouldn't change anything).
* [lldb][NFC] Remove redundant ClangASTContext constructor that takes ArchSpecRaphael Isemann2020-01-082-30/+23
| | | | | | | ArchSpec has a superset of the information of llvm::Triple but the ClangASTContext just uses the Triple part of it. This deletes the ArchSpec constructor and all the code creating ArchSpecs and instead just uses the llvm::Triple constructor for ClangASTContext.
* [lldb/CMake] Only auto-enable Python when SWIG is foundJonas Devlieghere2020-01-072-36/+37
| | | | | | | | | As correctly pointed out by Martin on the mailing list, Python should only be auto-enabled if SWIG is found as well. This moves the logic of finding SWIG into FindPythonInterpAndLibs to make that possible. To make diagnosing easier I've included a status message to convey why Python support is disabled.
* [lldb/Test] Try to appease the Windows botJonas Devlieghere2020-01-071-1/+0
| | | | | | | | | | | | In TestConvenienceVariables I changed %t from a file to a directory. This tripped up mkdir which can't deal with an existing file at the given location. In order to solve this issue on the bots I added an `rm -rf %t` statement, but now the Windows bot complains that "This function is not supported on this system". If you never ran the test suite wit this temporary workaround, the test might fail. If this happens please remove what %t expands to in the lit output and rerun the test.
* Revert "Re-land "[lldb/Lua] Add string conversion operator for SBTarget.""Jonas Devlieghere2020-01-074-12/+12
| | | | | | This was returning a pointer to a stack-allocated memory location. This works for Python where we return a PythonString which must own the underlying string.
* Rewrite comment about what watchpoints Aarch64 supports.Jason Molenda2020-01-071-21/+29
|
* Re-land "[lldb/Lua] Add string conversion operator for SBTarget."Jonas Devlieghere2020-01-074-12/+12
| | | | | | | Extend the SBTarget class with a string conversion operator and reuse the same code between Python and Lua. This should happen for all the SB classes, but I'm doing just this one as an example and for use in a test case.
* [lldb/Test] Remove old binary created by TestConvenienceVariablesJonas Devlieghere2020-01-071-0/+1
| | | | | On a dirty build directory the new mkdir fails because the file already exists and is not a directory.
* [lldb/Test] Make TestConvenienceVariables more strictJonas Devlieghere2020-01-071-14/+11
| | | | | | This test was passing even when the output of lldb.target was empty. I've made the test more strict by checking explicitly for the target name and by using CHECK-NEXT lines.
* Revert "[lldb/Lua] Add string conversion operator for SBTarget."Jonas Devlieghere2020-01-074-12/+12
| | | | This reverts commit 640d0ba8760051afc002c672121c6989517fc94e.
* [lldb/Lua] Add string conversion operator for SBTarget.Jonas Devlieghere2020-01-074-12/+12
| | | | | | | Extend the SBTarget class with a string conversion operator and reuse the same code between Python and Lua. This should happen for all the SB classes, but I'm doing just this one as an example and for use in a test case.
* [lldb] Initialize some bitfields in FuncUnwinders.cppPavel Labath2020-01-071-0/+2
| | | | This got flagged by msan.
* Remove extraneous spacesMed Ismail Bennani2020-01-071-1/+1
| | | | Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
* [lldb][NFC] Use static_cast instead of reinterpret_cast where possibleRaphael Isemann2020-01-0716-69/+67
| | | | | | | | | | | | | | Summary: There are a few places in LLDB where we do a `reinterpret_cast` for conversions that we could also do with `static_cast`. This patch moves all this code to `static_cast`. Reviewers: shafik, JDevlieghere, labath Reviewed By: labath Subscribers: arphaman, usaxena95, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D72161
* [lldb][NFC] Take a llvm::Triple in ClangASTContext constructorRaphael Isemann2020-01-077-18/+13
| | | | | | This constructor is supposed to take a string representing an llvm::Triple. We might as well take a llvm::Triple here which saves us all the string conversions in the call sites and we make this more type safe.
* [lldb] Fix LLDB build after API change to printInst (D72172)Raphael Isemann2020-01-071-2/+2
| | | | | It seems in D72172 we always pass a 0 as the new default argument so let's do the same in LLDB to get the build bot running.
* Change the patterns to include the prefix '= ' so we don't pass errantly.Jason Molenda2020-01-061-5/+5
| | | | | | | | Looking at a sometimes-passing test case on a platform where random values were being returned - sometimes the expected digit ('1' or '2') would be included in the random returned value. Add a prefix to reduce the likelihood of this a bit.
* [NSArray] Remove a very old and deprecated formatter.Davide Italiano2020-01-061-27/+0
| | | | Checked with the Foundation folks.
* [lldb/Docs] Describe optional dependencies on build page.Jonas Devlieghere2020-01-061-5/+31
| | | | | | | List the different CMake flags controlling the optional dependencies as per the discussion on the mailing list: http://lists.llvm.org/pipermail/lldb-dev/2020-January/015867.html
* [lldb/Docs] Fix capitalization typo.Jonas Devlieghere2020-01-061-1/+1
| | | | This has been bothering me for way too long.
* [lldb/CMake] Only set PYTHON_HOME on WindowsJonas Devlieghere2020-01-061-1/+1
| | | | | | My earlier change for Python auto-detection caused PYTHON_HOME to be set unconditionally, while before the change this only happened for Windows. This caused the PythonDataObjectsTest to fail with an import error.
* [CMake] Add $ORIGIN/../../../../lib to rpath if BUILD_SHARED_LIBS or ↵Fangrui Song2020-01-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | LLVM_LINK_LLVM_DYLIB on *nix Summary: lib/python2.7/dist-packages/lldb/_lldb.so is a symlink to lib/liblldb.so, which depends on lib/libLLVM*.so (-DBUILD_SHARED_LIBS=ON) or lib/libLLVM-10git.so (-DLLVM_LINK_LLVM_DYLIB=ON). Add an additional rpath `$ORIGIN/../../../../lib` so that _lldb.so can be loaded from Python. This fixes an import error from lib/python2.7/dist-packages/lldb/__init__.py from . import _lldb ImportError: libLLVMAArch64CodeGen.so.10git: cannot open shared object file: No such file or directory The following configurations will work: * -DBUILD_SHARED_LIBS=ON * -DBUILD_SHARED_LIBS=OFF -DLLVM_LINK_LLVM_DYLIB=ON * -DBUILD_SHARED_LIBS=OFF -DLLVM_LINK_LLVM_DYLIB=ON -DCLANG_LINK_CLANG_DYLIB=ON (-DCLANG_LINK_CLANG_DYLIB=ON depends on -DLLVM_LINK_LLVM_DYLIB=ON) Reviewed By: labath Differential Revision: https://reviews.llvm.org/D71800
* [lldb/Test] Move @skipIfAsan from test class to test methods.Jonas Devlieghere2020-01-061-1/+2
| | | | skipTestIfFn can only be used to decorate a test method.
OpenPOWER on IntegriCloud