summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* NativeProcessProtocol: Simplify breakpoint setting codePavel Labath2018-11-0414-885/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A fairly simple operation as setting a breakpoint (writing a breakpoint opcode) at a given address was going through three classes: NativeProcessProtocol which called NativeBreakpointList, which then called SoftwareBrekpoint, only to end up again in NativeProcessProtocol to do the actual writing itself. This is unnecessarily complex and can be simplified by moving all of the logic into NativeProcessProtocol class itself, removing a lot of boilerplate. One of the reeasons for this complexity was that (it seems) NativeBreakpointList class was meant to hold both software and hardware breakpoints. However, that never materialized, and hardware breakpoints are stored in a separate map holding only hardware breakpoints. Essentially, this patch makes software breakpoints follow that approach by replacing the heavy SoftwareBraekpoint with a light struct of the same name, which holds only the data necessary to describe one breakpoint. The rest of the logic is in the main class. As, at the lldb-server level, handling software and hardware breakpoints is very different, this seems like a reasonable state of things. Reviewers: krytarowski, zturner, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D52941 llvm-svn: 346093
* Fix duplicate testcase filenameJan Kratochvil2018-11-041-0/+0
| | | | | | | | | dotest.py started reporting: Exception: Found multiple tests with the name TestSampleTest.py After the commit of: https://reviews.llvm.org/D54056 llvm-svn: 346089
* Test commitNathan Lanza2018-11-031-0/+1
| | | | llvm-svn: 346067
* Fix some windows-specific fallout from the FileSpec change.Zachary Turner2018-11-032-32/+32
| | | | llvm-svn: 346058
* Make sure to have lit load the configured site config first.Zachary Turner2018-11-031-1/+3
| | | | | | | | | | For the lldb unit test suite, we forgot to add the mapping from site config to main config, so when it found the main config in the source tree, it wasn't going and loading the configured version in the build tree first, so the required properties weren't getting set up properly. llvm-svn: 346057
* Add an SBExpressionOptions setting mirroring the "exec" command's --allow-jit.Jim Ingham2018-11-026-0/+138
| | | | | | | | <rdar://problem/44809176> Differential Revision: https://reviews.llvm.org/D54056 llvm-svn: 346053
* [FileSystem] Open File instances through the FileSystem.Jonas Devlieghere2018-11-0219-220/+199
| | | | | | | | | | | This patch modifies how we open File instances in LLDB. Rather than passing a path or FileSpec to the constructor, we now go through the virtual file system. This is needed in order to make things work with the VFS in the future. Differential revision: https://reviews.llvm.org/D54020 llvm-svn: 346049
* Fix the lit test suite.Zachary Turner2018-11-021-0/+3
| | | | | | This change was accidentally missed from the original changeset. llvm-svn: 346046
* Revert "[Symbol] Search symbols with name and type in a symbol file"Davide Italiano2018-11-0210-93/+24
| | | | | | It broke MacOS buildbots. llvm-svn: 346045
* Fix a bug in the lit test suite generation.Zachary Turner2018-11-021-1/+1
| | | | | | | | I'm not sure why this has to be CMAKE_CURRENT_SOURCE_DIR, but it causes all kinds of strange cmake generation errors when it's the binary dir. llvm-svn: 346035
* Refactor the lit configuration filesZachary Turner2018-11-0239-231/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | A year or so ago, I re-wrote most of the lit infrastructure in LLVM so that it wasn't so boilerplate-y. I added lots of common helper type stuff, simplifed usage patterns, and made the code more elegant and maintainable. We migrated to this in LLVM, clang, and lld's lit files, but not in LLDBs. This started to bite me recently, as the 4 most recent times I tried to run the lit test suite in LLDB on a fresh checkout the first thing that would happen is that python would just start crashing with unhelpful backtraces and I would have to spend time investigating. You can reproduce this today by doing a fresh cmake generation, doing ninja lldb and then python bin/llvm-lit.py -sv ~/lldb/lit/SymbolFile at which point you'll get a segfault that tells you nothing about what your problem is. I started trying to fix the issues with bandaids, but it became clear that the proper solution was to just bring in the work I did in the rest of the projects. The side benefit of this is that the lit configuration files become much cleaner and more understandable as a result. Differential Revision: https://reviews.llvm.org/D54009 llvm-svn: 346008
* [FileSystem] Remove `SetFileSystem` method.Jonas Devlieghere2018-11-022-7/+0
| | | | | | | This is no longer relevant with the new way we initialize the FileSystem. llvm-svn: 346003
* [FileSystme] Move ::open abstraction into FileSystem.Jonas Devlieghere2018-11-024-12/+20
| | | | | | | This moves the abstraction around ::open into the FileSystem, as is already the case for ::fopen. llvm-svn: 346002
* [NativePDB] Make tests work on x86 tooAleksandr Urakov2018-11-023-9/+9
| | | | | | | | | | | | | | | Summary: This patch fixes the NativePDB tests to make them work from x86 command line too Reviewers: zturner, stella.stamenova Subscribers: aleksandr.urakov, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D54031 llvm-svn: 345974
* [LLDB] - Add support for DW_FORM_rnglistx and relative DW_RLE_* entries.George Rimar2018-11-027-21/+175
| | | | | | | | | This adds support for DW_RLE_base_addressx, DW_RLE_startx_endx, DW_RLE_startx_length, DW_FORM_rnglistx. Differential revision: https://reviews.llvm.org/D53929 llvm-svn: 345958
* [Symbol] Search symbols with name and type in a symbol fileAleksandr Urakov2018-11-0210-24/+93
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds possibility of searching a public symbol with name and type in a symbol file. It is helpful when working with PE, because PE's symtabs contain only imported / exported symbols only. Such a search is required for e.g. evaluation of an expression that calls some function of the debuggee. Reviewers: zturner, asmith, labath, clayborg, espindola Reviewed By: clayborg Subscribers: emaste, arichardson, aleksandr.urakov, jingham, lldb-commits, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D53368 llvm-svn: 345957
* [Windows] Fix Windows build after be053dd5a384a03da5a77552686900ddc7bfc178Aleksandr Urakov2018-11-026-15/+18
| | | | llvm-svn: 345956
* When no FileCheck binary is specified, look in the llvm/clang binJason Molenda2018-11-011-0/+32
| | | | | | | dirs relative to the source directory (Xcode build style) to find one, use it if found. llvm-svn: 345912
* [File] Remove static method to get permissions.Jonas Devlieghere2018-11-015-20/+20
| | | | | | | This patch removes the static accessor in File to get a file's permissions. Permissions should be checked through the FileSystem class. llvm-svn: 345901
* [FileSystem] Update SetFile signature.Jonas Devlieghere2018-11-011-1/+1
| | | | llvm-svn: 345898
* [FileSystem] Change FileSpec constructor signature (2/2)Jonas Devlieghere2018-11-011-4/+2
| | | | | | | Fix breakage due to the recent FileSpec change that extracts the path resultion logic into FileSystem for the FreeBSD host. llvm-svn: 345895
* [FileSystem] Change FileSpec constructor signature.Jonas Devlieghere2018-11-011-3/+4
| | | | | | | Fix breakage due to the recent FileSpec change that extracts the path resultion logic into FileSystem for the Android host. llvm-svn: 345891
* [FileSystem] Move path resolution logic out of FileSpecJonas Devlieghere2018-11-01128-628/+627
| | | | | | | | | This patch removes the logic for resolving paths out of FileSpec and updates call sites to rely on the FileSystem class instead. Differential revision: https://reviews.llvm.org/D53915 llvm-svn: 345890
* Fix clang -Wimplicit-fallthrough warnings across llvm, NFCReid Kleckner2018-11-012-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch should not introduce any behavior changes. It consists of mostly one of two changes: 1. Replacing fall through comments with the LLVM_FALLTHROUGH macro 2. Inserting 'break' before falling through into a case block consisting of only 'break'. We were already using this warning with GCC, but its warning behaves slightly differently. In this patch, the following differences are relevant: 1. GCC recognizes comments that say "fall through" as annotations, clang doesn't 2. GCC doesn't warn on "case N: foo(); default: break;", clang does 3. GCC doesn't warn when the case contains a switch, but falls through the outer case. I will enable the warning separately in a follow-up patch so that it can be cleanly reverted if necessary. Reviewers: alexfh, rsmith, lattner, rtrieu, EricWF, bollu Differential Revision: https://reviews.llvm.org/D53950 llvm-svn: 345882
* [FileSystem] Fix typo in ProcessFreeBSDJonas Devlieghere2018-11-011-1/+1
| | | | llvm-svn: 345860
* [FileSystem] Fix Exists call sitesJonas Devlieghere2018-11-015-8/+13
| | | | | | | There were some calls left to Exists() on non-darwin platforms (Windows, Linux and FreeBSD) that weren't yet updated to use the FileSystem. llvm-svn: 345857
* [FileSystem] Remove Exists() from FileSpecJonas Devlieghere2018-11-0152-171/+178
| | | | | | | | | This patch removes the Exists method from FileSpec and updates its uses with calls to the FileSystem. Differential revision: https://reviews.llvm.org/D53845 llvm-svn: 345854
* [FileSystem] Remove ResolveExecutableLocation() from FileSpecJonas Devlieghere2018-11-0110-58/+50
| | | | | | | | | This patch removes the ResolveExecutableLocation method from FileSpec and updates its uses with calls to the FileSystem. Differential revision: https://reviews.llvm.org/D53834 llvm-svn: 345853
* [FileSystem] Improve assert and add Terminate in unit test.Jonas Devlieghere2018-11-012-3/+6
| | | | | | | | Speculative fix for the Xcode bots where we were seeing the assertion being triggered because we would re-initialize the FileSystem without terminating it. llvm-svn: 345849
* [NativePDB] Get LLDB types from PDB function types.Zachary Turner2018-11-019-8/+561
| | | | | | | | | | | | | | This adds basic support for getting function signature types into LLDB's type system, including into clang's AST. There are a few edge cases which are not correctly handled, mostly dealing with nested classes, but this isn't specific to functions and apply equally to variable types. Note that no attempt has been made yet to deal with member function types, which will happen in subsequent patches. Differential Revision: https://reviews.llvm.org/D53951 llvm-svn: 345848
* [FileSystem] Remove GetPermissions() and Readable() from FileSpecJonas Devlieghere2018-11-0113-50/+17
| | | | | | | | | This patch removes the GetPermissions and GetReadable methods from FileSpec and updates its uses with calls to the FileSystem. Differential revision: https://reviews.llvm.org/D53831 llvm-svn: 345843
* [Windows] A basic implementation of memory allocations in a debuggee processAleksandr Urakov2018-11-014-1/+82
| | | | | | | | | | | | | | | | | | | Summary: This patch adds a basic implementation of `DoAllocateMemory` and `DoDeallocateMemory` for Windows processes. For now it considers only the executable permission (and always allows reads and writes). Reviewers: zturner, asmith, stella.stamenova, labath, clayborg Reviewed By: zturner Subscribers: Hui, vsk, jingham, aleksandr.urakov, clayborg, abidh, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D52618 llvm-svn: 345815
* [FileSystem] Remove GetByteSize() from FileSpecJonas Devlieghere2018-11-0113-28/+33
| | | | | | | | | This patch removes the GetByteSize method from FileSpec and updates its uses with calls to the FileSystem. Differential revision: https://reviews.llvm.org/D53788 llvm-svn: 345812
* [FileSystem] Move EnumerateDirectory from FileSpec to FileSystem.Jonas Devlieghere2018-11-0114-181/+142
| | | | | | | | | | | | | | This patch moves the EnumerateDirectory functionality and related enum and typedef from FileSpec to FileSystem. This is part of a set of patches that extracts file system related convenience methods from FileSpec. The long term goal is to remove this method altogether and use the iterators directly, but for introducing the VFS into LLDB this change is sufficient. Differential revision: https://reviews.llvm.org/D53785 llvm-svn: 345800
* [FileSystem] Re-add EnumerateDirectoryJonas Devlieghere2018-11-013-0/+76
| | | | | | Re-enable EnumerateDirectory now that no_push is available in llvm (r345793). llvm-svn: 345799
* [FileSystem] Remove EnumerateDirectoryJonas Devlieghere2018-10-313-76/+0
| | | | | | | | The new implementation of EnumerateDirectory relies on `::no_push()` being implemented for the VFS recursive directory iterators. However this patch (D53465) hasn't been landed yet. llvm-svn: 345787
* [FileSystem] Extend file system and have it use the VFS.Jonas Devlieghere2018-10-3132-68/+632
| | | | | | | | | | | | | | | | This patch extends the FileSystem class with a bunch of functions that are currently implemented as methods of the FileSpec class. These methods will be removed in future commits and replaced by calls to the file system. The new functions are operated in terms of the virtual file system which was recently moved from clang into LLVM so it could be reused in lldb. Because the VFS is stateful, we turned the FileSystem class into a singleton. Differential revision: https://reviews.llvm.org/D53532 llvm-svn: 345783
* Makefile.rules: Don't use code signing on macOS; it isn't necessary.Adrian Prantl2018-10-311-2/+3
| | | | llvm-svn: 345768
* [NFC] Fixed -Wsign-compare warningDavid Bolvansky2018-10-311-1/+1
| | | | llvm-svn: 345755
* [LLDB] - Regroup the switch entries in DWARFFormValue::ExtractValue. NFC.George Rimar2018-10-311-60/+26
| | | | | | | | This is NFC to clean up the `DWARFFormValue::ExtractValue`. It groups similar `DW_FORM_*` and removes an excessive assignment of `ref_addr_size` (it was assigned right after in any case). llvm-svn: 345733
* [LLDB] - Removed unused variable. NFC.George Rimar2018-10-311-4/+1
| | | | | | | | Introduced in r344119. Thanks to Dávid Bolvanský fo reporting. llvm-svn: 345720
* [lldb] Fix race condition in framework installationShoaib Meenai2018-10-311-1/+1
| | | | | | | | | | | | | We need the install-liblldb-stripped target to depend on the lldb-framework target in order for the installation to be guaranteed to behave correctly, otherwise it's possible for the lldb-framework and install-liblldb-stripped targets to run in parallel, resulting in temporary or partially processed files being copied into the framework. install-liblldb already depends on lldb-framework for this reason. Differential Revision: https://reviews.llvm.org/D53917 llvm-svn: 345711
* [LLDB] - Add support for DW_FORM_addrx[1-4]? forms.George Rimar2018-10-316-8/+124
| | | | | | | | | This adds the support for DW_FORM_addrx, DW_FORM_addrx1, DW_FORM_addrx2, DW_FORM_addrx3, DW_FORM_addrx4 forms. Differential revision: https://reviews.llvm.org/D53813 llvm-svn: 345706
* Fixup the Python-less build of ScriptedRecognizedStackFrameKuba Mracek2018-10-312-0/+6
| | | | llvm-svn: 345694
* [lldb] Introduce StackFrameRecognizer [take 3]Kuba Mracek2018-10-3124-16/+1163
| | | | | | | | This patch introduces a concept of "frame recognizer" and "recognized frame". This should be an extensible mechanism that retrieves information about special frames based on ABI, arguments or other special properties of that frame, even without source code. A few examples where that could be useful could be 1) objc_exception_throw, where we'd like to get the current exception, 2) terminate_with_reason and extracting the current terminate string, 3) recognizing Objective-C frames and automatically extracting the receiver+selector, or perhaps all arguments (based on selector). Differential Revision: https://reviews.llvm.org/D44603 llvm-svn: 345693
* Revert r345686 due to build failuresKuba Mracek2018-10-3124-1162/+16
| | | | llvm-svn: 345688
* [lldb] Introduce StackFrameRecognizer [take 2]Kuba Mracek2018-10-3124-16/+1162
| | | | | | | | This patch introduces a concept of "frame recognizer" and "recognized frame". This should be an extensible mechanism that retrieves information about special frames based on ABI, arguments or other special properties of that frame, even without source code. A few examples where that could be useful could be 1) objc_exception_throw, where we'd like to get the current exception, 2) terminate_with_reason and extracting the current terminate string, 3) recognizing Objective-C frames and automatically extracting the receiver+selector, or perhaps all arguments (based on selector). Differential Revision: https://reviews.llvm.org/D44603 llvm-svn: 345686
* Revert r345678 (build failure on Linux machines).Kuba Mracek2018-10-3124-1162/+16
| | | | llvm-svn: 345680
* [lldb] Introduce StackFrameRecognizerKuba Mracek2018-10-3124-16/+1162
| | | | | | | | This patch introduces a concept of "frame recognizer" and "recognized frame". This should be an extensible mechanism that retrieves information about special frames based on ABI, arguments or other special properties of that frame, even without source code. A few examples where that could be useful could be 1) objc_exception_throw, where we'd like to get the current exception, 2) terminate_with_reason and extracting the current terminate string, 3) recognizing Objective-C frames and automatically extracting the receiver+selector, or perhaps all arguments (based on selector). Differential Revision: https://reviews.llvm.org/D44603 llvm-svn: 345678
* [testsuite] Skip an already failing test on MacOS.Davide Italiano2018-10-301-0/+1
| | | | | | | | Due to some libcxx changes to inlining, this now also crashes, so it gets reported as "failure" by the bot. This commit doesn't really change the status quo, just placates the bots. llvm-svn: 345668
OpenPOWER on IntegriCloud