summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Some cleanups to the native pdb plugin [NFC].Zachary Turner2018-10-225-130/+244
| | | | | | | | | | | This is mostly some cleanup done in the process of implementing some basic support for types. I tried to split up the patch a bit to get some of the NFC portion of the patch out into a separate commit, and this is the result of that. It moves some code around, deletes some spurious namespace qualifications, removes some unnecessary header includes, forward declarations, etc. llvm-svn: 344913
* [PDB] Test variadic function type in PDBAaron Smith2018-10-194-7/+15
| | | | | | This adds back the test case reverted in commit: d260a269200824c5c1c8c6de531fd5aa63db9c35 llvm-svn: 344809
* [lldb] Add support in Status::AsCString to retrieve win32 system error stringsAaron Smith2018-10-192-1/+51
| | | | | | | | | | Reviewers: rnk, zturner, aleksandr.urakov Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D53092 llvm-svn: 344798
* [lldbsuite, windows] Disable two tail call frames tests that fail on WindowsStella Stamenova2018-10-192-0/+5
| | | | | | | | | | | | | | Summary: These tests fail on Windows because of known limitations (a.k.a. bugs) with the current implementation of GetFrameAtIndex Reviewers: asmith, vsk Reviewed By: vsk Subscribers: abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D53415 llvm-svn: 344788
* [SymbolFileNativePDB] Fix missing linkage to DebugInfoCodeViewMichal Gorny2018-10-181-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D53402 llvm-svn: 344746
* [lldbsuite] Mark the TestScriptedResolver tests as XFAIL on WindowsStella Stamenova2018-10-181-0/+4
| | | | | | | | | | | | Summary: They fail similarly to some of the other breakpoint tests on Windows, so I suspect the cause is the same. I've linked to the same bug. Reviewers: asmith, zturner, jingham Subscribers: abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D53331 llvm-svn: 344744
* [Windows] Fix threads comparison on WindowsAleksandr Urakov2018-10-185-1/+11
| | | | | | | | | | | | | | | | | | | | | Summary: This patch makes Windows threads to compare by a thread ID, not by a handle. It's because the same thread can have different handles on Windows (for example, `GetCurrentThread` always returns the fake handle `-2`). This leads to some incorrect behavior. For example, in `Process::GetRunLock` always `m_public_run_lock` is returned without this patch. Reviewers: zturner, clayborg, stella.stamenova Reviewed By: stella.stamenova Subscribers: stella.stamenova, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D53357 llvm-svn: 344729
* Revert "Return a named error in the result object of an expression with no ↵Krasimir Georgiev2018-10-1810-73/+11
| | | | | | | | | | | | | | | | | result" This reverts commit r344647. This causes build failures with [-Werror, -Wswitch]. Some cases where the newly introduced enum value is not handled in particular are in: lldb/source/Expression/REPL.cpp:350 lldb/source/Interpreter/CommandInterpreter.cpp:1529 (maybe there could be more) As I don't understand lldb to make sure the likely trivial fixes are correct and also as they might need additional tests, leaving to the author to resolve. llvm-svn: 344722
* [LLDB] - Add support for DW_RLE_start_end entries (.debug_rnglists)George Rimar2018-10-173-1/+85
| | | | | | | | | | | | | | | DWARF5 describes DW_RLE_start_end as: This is a form of bounded range entry that has two target address operands. Each operand is the same size as used in DW_FORM_addr. These indicate the starting and ending addresses, respectively, that define the address range for which the following location is valid. The patch implements the support. Differential revision: https://reviews.llvm.org/D53193 llvm-svn: 344674
* Delete commented-out code.Adrian Prantl2018-10-161-2/+0
| | | | llvm-svn: 344648
* Return a named error in the result object of an expression with no resultJim Ingham2018-10-1610-11/+73
| | | | | | | | | | | | Before we returned an error that was not exposed in the SB API and no useful error message. This change returns eExpressionProducedNoResult and an appropriate error string. <rdar://problem/44539514> Differential Revision: https://reviews.llvm.org/D53309 llvm-svn: 344647
* Fixed an issue that a bot found with my changesJason Molenda2018-10-161-81/+119
| | | | | | | | | | | | | | | | | in r344626 & recommitting. Original commit msg: Simplify LocateDSYMInVincinityOfExecutable by moving some redundant code into a separate function, LookForDsymNextToExecutablePath, and having that function also look for .dSYM.yaa files in addition to .dSYM bundles. Differential Revision: https://reviews.llvm.org/D53305 <rdar://problem/40406580> llvm-svn: 344646
* Code cleanup: Remove DWARFDebugInfoEntry::m_empty_childrenJan Kratochvil2018-10-163-22/+14
| | | | | | | | | | | | | | | | | | | | | | | It merges DWARFDebugInfoEntry's m_empty_children into m_has_children. m_empty_children was implemented by rL144983. As Greg confirmed m_has_children was used to represent what was in the DWARF in the byte that follows the DW_TAG. m_empty_children was used for DIEs that said they had children but actually only contain a single NULL tag. It is fine to not differentiate between the two. Also changed assert()->lldbassert() for m_abbr_idx 16-bit overflow check as that could be a tough bug to catch if it ever happens. I have checked all calls of HasChildren() that this change should not matter to them. The code even wants to know if there are any children - it does not matter how the children presence is coded in the binary. Patch written based on suggestions by Greg Clayton. Differential Revision: https://reviews.llvm.org/D53321 llvm-svn: 344644
* Revert r344626 while I address a testsuite failure from a bot.Jason Molenda2018-10-161-119/+81
| | | | llvm-svn: 344636
* Tiny testsuite tweaks. Don't run the apple simulatorJason Molenda2018-10-163-0/+11
| | | | | | | | | | tests when targetting a device. Add an include to safe-to-call-func to work around a modules issue with a certain combination of header files. Add rules for Darwin systems to ad-hoc codesign binaries that the testsuite builds. llvm-svn: 344635
* Use a relaxed substring check for function names in a testVedant Kumar2018-10-161-2/+7
| | | | | | | | | | | The TestTailCallFrameSBAPI.py test checks that function names in a backtrace are equal to an expected value. Use a relaxed substring check because function dislpay names are platform-dependent. E.g we see "void sink(void)" on Windows, but "sink()" on Darwin. This seems like a bug -- just work around it for now. llvm-svn: 344634
* Don't run TestBreakpointIt.py on arm64 devices;Jason Molenda2018-10-161-0/+2
| | | | | | it is armv7 specific. llvm-svn: 344633
* For a built & test bot, add an environment variable PLATFORM_SDK_DIRECTORY,Jason Molenda2018-10-161-0/+23
| | | | | | | | | | | which PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded which examine for any additional SDK directories when it is constructing its list. <rdar://problem/42984340> <rdar://problem/41351223> llvm-svn: 344628
* Simplify LocateDSYMInVincinityOfExecutable by movingJason Molenda2018-10-161-81/+119
| | | | | | | | | | | | | some redundant code into a separate function, LookForDsymNextToExecutablePath, and having that function also look for .dSYM.yaa files in addition to .dSYM bundles. Differential Revision: https://reviews.llvm.org/D53305 <rdar://problem/40406580> llvm-svn: 344626
* [lldbsuite] Fix the mac version decorator to work on non-mac platformsStella Stamenova2018-10-161-2/+2
| | | | | | | | | | | | | | Summary: On non-mac platforms, mac_ver returns an empty string which when converted to LooseVersion has no "version" property. This causes a failure when the decorator executes. Instead, check whether the value returned from mac_ver is an empty string and avoid the LooseVersion comparison. Reviewers: labath, davide, asmith, shafik, jingham Reviewed By: jingham Subscribers: jingham, lldb-commits Differential Revision: https://reviews.llvm.org/D53208 llvm-svn: 344623
* Fix: Assertion failed: (!m_first_die || m_first_die == m_die_array.front()), ↵Jan Kratochvil2018-10-161-1/+5
| | | | | | | | | | | | | | | | function ExtractDIEsRWLocked xbolva00 bugreported $subj in: https://reviews.llvm.org/D46810#1247410 It can happen only from the line: m_die_array.back().SetEmptyChildren(true); In the case DW_TAG_compile_unit has DW_CHILDREN_yes but there is only 0 (end of list, no children present). Therefore the assertion can fortunately happen only with a hand-crafted DWARF or with DWARF from some suboptimal compilers. Differential Revision: https://reviews.llvm.org/D53255 llvm-svn: 344605
* Use assertEqual to improve test failure loggingVedant Kumar2018-10-162-12/+12
| | | | | | | Some tests in test/functionalities/tail_call_frames are failing on non-Darwin platforms. Use assertEqual to improve logging on failure. llvm-svn: 344581
* Convert code to use early exits in prepraration for future changes. (NFC)Adrian Prantl2018-10-151-56/+56
| | | | llvm-svn: 344557
* [lldbsuite] Make the names of test classes uniqueStella Stamenova2018-10-151-1/+1
| | | | | | | | | | | | | | | Summary: If the names are not unique, the tests overwrite each other's results and logs. This also causes failures on platforms where the files are locked for writing. The names of the class/test pairs *have to* always be unique. The easiest way to achieve that is to name each class differently (usually the same as the file name). Reviewers: jasonmolenda, asmith Subscribers: clayborg, nemanjai, kbarton, lldb-commits Differential Revision: https://reviews.llvm.org/D53297 llvm-svn: 344547
* [lldbsuite] Disable Test128BitsInteger on WindowsStella Stamenova2018-10-151-1/+4
| | | | | | | | | | | | | | Summary: This test is failing on Windows because lldb does not support JIT on Windows. Reviewers: davide, asmith Reviewed By: davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D53226 llvm-svn: 344543
* Fix double import of _lldb module.Vadim Chugunov2018-10-142-5/+8
| | | | | | | | | | | | Fix llvm.org/pr39054: - Register _lldb as a built-in module during initialization of script interpreter, - Reverse the order of imports in __init__.py: first try to import by absolute name, which will find the built-in module in the context of lldb (and other hosts that embed liblldb), then try relative import, in case the module is being imported from Python interpreter. This works for SWIG>=3.0.11; before that, SWIG did not support custom module import code. Differential revision: https://reviews.llvm.org/D52404 llvm-svn: 344474
* Add REQUIRES: lld to SymbolFileNativePDB tests.Zachary Turner2018-10-123-28/+31
| | | | llvm-svn: 344431
* Try to fix some failures on MacOSX with the NativePDB patch.Zachary Turner2018-10-124-8/+15
| | | | | | | | | | This adds -- before any filenames, so that /U doesn't get interpreted as a command line. It also adds better error checking, so that we don't get assertions on the failure path when a file fails to parse as a PDB. llvm-svn: 344429
* Change the default handling for SIGPIPE to pass/,no-stop/no-notify.Jim Ingham2018-10-121-1/+1
| | | | | | | | | Most of the time SIGPIPE is just annoying, and so we should pass it on silently it by default. <rdar://problem/39359145> llvm-svn: 344418
* Add NativePDB subdir again.Jason Molenda2018-10-121-0/+35
| | | | llvm-svn: 344414
* Fix failure in get_filecheck_path when filecheck is NoneStella Stamenova2018-10-121-1/+1
| | | | | | If the path was not specified (and it's None), lexists throws an exception rather than returning False. get_filecheck_path now checks whether filecheck is set before calling lexists llvm-svn: 344410
* Resubmit "Add SymbolFileNativePDB plugin."Zachary Turner2018-10-1222-6/+2210
| | | | | | | | | | This was originally reverted due to some test failures on Linux. Those problems turned out to require several additional patches to lld and clang in order to fix, which have since been submitted. This patch is resubmitted unchanged. All tests now pass on both Linux and Windows. llvm-svn: 344409
* Changing test names in TestDataFormatterLibcxxVariant.py and ↵Shafik Yaghmour2018-10-122-2/+2
| | | | | | TestStdFunctionStepIntoCallable.py to be unique, NFC llvm-svn: 344407
* [dotest] Make a missing FileCheck binary a warning, not an errorVedant Kumar2018-10-123-6/+12
| | | | | | | | | | This allows bots which haven't updated to pass in --filecheck to dotest.py to run more tests. FileCheck-dependent tests will continue to fail. Differential Revision: https://reviews.llvm.org/D53175 llvm-svn: 344401
* Add "v" as well as "var" as an alias for "frame var".Jim Ingham2018-10-121-0/+1
| | | | | | <rdar://problem/40066460> llvm-svn: 344397
* [lldbsuite] Fix the filecheck functionality to work with Python 3Stella Stamenova2018-10-121-1/+1
| | | | | | | | | | | | | | Summary: This is another string/byte conversion issue between Python 2 and 3. In Python 2, the subprocess communication expects a byte string, but in Python 3, it expects bytes. Since both versions are capable of using strings when universal_newlines is set to True AND filecheck operates on strings, force the use of strings. Reviewers: zturner, asmith, vsk Reviewed By: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D53166 llvm-svn: 344386
* Adding support to step into the callable wrapped by libc++ std::functionShafik Yaghmour2018-10-126-1/+213
| | | | | | | | rdar://problem/14365983 Differential Revision: https://reviews.llvm.org/D52851 llvm-svn: 344371
* [LLDB] - Add support for DW_FORM_implicit_const.George Rimar2018-10-1210-51/+137
| | | | | | | | | | | | | | | LLDB does not support this DWARF5 form atm. At least gcc emits it in some cases when doing optimization for abbreviations. As far I can tell, clang does not support it yet, though the rest LLVM code already knows about it. The patch adds the support. Differential revision: https://reviews.llvm.org/D52689 llvm-svn: 344328
* Remove references to source/Plugins/SymbolFile/NativePDB.Jason Molenda2018-10-121-25/+0
| | | | llvm-svn: 344323
* Revert SymbolFileNativePDB plugin.Zachary Turner2018-10-1122-2210/+6
| | | | | | | | | This was originally causing some test failures on non-Windows platforms, which required fixes in the compiler and linker. After those fixes, however, other tests started failing. Reverting temporarily until I can address everything. llvm-svn: 344279
* Fix this comment so it is consistent with all the others.Jason Molenda2018-10-111-1/+1
| | | | llvm-svn: 344277
* Don't mark an LC_BUILD_VERSION as giving us a Jason Molenda2018-10-111-1/+1
| | | | | | correct version if it has a major verison 0. llvm-svn: 344275
* Better support for POSIX paths in PDBs.Zachary Turner2018-10-113-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | While it doesn't make a *ton* of sense for POSIX paths to be in PDBs, it's possible to occur in real scenarios involving cross compilation. The tools need to be able to handle this, because certain types of debugging scenarios are possible without a running process and so don't necessarily require you to be on a Windows system. These include post-mortem debugging and binary forensics (e.g. using a debugger to disassemble functions and examine symbols without running the process). There's changes in clang, LLD, and lldb in this patch. After this the cross-platform disassembly and source-list tests pass on Linux. Furthermore, the behavior of LLD can now be summarized by a much simpler rule than before: Unless you specify /pdbsourcepath and /pdbaltpath, the PDB ends up with paths that are valid within the context of the machine that the link is performed on. Differential Revision: https://reviews.llvm.org/D53149 llvm-svn: 344269
* [lldb] Surpress copy-elison warning.Eric Liu2018-10-111-2/+2
| | | | llvm-svn: 344252
* [lldb] rename MinOS::minor to MinOS::minor_version etc. NFCEric Liu2018-10-111-8/+8
| | | | | | | The constructor initializer minor(...)/major(...) can be confused with system macros `#define minor(...)` on some platforms. llvm-svn: 344250
* Upstreaming the BridgeOS device support and the Jason Molenda2018-10-1119-35/+714
| | | | | | | | | | | | | | | LC_BUILD_VERSION load command handling - this commit is a combination of patches by Adrian Prantl and myself. llvm::Triple::BridgeOS isn't defined yet, so all references to that are currently commented out. Also update Xcode project file to build the NativePDB etc plugins. <rdar://problem/43353615> llvm-svn: 344209
* [SymbolFileNativePDB] Fix compilation errors with gcc.Zachary Turner2018-10-104-6/+11
| | | | llvm-svn: 344173
* [Windows] Fix a bug that causes lldb to freezeAaron Smith2018-10-102-5/+15
| | | | | | | | | | | | | | | | | | | | | Summary: If the process exits before any initial stop then notify the debugger of the error otherwise WaitForDebuggerConnection() will be blocked. An example of this issue is when a process fails to load a dependent DLL. In addition to the fix, remove a duplicate call to FreeProcessHandles() in DebuggerThread::HandleExitProcessEvent() and use decimal format for all thread IDs. Reviewers: rnk, zturner, aleksandr.urakov Reviewed By: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D53090 llvm-svn: 344168
* Create a SymbolFile plugin for cross-platform PDB access.Zachary Turner2018-10-1022-6/+2205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing SymbolFilePDB only works on Windows, as it is written against a closed-source Microsoft SDK that ships with their debugging tools. There are several reasons we want to bypass this and go straight to the bits of the PDB, but just to list a few: More room for optimization. We can't see inside the implementation of the Microsoft SDK, so we don't always know if we're doing things in the most efficient way possible. For example, setting a breakpoint on main of a big program currently takes several seconds. With the implementation here, the time is unnoticeable. We want to be able to symbolize Windows minidumps even if not on Windows. Someone should be able to debug Windows minidumps as if they were on Windows, given that no running process is necessary. This patch is a very crude first attempt at filling out some of the basic pieces. I've implemented FindFunctions, ParseCompileUnitLineTable, and ResolveSymbolContext for a limited subset of possible parameter values, which is just enough to get it to display something nice for the breakpoint location. I've added several tests exercising this functionality which are limited enough to work on all platforms but still exercise this functionality. I'll try to add as many tests of this nature as I can, but at some point we'll need a live process. For now, this plugin is enabled always on non-Windows, and by setting the environment variable LLDB_USE_NATIVE_PDB_READER=1 on Windows. Eventually, once it's at parity with the Windows implementation, we'll delete the Windows DIA-based implementation. Differential Revision: https://reviews.llvm.org/D53002 llvm-svn: 344154
* [LLDB] - Simplify. NFC.George Rimar2018-10-101-8/+1
| | | | | | | | | | There are several places that call `FindRanges`, all of them use `Slide` to adjust the ranges found by the base address. All except one, which does the same manually in a loop. Patch updates it to use `Slide` for consistency. llvm-svn: 344122
OpenPOWER on IntegriCloud