summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Add offsetof support to expression evaluator.Raphael Isemann2019-07-187-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We currently don't support offsetof in the expression evaluator as it is implemented as a macro (which then calls __builtin_offsetof) in stddef.h. The best solution would be to include that header (or even better, import Clang's builtin module), but header-parsing and (cross-platform) importing modules is not ready yet. Until we get this working with modules I would say we add the macro to our existing macro list as we already do with other macros from stddef.h/stdint.h. We should be able to drop all of them once we can import the relevant modules by default. rdar://26040641 Reviewers: shafik, davide Reviewed By: davide Subscribers: clayborg, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64917 llvm-svn: 366476
* [swig] Enable autodoc featureJonas Devlieghere2019-07-181-0/+1
| | | | | | | | | This patch enables the SWIG `autodoc` feature so that the generated Python reference [1] includes class properties. [1] https://lldb.llvm.org/python_reference/index.html llvm-svn: 366471
* [LLDB] Remove lldb-miJonas Devlieghere2019-07-18196-35601/+0
| | | | | | | | | | | | | | As discussed on the mailing list [1], this patch removes the lldb-mi tool and its tests from the LLDB repository. We moved lldb-mi into a separate repository on GitHub [2] for downstream users or maintainers to build and package. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-July/015103.html [2] https://github.com/lldb-tools/lldb-mi Differential revision: https://reviews.llvm.org/D64255 llvm-svn: 366465
* [CMake] Polish folders in generated Xcode projectStefan Granitz2019-07-183-2/+7
| | | | | | | | | | | | | | Summary: Group plugins by subfolder. Move liblldb-resource-headers to `lldb misc`. Avoid install-distribution related targets in IDE-enabled builds. Reviewers: jingham, mib, stella.stamenova Subscribers: mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D64865 llvm-svn: 366459
* [lldb][NFC] Tablegenify alias/regex/history/source/scriptRaphael Isemann2019-07-182-28/+69
| | | | | | | (Converting these commands together as they are all simple commands that share the same file). llvm-svn: 366440
* [CMake] Always build debugserver on Darwin and allow tests to use the ↵Stefan Granitz2019-07-187-145/+115
| | | | | | | | | | | | | | | | | | | | | | | | system's one Summary: We can always build debugserver, but we can't always sign it to be useable for testing. `LLDB_USE_SYSTEM_DEBUGSERVER` should only tell whether or not the system debugserver should be used for testing. The old behavior complicated the logic around debugserver a lot. The new logic sorts out most of it. Please note that this patch is in early stage and needs some more testing. It should not affect platfroms other than Darwin. It builds on Davide's approach to validate the code-signing identity at configuration time. What do you think? Reviewers: xiaobai, JDevlieghere, davide, compnerd, friss, labath, mgorny, jasonmolenda Reviewed By: JDevlieghere Subscribers: lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D64806 llvm-svn: 366433
* [lldb][NFC] Format 'type' commands in Options.tdRaphael Isemann2019-07-181-46/+98
| | | | llvm-svn: 366426
* [lldb] Tablegenify thread commands and fix completion bug for thread step-*Raphael Isemann2019-07-182-39/+100
| | | | | | | | | | Beside turning the options into the new tablegen format, this patch also fixes that a few commands had source file completions for the "count" and "end-linenumber" arguments (which both accepted only integers). Reason for that are that somehow we added a '1' instead of our usual '0' value to the initial value for completion. llvm-svn: 366425
* [lldb][NFC] Tablegenify type commandsRaphael Isemann2019-07-182-68/+101
| | | | llvm-svn: 366415
* [lldb] Don't double emit option groupsRaphael Isemann2019-07-181-1/+0
| | | | | | | | | We currently emit the option groups twice if Groups<[1,2,3]> is used in the tablegen. This leads to compilation errors. This patch just removes the line that accidentially emits the option group a second time. llvm-svn: 366414
* Only build lldb-tblgen if it's not a current targetNathan Lanza2019-07-181-7/+13
| | | | | | | | | | | | | | | Summary: When doing standalone builds, you could potentially be building against an llvm which also built lldb. If this were the case, you'd be attempting to build this target twice. Reviewers: xiaobai Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D64847 llvm-svn: 366394
* [cmake] Add NATIVE build for cross compiling standalone buildsNathan Lanza2019-07-181-0/+14
| | | | | | | | | TableGen is a host tool and requires a native variant for every build. While building as a part of llvm this is trivial and llvm handles it. However, building standalone means that lldb has to handle this itself. Add a NATIVE build variant to enable this. llvm-svn: 366392
* [NFC] Clarify a Cmake status message regarding Python on LLDBConfigAdrian McCarthy2019-07-171-1/+1
| | | | llvm-svn: 366383
* Ah, forgot a debug line I left in the dsym-for-uuid.sh scriptJason Molenda2019-07-171-1/+0
| | | | | | | to make sure it was correctly being disabled after this test case completed. llvm-svn: 366381
* Add support to ProcessMachCore::DoLoadCore to handle an EFI UUID str.Jason Molenda2019-07-176-0/+497
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a core file has an EFI version string which includes a UUID (similar to what it returns for the kdp KDP_KERNELVERSION packet) in the LC_IDENT or LC_NOTE 'kern ver str' load command. In that case, we should try to find the binary and dSYM for the UUID listed. The dSYM may have python code which knows how to relocate the binary to the correct address in lldb's target section load list and loads other ancillary binaries. The test case is a little involved, 1. it compiles an inferior hello world apple (a.out), 2. it compiles a program which can create a corefile manually with a specific binary's UUID encoded in it, 3. it gets the UUID of the a.out binary, 4. it creates a shell script, dsym-for-uuid.sh, which will return the full path to the a.out + a.out.dSYM when called with teh correct UUID, 5. it sets the LLDB_APPLE_DSYMFORUUID_EXECUTABLE env var before creating the lldb target, to point to this dsym-for-uuid.sh, 6. runs the create-corefile binary we compiled in step #2, 7. loads the corefile from step #6 into lldb, 8. verifies that lldb loaded a.out by reading the LC_NOTE load command from the corefile, calling dsym-for-uuid.sh with that UUID, got back the path to a.out and loaded it. whew! <rdar://problem/47562911> llvm-svn: 366378
* Fix CreateFunctionTemplateSpecialization to prevent dangling poiner to stack ↵Shafik Yaghmour2019-07-174-3/+43
| | | | | | | | | | memory In ClangASTContext::CreateFunctionTemplateSpecializationInfo a TemplateArgumentList is allocated on the stack but is treated as if it is persistent in subsequent calls. When we exit the function func_decl will still point to the stack allocated memory. We will use TemplateArgumentList::CreateCopy instead which will allocate memory out of the DeclContext. Differential Revision: https://reviews.llvm.org/D64777 llvm-svn: 366365
* [docs] Adjust variable formatting tableJonas Devlieghere2019-07-171-1/+10
| | | | | | | | | | | | | | While the in-place hints on valid formats are up to date (e.g. when choosing an invalid format expr -f nonExisting -- 42), the corresponding online docs table is not. The formats "address", "hex float", "instruction" and "void" are missing, and "decimal" refers to an outdated abbreviation 'i' instead of 'd'. Patch by: Lukas Böger Differential revision: https://reviews.llvm.org/D63813 llvm-svn: 366364
* [CMake] Remove duplicated logic to find Python when doing a standalone buildJonas Devlieghere2019-07-171-12/+0
| | | | | | | | | | | I'm pretty sure there's no need to have this logic living in LLDBStandalone. It doesn't appear anything in LLVM depends on this, and We always go through LLDBConfig.cmake which has the canonical way to find the Python libs and interpreter for LLDB. Differential revision: https://reviews.llvm.org/D64821 llvm-svn: 366363
* [CMake] Use LLVM_DIR and Clang_DIR for standalone builds.Jonas Devlieghere2019-07-171-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a standalone build, without setting LLDB_PATH_TO_LLVM_BUILD or LLDB_PATH_TO_CLANG_BUILD, you get the following error. ``` CMake Error at cmake/modules/LLDBStandalone.cmake:23 (find_package): Could not find a package configuration file provided by "LLVM" with any of the following names: LLVMConfig.cmake llvm-config.cmake Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set "LLVM_DIR" to a directory containing one of the above files. If "LLVM" provides a separate development package or SDK, be sure it has been installed. ``` This suggests setting LLVM_DIR to LLVM's install directory. However, LLDBStandalone.cmake takes LLDB_PATH_TO_LLVM_BUILD as its hint. As someone who isn't familiar with the standalone process, this is rather confusing. This patch removes LLDB_PATH_TO_LLVM_BUILD and LLDB_PATH_TO_CLANG_BUILD and instead use LLVM_DIR and Clang_DIR respectively. Differential revision: https://reviews.llvm.org/D64823 llvm-svn: 366362
* [dotest] Disable color while testing.Jonas Devlieghere2019-07-171-0/+3
| | | | | | | | | Disable colors so we don't risk having unexpected ANSI codes in the test output. Currently, the behavior of a test can change depending on whether it's run under a color-supporting terminal, or under a dummy terminal, for example when using lit or multiprocessing. llvm-svn: 366356
* [Test] Add module cache for TestWeakSymbolsJonas Devlieghere2019-07-171-1/+1
| | | | | | | Explicitly set the module cache in the Makefile with -fmodules-cache-path. llvm-svn: 366352
* [CMake] Avoid liblldb genex when figuring out the copy destination for ↵Stefan Granitz2019-07-171-1/+2
| | | | | | | | framework tools This genex created an order-only dependency to liblldb for every framework tool. It reduced build throughput in the first half of the compilation and pulled in unnecessary build units, e.g. debugserver required ~900 build units. With this change debugserver is (again) down at 52 build units! llvm-svn: 366350
* [lldb] Make log for ClangModulesDeclVendor's compiler flag less verboseRaphael Isemann2019-07-171-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently the ClangModulesDeclVendor is spamming the expression log with the compiler flags it is using, which creates a log that looks like this: ``` clang -fmodules -fimplicit-module-maps ``` This patch removes all these newlines and just prints the compiler flags in one line as you see in the command line: ``` clang -fmodules -fimplicit-module-maps [...] ``` Reviewers: shafik, davide Reviewed By: davide Subscribers: davide, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64858 llvm-svn: 366347
* [CMake] Move standalone check so we don't have to reconfigure LLDBJonas Devlieghere2019-07-172-100/+102
| | | | | | | | | | | | | By moving the standalone check into the main CMake file, the whole file is ignored in a regular (non-standalone) build. This means that you can make changes to LLDBStandalone.cmake without having to reconfigure a build in a different directory. This matters when you share one source repository with different build directories (e.g. release-assert, debug, standalone). Differential revision: https://reviews.llvm.org/D64824 llvm-svn: 366346
* [NativePDB] Add a FromCompilerDecl for going from lldb -> clangNathan Lanza2019-07-172-0/+5
| | | | | | | | | | Summary: A common transformation in NativePDB is to go from lldb types to clang types and vice versa. This function automates one of those steps. Differential Revision: https://reviews.llvm.org/D64851 llvm-svn: 366345
* [ASTImporter] Fix LLDB lookup in transparent ctx and with ext srcGabor Marton2019-07-173-14/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With LLDB we use localUncachedLookup(), however, that fails to find Decls when a transparent context is involved and the given DC has external lexical storage. The solution is to use noload_lookup, which works well with transparent contexts. But, we cannot use only the noload_lookup since the slow case of localUncachedLookup is still needed in some other cases. These other cases are handled in ASTImporterLookupTable, but we cannot use that with LLDB since that traverses through the AST which initiates the load of external decls again via DC::decls(). We must avoid loading external decls during the import becuase ExternalASTSource is implemented with ASTImporter, so external loads during import results in uncontrolled and faulty import. Reviewers: shafik, teemperor, jingham, clayborg, a_sidorin, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits, lldb-commits Tags: #clang, #lldb Differential Revision: https://reviews.llvm.org/D61333 llvm-svn: 366325
* [lldb][NFC] Tablegenify watchpoint commandsRaphael Isemann2019-07-173-17/+46
| | | | | | | Part of the project that migrates these struct initializers to our new lldb-tablegen. llvm-svn: 366316
* [Target][NFCI] Remove commented out codeAlex Langford2019-07-171-2/+0
| | | | llvm-svn: 366295
* [NativePDB] Make GetTranslationUnitDecl return an lldb CompilerDeclCtxNathan Lanza2019-07-172-10/+11
| | | | | | | | | | | Summary: We intend to make PdbAstBuilder abstract and implement PdbAstBuilderClang along with any other languages that wish to use PDBs. This is the first step. Differential Revision: https://reviews.llvm.org/D64852 llvm-svn: 366293
* [Target][NFCI] Rename variableAlex Langford2019-07-171-8/+8
| | | | | | This variable doesn't have anything to do with clang. llvm-svn: 366292
* Don't require python exe and lib versions to match while crosscompilingNathan Lanza2019-07-161-1/+2
| | | | | | | | | | | | | | Summary: While cross compiling, the python executable is used to run a handful of scripts while the libraries are linked and headers are included. Theoretically it's possible for the versions to match completely, but requiring the build to match 2.7.10 to 2.7.15 is unnecessary. Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D64822 llvm-svn: 366285
* add a workaround in GetLine to account for ReadFile not reporintg errorNathan Lanza2019-07-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | Summary: ReadFile on Windows is supposed to set ERROR_OPERATION_ABORTED according to the docs on MSDN. However, this has evidently been a known bug since Windows 8. Therefore, we can't detect if a signal interrupted in the fgets. So pressing ctrl-c causes the repl to end and the process to exit. A temporary workaround is just to attempt to fgets twice until this bug is fixed. A possible alternative would be to set a flag in the `sigint_handler` and simply check that flag in the true part of the if statement. However, signal handlers on Windows are asynchronous and this would require sleeping on the repl loop thread while still not necessarily guarnateeing that you caught the sigint. Reviewers: jfb Differential Revision: https://reviews.llvm.org/D64660 llvm-svn: 366281
* [Symbol] Remove unused fields from ClangASTContextAlex Langford2019-07-161-2/+0
| | | | llvm-svn: 366261
* Fix LLDB Windows build Python version logic after r366243Reid Kleckner2019-07-161-0/+1
| | | | llvm-svn: 366247
* [CMake] Fail when Python interpreter doesn't match Python libraries versionJonas Devlieghere2019-07-161-3/+6
| | | | | | | | | | | | | | Because of how CMake finds the Python libraries and interpreter, it's possible to end up with a discrepancy between the two. For example, you'd end up using a Python 3 interpreter to run the test suite while LLDB was built and linked against Python 2. This patch adds a fatal error to CMake so we find out at configuration time, instead of finding out at test time. Differential revision: https://reviews.llvm.org/D64812 llvm-svn: 366243
* [CMake] Add Apple-lldb-Xcode.cmake cache that avoids install optionsStefan Granitz2019-07-161-0/+4
| | | | llvm-svn: 366226
* Revert "[swig] Add workaround for old swig"Jonas Devlieghere2019-07-161-5/+0
| | | | | | | With the deprecation of swig 1.x (r366213), this workaround should no longer be necessary. llvm-svn: 366221
* [SWIG] Deprecate SWIG 1.xJonas Devlieghere2019-07-161-0/+5
| | | | | | | | | | | | | | The last swig 1.x release dates from 2009, now 10 years ago. Recently, I fixed an issue that prevented us from using swig 4 (r364974), which turned out to be not backward compatible with swig 1.x (r365718). This patch deprecates this (really old) version of swig and makes swig 2 the minimum supported version in LLDB . This should be fine for the build bots, which are all running swig 3 or later. Differential revision: https://reviews.llvm.org/D64782 llvm-svn: 366213
* [lldb] Rename Options.inc to CommandOptions.inc [NFC]Raphael Isemann2019-07-165-7/+7
| | | | | | | | It seems having two Options.inc files in the same project is giving our custom Xcode project a hard time. This patch renames the new Options.inc to CommandOptions.inc to prevent this conflict. llvm-svn: 366196
* [lldb] Handle EOF from `lldb-vscode`Jan Kratochvil2019-07-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Sometimes (when running lldb-vscode under strace) I get: read(0, "", 16) = 0 read(0, "", 16) = 0 read(0, "", 16) = 0 ... With this patch testcases finish properly even with strace: read(0, "", 16) = 0 futex(0x1346508, FUTEX_WAKE_PRIVATE, 2147483647) = 0 stat("", 0x7ffe8f2634c8) = -1 ENOENT (No such file or directory) --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=9124, si_uid=1001, si_status=SIGINT, si_utime=1, si_stime=0} --- close(4) = 0 exit_group(0) = ? +++ exited with 0 +++ Differential Revision: https://reviews.llvm.org/D64698 llvm-svn: 366187
* [Target] Remove unused method Target::GetDefaultClangModuleSearchPathsAlex Langford2019-07-162-9/+0
| | | | llvm-svn: 366161
* Update some file changes, but there's a dependency loop soJason Molenda2019-07-151-12/+4
| | | | | | it doesn't quite work rigtht now. llvm-svn: 366156
* [LanguageRuntime] Move ObjCLanguageRuntime into a pluginAlex Langford2019-07-1533-30/+56
| | | | | | | | | | | | | | Summary: Following up to my CPPLanguageRuntime change, I'm moving ObjCLanguageRuntime into a plugin as well. Reviewers: JDevlieghere, compnerd, jingham, clayborg Subscribers: mgorny, arphaman, lldb-commits Differential Revision: https://reviews.llvm.org/D64763 llvm-svn: 366148
* [lldb][doc] Document how our LLDB table gen initialized optionsRaphael Isemann2019-07-151-0/+98
| | | | | | | | | | | | | | | | Summary: This patch adds documentation that should make it easier to migrate from using the old initializers to the table gen format. Reviewers: jingham Reviewed By: jingham Subscribers: abidh, lldb-commits, JDevlieghere Tags: #lldb Differential Revision: https://reviews.llvm.org/D64670 llvm-svn: 366083
* [lldb] [test] Un-XFAIL TestFormattersSBAPI on NetBSDMichal Gorny2019-07-131-1/+0
| | | | llvm-svn: 365991
* Make Python version setting actually effectiveJonas Devlieghere2019-07-131-1/+1
| | | | | | | | | | | This needs to be outside the if to actually work. Also, this adjusts the list of versions to match LLVM. Patch by: Christian Biesinger Differential revision: https://reviews.llvm.org/D64578 llvm-svn: 365988
* [DWARFContext] Strip leading dot in section namesJonas Devlieghere2019-07-131-0/+2
| | | | | | The LLVM context doesn't expect the leading dot in the section name. llvm-svn: 365978
* [LanguageRuntime] Move CPPLanguageRuntime into a pluginAlex Langford2019-07-1213-9/+23
| | | | | | | | | | | | Summary: This seems better suited to be in a plugin. Reviewers: JDevlieghere, clayborg, jingham, compnerd, labath Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D64599 llvm-svn: 365951
* [ObjectContainerBSDArchive] Simplify a few things (NFC)Jonas Devlieghere2019-07-122-61/+70
| | | | | | Differential revision: https://reviews.llvm.org/D64661 llvm-svn: 365950
* [Core] Generalize ValueObject::MaybeCalculateCompleteTypeAlex Langford2019-07-124-42/+52
| | | | | | | | | | | | | | | | Summary: Instead of hardcoding ClangASTContext and ObjCLanguageRuntime, we can generalize this by creating the method GetRuntimeType in LanguageRuntime and moving the current MaybeCalculateCompleteType implementation into ObjCLanguageruntime::GetRuntimeType Reviewers: jingham, clayborg, JDevlieghere Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D64159 llvm-svn: 365939
OpenPOWER on IntegriCloud