summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* 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
* 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
* Fix broken builtin functions in the expression commandRaphael Isemann2018-08-232-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Add libc++ data formatter for std::functionAdrian Prantl2018-08-233-27/+231
| | | | | | | | | | | | - 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
* Fix compiler warnings after rL339649.Aleksandr Urakov2018-08-171-6/+3
| | | | | | 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
* Update LLDB for LLVM CodeView API change in r339907Reid Kleckner2018-08-161-329/+329
| | | | llvm-svn: 339910
* Fix a little thinko in generating ___lldb_unnamed_symbol symbols Jim Ingham2018-08-151-1/+2
| | | | | | | | | | | when we have only an in-memory copy of the binary. Also added a test for the generation of these symbols in the in-memory and regular cases. <rdar://problem/43160401> llvm-svn: 339833
* Add libc++ data formatters for std::optional.Adrian Prantl2018-08-155-7/+132
| | | | | | | | | | Patch by Shafik Yaghmour! This reapplies an earlier version after addressing some post-commit feedback. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 339828
* Remove manual byte counting from Highlighter code.Raphael Isemann2018-08-142-13/+7
| | | | | | | | | | | | | | | | | | | | Summary: This removes the manual byte counting mechanism from the syntax highlighting code. This is no longer necessary as the Stream class now has built-in support for automatically counting the bytes that were written to it so far. The advantage of automatic byte counting via Stream is that it is less error-prone than the manual version and we need to write less boilerplate code. Reviewers: labath Reviewed By: labath Subscribers: labath, lldb-commits Differential Revision: https://reviews.llvm.org/D50676 llvm-svn: 339695
* Remove unused FastDemangle sourcesStefan Granitz2018-08-141-1/+1
| | | | llvm-svn: 339671
* [PDB] Parse UDT symbols and pointers to members (combined patch)Aleksandr Urakov2018-08-144-107/+444
| | | | | | | | | | | | | | | | | | | | | | Summary: In this patch I've tried to combine the best ideas from D49368 and D49410, so it implements following: - Completion of UDTs from a PDB with a filling of a layout info; - Pointers to members; - Fixes the bug relating to a virtual base offset reading from `vbtable`. The offset was treated as an unsigned, but it can be a negative sometimes. - Support of MSInheritance attribute Reviewers: asmith, zturner, rnk, labath, clayborg, lldb-commits Reviewed By: zturner Subscribers: aleksandr.urakov, stella.stamenova, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D49980 llvm-svn: 339649
* Straight forward FastDemangle replacement in SubsPrimitiveParmItaniumStefan Granitz2018-08-131-38/+57
| | | | | | | | | | | | | | | | | | | Summary: Removing FastDemangle will greatly reduce maintenance efforts. This patch replaces the last point of use in LLDB. Semantics should be kept intact. Once this is agreed upon, we can: * Remove the FastDemangle sources * Add more features e.g. substitutions in template parameters, considering all variations, etc. Depends on LLVM patch https://reviews.llvm.org/D50586 Reviewers: erik.pilkington, friss, jingham, JDevlieghere Subscribers: kristof.beyls, chrib, lldb-commits Differential Revision: https://reviews.llvm.org/D50587 llvm-svn: 339583
* Removed doxygen comment that doesn't fit to function signatureRaphael Isemann2018-08-071-6/+0
| | | | llvm-svn: 339204
* Misc module/dwarf logging improvementsLeonard Mosescu2018-08-072-12/+23
| | | | | | | | | | | | | | This change improves the logging for the lldb.module category to note a few interesting cases: 1. Local object file found, but specs not matching 2. Local object file not found, using a placeholder module The handling and logging for the cases wehre we fail to load compressed dwarf symbols is also improved. Differential Revision: https://reviews.llvm.org/D50274 llvm-svn: 339161
* Fix a couple of extended-offsetof warnings that had slipped throughPavel Labath2018-08-071-3/+3
| | | | llvm-svn: 339130
* Move RegisterValue,Scalar,State from Core to UtilityPavel Labath2018-08-07103-130/+129
| | | | | | | | | | | | | These three classes have no external dependencies, but they are used from various low-level APIs. Moving them down to Utility improves overall code layering (although it still does not break any particular dependency completely). The XCode project will need to be updated after this change. Differential Revision: https://reviews.llvm.org/D49740 llvm-svn: 339127
* Revert "Add a relocation for R_AARCH64_ABS32 in ObjectFileELF"Stephane Sezer2018-08-061-10/+5
| | | | | | This reverts commit f055ce7eb893cd0d17ebcfd4125018f46f983aff. llvm-svn: 339071
* Add a relocation for R_AARCH64_ABS32 in ObjectFileELFStephane Sezer2018-08-061-5/+10
| | | | | | | | | | | | | | | | | | 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, peter.smith, clayborg, javed.absar, espindola Differential Revision: https://reviews.llvm.org/D49407 Change by Nathan Lanza <lanza@fb.com> llvm-svn: 339068
* Fix more offsetof issues.Greg Clayton2018-08-061-5/+5
| | | | llvm-svn: 339034
* Fix offsetof usage that got lost when passing patches between linux and mac.Greg Clayton2018-08-062-14/+16
| | | | llvm-svn: 339033
* Add support for ARM and ARM64 breakpad generated minidump files (version 2).Greg Clayton2018-08-069-18/+1597
| | | | | | | | | | | | | | | | In this patch I add support for ARM and ARM64 break pad files. There are two flavors of ARM: Apple where FP is R7, and non Apple where FP is R11. Added minimal tests that load up ARM64 and the two flavors or ARM core files with a single thread and known register values in each register. Each register is checked for the exact value. This is a fixed version of: https://reviews.llvm.org/D49750 The changes from D49750 are: Don't init the m_arch in the Initialize call as a system info isn't required. This keeps the thread list, module list and other tests from failing Added -Wextended-offsetof to Xcode project so we catch use extended usages of offsetof before submission Fixed any extended offset of warnings Differential Revision: https://reviews.llvm.org/D50336 llvm-svn: 339032
* Revert "Add support for ARM and ARM64 breakpad generated minidump files"Pavel Labath2018-08-039-1653/+76
| | | | | | | | This reverts commit r338734 (and subsequent fixups in r338772 and r338746), because it breaks some minidump unit tests and introduces a lot of compiler warnings. llvm-svn: 338828
* [lldb] Remove unused variable.David L. Jones2018-08-021-1/+0
| | | | | | The use of this variable was removed in r338734. It now causes unused variable warnings. llvm-svn: 338772
* Fix CMake build.Zachary Turner2018-08-021-0/+2
| | | | | | | Some new files were committed to the repository but not added to the CMakeLists.txt, so this patch fixes the build. llvm-svn: 338746
* Add support for ARM and ARM64 breakpad generated minidump filesGreg Clayton2018-08-028-75/+1651
| | | | | | | | In this patch I add support for ARM and ARM64 break pad files. There are two flavors of ARM: Apple where FP is R7, and non Apple where FP is R11. Added minimal tests that load up ARM64 and the two flavors or ARM core files with a single thread and known register values in each register. Each register is checked for the exact value. Differential Revision: https://reviews.llvm.org/D49750 llvm-svn: 338734
* [LLDB] Added syntax highlighting supportRaphael Isemann2018-08-0219-1/+359
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds syntax highlighting support to LLDB. When enabled (and lldb is allowed to use colors), printed source code is annotated with the ANSI color escape sequences. So far we have only one highlighter which is based on Clang and is responsible for all languages that are supported by Clang. It essentially just runs the raw lexer over the input and then surrounds the specific tokens with the configured escape sequences. Reviewers: zturner, davide Reviewed By: davide Subscribers: labath, teemperor, llvm-commits, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D49334 llvm-svn: 338662
* [DWARFASTParser] Remove special cases for `llvm-gcc`Davide Italiano2018-08-011-26/+3
| | | | | | | | Reviewed by: aprantl, labath. Differential Revision: https://reviews.llvm.org/D48500 llvm-svn: 338638
* Android is an environment and we were comparing the android tripleEric Christopher2018-07-311-3/+3
| | | | | | | | | against the OS rather than the environment. Also update other uses of OS when we meant environment in the android local code. NFC intended. llvm-svn: 338460
* Tidy up comment.Eric Christopher2018-07-311-2/+2
| | | | llvm-svn: 338459
* Use UnknownVendor rather than UnknownArch since they're in two different enumsEric Christopher2018-07-311-1/+1
| | | | | | and we're switching on vendor and not arch. llvm-svn: 338458
* Remove friend class declarations from DWARFUnit and DWARFCompileUnitJan Kratochvil2018-07-292-4/+0
| | | | | | They are no longer needed since D45170. llvm-svn: 338224
* Revert "Recommit [DataFormatters] Add formatter for C++17 std::optional."Davide Italiano2018-07-275-125/+0
| | | | | | | This broke a linux bot which doesn't support -std=c++17. The solution is to add a decorator to skip these tests on machines with older compilers. llvm-svn: 338162
* Recommit [DataFormatters] Add formatter for C++17 std::optional.Davide Italiano2018-07-275-0/+125
| | | | | | | | | | This should have all the correct files now. <rdar://problem/41471112> Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 338156
* Revert "[DataFormatters] Add formatter for C++17 std::optional."Davide Italiano2018-07-251-85/+0
| | | | | | | I forgot to git add some files. I'm going to recommit the correct version at once soon. llvm-svn: 337963
* [DataFormatters] Add formatter for C++17 std::optional.Davide Italiano2018-07-251-0/+85
| | | | | | | | | | <rdar://problem/41471112> Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 337959
* [ProcessGDBRemote] handle result from ConnectToDebugserverJonas Devlieghere2018-07-251-1/+1
| | | | | | | We ignored the result from ConnectToDebugserver, causing certain errors (like a failed handshake) not to surface. llvm-svn: 337932
* Fix PythonString::GetString for >=python-3.7Pavel Labath2018-07-251-3/+5
| | | | | | | | The return value of PyUnicode_AsUTF8AndSize is now "const char *". Thanks to Brett Neumeier for testing the patch out on python 3.7. llvm-svn: 337908
* Move dumping code out of RegisterValue classPavel Labath2018-07-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The dump function was the only part of this class which depended on high-level functionality. This was due to the DumpDataExtractor function, which uses info from a running target to control dump format (although, RegisterValue doesn't really use the high-level part of DumpDataExtractor). This patch follows the same approach done for the DataExtractor class, and extracts the dumping code into a separate function/file. This file can stay in the higher level code, while the RegisterValue class and anything that does not depend in dumping can stay go to lower layers. The XCode project will need to be updated after this patch. Reviewers: zturner, jingham, clayborg Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D48351 llvm-svn: 337832
* [cmake] Remove unused ${LLDB_PLUGINS} dependency from our Objective-C++ ↵Raphael Isemann2018-07-231-1/+0
| | | | | | | | | | | | | | | | | | | | CMake config Summary: LLDB_PLUGINS doesn't exist as a variable, so this line doesn't add any dependencies and is just confusing. It seems this slipped in from the gdb-remote CMake I was using as a CMake template. The gdb-remote CMake itself is using a local LLDB_PLUGINS variable, so that code is fine. Reviewers: davide Reviewed By: davide Subscribers: davide, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D49695 llvm-svn: 337741
* [NFC] Minor code refactoring.Raphael Isemann2018-07-231-4/+1
| | | | | | | | Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49696 llvm-svn: 337737
* Add support for parsing Breakpad minidump files that can have extra padding ↵Greg Clayton2018-07-231-2/+19
| | | | | | | | in the module, thread and memory lists. Differential Revision: https://reviews.llvm.org/D49579 llvm-svn: 337694
* Defend LoadImageUsingPaths against a path listJim Ingham2018-07-201-0/+4
| | | | | | with empty paths on it. llvm-svn: 337515
* Fix the libcxx set, multiset, vector and bitset formatters to work on ↵Jim Ingham2018-07-131-4/+6
| | | | | | | | | | | | | | | | references. The synthetic child providers for these classes had a type expression that matched pointers & references to the type, but the Front End only worked on the actual object. I fixed this by adding a way for the Synthetic Child FrontEnd provider to request dereference, and then had these formatters use that mode. <rdar://problem/40849836> Differential Revision: https://reviews.llvm.org/D49279 llvm-svn: 337035
* No longer pass a StringRef to the Python APIRaphael Isemann2018-07-131-2/+3
| | | | | | | | | | | | | | | | | | Summary: The refactoring patch for DoExecute missed this case of a variadic function that just silently accepts a StringRef which it then tries to reinterpret as a C-string. This should fix the Windows builds. Reviewers: stella.stamenova Reviewed By: stella.stamenova Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49309 llvm-svn: 337030
* Convert a location information from PDB to a DWARF expressionJonas Devlieghere2018-07-134-1/+636
| | | | | | | | | | | | | | | | | | The current version of SymbolFilePDB::ParseVariableForPDBData function always initializes variables with an empty location. This patch adds the converter of a location information from PDB to a DWARF expression, so it becomes possible to watch values of variables of primitive data types. At the moment the converter supports only Static, TLS, RegRel, Enregistered and Constant PDB location types, but it seems that it's enough for most cases. There are still some problems with retrieving values of variables (e.g. we can't watch variables of composite types), but they look not relevant to the conversion to DWARF. Patch by: Aleksandr Urakov Differential revision: https://reviews.llvm.org/D49018 llvm-svn: 336988
* Remove incorrect thread-pc-values clearingJason Molenda2018-07-121-1/+0
| | | | | | | | | | from ProcessGDBRemote::UpdateThreadIDsFromStopReplyThreadsValue. Patch by Venkata Ramanaiah. Differential Revision: https://reviews.llvm.org/D48868 llvm-svn: 336956
OpenPOWER on IntegriCloud