summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [JSON] Use LLVM's library for decoding JSON in StructuredDataJonas Devlieghere2019-10-012-101/+48
| | | | | | | | | This patch replaces the hand-rolled JSON decoding in StructuredData with LLVM's JSON library. Differential revision: https://reviews.llvm.org/D68282 llvm-svn: 373360
* [JSON] Use LLVM's library for encoding JSON in StructuredDataJonas Devlieghere2019-10-017-102/+57
| | | | | | | | | This patch replaces the hand-rolled JSON emission in StructuredData with LLVM's JSON library. Differential revision: https://reviews.llvm.org/D68248 llvm-svn: 373359
* Fix a syntax error.Adrian Prantl2019-10-011-1/+1
| | | | llvm-svn: 373355
* Fix a condition-flip regression introduced in r373344.Adrian Prantl2019-10-011-1/+1
| | | | llvm-svn: 373354
* Typo (NFC)Adrian Prantl2019-10-011-3/+3
| | | | llvm-svn: 373353
* Simplify condition (NFC)Adrian Prantl2019-10-011-1/+1
| | | | llvm-svn: 373352
* Remove size_t return parameter from FindTypesAdrian Prantl2019-10-0124-344/+261
| | | | | | | | | | | | | | | In r368345 I accidentally introduced a regression that would over-report the number of matches found by FindTypes if the DeclContext Filter was hit. This patch simply removes the size_t return parameter altogether — it's not that useful. rdar://problem/55500457 Differential Revision: https://reviews.llvm.org/D68169 llvm-svn: 373344
* Update SymbolFilePDB for FindTypes API change.Adrian Prantl2019-10-012-22/+17
| | | | | | This is untested, I don't have access to a Windows machine. llvm-svn: 373342
* [lldb][NFC] Mark ClangASTContext constructor as explicitRaphael Isemann2019-10-011-1/+1
| | | | | | | Given that we can implicitly construct a ClangASTContext from any string, we should really mark this as explicit. llvm-svn: 373339
* [lldb][NFC] Remove unused ClangASTContext::GetHasExternalStorageRaphael Isemann2019-10-012-69/+0
| | | | | | This code isn't used nor tested. llvm-svn: 373337
* [lldb][NFC] Remove unused ClangASTContext functions for checking/removing ↵Raphael Isemann2019-10-012-21/+0
| | | | | | the ExternalASTSource llvm-svn: 373334
* [lldb][NFC] Disallow changing the ASTContext of an ClangASTContext after ↵Raphael Isemann2019-10-014-17/+16
| | | | | | | | | | | construction. We have no use case in LLDB where we actually do want to change the ASTContext after it the ClangASTContext has been constructed. All callers of setASTContext are just setting the ASTContext directly after construction, so we might as well make this a Constructor instead of supporting this tricky use case. llvm-svn: 373330
* [lldb][NFC] Modernize ClangASTContext constructorRaphael Isemann2019-10-012-41/+35
| | | | | | | | | Now using default initializers and StringRef. Also formats the member list that we excluded from clang-format at some point and still hangs around with the old LLDB code style. llvm-svn: 373329
* [clang][lldb][NFC] Encapsulate ExternalASTMerger::ImporterSourceRaphael Isemann2019-10-014-11/+11
| | | | | | NFC preparation work for upcoming ExternalASTMerger patches. llvm-svn: 373312
* [Windows] Added support of watchpoints to `NativeProcessWindows`Aleksandr Urakov2019-10-018-64/+835
| | | | | | | | | | | | | | | | Summary: This patch adds support of watchpoints to the new `NativeProcessWindows` plugin. The same tests as in D67168 pass with these changes when the old plugin is turned off, so they will cover this functionality when the old plugin is gone. Reviewers: asmith, amccarth, stella.stamenova, labath Reviewed By: labath Subscribers: labath, jfb, JDevlieghere, lldb-commits, leonid.mashinskiy Tags: #lldb Differential Revision: https://reviews.llvm.org/D67222 llvm-svn: 373300
* File::Clear() -> File::TakeStreamAndClear()Lawrence D'Anna2019-10-013-6/+22
| | | | | | | | | | | | | | | | | | | | | | | Summary: File::Clear() is an ugly function. It's only used in one place, which is the swig typemaps for FILE*. This patch refactors and renames that function to make it clear what it's really for and why nobody else should use it. Both File::TakeStreamAndClear() and the FILE* typemaps will be removed in later patches after a suitable replacement is in place. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68160 llvm-svn: 373285
* Allow the internal-state-thread free access to the TargetAPI mutex.Jim Ingham2019-10-017-11/+96
| | | | | | | | | | | It is always doing work on behalf of another thread that presumably has the mutex, so if it is calling SB API's it should have free access to the mutex. This is the same decision as we made earlier with the process RunLock. Differential Revision: https://reviews.llvm.org/D68174 llvm-svn: 373280
* [Docs] Document lldb-instrJonas Devlieghere2019-10-011-0/+40
| | | | | | This adds some information on how to instrument the API classes. llvm-svn: 373277
* [StackFrameList][DFS] Turn a few raw pointers into references, NFCVedant Kumar2019-09-302-8/+9
| | | | llvm-svn: 373267
* Try to update Windows unit test for API change.Adrian Prantl2019-09-301-21/+18
| | | | llvm-svn: 373250
* [test] Make TestBasicEntryValuesX86_64 run on Linux as well as DarwinVedant Kumar2019-09-301-1/+5
| | | | | | | I think a reasonable plan here is to add support for OSes following the SysV ABI one by one, watching the bots as we go. llvm-svn: 373233
* [lldb][NFC] Updating test to reflect made by D67966Shafik Yaghmour2019-09-301-1/+1
| | | | | | | Summary: D67966 changes the output when dumping DWARF expressions and this updates basic_entry_values_x86_64 test to reflect this change. llvm-svn: 373229
* Remove unused "append" parameter from FindTypes APIAdrian Prantl2019-09-3016-131/+87
| | | | | | | | | | | | | I noticed that SymbolFileDWARFDebugMap::FindTypes was implementing it incorrectly (passing append=false in a for-loop to recursive calls to FindTypes would yield only the very last set of results), but instead of fixing it, removing it seemed like an even better option. rdar://problem/54412692 Differential Revision: https://reviews.llvm.org/D68171 llvm-svn: 373224
* Use llvm for dumping DWARF expressionsPavel Labath2019-09-307-413/+17
| | | | | | | | | | | | | | | Summary: It uses the new ability of ABI plugins to vend llvm::MCRegisterInfo structs (which is what is needed to turn dwarf register numbers into strings). Reviewers: JDevlieghere, aprantl, jasonmolenda Subscribers: tatyana-krasnukha, lldb-commits Differential Revision: https://reviews.llvm.org/D67966 llvm-svn: 373208
* [lldb][NFC][modern-type-lookup] Remove while(false) behind if() {}Raphael Isemann2019-09-301-2/+0
| | | | | | | | This was originally a 'do { ... } while (false);' like in the rest of the function, but the do was refactored into an 'if' without also removing the trailing 'while(false);' llvm-svn: 373206
* [lldb] Reland 370734: Test 'frame select -r' and fix that INT32_MIN breaks ↵Raphael Isemann2019-09-302-13/+59
| | | | | | | | | | | | | the option parser The problem with r370734 was that it removed the code for resetting the options in OptionParsingStarting. This caused that once a 'frame select -r ...' command was executed, we kept the relative index argument for all following 'frame select ...' invocations (even the ones with an absolute index as they are the same command object). See rdar://55791276. This relands the patch but keeps the code that resets the command options before execution. llvm-svn: 373201
* [lldb] Partly revert 370734: Test 'frame select -r' and fix that INT32_MIN ↵Raphael Isemann2019-09-302-20/+16
| | | | | | | | | | | breaks the option parser This somehow caused that 'frame select X' ends up being interpreted as 'frame select -r 1' when 'up' or 'down' were run before 'frame select X'. See rdar://55791276. Partly reverting to unbreak master. The changes that aren't reverted are the generic 'frame select -r' tests that are obviously NFC and test existing behavior. llvm-svn: 373194
* [lldb][clang][modern-type-lookup] Use ASTImporterSharedState in ↵Raphael Isemann2019-09-303-0/+29
| | | | | | | | | | | | | | | | | | ExternalASTMerger Summary: The ExternalASTMerger should use the ASTImporterSharedState. This allows it to handle std::pair in LLDB (but the rest of libc++ is still work in progress). Reviewers: martong, shafik, a.sidorin Subscribers: rnkovacs, christof, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68140 llvm-svn: 373193
* Revert "[LLDB] Use the llvm microsoft demangler instead of the windows ↵Martin Storsjo2019-09-281-3/+41
| | | | | | | | | dbghelp api. NFC." This reverts SVN r373144, as it changed the demangled output a little, see http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/9306. llvm-svn: 373146
* [LLDB] Use the llvm microsoft demangler instead of the windows dbghelp api. NFC.Martin Storsjo2019-09-281-41/+3
| | | | | | | | | If there's any testcases that only do demangling (I didn't find any), they could be made available for all platforms now. Differential Revision: https://reviews.llvm.org/D68134 llvm-svn: 373144
* Give an error when StepUsingScriptedThreadPlan is passed a bad classname.Jim Ingham2019-09-288-9/+43
| | | | | | Differential Revision: https://reviews.llvm.org/D68173 llvm-svn: 373135
* [Core] Remove unused dependency on clangASTAlex Langford2019-09-282-4/+0
| | | | llvm-svn: 373134
* [debugserver] Add --version/-V command line option to debugserver.Jonas Devlieghere2019-09-271-0/+11
| | | | | | | | | | | When not running under a TTY the output is buffered and not flushed before debugserver exits which makes it impossible to parse the version string. This adds a -V/--version command that just prints the version to stdout and exits with an exit code zero. Differential revision: https://reviews.llvm.org/D68156 llvm-svn: 373127
* refactor: move IOObject::m_should_close_fd into subclassesLawrence D'Anna2019-09-275-19/+20
| | | | | | | | | | | | | | | | | | Summary: m_should_close_fd doesn't need to be in IOObject. It will be useful for my next change to move it down into File and Socket. Reviewers: labath, JDevlieghere, jasonmolenda Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68152 llvm-svn: 373126
* [Reproducer] Use // in the unit testsJonas Devlieghere2019-09-271-13/+13
| | | | | | This should be a valid absolute path on both POSIX and Windows. llvm-svn: 373124
* [Reproducer] Update the unit tests to specify the path style.Jonas Devlieghere2019-09-271-17/+33
| | | | | | | The unit tests started failing on Windows after my recent patch that ensured we always deal with absolute paths. This should fix that. llvm-svn: 373114
* [CMake] Depend on clang-tablegen-targetsJonas Devlieghere2019-09-271-1/+1
| | | | | | | | The ClangDriverOptions target is not available for standalone builds. Thanks Alex for pointing this out! llvm-svn: 373112
* Revert: [lldb] [testsuite] Remove redundant MAKE_DSYM := NOJan Kratochvil2019-09-2717-0/+22
| | | | | | | | | | Revert: llvm-svn: 373061 It broke OSX testsuite: https://reviews.llvm.org/D67589#1686150 lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py llvm-svn: 373110
* [CMake] Make Core depend on ClangDriverOptions (NFC)Jonas Devlieghere2019-09-271-0/+3
| | | | | | | | ModuleList.cpp includes clang/Driver/Driver.h which depends on clang/Driver/Options.inc. This patch adds the corresponding TableGen target to Core. llvm-svn: 373105
* [Reproducer] Always use absolute paths for capture & replay.Jonas Devlieghere2019-09-273-4/+21
| | | | | | | | | | | The VFS requires files to be have absolute paths. The file collector makes paths relative to the reproducer root. If the root is a relative path, this would trigger an assert in the VFS. This patch ensures that we always make the given path absolute. Thank you Ted Woodward for pointing this out! llvm-svn: 373102
* remove File::SetStream(), make new files instead.Lawrence D'Anna2019-09-2728-255/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch removes File::SetStream() and File::SetDescriptor(), and replaces most direct uses of File with pointers to File. Instead of calling SetStream() on a file, we make a new file and replace it. My ultimate goal here is to introduce a new API class SBFile, which has full support for python io.IOStream file objects. These can redirect read() and write() to python code, so lldb::Files will need a way to dispatch those methods. Additionally it will need some form of sharing and assigning files, as a SBFile will be passed in and assigned to the main IO streams of the debugger. In my prototype patch queue, I make File itself copyable and add a secondary class FileOps to manage the sharing and dispatch. In that case SBFile was a unique_ptr<File>. (here: https://github.com/smoofra/llvm-project/tree/files) However in review, Pavel Labath suggested that it be shared_ptr instead. (here: https://reviews.llvm.org/D67793) In order for SBFile to use shared_ptr<File>, everything else should as well. If this patch is accepted, I will make SBFile use a shared_ptr I will remove FileOps from future patches and use subclasses of File instead. Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67891 llvm-svn: 373090
* [lldb] Disable testing entry values as memory locationDjordje Todorovic2019-09-271-0/+3
| | | | | | The D67717 excludes such locations for now. llvm-svn: 373074
* [lldb/cmake] add lldbCore -> clangDriver dependencyPavel Labath2019-09-271-0/+1
| | | | | | | | ModuleList.cpp includes clang/Driver/Driver.h. Reflect that in the build system. Not having this can cause build failures if ModuleList.cpp is built before Driver.inc is generated. llvm-svn: 373073
* Unwind: Add a stack scanning mechanism to support win32 unwindingPavel Labath2019-09-2710-12/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Windows unwinding is weird. The unwind rules do not (always) describe the precise layout of the stack, but rather expect the debugger to scan the stack for something which looks like a plausible return address, and the unwind based on that. The reason this works somewhat reliably is because the the unwinder also has access to the frame sizes of the functions on the stack. This allows it (in most cases) to skip function pointers in local variables or function arguments, which could otherwise be mistaken for return addresses. Implementing this kind of unwind mechanism in lldb was a bit challenging because we expect to be able to statically describe (in the UnwindPlan) structure, the layout of the stack for any given instruction. Giving a precise desription of this is not possible, because it requires correlating information from two functions -- the pushed arguments to a function are considered a part of the callers stack frame, and their size needs to be considered when unwinding the caller, but they are only present in the unwind entry of the callee. The callee may end up being in a completely different module, or it may not even be possible to determine it statically (indirect calls). This patch implements this functionality by introducing a couple of new APIs: SymbolFile::GetParameterStackSize - return the amount of stack space taken up by parameters of this function. SymbolFile::GetOwnFrameSize - the size of this function's frame. This excludes the parameters, but includes stuff like local variables and spilled registers. These functions are then used by the unwinder to compute the estimated location of the return address. This address is not always exact, because the stack may contain some additional values -- for instance, if we're getting ready to call a function then the stack will also contain partially set up arguments, but we will not know their size because we haven't called the function yet. For this reason the unwinder will crawl up the stack from the return address position, and look for something that looks like a possible return address. Currently, we assume that something is a valid return address if it ends up pointing to an executable section. All of this logic kicks in when the UnwindPlan sets the value of CFA as "isHeuristicallyDetected", which is also the final new API here. Right now, only SymbolFileBreakpad implements these APIs, but in the future SymbolFilePDB will use them too. Differential Revision: https://reviews.llvm.org/D66638 llvm-svn: 373072
* Disable the empty string check in TestDataFormatterStdStringPavel Labath2019-09-271-1/+2
| | | | | | | This check was failing since it was added in r372837. It should be possible to re-enable it once D68010 lands. llvm-svn: 373071
* Fix some swig warningsPavel Labath2019-09-275-21/+3
| | | | | | | | | Previously, these were unseen because the wrapper script would swallow them. This fixes the following types of warnings: - methods being declared more than once - swig complained about ignoring operator=, so I just removed it llvm-svn: 373069
* [lldb] [testsuite] Remove redundant MAKE_DSYM := NOJan Kratochvil2019-09-2717-22/+0
| | | | | | | According to a comment by Pavel Labath: https://reviews.llvm.org/D67589#inline-612375 llvm-svn: 373061
* [lldb] Print an error message for an empty subcommandRaphael Isemann2019-09-272-3/+4
| | | | llvm-svn: 373053
* [lldb][NFC] Actually test which method we call in TestCallOverriddenMethodRaphael Isemann2019-09-272-4/+8
| | | | llvm-svn: 373051
* [lldb][NFC] Test CommandObjectMultiword functionalityRaphael Isemann2019-09-271-0/+34
| | | | | | | | A lot of commands are made up of CommandObjectMultiword with subcommands. CommandObjectMultiword actually has some functionality on its own that wasn't tested before. llvm-svn: 373050
OpenPOWER on IntegriCloud