summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [lldb] Let table gen create command option initializers.Raphael Isemann2019-07-1213-29/+436
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We currently have man large arrays containing initializers for our command options. These tables are tricky maintain as we don't have any good place to check them for consistency and it's also hard to read (`nullptr, {}, 0` is not very descriptive). This patch fixes this by letting table gen generate those tables. This way we can have a more readable syntax for this (especially for all the default arguments) and we can let TableCheck check them for consistency (e.g. an option with an optional argument can't have `eArgTypeNone`, naming of flags', etc.). Also refactoring the related data structures can now be done without changing the hundred of option initializers. For example, this line: ``` {LLDB_OPT_SET_ALL, false, "hide-aliases", 'a', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Hide aliases in the command list."}, ``` becomes this: ``` def hide_aliases : Option<"hide-aliases", "a">, Desc<"Hide aliases in the command list.">; ``` For now I just moved a few initializers to the new format to demonstrate the change. I'll slowly migrate the other option initializers tables in separate patches. Reviewers: JDevlieghere, davide, sgraenitz Reviewed By: JDevlieghere Subscribers: jingham, xiaobai, labath, mgorny, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64365 llvm-svn: 365908
* [windows] re-call signal in sigint_handler for WindowsNathan Lanza2019-07-121-0/+3
| | | | | | | | | | | | Summary: Windows requires re-setting the signal handler each time it is used and thus ctrl-c was not behaving properly on Windows Reviewers: jfb Differential Revision: https://reviews.llvm.org/D64046 llvm-svn: 365868
* [Expression] Move IRDynamicChecks to ClangExpressionParserAlex Langford2019-07-128-56/+108
| | | | | | | | | | | | | | | | | | Summary: IRDynamicChecks in its current form is specific to Clang since it deals with the C language family. It is possible that we may want to instrument code generated for other languages, but we can factor in a more general mechanism to do so at a later time. This decouples ObCLanguageRuntime from Expression! Reviewers: compnerd, clayborg, jingham, JDevlieghere Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D64591 llvm-svn: 365853
* [Target] Replace Plugin headers with non-plugin headersAlex Langford2019-07-111-2/+1
| | | | llvm-svn: 365843
* Add convenience methods to convert LLDB to LLVM data structures.Jonas Devlieghere2019-07-117-10/+57
| | | | | | | | | | This patch adds two convenience methods named GetAsLLVM to the LLDB counterparts of the DWARF DataExtractor and the DWARF context. The DWARFContext, once created, is cached for future usage. Differential revision: https://reviews.llvm.org/D64535 llvm-svn: 365819
* [lldb] Make TestDeletedExecutable more reliableRaphael Isemann2019-07-112-5/+25
| | | | | | | | | | | | | | | | | | | | | Summary: It seems that calling Popen can return to the caller before the started process has read all the needed information from its executable. This means that in case we delete the executable while the process is still starting up, this test will create a zombie process which in turn leads to a failing test. On my macOS system this happens quite frequently. This patch fixes this by letting the test synchronize with the inferior after it has started up. Reviewers: davide Reviewed By: davide Subscribers: labath, friss, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64546 llvm-svn: 365813
* [lldb] Don't use __FUNCTION__ as a file nameRaphael Isemann2019-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: I saw while debugging that we call this file `ParseInternal`, which is not a very good name for our fake expression file and also adds this unnecessary link between the way we name this function and the other source location names we get from the expression parser. This patch is renaming it to `<lldb-expr>` which is closer to the way Clang names its buffers, it doesn't depend on the function name (which changes when I refactor this code) and it's easier to grep for. Reviewers: davide Reviewed By: davide Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64545 llvm-svn: 365812
* [LLDB] Fix FreeBSD build.David Carlier2019-07-112-19/+24
| | | | | | | | | | | | To align with the LaunchThread change. Reviewers: MaskRay, mgorny Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D64398 llvm-svn: 365761
* [lldb] Disable TestDollarInVariable.py on WindowsRaphael Isemann2019-07-111-1/+2
| | | | | | | | | | | | It seems on Windows we don't handle the lldb_expr_result variable correctly: ``` AssertionError: False is not True : 'expr $__lldb_expr_result' returns expected result, got '(int &) $0 = 0x0000000000000000' ``` I'll disable the test until I can find a way to debug this on Windows. llvm-svn: 365719
* [swig] Add workaround for old swigJonas Devlieghere2019-07-111-0/+5
| | | | | | | | | Apparently, when using swig 1.3.40, properties to set values do not work without the `__swig_setmethods__` workaround. I conditionally added this back for SBTypeCategory, as it's causing a test failure on GreenDragon, while I investigate this further. llvm-svn: 365718
* [lldb] Fix handling of dollar characters in expr commandRaphael Isemann2019-07-107-31/+132
| | | | llvm-svn: 365698
* [Expression] IR Instrumenters should have a UtilityFunctionAlex Langford2019-07-102-18/+18
| | | | | | | | | Right now, IR Instrumenters take a DynamicCheckerFunctions object which has all the UtilityFunctions used to instrument IR for expressions. However, each Instrumenter (in practice) uses exactly one UtilityFunction, so let's change the abstraction. llvm-svn: 365696
* Add Python 3.6 and 3.7 to the version listNico Weber2019-07-101-1/+1
| | | | | | | | | | Python 3.6 and 3.7 have been released. Differential Revision: https://reviews.llvm.org/D64444 Patch from Christian Biesinger <cbiesinger@google.com>! llvm-svn: 365688
* [scripts] Remove the unused 'shush' script.Davide Italiano2019-07-101-64/+0
| | | | | | | | There are pre-made utilities doing this. If somebody finds an use for it and wants to resurrect, I would recommend to revise the error messages. llvm-svn: 365677
* Options: Reduce code duplicationPavel Labath2019-07-104-72/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While investigating breakages caused by D63110, I noticed we were building the short options strings in three places. Some of them used a leading ':' to detect missing arguments, and some didn't. This was the indirect cause of D63110. Here, I move the common code into a utility function. Also, unify the code which appends the sentinel value at the end of the option vector, and make it harder for users to pass invalid argc-argv combos to getopt (another component of D63110) by having the OptionParser::Parse function take a (Mutable)ArrayRef. This unification has uncovered that we don't handle missing arguments while building aliases, However, it's not possible to write an effective test for this, as right now it is not possible to return an error out of the alias parsing code (which means we are printing the generic "failure" message even after this patch). Reviewers: mgorny, aprantl Reviewed By: mgorny Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D63770 llvm-svn: 365665
* ObjectFileELF: Add support for gnu-style compressed sectionsPavel Labath2019-07-103-29/+57
| | | | | | | | | With this style, a compressed section is indicated by a "z" in the section name, instead of a section header flag. This patch consists of two small tweaks: - use an llvm Decompressor method in order to properly detect compressed sections - make sure we recognise .zdebug_info (and friends) when classifying section types. llvm-svn: 365654
OpenPOWER on IntegriCloud