summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix windows build after r366791Pavel Labath2019-07-231-1/+3
| | | | | | | | | | | | A side effect of this commit was that it exchanged the order of types and compile units in the output of SymbolVendor::Dump. A couple of PDB tests dependened on that to assert the links between the two. While it wouldn't be too hard to update the tests, the change of ordering was not something I intended to do with that patch, and is easy to restore the original order, so I do just that. llvm-svn: 366798
* [lldb][NFC] Tablegenify sourceRaphael Isemann2019-07-232-19/+46
| | | | llvm-svn: 366795
* SymbolVendor: Move compile unit handling into the SymbolFile classPavel Labath2019-07-2317-143/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: SymbolFile classes are responsible for creating CompileUnit instances and they already need to have a notion of the id<->CompileUnit mapping (because of APIs like ParseCompileUnitAtIndex). However, the SymbolVendor has remained as the thing responsible for caching created units (which the SymbolFiles were calling via convoluted constructs like "m_obj_file->GetModule()->GetSymbolVendor()->SetCompileUnitAtIndex(...)"). This patch moves the responsibility of caching the units into the SymbolFile class. It does this by moving the implementation of SymbolVendor::{GetNumCompileUnits,GetCompileUnitAtIndex} into the equivalent SymbolFile functions. The SymbolVendor functions become just a passthrough much like the rest of SymbolVendor. The original implementations of SymbolFile::GetNumCompileUnits is moved to "CalculateNumCompileUnits", and are made protected, as the "Get" function is the external api of the class. SymbolFile::ParseCompileUnitAtIndex is made protected for the same reason. This is the first step in removing the SymbolVendor indirection, as proposed in <http://lists.llvm.org/pipermail/lldb-dev/2019-June/015071.html>. After removing all interesting logic from the SymbolVendor class, I'll proceed with removing the indirection itself. Reviewers: clayborg, jingham, JDevlieghere Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D65089 llvm-svn: 366791
* [lldb][NFC] Tablegenify disassembleRaphael Isemann2019-07-232-24/+41
| | | | llvm-svn: 366783
* [lldb][test_suite] Fix skipIfTargetAndroid decoratorAlex Langford2019-07-231-7/+3
| | | | | | | | | | | | Summary: Delete the duplicate func `skipIfTargetAndroid` Fix the old one. It didn't work for missing an argument `bugnumber`, this somehow made the decorator failed Differential Revision: https://reviews.llvm.org/D64583 Patch by Wanyi Ye <kusmour@gmail.com> llvm-svn: 366771
* [lldb][test_suite] skip tests of `libstdcpp` on Android and clean upAlex Langford2019-07-232-19/+15
| | | | | | | | | | | | | | | | Summary: Delete the android target from `libstdcpp` test category, since android no longer support libstdcxx Reviewers: xiaobai, labath Reviewed By: labath Subscribers: srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64771 llvm-svn: 366770
* [Logging] Replace LogIfAnyCategoriesSet with LLDB_LOG.Jonas Devlieghere2019-07-226-67/+35
| | | | | | | | This patch removes any remaining instances of LogIfAnyCategoriesSet and replaces them with the LLDB_LOG macro. This in turn made it possible to make Log::VAPrintf and Log::VAError private. llvm-svn: 366768
* Restore tests for lldb-server and lldb-vscode removed at rL366590Antonio Afonso2019-07-2263-0/+10564
| | | | | | | | | | | | | | | | Summary: This was removed here rL366590 by accident. Reviewers: xiaobai, jfb Reviewed By: xiaobai Subscribers: dexonsmith, srhines, krytarowski, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65123 llvm-svn: 366766
* Remove Xcode project remnantsJonas Devlieghere2019-07-222-64/+0
| | | | llvm-svn: 366745
* Remove INSTALL.txt fileJonas Devlieghere2019-07-221-18/+0
| | | | | | | Its contents are stale and much better documentation can be found either online or in the docs directory. llvm-svn: 366742
* [Docs] Remove stale documentationJonas Devlieghere2019-07-221-21/+2
| | | | | | | This removes a stale piece of documentation about building LLDB with the Xcode project. llvm-svn: 366741
* [LLDB] Remove the Xcode projectJonas Devlieghere2019-07-2213-12765/+0
| | | | | | | | | | | | | Finally, after a lot of hard work from a bunch of people, we're in a state where we can unify LLDB's build system. This patch removes the hand-maintained Xcode project in favor of using CMake in combination with the Xcode generator. Going forward, we want to focus our efforts on improving the generated Xcode project. Differential revision: https://reviews.llvm.org/D65109 llvm-svn: 366739
* [Symbol] Improve Variable::GetLanguageAlex Langford2019-07-222-14/+14
| | | | | | | | | | | | | | | | Summary: When trying to ascertain what language a variable belongs to, just checking the compilation unit is often not enough. In r364845 I added a way to check for a variable's language type, but didn't put it in Variable itself. Let's go ahead and put it in Variable. Reviewers: jingham, clayborg Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D64042 llvm-svn: 366733
* [Windows] Fix race condition between state changesAdrian McCarthy2019-07-221-11/+10
| | | | | | | | | | | | | | | Patch by Martin Andersson (martin.andersson@evoma.se) If the process is resumed before the state is changed to "running" there is a possibility (when single stepping) that the debugger stops and changes the state to "stopped" before it is first changed to "running". This causes the process to ignore the stop event (since the state did not change) which in turn leads the DebuggerThread to wait indefinitely for the exception predicate in HandleExceptionEvent. Differential Revision: https://reviews.llvm.org/D62183 llvm-svn: 366703
* ELF: Fix a "memset clearing object of non-trivial type" warningPavel Labath2019-07-222-16/+3
| | | | | | | | Just delete the memset as the ELFHeader constructor already zero-initializes the object. Also clean up the ObjectFileELF constructors/desctructors while I'm in there. llvm-svn: 366692
* [lldb][NFC] Tablegenify breakpointRaphael Isemann2019-07-224-139/+270
| | | | llvm-svn: 366673
* [lldb] Fix crash when looking up type coming from the ClangModuleDeclVendorRaphael Isemann2019-07-212-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We assume in LLDB that every type comes from an ASTContext with an associated ClangASTContext. However the types inside the ClangModuleDeclVendor don't have a ClangASTContext so we end up crashing whenever we create a CompilerType for one of these types. Simplest way to trigger this bug is to just look up NSObject from a module: (lldb) expr @import Foundation (lldb) type lookup NSObject Assertion failed: (m_type_system != nullptr), function CompilerType, file /Users/teemperor/llvm1/llvm-project/lldb/source/Symbol/CompilerType.cpp, line 39. This patch just creates a ClangASTContext for the ASTContext used by ClangModuleDeclVendor. Reviewers: davide, shafik Reviewed By: davide Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64989 llvm-svn: 366653
* [NativePDB] Make GetOrCreateDeclForUid return an lldb CompilerDeclNathan Lanza2019-07-213-12/+16
| | | | | | | | | We intend to make PdbAstBuilder abstract and implement PdbAstBuilderClang along with any other languages that wish to use PDBs. Thus, change GetOrCreateDeclForUid from returning a clang decl to a lldb_private::CompilerDecl. llvm-svn: 366650
* [lldb] Fix buildbot build fail caused by r366645Yuanfang Chen2019-07-211-2/+2
| | | | llvm-svn: 366647
* build: allow the user to specify `llvm-tblgen`Saleem Abdulrasool2019-07-201-23/+27
| | | | | | | | | | | | This follows the same pattern as Clang and permits the user to specify the tablegen to use via `-DLLVM_TABLEGEN=`. This allows for cross-compiling LLDB for a foreign target (e.g. Windows ARM64 on Windows X64). The LLVM dependency for LLDB in that case must be a Windows ARM64 build which cannot cross-compile llvm-tblgen due to the way that Visual Studio works. Instead, permit the user to have a separate tablegen build which can be used during the build. llvm-svn: 366639
* [CMake] Align debugserver with lldb-server on DarwinStefan Granitz2019-07-205-10/+17
| | | | | | | | | | | | | | | | Summary: Make debugserver a tool like lldb-server, so it can be included/excluded via `LLDB_TOOL_DEBUGSERVER_BUILD`. This replaces the old `LLDB_NO_DEBUGSERVER` flag. Doing the same for darwin-debug while I am here. Reviewers: xiaobai, JDevlieghere, davide Reviewed By: xiaobai, JDevlieghere Subscribers: mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D64994 llvm-svn: 366631
* [lldb][NFC] Cleanup mentions and code related to lldb-miRaphael Isemann2019-07-19117-15114/+1
| | | | | | | | | | | | | | | | Summary: lldb-mi has been removed, but there are still a bunch of references in the code base. This patch removes all of them. Reviewers: JDevlieghere, jfb Reviewed By: JDevlieghere Subscribers: dexonsmith, ki.stfu, mgorny, abidh, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64992 llvm-svn: 366590
* Support Linux signal return trampolines in frame initializationJoseph Tremoulet2019-07-1928-12/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add __kernel_rt_sigreturn to the list of trap handlers for Linux (it's used as such on aarch64 at least), and __restore_rt as well (used on x86_64). Skip decrement-and-recompute for trap handlers in InitializeNonZerothFrame, as signal dispatch may point the child frame's return address to the start of the return trampoline. Parse the 'S' flag for signal handlers from eh_frame augmentation, and propagate it to the unwind plan. Reviewers: labath, jankratochvil, compnerd, jfb, jasonmolenda Reviewed By: jasonmolenda Subscribers: clayborg, MaskRay, wuzish, nemanjai, kbarton, jrtc27, atanasyan, jsji, javed.absar, kristof.beyls, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D63667 llvm-svn: 366580
* [lldb][NFC] Tablegenify targetRaphael Isemann2019-07-193-66/+168
| | | | llvm-svn: 366561
* [NFC] Remove indent after r366433Stefan Granitz2019-07-191-120/+118
| | | | llvm-svn: 366560
* [Target] Fix formatting and whitespace (NFC)Jonas Devlieghere2019-07-192-204/+191
| | | | llvm-svn: 366522
* [Target] Return an llvm::Expected from GetEntryPointAddress (NFC)Jonas Devlieghere2019-07-193-36/+33
| | | | | | | Instead of taking a status and potentially returning an invalid address, return an expected which is guaranteed to contain a valid address. llvm-svn: 366521
* check for interrupt from fgets on WindowsNathan Lanza2019-07-191-0/+3
| | | | | | | | Windows does not have the error EINTR when a blocking syscall is interrupted by a signal. The ReadFile API that fgets is implemented with instead use ERROR_OPERATION_ABORTED. Check for that after fgets. llvm-svn: 366520
* [NFC] Remove instances of unused ClangASTContext headerAlex Langford2019-07-193-3/+2
| | | | llvm-svn: 366519
* [Commands] Remove unused header from CommandObjectFrameAlex Langford2019-07-191-1/+0
| | | | llvm-svn: 366517
* [cmake] Update NATIVE build variables to account for standalone changesNathan Lanza2019-07-181-5/+4
| | | | | | | | | | | | Summary: LLDB_PATH_TO_{CLANG,LLVM}_BUILD were removed and replaced with {LLVM,Clang}_DIR. Adjust the NATIVE build to account for this. Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D64959 llvm-svn: 366513
* Remember to sort the Xcode project!!!Jim Ingham2019-07-181-2680/+2680
| | | | llvm-svn: 366508
* Add an expectedFailure test for type finding.Jim Ingham2019-07-183-0/+83
| | | | | | | | | | | | When two .c files define a type of the same name, lldb just picks one and uses it regardless of context. That is not correct. When stopped in a frame in one of the .c files that define this type, it should use that local definition. This commit just adds a test that checks for the correct behavior. It is currently xfailed. llvm-svn: 366507
* The switch to table-genning command options brokeJim Ingham2019-07-181-2680/+2705
| | | | | | | | the xcode project. This gets it a little closer to working, but I still have to figure out how to generate the lldb tablegen backend from the Xcode project. llvm-svn: 366506
* [Breakpoint] Replace use of ClangASTContext with TypeSystemAlex Langford2019-07-181-2/+3
| | | | llvm-svn: 366495
* Fall back to dyld's _dyld_start when no LC_MAIN / main() func can be foundJason Molenda2019-07-185-30/+84
| | | | | | | | | | | | | | | | | | | | | | | | | The new DriverKit user-land kernel drivers in macOS 10.15 / Catalina do not have a main() function or an LC_MAIN load command. lldb uses the address of main() as the return address for inferior function calls; it puts a breakpoint on main, runs the inferior function call, and when the main() breakpoint is hit, lldb knows unambiguously that the inferior function call ran to completion - no other function calls main. This change hoists the logic for finding the "entry address" from ThreadPlanCallFunction to Target. It changes the logic to first try to get the entry address from the main executable module, but if that module does not have one, it will iterate through all modules looking for an entry address. The patch also adds code to ObjectFileMachO to use dyld's _dyld_start function as an entry address. <rdar://problem/52343958> Differential Revision: https://reviews.llvm.org/D64897 llvm-svn: 366493
* [FileSpecList] Add EmplaceBack method (NFC)Jonas Devlieghere2019-07-186-9/+18
| | | | | | | | Instead of having to write FileSpecList::Append(FileSpec(args)) you can now call FileSpecList::EmplaceBack(args), similar to std::vector<>::emplace_back. llvm-svn: 366489
* [lldb][swig] Fix autodocs flag parsingJordan Rupprecht2019-07-181-1/+1
| | | | | | | | r366471 added "-features autodoc" without a trailing comment, leading to `Unrecognized option -features autodoc-threads` due to implicit string concatenation. Add a comma to fix that. Also separate into "-features" and "autodoc", otherwise it gets parsed as a single "-features autodoc" flag which is also not recognized (it must be two separate CLI args). llvm-svn: 366478
* 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
OpenPOWER on IntegriCloud