summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* SymbolVendor: Remove the object file member variablePavel Labath2019-07-3119-141/+145
| | | | | | | | | | | | | | | | | | Summary: The last responsibility of the SymbolVendor was to hold an owning reference to the object file (in case symbols are being read from a different file than the main module). As SymbolFile classes already hold a non-owning reference to the object file, we can easily remove this responsibility of the SymbolVendor by making the SymbolFile reference owning. Reviewers: JDevlieghere, clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65401 llvm-svn: 367392
* Change '|' to '&' in conditional.Richard Trieu2019-07-311-1/+1
| | | | | | | | Bitwise-or with a non-zero constant will always evaluate to true. Switch to bitwise-and which will only evalute to true if the specified bit is set in the other operand. llvm-svn: 367386
* [CompletionRequest] Remove unimplemented members.Jonas Devlieghere2019-07-3113-68/+21
| | | | | | | | | | Completion requests have two fields that are essentially unimplemented: `m_match_start_point` and `m_max_return_elements`. This would've been okay, if it wasn't for the fact that this caused a bunch of useless parameters to be passed around. Occasionally there would be a comment or assert saying that they are not supported. This patch removes them. llvm-svn: 367385
* [StringList] Change LongestCommonPrefix APIJonas Devlieghere2019-07-315-19/+11
| | | | | | | | | When investigating a completion bug I got confused by the API. LongestCommonPrefix finds the longest common prefix of the strings in the string list. Instead of returning that string through an output argument, just return it by value. llvm-svn: 367384
* [TableGen] Move helpers into LLDBTableGenUtils.Jonas Devlieghere2019-07-316-28/+62
| | | | | | | Instead of polluting the LLDBTableGenBackends header with helpers used by both emitters, move them into a separate files. llvm-svn: 367377
* [TableGen] Include vectorJonas Devlieghere2019-07-311-0/+1
| | | | | | Fixes "no member named 'vector' in namespace 'std'" compile error. llvm-svn: 367375
* [SymbolFilePDB] Fix windows bots after rL367360Alex Langford2019-07-301-4/+12
| | | | | | | | SymbolFilePDB tests were using GetTypeSystemForLanguage but weren't changed to accomodate the use of an llvm::Expected. I adjusted them accordingly. llvm-svn: 367368
* [TableGen] Reuse typedef across emitters (NFC)Jonas Devlieghere2019-07-303-18/+14
| | | | | | | This moves the std::map typedef into the header so it can be reused by all the emitter implementations. llvm-svn: 367363
* [Symbol] Use llvm::Expected when getting TypeSystemsAlex Langford2019-07-3036-328/+596
| | | | | | | | | | | | | | | | | | Summary: This commit achieves the following: - Functions used to return a `TypeSystem *` return an `llvm::Expected<TypeSystem *>` now. This means that the result of a call is always checked, forcing clients to move more carefully. - `TypeSystemMap::GetTypeSystemForLanguage` will either return an Error or a non-null pointer to a TypeSystem. Reviewers: JDevlieghere, davide, compnerd Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D65122 llvm-svn: 367360
* [SymbolFile] SymbolFileDWARF::ParseLineTable should lock its moduleAlex Langford2019-07-301-1/+1
| | | | | | | | | As of svn rL367298, SymbolFileDWARF locks the module in many cases where it needs to parse some aspect of the DWARF symbol file. SymbolFileDWARF::ParseLineTable needs to lock the module because SymbolVendor::ParseLineTable no longer locks it. llvm-svn: 367358
* [Reproducers] Fix incorrect help messageJonas Devlieghere2019-07-301-2/+2
| | | | | | | The help message mentioned the `log` command (probably because I copied it from there originally). llvm-svn: 367338
* [dotest] Remove multiprocessingJonas Devlieghere2019-07-306-1913/+5
| | | | | | | | | | | Now that the Xcode project is removed, I want to focus on dotest as a test framework, and remove its driver capabilities for which we already rely on llvm's lit. Removing multiprocessing is the first step in that direction. Differential revision: https://reviews.llvm.org/D65311 llvm-svn: 367331
* [lldb][NFC] Fix import-std-module tests that relied on fix-its to passRaphael Isemann2019-07-302-5/+5
| | | | | | | These tests currently pass, but they rely on fix-its in our expression parser to pass because they have some typos. llvm-svn: 367309
* [lldb] Fix crash when tab-completing in multi-line exprRaphael Isemann2019-07-304-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Tab completing inside the multiline expression command can cause LLDB to crash. The easiest way to do this is to go inside a frame with at least one local variable and then try to complete: (lldb) expr 1. a[tab] Reason for this was some mixup when we calculate the cursor position. Obviously we should calculate the offset inside the string by doing 'end - start', but we are doing 'start - end' (which causes the offset to become -1 which will lead to some out-of-bounds reading). Fixes rdar://51754005 I don't see any way to test this as the *multiline* expression completion is completely untested at the moment and I don't think we have any existing code for testing infrastructure for it. Reviewers: shafik, davide, labath Reviewed By: labath Subscribers: abidh, lldb-commits, davide, clayborg, labath Tags: #lldb Differential Revision: https://reviews.llvm.org/D64995 llvm-svn: 367308
* [lldb][NFC] Check in crashing test caseRaphael Isemann2019-07-303-0/+19
| | | | llvm-svn: 367307
* [lldb][docs] Update documentation for monorepo and CMake cachesStefan Granitz2019-07-301-36/+144
| | | | | | | | | | | | | | | | Summary: The lldb build system made good progress in the last months, but documentation was still lacking behind. Here's a patch to catch up. Reviewers: JDevlieghere, jingham, labath, stella.stamenova, teemperor, jryans, kastiglione, xiaobai, compnerd, zturner Reviewed By: labath, stella.stamenova, jryans Subscribers: clayborg, amccarth, friss, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D65330 llvm-svn: 367302
* PECOFF: Fix a "memset clearing an object of non-trivial type" warningPavel Labath2019-07-302-34/+32
| | | | | | | | | | | | This time, the warning pointed to an actual problem, because the coff_opt_header structure contained a std::vector. I guess this happened to work because the all-zero state was a valid representation of an empty vector, but its not a good idea to rely on that. I remove the memset, and have the structure clear its members in the constructor instead. llvm-svn: 367299
* SymbolVendor: Move locking into the Symbol FilesPavel Labath2019-07-308-160/+126
| | | | | | | | | | | | | | | | | | | | | | Summary: The last bit of functionality in SymbolVendor passthrough functions is the locking the module mutex. While it may be nice doing the locking in a central place, we weren't really succesful in doing that right now, because some SymbolFile function could still be called without going through the SymbolVendor. This meant in SymbolFileDWARF (the only battle-tested symbol file implementation) roughly a half of the functions was taking additional locks and another half was asserting that the lock is already held. By making the SymbolFile responsible for locking, we can at least make the situation in SymbolFileDWARF more consistent. Reviewers: clayborg, JDevlieghere, jingham, jdoerfert Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D65329 llvm-svn: 367298
* [lldb] [test/lldb-vscode] Use realpath to match vscode behaviorMichal Gorny2019-07-301-2/+4
| | | | | | | | | | | Compare the directory paths returned by lldb-vscode against realpaths rather than apparent paths. This matches lldb-vscode behavior and therefore fixes test failures when one of the parent directories of the source tree is a symlink. Differential Revision: https://reviews.llvm.org/D65432 llvm-svn: 367291
* [lldb] [test/lldb-vscode] Use os.path.dirname() [NFC]Michal Gorny2019-07-301-5/+5
| | | | | | | Replace os.path.split()[0] with os.path.dirname(). Suggested by Pavel Labath in D65432. llvm-svn: 367290
* [lldb] [test] Mark newly running test XFAIL on NetBSDMichal Gorny2019-07-301-0/+1
| | | | | | | | The test was not previously run due to decorator bug (fixed in r366903). It is not a regression and is probably related to the other failing test, so just disable it. llvm-svn: 367285
* [NFC] avoid AlignedCharArray in lldbJF Bastien2019-07-292-3/+3
| | | | | | As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio. llvm-svn: 367275
* [CMake] Move project() call to main CMake fileHaibo Huang2019-07-292-2/+1
| | | | | | | | | | | | | | | Summary: The main CMake file don't have a project() call. In this case, cmake will run a dummy project(Project ) at the very beginning. Even before cmake_minimum_required. And a series of compiler detections will be triggered. This is problematic if we depends on some policy to be set. E.g. CMP0056. try_compile will fail before we have a chance to do anything. Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65362 llvm-svn: 367273
* [Symbolication] Remove some dead code. Nothing exciting.Davide Italiano2019-07-291-2/+0
| | | | llvm-svn: 367262
* [Symbolication] Remove a duplicate assignment.Davide Italiano2019-07-291-1/+0
| | | | llvm-svn: 367261
* [Symbolication] Fix unicode compatibility between 2 and 3.Davide Italiano2019-07-291-1/+1
| | | | | | | | | Triples are always ASCII for now, but we were handed out a unicode object. <rdar://problem/53592772> llvm-svn: 367260
* [Reproducers] Pass FileCollector around as a shared_ptr (NFC)Jonas Devlieghere2019-07-294-14/+19
| | | | | | | | | | | Instead of passing the FileCollector around as a reference or raw pointer, use a shared_ptr. This change's motivation is twofold. First it adds compatibility for the newly added `FileCollectorFileSystem`. Secondly, it addresses a lifetime issue we only see when LLDB is used from Xcode, where a reference to the FileCollector outlives the reproducer instance. llvm-svn: 367258
* Test load unloading of modules with libraries-svr4Antonio Afonso2019-07-291-0/+40
| | | | | | | | | | | | | | | | | | Summary: This doubles the 3 tests running right now on linux by also executing each test with libraries-svr4 enabled. Not sure if there's a better way to do this as I had to copy/paste all the decorators as well... Reviewers: labath, clayborg, xiaobai Reviewed By: labath Subscribers: srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65129 llvm-svn: 367247
* [lldb] Qualify includes of Properties[Enum].inc files. NFCJordan Rupprecht2019-07-2934-71/+71
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a bit more explicit, and makes it possible to build LLDB without varying the -I lines per-directory. (The latter is useful because many build systems only allow this to be configured per-library, and LLDB is insufficiently layered to be split into multiple libraries on stricter build systems). (My comment on D65185 has some more context) Reviewers: JDevlieghere, labath, chandlerc, jdoerfert Reviewed By: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65397 Patch by Sam McCall! llvm-svn: 367241
* [lldb] Also include the array definition in Properties.incJonas Devlieghere2019-07-2916-129/+105
| | | | | | | | | | | | | | | | Right now our Properties.inc only generates the initializer for the options list but not the array declaration boilerplate around it. As the array definition is identical for all arrays, we might as well also let the Properties.inc generate it alongside the initializers. Unfortunately we cannot do the same for enums, as there's this magic ePropertyExperimental, which needs to come at the end to be interpreted correctly. Hopefully we can get rid of this in the future and do the same for the property enums. Differential revision: https://reviews.llvm.org/D65353 llvm-svn: 367238
* [lldb] Increase testsuite packet-timeout 5secs -> 1minJan Kratochvil2019-07-297-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | rL357954 did increase `packet-timeout` 1sec -> 5secs. Which is IMO about the maximum timeout reasonable for regular use. But for testsuite I think the timeout should be higher as the testsuite runs in parallel and it can be run even on slow hosts and with other load (moreover if it runs on some slow arch). I have chosen 60 secs, that should be enough hopefully. Larger value could make debugging with hanging `lldb-server` annoying. This patch was based on this testsuite timeout: http://lab.llvm.org:8014/builders/lldb-x86_64-fedora/builds/546/steps/test/logs/stdio FAIL: test_connect (TestGDBRemoteClient.TestGDBRemoteClient) Test connecting to a remote gdb server ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py", line 13, in test_connect process = self.connect(target) File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py", line 480, in connect self.assertTrue(error.Success(), error.description) AssertionError: False is not True : failed to get reply to handshake packet Differential Revision: https://reviews.llvm.org/D65271 llvm-svn: 367234
* SymbolVendor: Make SectionAddressesChanged a passthroughPavel Labath2019-07-293-15/+17
| | | | | | | | | | | | | | | Summary: This moves the implementation of the function into the SymbolFile class, making it possible to excise the SymbolVendor passthrough functions in follow-up patches. Reviewers: clayborg, jingham, JDevlieghere Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65266 llvm-svn: 367231
* [lldb] [test] Mark three new tests XFAIL on NetBSDMichal Gorny2019-07-292-0/+3
| | | | llvm-svn: 367228
* [lldb][NFC] Split emitting and parsing in LLDBOptionDefEmitterRaphael Isemann2019-07-291-42/+80
| | | | | | | | Splitting the different logic is cleaner and we it will be easier to implement the enum emitting (which otherwise would have to reimplement the Record parsing). llvm-svn: 367207
* [lldb][NFC] Remove DiagnosticManager::CopyDiagnosticsRaphael Isemann2019-07-292-11/+0
| | | | | | | | | The Diagnostic class in LLDB is suppossed to be inherited from, so just copying the diagnostics like this is wrong. The function is also unused, so lets just get rid of it instead of creating some cloning facility for it. llvm-svn: 367201
* [lldb] Also include the array definition in CommandOptions.incRaphael Isemann2019-07-2820-196/+26
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Right now our CommandOptions.inc only generates the initializer for the options list but not the array declaration boilerplate around it. As the array definition is identical for all arrays, we might as well also let the CommandOptions.inc generate it alongside the initializers. This patch will also allow us to generate additional declarations related to that option list in the future (e.g. a enum class representing the specific options which would make our handling code less prone). This patch also fixes a few option tables that didn't follow our naming style. Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65331 llvm-svn: 367186
* [CMake] Print the correct variablesJonas Devlieghere2019-07-261-1/+1
| | | | | | | | This didn't get updated after we decided to set PYTHON_MAJOR_VERSION and PYTHON_MINOR_VERSION in find_python_libs_windows, instead of parsing the variables ourselves. llvm-svn: 367153
* [TableGen] Fix stale include pathsJonas Devlieghere2019-07-262-8/+8
| | | | | | | This worked locally because the include files were not regenerated, but fails when performing a clean build. llvm-svn: 367152
* [TableGen] Move core properties into a separate file (NFC)Jonas Devlieghere2019-07-264-10/+12
| | | | | | | With the plugins having their own tablgen file, it makes sense to split off the core properties as well. llvm-svn: 367140
* [TableGen] Move target properties into a separate file (NFC)Jonas Devlieghere2019-07-267-246/+257
| | | | | | | With the plugins having their own tablgen file, it makes sense to split off the target properties as well. llvm-svn: 367139
* [TableGen] Move interpreter properties into a separate file (NFC)Jonas Devlieghere2019-07-265-34/+44
| | | | | | | With the plugins having their own tablgen file, it makes sense to split off the interpreter properties as well. llvm-svn: 367138
* Document that LLDB_LOG macros use the format_providers.Jim Ingham2019-07-261-0/+20
| | | | | | Differential Revision: https://reviews.llvm.org/D65293 llvm-svn: 367132
* [CMake] Fix find_python_libs_windowsJonas Devlieghere2019-07-261-0/+1
| | | | | | | Exporting PYTHON_INCLUDE_DIR to the Python scope somehow got lost in my last change. Add it back again. This should fix the Windows bot! llvm-svn: 367127
* [CMake] Print Python version on WindowsJonas Devlieghere2019-07-261-2/+2
| | | | | | Trying to figure out what's causing the Windows bot to fail. llvm-svn: 367125
* [CMake] Loosen Python version check and ignore patch versionJonas Devlieghere2019-07-261-10/+36
| | | | | | | | | Some versions of macOS report a different patch version for the system provided interpreter and libraries. Differential revision: https://reviews.llvm.org/D65230 llvm-svn: 367115
* [lldb][NFC] Remove eDiagnosticOriginGoRaphael Isemann2019-07-261-2/+0
| | | | | | This enum value is unused as we removed Go support. llvm-svn: 367110
* DWARF: Improve type safety or range lists parsingPavel Labath2019-07-265-16/+10
| | | | | | | | | Delete the abstract GetOffset function, which is only defined for rnglists entries. Instead fix up entries which refer to the range list classes so that one can statically know that he is dealing with the rnglists section and call the function that way. llvm-svn: 367106
* [lldb] Don't dynamically allocate the posix option validator.Raphael Isemann2019-07-264-24/+21
| | | | | | | | We dynamically allocate the option validator which means we can't mark this list of OptionDefinitions as constexpr. It's also more complicated than necessary. llvm-svn: 367102
* Fix some "control reaches end of non-void function" warningsPavel Labath2019-07-261-0/+2
| | | | llvm-svn: 367095
* ObjectFileELF: Use llvm::JamCRC to refactor CRC32 computationFangrui Song2019-07-261-67/+9
| | | | | | | | Reviewed By: labath Differential Revision: https://reviews.llvm.org/D65318 llvm-svn: 367090
OpenPOWER on IntegriCloud