summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix integer literals which are cast to boolJonas Devlieghere2019-05-2434-82/+84
| | | | | | | | | This change replaces built-in types that are implicitly converted to booleans. Differential revision: https://reviews.llvm.org/D62284 llvm-svn: 361580
* [lldb] followup fix for https://reviews.llvm.org/D62305Konrad Kleine2019-05-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixing this error on windows build bot: ``` E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21): error C2440: 'initializing': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(21): error C2439: 'lldb_private::HostNativeThreadBase::m_result': member could not be initialized E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\include\lldb/Host/HostNativeThreadBase.h(48): note: see declaration of 'lldb_private::HostNativeThreadBase::m_result' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24): error C2440: 'initializing': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(24): error C2439: 'lldb_private::HostNativeThreadBase::m_result': member could not be initialized E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\include\lldb/Host/HostNativeThreadBase.h(48): note: see declaration of 'lldb_private::HostNativeThreadBase::m_result' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(40): error C2440: '=': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(40): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(50): error C2440: '=': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Host\common\HostNativeThreadBase.cpp(50): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type ``` see http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/5050/steps/build/logs/stdio Reviewers: stella.stamenova, JDevlieghere Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62337 llvm-svn: 361565
* [NFC] Add blank line (test commit)J. Ryan Stinnett2019-05-231-0/+1
| | | | llvm-svn: 361555
* [Process] Fix another thread_result_t & nullptr incompatibility.Jonas Devlieghere2019-05-231-7/+7
| | | | llvm-svn: 361548
* [lldb] Make sure RegularExpression constructors always initialize member ↵Jorge Gorbe Moya2019-05-231-4/+3
| | | | | | | | | | | | variables The copy constructor of RegularExpression doesn't initialize m_comp_err. This causes an use-of-initialized-value error when a RegularExpression is copied: the copy constructor calls Compile, which calls Free to free the existing regex if needed, which in turn reads m_comp_err to check if there's any regex to be freed. This change calls the default constructor from the other constructors to make sure members are always initialized with sensible values. This also avoids duplicating init logic, like the RegularExpression(llvm:StringRef) constructor does, which is error prone. Differential Revision: https://reviews.llvm.org/D62334 llvm-svn: 361546
* [Utility] Avoid a few unnecessary copies (NFC)Jonas Devlieghere2019-05-234-26/+30
| | | | | | | Avoid unnecessary copies by either passing by const-reference or moving the argument. llvm-svn: 361544
* [gdb-remote] Fix more issues with thread_result_tJonas Devlieghere2019-05-232-4/+4
| | | | | | More fixes needed to un-break the Windows bot. llvm-svn: 361539
* Test commit access by removing a empty lineAntonio Afonso2019-05-231-1/+0
| | | | llvm-svn: 361531
* [HostNativeThreadBase] Undo nullptr changesJonas Devlieghere2019-05-231-4/+4
| | | | | | | The thread result type is an unsigned instead of a pointer on windows, so we shouldn't replace 0 with nullptr here. llvm-svn: 361528
* [lldb] fix cannot convert from 'nullptr' to 'lldb::thread_result_t'Konrad Kleine2019-05-235-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: On Windows `lldb::thread_result_t` resolves to `typedef unsigned thread_result_t;` and on other platforms it resolves to `typedef void *thread_result_t;`. Therefore one cannot use `nullptr` when returning from a function that returns `thread_result_t`. I've made this change because a windows build bot fails with these errors: ``` E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Communication.cpp(362): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Communication.cpp(362): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type ``` and ``` E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1619): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1619): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1664): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1664): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type ``` This is the failing build: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/5035/steps/build/logs/stdio Reviewers: JDevlieghere, teemperor, jankratochvil, labath, clayborg, RKSimon, courbet, jhenderson Reviewed By: labath, clayborg Subscribers: labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62305 llvm-svn: 361503
* [lldb] NFC modernize codebase with modernize-use-nullptrKonrad Kleine2019-05-23248-1459/+1485
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]] This commit is the result of modernizing the LLDB codebase by using `nullptr` instread of `0` or `NULL`. See https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html for more information. This is the command I ran and I to fix and format the code base: ``` run-clang-tidy.py \ -header-filter='.*' \ -checks='-*,modernize-use-nullptr' \ -fix ~/dev/llvm-project/lldb/.* \ -format \ -style LLVM \ -p ~/llvm-builds/debug-ninja-gcc ``` NOTE: There were also changes to `llvm/utils/unittest` but I did not include them because I felt that maybe this library shall be updated in isolation somehow. NOTE: I know this is a rather large commit but it is a nobrainer in most parts. Reviewers: martong, espindola, shafik, #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits Tags: #lldb, #llvm Differential Revision: https://reviews.llvm.org/D61847 llvm-svn: 361484
* Add REQUIRES: lld to debug-types-address-ranges.sPavel Labath2019-05-231-0/+2
| | | | | | This should fix the green dragon bots. llvm-svn: 361481
* DWARFASTParserClang: Reduce indentationPavel Labath2019-05-231-1507/+1495
| | | | | | by two levels via early returns. llvm-svn: 361471
* DWARF: Don't compute address ranges for type unitsPavel Labath2019-05-238-116/+456
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Type units don't describe any code, so they should never be the result of any address lookup queries. Previously, we would compute the address ranges for the type units for via the line tables they reference because the type units looked a lot like line-tables-only compile units. However, this is not correct, as the line tables are only referenced from type units so that other declarations can use the file names contained in them. In this patch I make the BuildAddressRangeTable function virtual, and implement it only for compile units. Testing this was a bit tricky, because the behavior depends on the order in which we add things to the address range map. This rarely caused a problem with DWARF v4 type units, as they are always added after all CUs. It happened more frequently with DWARF v5, as there clang emits the type units first. However, this is still not something that it is required to do, so for testing I've created an assembly file where I've deliberately sandwiched a compile unit between two type units, which should isolate us from both changes in how the compiler emits the units and changes in the order we process them. Reviewers: clayborg, aprantl, JDevlieghere Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D62178 llvm-svn: 361465
* Simplify `GetName`+`AppendTypeName` by `DWARFDIE`Jan Kratochvil2019-05-234-168/+131
| | | | | | | | | | | | | | | In D61502#1503247 @clayborg suggested that DWARFUnit *+dw_offset_t can be now replaced by DWARFDIE. It is moved from DWARFDebugInfoEntry to DWARFDIE as noted by @clayborg. I have also removed return type as (1) it was wrong in one case and (2) no existing caller used the return type. I also refactored the deep nesting noted by @JDevlieghere. Differential Revision: https://reviews.llvm.org/D62211 llvm-svn: 361463
* [Reproducer] Pass FileSpec by const-ref. (NFC)Jonas Devlieghere2019-05-232-3/+3
| | | | | | | Fix two functions where we were passing FileSpecs by value, while we could pass by const reference. llvm-svn: 361459
* [Utility] Modernize C-style catsJonas Devlieghere2019-05-2316-225/+263
| | | | | | | | Replaces the remaining C-style casts with explicit casts in Utility. The motivation is that they are (1) easier to spot and (2) don't have multiple meanings. llvm-svn: 361458
* Remove unused const version of CommandInterpreter::GetCommandHistory.Jim Ingham2019-05-231-2/+0
| | | | llvm-svn: 361455
* [ARM64][AArch64] Update disassembler attributes to ARMv8.5 ISA with SVE ↵Omair Javaid2019-05-231-3/+3
| | | | | | | | | | extensions This patch updates assembler attributes for AArch64 targets so we can disassemble newer instructions supported in ISA version 8.5 and SVE extensions. Differential Revision: https://reviews.llvm.org/D62235 llvm-svn: 361451
* Ack, added DWARFTypeUnit to the wrong target...Jim Ingham2019-05-234-12/+10
| | | | | | LLDB -> liblldbcore.a llvm-svn: 361447
* [lldb] Fix use-of-uninitialized-value in DriverJorge Gorbe Moya2019-05-221-1/+1
| | | | | | | | | | | | The driver passes by reference an uninitialized num_errors variable to RunCommandInterpreter. This should be fine, as it's supposed to be an output argument, but the reproducer instrumentation reads it in order to record the value of all the arguments to the function. This change fixes it by initializing num_errors to 0 before calling RunCommandInterpreter. llvm-svn: 361444
* Expression: correct relocation model for WindowsSaleem Abdulrasool2019-05-221-10/+4
| | | | | | | | | | | The Windows Code Generation model cannot generation code with the PIC relocation model - all code is implicitly position independent due to the DLL load slide that occurs if it is not loaded at the preferred base address. Invert the condition and inline the single use of the variable. This should also aid the WASM target. This significantly improves the state of the (swift) repl on Windows (and should aid in expression evaluation on Windows). llvm-svn: 361443
* [Target] Protect Processes' language runtimes map with a mutexAlex Langford2019-05-222-10/+23
| | | | | | | | | | | | | Summary: From what I understand, it's possible for multiple threads to request a specific language runtime (e.g. CPPLanguageRuntime). This leads to a data race. Reviewers: jingham, JDevlieghere, compnerd, clayborg Differential Revision: https://reviews.llvm.org/D62169 llvm-svn: 361442
* Actaully lock accesses to OptionValueFileSpecList objectsFrederic Riss2019-05-222-5/+8
| | | | | | | | The patch in r359029 missed a few accessors and mutators. This patch also changes the lock to a recursive one as OptionValueFileSpecList::Clear() can be invoked from some of the other methods. llvm-svn: 361440
* Add DWARFTypeUnit to the Xcode project.Jim Ingham2019-05-221-0/+6
| | | | llvm-svn: 361420
* [EditLine] Rewrite GetHistoryFilePathJonas Devlieghere2019-05-221-13/+18
| | | | | | | | | | | | | | | | | | | | Rewrite the GetHistoryFilePath implementation without relying on FileSpec in the spirit of our discussion in D61994. It changes LLDBs behavior in two ways: 1. We now only use the -widehistory suffix when LLDB is built with wchar support, instead of as the fallback from when the ~/.lldb directory isn't writable. 2. When the ~/.lldb directory isn't writable, we don't write any history files at all. Previously we would write them to the user's home directory (with the incorrect wide suffix), polluting ~ with a different file for every IO handler. Differential revision: https://reviews.llvm.org/D62216 llvm-svn: 361412
* Added a dot at the end of commentKonrad Kleine2019-05-221-3/+3
| | | | | | | | | | | | | | Summary: to test SVN commit access with a simple change. Reviewers: jankratochvil Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62243 llvm-svn: 361383
* DWARF: Add debug_ranges/rnglists testsPavel Labath2019-05-223-0/+219
| | | | | | | | | | | | | | | .debug_ranges parsing is not well tested [citation needed] because this section tends to be only used in optimized code, and we don't build optimized executables in our tests, as they produce unpredictable results. This patch aims to add some very simple tests for parsing static range data, which can serve as a first line of defense in case things break. I also include one XFAILed test, which demonstrates that we don't correctly handle mixed DWARF v5 and v4 ranges in a single file. llvm-svn: 361373
* Add AST loggingGabor Marton2019-05-223-0/+24
| | | | | | | | | | | | | | | | Summary: Log the AST of the TU associated with LLDB's `expr` command, once a declaration is completed Reviewers: shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62061 llvm-svn: 361362
* DWARFDebugInfoEntry: remove unused variablePavel Labath2019-05-221-4/+1
| | | | llvm-svn: 361361
* DWARF: Introduce DWARFTypeUnit classPavel Labath2019-05-2215-48/+224
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces the DWARFTypeUnit class, and teaches lldb to parse type units out of both the debug_types section (DWARF v4), and from the regular debug_info section (DWARF v5). The most important piece of functionality - resolving DW_AT_signatures to connect type forward declarations to their definitions - is not implemented here, but even without that, a lot of functionality becomes available. I've added tests for the commands that start to work after this patch. The changes in this patch were greatly inspired by D61505, which in turn took over changes from D32167. Reviewers: JDevlieghere, clayborg, aprantl Subscribers: mgorny, jankratochvil, lldb-commits Differential Revision: https://reviews.llvm.org/D62008 llvm-svn: 361360
* Delete unnecessary copy ctorsFangrui Song2019-05-2212-93/+0
| | | | llvm-svn: 361358
* [Symbol] Remove dead codeAlex Langford2019-05-221-55/+0
| | | | llvm-svn: 361337
* [FileSystem] Fix regression in FileSystem::ResolveJonas Devlieghere2019-05-211-8/+12
| | | | | | | | | | | | | | | | When I moved the resolve code from FileSpec to the FileSystem class, I introduced a regression. If you compare the two implementations, you'll notice that if the path doesn't exist, we should only reverse the effects of makeAbsolute, not the effects of tilde expansion. As a result, the logic to create the ~/.lldb directory broke, because we would resolve the path before creating it. Because the directory didn't exist yet, we'd call create_directories on the unresolved path, which failed. Differential revision: https://reviews.llvm.org/D62219 llvm-svn: 361321
* [CommandInterpreter] Fix SkipAppInitFiles setterJonas Devlieghere2019-05-211-1/+1
| | | | | | The SkipAppInitFiles setter was ignoring its import argument. llvm-svn: 361316
* [Test] Fix conflicting test names.Jonas Devlieghere2019-05-211-1/+1
| | | | | | | Two tests having the same name creates a race condition when moving the trace files. llvm-svn: 361310
* Fix LLDB warnings when compiling with Clang 8.0Alexandre Ganea2019-05-218-25/+66
| | | | | | Differential Revision: https://reviews.llvm.org/D62021 llvm-svn: 361295
* Remove `SymbolFileDWARF *` when there is already `DWARFUnit *`Jan Kratochvil2019-05-218-249/+186
| | | | | | | | | | | | | | In D61502#1503247 @clayborg suggested that SymbolFileDWARF *dwarf2Data is really redundant in all the calls with also having DWARFUnit *cu. So remove it. One `SymbolFileDWARF *` nullptr check (DWARFDebugInfoEntry::GetDIENamesAndRanges) could be removed, other two nullptr checks (DWARFDebugInfoEntry::GetName and DWARFDebugInfoEntry::AppendTypeName) need to stay in place (now for `DWARFUnit *`). Differential Revision: https://reviews.llvm.org/D62011 llvm-svn: 361277
* [lldb-mi] Include full path in the -data-disassemble responseTatyana Krasnukha2019-05-212-1/+16
| | | | | | | | Differential Revision: https://reviews.llvm.org/D59015 Patch by Anton Kolesov <Anton.Kolesov@synopsys.com> llvm-svn: 361255
* DWARF: Port debug_addr over to DWARFContextPavel Labath2019-05-219-48/+20
| | | | llvm-svn: 361232
* DWARF: Introduce DWARFUnitHeader classPavel Labath2019-05-215-147/+168
| | | | | | | | | | | | | | | | | | | Summary: This patch introduces the DWARFUnitHeader class. Its purpose (and its structure, to the extent it was possible to make it) is the same as its LLVM counterpart -- to extract the unit header information before we actually construct the unit, so that we know which kind of units to construct. This is needed because as of DWARF5, type units live in the .debug_info section, which means it's not possible to statically determine the type of units in a given section. Reviewers: aprantl, clayborg, JDevlieghere Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D62073 llvm-svn: 361224
* [CMake] Correct some dependenciesAlex Langford2019-05-212-1/+1
| | | | | | Symbol doesn't depend on CPlusPlusLanguage, but Expressiond does. llvm-svn: 361216
* lldb-server: LLGS: support 32-bit on 64-bit hostsSaleem Abdulrasool2019-05-211-11/+16
| | | | | | | Enable the ARM emulation support on AArch64 which can execute ARM32 code. Similarly, handle MIPS 32 on 64. llvm-svn: 361210
* DWARF: Port most of other sections over to DWARFContextPavel Labath2019-05-209-126/+80
| | | | | | | | This moves the sections from SymbolFileDWARF to DWARFContext, where it was trivial to do so. A couple of sections are still left in SymbolFileDWARF. These will be handled by separate patches. llvm-svn: 361127
* minidump: Remove checked-in files used for testing MemoryList handlingPavel Labath2019-05-207-79/+183
| | | | | | | Now that yaml2obj supports this stream, we can use the yaml form instead. llvm-svn: 361126
* [lldb] [lit] Skip more tests when Python is unavailableMichal Gorny2019-05-192-0/+3
| | | | | | | | LocalLLDBInit.test requires Python module loading support. CommandScriptImmediateOutput tests are specific to running scripts. Disable all of them when Python support is disabled. llvm-svn: 361115
* [lldb] [lit] Driver/TestConvenienceVariables.test requires PythonMichal Gorny2019-05-192-1/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D62096 llvm-svn: 361114
* [crashlog] Use loads() instead of readPlistFromString() for python 3.Davide Italiano2019-05-181-1/+7
| | | | | | <rdar://problem/50903413> llvm-svn: 361087
* Revert "Fix IPv6 support on lldb-server platform"Alex Langford2019-05-186-212/+87
| | | | | | | | | | | This reverts commit c28f81797084b8416ff5be4f9e79000a9741ca6a. This reverts commit 7e79b64642486f510f7872174eb831df68d65b84. Looks like there is more work to be done on this patch. I've spoken to the author and for the time being we will revert to keep the buildbots green. llvm-svn: 361086
* Unbreak windows build botAlex Langford2019-05-181-0/+6
| | | | | | | Commit c28f81797084b8416ff5be4f9e79000a9741ca6a (svn r361079) broke the windows buildbot. This should fix it. llvm-svn: 361083
OpenPOWER on IntegriCloud