summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Don't include the Age in the UUID for CvRecordPdb70 UUID records in minidump ↵Greg Clayton2018-08-291-2/+12
| | | | | | | | | | | | | | | | | files for Apple vendors. The CvRecordPdb70 structure looks like: struct CvRecordPdb70 { uint8_t Uuid[16]; llvm::support::ulittle32_t Age; // char PDBFileName[]; }; We were including the "Age" in the UUID for Apple vedors which caused us to not be able to match the UUID to built binaries. The "Age" field is set to zero in breakpad minidump files for Apple targets. Differential Revision: https://reviews.llvm.org/D51442 llvm-svn: 340966
* Removed commented out includes [NFC]Raphael Isemann2018-08-291-4/+0
| | | | llvm-svn: 340958
* [PDB] Resolve a symbol context block info correctlyAleksandr Urakov2018-08-293-6/+63
| | | | | | | | | | | | | | | | | | | Summary: This patch allows to resolve a symbol context block info even if a function info was not requested. Also it adds the correct resolving of nested blocks (the previous implementation used function blocks instead of them). Reviewers: zturner, asmith, labath Reviewed By: asmith Subscribers: lldb-commits, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D51104 llvm-svn: 340901
* [LLDB] Fix script to work with GNU sedShoaib Meenai2018-08-281-5/+6
| | | | | | | | | | | | | | | | | GNU sed and BSD sed have a different command-line syntax for in-place editing, and the current form of the script would only work with BSD sed. The easiest way to get cross-platform behavior is to specify a backup suffix and then just delete the backup file at the end. (BSD sed is the default on macOS, but it's possible to acquire GNU coreutils and have your `sed` be GNU sed even on macOS; I'm aware it's not officially supported in any capacity, but it's easy enough to support here.) An alternative would be using `perl -p -i -e` instead of `sed -i`, but I figured it was best to make the minimal working change. Differential Revision: https://reviews.llvm.org/D51374 llvm-svn: 340885
* Allow IRInterpreter to deal with non-power-of-2 sized types to support some ↵Frederic Riss2018-08-283-11/+53
| | | | | | | | | | | | | | | | | | | | bitfield accesses. Summary: For some bitfield patterns (like the one added by this commit), Clang will generate non-regular data types like i24 or i48. This patch follows a pretty naive approach of just bumping the type size to the next power of 2. DataExtractor know how to deal with weird sizes. The operations on Scalar do not know how to deal with those types though, so we have to legalize the size when creating a Scalar. Reviewers: jingham, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D51245 llvm-svn: 340880
* Remove unnecessary entitlement in debugserver for iOS.Jason Molenda2018-08-281-2/+0
| | | | | | <rdar://problem/43631901> llvm-svn: 340877
* [lldb] Fix lldb build on muslRaphael Isemann2018-08-281-0/+1
| | | | | | | | | | | | | | | | | | | Summary: limits.h is needed for getting PATH_MAX definition, this comes to fore with musl libc where limits.h is not included indirectly via other system headers. Patch by Khem Raj, thanks! Reviewers: compnerd Reviewed By: compnerd Subscribers: llvm-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D31275 llvm-svn: 340876
* Respect platform sysroot when loading core filesPavel Labath2018-08-282-19/+70
| | | | | | | Patch by Eugene Birukov <eugenebi@microsoft.com> Differential Revision: https://reviews.llvm.org/D49685 llvm-svn: 340841
* Use a RAII guard to control access to DisassemblerLLVMC.Raphael Isemann2018-08-282-60/+59
| | | | | | | | | | | | | | | | | | | | Summary: This patch replaces the manual lock/unlock calls for gaining exclusive access to the disassembler with a RAII-powered access scope. This should prevent that we somehow skip over these trailing Unlock calls (e.g. with early returns). We also have a second `GetDisasmToUse` method now that takes an already constructed access scope to prevent deadlocks when we call this from other methods. Reviewers: #lldb, davide, vsk Reviewed By: #lldb, davide, vsk Subscribers: davide, vsk, lldb-commits Differential Revision: https://reviews.llvm.org/D51319 llvm-svn: 340835
* Make the DYLD_INSERT_LIBRARIES workaround for SIP more robut for the various ↵Adrian Prantl2018-08-271-4/+8
| | | | | | configurations that bots are running llvm-svn: 340792
* Add a mkdir -p to builddir into lldbtest.pyAdrian Prantl2018-08-271-0/+11
| | | | | | Based on how it is executed, it may not have been yet created. llvm-svn: 340791
* Fix typoAdrian Prantl2018-08-271-1/+1
| | | | llvm-svn: 340779
* Let the CompilerInstance create our clang ASTContextRaphael Isemann2018-08-271-10/+5
| | | | | | | | | | | | | | | | | | Summary: Now that we moved the BuiltinContext and SelectorTable to the CompilerInstance, we can also get rid of manually creating our own ASTContext, but just use the one from the CompilerInstance (which will be created with the same settings). Reviewers: vsk, aprantl, davide Reviewed By: davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D51253 llvm-svn: 340748
* Disable use-color if the output stream is not a terminal with color support.Raphael Isemann2018-08-274-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: LLDB currently only checks the output terminal for color support by looking at the `TERM` environment variable and comparing it to `"dumb"`. This causes that when running LLDB on a CI node, the syntax highlighter will not be deactivated by LLDB and the output log is filled with color codes (unless the terminal emulator actually exposes itself as dumb). This patch now relies on the LLVM code for detecting color support which is more reliable. We now also correctly actually initialize the `m_supports_colors` variable in `File`. `m_supports_colors` was so far uninitialized, but the code path that uses `m_supports_colors` was also dead so the sanitizers didn't sound an alarm. The old check that compares `TERM` is not removed by this patch as the new LLVM code doesn't seem to handle this case (and it's a good thing to check for "dumb" terminals). Reviewers: aprantl, javed.absar Reviewed By: aprantl Subscribers: kristof.beyls, abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D51243 llvm-svn: 340747
* Disable exceptions for TestDataFormatterLibcxxOptional.pyFrederic Riss2018-08-251-1/+1
| | | | | | | | | | On macOS, some of the <optional> APIs used by the test are available only starting on macOS 10.14 when using exceptions. Build the test with -fno-exceptions so that the test builds on older systems too. rdar://problem/43700544 llvm-svn: 340676
* [vscode] Skip some of the vscode tests on Linux and fix oneStella Stamenova2018-08-243-0/+17
| | | | | | | | | | | | Summary: These are already skipped on Darwin because they cause build bot failures. Both on the build bots as well as in our testing we have seen a number of these tests fail and hang. This change skips the failing/hanging tests on Linux and also fixes one of the test - the test needs the thread library to build. Reviewers: asmith, clayborg, aprantl Subscribers: teemperor, lldb-commits Differential Revision: https://reviews.llvm.org/D51227 llvm-svn: 340658
* Fixed windows bots that were failing because of PATH_MAXRaphael Isemann2018-08-241-0/+2
| | | | | | | | As we only use PATH_MAX for an assert in a unit test that is supposed to catch the random failures on the Swift CI bots, we might as well just ifdef this assert out on Windows. llvm-svn: 340652
* [PDB] Make variables.test to pass using a 32-bit compiler tooAleksandr Urakov2018-08-241-1/+1
| | | | | | | | | | | | | | | | | Summary: `variables.test` depends on mangled names, but the mangling depends on the bitness. This patch specifies the bitness explicitly, so mangled names doesn't differ when a 32-bit version of the compiler is used. Reviewers: stella.stamenova, asmith Reviewed By: stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D51158 llvm-svn: 340597
* Add more pre-run asserts for the DirCompletionAbsolute testRaphael Isemann2018-08-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The DirCompletionAbsolute is still randomly failing on the nodes even after D50722, so this patch adds more asserts that verify certain properties on which the actual completion implementation relies on. The first assert checks that the directory we complete on actually exists. If the directory doesn't exist on the next CI failure, this assert should catch it and we know that the 0 matches come from a missing base directory. The second assert is just checking that we are below the PATH_MAX limit that the completion checks against. This check could randomly fail if the temporary directories we generate are sometimes longer than PATH_MAX, and the assert can tell us that this is the reason we failed (instead of the mysterious '0 matches'). (As a sidenote: We shouldn't be checking against PATH_MAX anyway in the code (as this is just wrong). Also the disk completion API really needs a better error mechanism than returning 0 on both error or no-results.) Reviewers: aprantl, friss Reviewed By: aprantl Subscribers: abidh Differential Revision: https://reviews.llvm.org/D51111 llvm-svn: 340589
* Reuse the SelectorTable from Clang's PreprocessorRaphael Isemann2018-08-232-5/+1
| | | | | | | | | | | | | | | | Summary: At the moment we create our own SelectorTable even though the Preprocessor always creates one for us that we can (and should) reuse. Reviewers: vsk Reviewed By: vsk Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D51185 llvm-svn: 340585
* Restrict the set of plugins used for ProcessMinidumpLeonard Mosescu2018-08-232-8/+15
| | | | | | | | | | | | | | 1. The dynamic loaders should not be needed for loading minidumps and they may create problems (ex. the macOS loader resets the list of loaded sections, which for minidumps are already set up during minidump loading) 2. In general, the extra plugins can do extraneous work which hurts performance (ex. trying to set up implicit symbolic breakpoints, which in turn will trigger extra debug information loading) Differential Revision: https://reviews.llvm.org/D51176 llvm-svn: 340578
* Change xfail to skipIf. The exact condition is really difficult to getAdrian Prantl2018-08-231-1/+1
| | | | | | right and doesn't add much signal. llvm-svn: 340574
* XFAIL test for older versions of clangAdrian Prantl2018-08-231-1/+1
| | | | llvm-svn: 340573
* Fix broken builtin functions in the expression commandRaphael Isemann2018-08-233-4/+64
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Calling any non-libc builtin function in the expression command currently just causes Clang to state that the function is not known. The reason for this is that we actually never initialize the list of builtin functions in the Builtin::Context. This patch just calls the initializer for the builtins in the preprocessor. Also adds some tests for the new builtins. It also gets rid of the extra list of builtins in the ClangExpressionParser, as we can just reuse the existing list in the Preprocessor for the ASTContext. Having just one list of builtins around is also closer to the standard Clang behavior. Reviewers: #lldb, vsk Reviewed By: vsk Subscribers: sgraenitz, clayborg, vsk, lldb-commits Differential Revision: https://reviews.llvm.org/D50481 llvm-svn: 340571
* Fix format string issue introduced in r340548Walter Lee2018-08-231-1/+1
| | | | | | Make format string portable. llvm-svn: 340562
* [cmake] Add option to skip building lldb-serverAlex Langford2018-08-233-2/+4
| | | | | | | | | | | | | | | Summary: There is currently a way to skip the debugserver build. See how the CMake variables SKIP_DEBUGSERVER and LLDB_CODESIGN_IDENTITY are used if you're interested in that. This allows us to skip building lldb-server as well. There is another debug server called ds2 that can be used with LLDB. If you choose to use ds2, this flag is very useful because it can cut down the build time of LLDB. Differential Revision: https://reviews.llvm.org/D49282 llvm-svn: 340560
* Fix check for dictionary entryAdrian Prantl2018-08-231-1/+1
| | | | llvm-svn: 340557
* XFAIL test for older versions of dsymutilAdrian Prantl2018-08-231-0/+1
| | | | llvm-svn: 340550
* lldbtest.py: Work around macOS SIP when testing ASANified builds.Adrian Prantl2018-08-231-0/+20
| | | | llvm-svn: 340548
* Add libc++ data formatter for std::functionAdrian Prantl2018-08-235-38/+261
| | | | | | | | | | | | - Added LibcxxFunctionSummaryProvider - Removed LibcxxFunctionFrontEnd - Modified data formatter tests to test new summary functionality Patch by Shafik Yaghmour! Differential Revision: https://reviews.llvm.org/D50864 llvm-svn: 340543
* Add include directory for libxml on macOSStephane Sezer2018-08-221-2/+1
| | | | | | | | | | | | | | | | | Summary: Builds fail because libxml/xmlreader.h isn't found. Adding the include directory to the include list fixes the issue. This is what we already do on non-macOS platforms in the same file. Reviewers: clayborg, xiaobai, lanza Reviewed By: clayborg, lanza Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D50918 llvm-svn: 340460
* Add unit test for StringLexerRaphael Isemann2018-08-222-0/+142
| | | | | | | | | | | | Reviewers: labath, #lldb Reviewed By: labath Subscribers: jloser, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D50298 llvm-svn: 340448
* lldbtest.py: Unconditionally set the clang module cache path.Adrian Prantl2018-08-212-13/+11
| | | | | | This should fix the errors observable on the new lldb-cmake bot. llvm-svn: 340293
* Makefile.rules: Use an absolute path to the module cache directory.Adrian Prantl2018-08-211-1/+2
| | | | | | This change is NFC, but it makes it more obvious in log files what happened. llvm-svn: 340286
* Reflow commentsAdrian Prantl2018-08-201-3/+3
| | | | llvm-svn: 340219
* Set path to sanitizer runtime when running tests through LIT on macOS.Adrian Prantl2018-08-202-0/+17
| | | | | | | | rdar://problem/42984739 Differential Revision: https://reviews.llvm.org/D50997 llvm-svn: 340218
* Remove manual byte counting from Opcode::DumpRaphael Isemann2018-08-201-13/+14
| | | | | | | | | | | | | | | | Summary: Stream now has byte-counting functionality, so let's use this instead of manual byte counting. Reviewers: clayborg, davide Reviewed By: davide Subscribers: davide, lldb-commits Differential Revision: https://reviews.llvm.org/D50677 llvm-svn: 340179
* Fix lit.cfg for python3: can only concatenate str (not "bytes") to strStefan Granitz2018-08-201-1/+1
| | | | llvm-svn: 340168
* [NFC] Minor update to commentAleksandr Urakov2018-08-201-1/+1
| | | | | | | | Update comment after rLLDB339994 Differential Revision: https://reviews.llvm.org/D49980 llvm-svn: 340151
* Skip tests on Darwin for now. The build bots are not passing due to heavy ↵Greg Clayton2018-08-188-3/+24
| | | | | | load and poor machines. llvm-svn: 340112
* Skip the lldb-vscode attach with waitFor test for now, some build bots are ↵Greg Clayton2018-08-171-0/+1
| | | | | | having trouble. llvm-svn: 340077
* Show how to use "lldb -P" to find the lldb.py.Jim Ingham2018-08-171-4/+5
| | | | | | | | | | We had hard-coded the path in the docs but that got out of date - showing again that -P is the better way to do this. <rdar://problem/43394652> llvm-svn: 340053
* Change the attach test case to use self.assertEqual so we can get more info ↵Greg Clayton2018-08-171-2/+10
| | | | | | | | on what is going wrong on test bots. Also add a cleanup function to remove the copied binary. llvm-svn: 340050
* Fix compiler warnings after rL339649.Aleksandr Urakov2018-08-172-10/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D49980 llvm-svn: 339994
* Add a relocation for R_AARCH64_ABS32 in ObjectFileELFStephane Sezer2018-08-171-4/+9
| | | | | | | | | | | | | | | | | | | | | | Summary: .rela.debug_info relocations are being done via ObjectFileELF::ApplyRelocations for aarch64. Currently, the switch case that iterates over the relocation type is only implemented for a few different types and `assert(false)`es over the rest. Implement the relocation for R_AARCH64_ABS32 in ApplyRelocations Reviewers: sas, xiaobai, javed.absar, espindola Reviewed By: sas Subscribers: emaste, arichardson, kristof.beyls Differential Revision: https://reviews.llvm.org/D50369 Change by Nathan Lanza <lanza@fb.com> llvm-svn: 339974
* Remove commented out constructor from ScalarAlex Langford2018-08-161-43/+0
| | | | | | | This appears to have been commented out since the initial checkin of lldb. llvm-svn: 339965
* Remove outdated TODOs in RegisterValueAlex Langford2018-08-161-3/+0
| | | | | | | | | These TODOs were for setting m_type in RegisterValue::SetValueFromString in the case where reg_info's encoding was eEncodingUint or eEncodingSint. m_type is set by SetUInt{8,16,32,64.128} during the SetUInt call. llvm-svn: 339959
* Update the Core file loading instructions so they keep the process stopped ↵Greg Clayton2018-08-161-0/+1
| | | | | | after attaching to a core file. llvm-svn: 339954
* [dotest] Make --test-subdir work with --no-multiprocessVedant Kumar2018-08-163-18/+49
| | | | | | | | | | | | | | | | | | | The single-process test runner is invoked in a number of different scenarios, including when multiple test dirs are specified or (afaict) when lit is used to drive the test suite. Unfortunately the --test-subdir option did not work with the single process test runner, breaking an important use case (using lit to run swift-lldb Linux tests): Failure URL: https://ci.swift.org/job/swift-PR-Linux/6841 We won't be able to run lldb tests within swift PR testing without filtering down the set of tests. This change makes --test-subdir work with the single-process runner. llvm-svn: 339929
* Fix lldb-vscode build on WindowsReid Kleckner2018-08-164-11/+12
| | | | | | | | Include PosixAPI.h to get a PATH_MAX definition and replace CreateEvent with CreateEventObject to avoid conflicts with the windows.h definition of CreateEvent to CreateEventW. llvm-svn: 339920
OpenPOWER on IntegriCloud