summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Support evaluation of DWARF expressions setting CFAPavel Labath2015-02-233-5/+26
| | | | | | | | | | | | | | | | | | | | | Summary: This patch enables evaluation of DWARF expressions setting the CFA during stack unwinding. This makes TestSigtrampUnwind "almost" pass on linux. I am not enabling the test yet since the symbol name for the signal trampoline does not get resolved properly due to a different bug, but apart from that, the backtrace is sane. I am unsure how this change affects Mac. I think it makes the unwinder prefer the DWARF unwind plan instead of some custom platform-dependant plan. However, it does not affect the end result - the stack unwinding works as expected. Reviewers: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7792 llvm-svn: 230211
* UnwindPlan::Row refactor -- add support for CFA set by a DWARF expressionPavel Labath2015-02-2315-208/+195
| | | | | | | | | | | | | | | | | | | Summary: This change refactors UnwindPlan::Row to be able to store the fact that the CFA is value is set by evaluating a dwarf expression (DW_CFA_def_cfa_expression). This is achieved by creating a new class CFAValue and moving all CFA setting/getting code there. Note that code using the new CFAValue::isDWARFExpression is not yet present and will be added in a follow-up patch. Therefore, this patch should not change the functionality in any way. Test Plan: Ran tests on Mac and Linux. No regressions detected. Reviewers: jasonmolenda, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7755 llvm-svn: 230210
* Add missing #include. This should fix the Windows build.Zachary Turner2015-02-211-0/+1
| | | | llvm-svn: 230128
* Update for Clang API change in r230123 -- lookup_result was alwaysChandler Carruth2015-02-212-3/+3
| | | | | | | | const, there was never a need for lookup_const_result. Now that vestigal type is gone, so switch LLDB to lookup_result and to use the DeclContextLookupResult rather than the Const variant. llvm-svn: 230126
* This should fix the Windows buildEnrico Granata2015-02-201-0/+1
| | | | llvm-svn: 230080
* Rename the "glob arguments" feature to "shell expand arguments"Enrico Granata2015-02-208-43/+43
| | | | | | This should not bring any feature change, except changing names of things here and there llvm-svn: 230077
* Make sure things build for iOS after recent changes.Greg Clayton2015-02-201-7/+9
| | | | llvm-svn: 230076
* Make sure the public state is eStateStopped when we return from ↵Greg Clayton2015-02-201-2/+2
| | | | | | SBTarget::LoadCore() by hijacking the public event queue so we can ensure that the event gets consumed and the public state of the process (StateType SBProcess::GetState()) returns eStateStopped. llvm-svn: 230066
* Start the refactoring of globbingEnrico Granata2015-02-205-81/+194
| | | | | | | | | | | | | - Add Host::GlobArguments() to perform local-globbing I implemented this on OSX and Windows in terms of argdumper (Windows implementation is essentially the same as the OSX version + a change in binary name and some string magic) Other platforms did not specifically chime in, so I left it unimplemented for them for the time being. Please feel free to fill in the blanks - Add Platform::GlobArguments() to support remote-globbing For now, no feature change here - but now we have infrastructure to help GDBRemote targets to support globbing - and patches to that effect will follow No visible feature change llvm-svn: 230065
* Avoid a race condition when loading core files where the process might still ↵Greg Clayton2015-02-201-1/+17
| | | | | | | | be handling the eStateStopped event we post to the private state thread causing us to return from SBTarget::LoadCore() before the process is ready to have API calls used on it. This fixes a crasher that could happen when loading core files from scripts. llvm-svn: 230060
* Add the new file to the CMakeLists. This should appease the Windows botEnrico Granata2015-02-201-0/+1
| | | | llvm-svn: 230049
* Add an OptionValueLanguage classEnrico Granata2015-02-203-0/+127
| | | | llvm-svn: 230046
* Introduce FileSystem::CalculateMD5AsString that supports any platform and ↵Oleksiy Vyalov2015-02-204-33/+73
| | | | | | | | make existing FileSystem::CalculateMD5 to use it. http://reviews.llvm.org/D7771 llvm-svn: 230036
* Refactor OptionValue::SetValueFromCString to use llvm::StringRefPavel Labath2015-02-2030-134/+112
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7676 llvm-svn: 230005
* Factor out common URL handling code in PlatformRemoteGDBServerPavel Labath2015-02-191-23/+17
| | | | | | | | | | | | | | | Summary: this also gets rid of a compiler warning in release builds by using a dynamically allocated buffer. Therefore, a size assertion is not necessary (and probably should have been an error in the first place). Reviewers: tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7751 llvm-svn: 229878
* Prevent LLGS from crashing when exiting - make NativeProcessLinux to wait ↵Oleksiy Vyalov2015-02-195-13/+29
| | | | | | | | until ThreadStateCoordinator is fully stopped before entering ~NativeProcessLinux. http://reviews.llvm.org/D7692 llvm-svn: 229875
* Silence unused variable warnings in release buildsPavel Labath2015-02-192-0/+2
| | | | llvm-svn: 229843
* A few minor path fixes for Windows.Zachary Turner2015-02-181-1/+7
| | | | | | | | | | | | When launching argdumper, there are a few problems with the current logic. First, on Windows, the file is called argdumper.exe, not argdumper. Second, Windows paths have backslashes in them, and JSON treats <backslash><char> as an escape sequence. To fix the second problem, on Windows we convert backslashes to forward slashes, since backslash isn't a valid filename character anyway this shouldn't be a problem. llvm-svn: 229784
* Fix TestDataFormatter* on LinuxVince Harron2015-02-181-1/+1
| | | | | | | | | | | llvm::StringRef doesn't make a copy of a string, it just holds a reference. When special_directions_stream went out of scope, special_directions was holding on to a stale pointer. Moving special_directions_stream into a higher scope to keep special_directions pointing to a valid string. llvm-svn: 229767
* Fix SettingsCommandTestCase.test_set_error_output_pathVince Harron2015-02-182-8/+16
| | | | | | | | | | target.error-path (and output-path) were getting resolved on the local file system, which doesn't make any sense for remote targets So this patch prevents file paths from being resolved on the host system. llvm-svn: 229763
* Fix warning that not all control-paths return from function.Zachary Turner2015-02-181-1/+1
| | | | llvm-svn: 229718
* Don't use AVX/XSTATE API on Windows.Zachary Turner2015-02-182-68/+34
| | | | | | | | | | | | | CopyContext is necessary to safely get the XState, but LLDB doesn't currently use the XState. CopyContext is available as of Windows 7 SP1, so it can't be used on Vista. Furthermore, it requires the Windows 8 SDK it compile, making the baseline for compiling and running LLDB higher than necessary. Patch by: Adrian McCarthy Reviewed by: Zachary Turner Differential Revision: http://reviews.llvm.org/D7572 llvm-svn: 229710
* Merge lldb-platform and lldb-gdbserver into a single binaryTamas Berghammer2015-02-181-2/+7
| | | | | | | | | | | | | This commit merges lldb-platform and lldb-gdbserver into a single binary of the same size as each of the previous individual binaries. Execution mode is controlled by the first argument being either platform or gdbserver. Patch from: flackr <flackr@google.com> Differential revision: http://reviews.llvm.org/D7545 llvm-svn: 229683
* Remove alias template from GDBRemoteCommunicationServerCommonTamas Berghammer2015-02-181-5/+2
| | | | | | | It is required because MSVC 2013 doesn't generate correct code for template aliases. llvm-svn: 229666
* [CMake] Remove debug message from CMakeLists.txtZachary Turner2015-02-181-1/+0
| | | | llvm-svn: 229592
* Make PlatformPOSIX::KillProcess to delegate to a remote platform if connected.Oleksiy Vyalov2015-02-172-0/+15
| | | | | | http://reviews.llvm.org/D7660 llvm-svn: 229577
* [CMake] Create a custom target for generating extension module.Zachary Turner2015-02-171-11/+1
| | | | | | | | | | | | | | | | | | | | | Previously we would create the extension module as a post-build step of creating liblldb. As part of this process, we created symlinks and did other stuff. This had several longstanding issues related to target dependencies, such as not re-creating the symlink if liblldb.dll failed to link, or if the build was Ctrl+C'ed from. Then, the script that creates the symlinks began to grow to include other things, such as argdumper, and it would try to create symlinks before it had finished building the targets it needed to symlink to. This patches addresses all of these problems by creating an explicit target for the script to run, and making it have a dependency on all the targets it needs to create symlinks from/to. llvm-svn: 229569
* Remove the CMake duplication for liblldb.Zachary Turner2015-02-173-85/+8
| | | | | | | | | Previously the CMake had a lot of duplication for the public API due to some differences regarding how we link on Windows. This fixes the issue, so making changes to the public API should be much easier now. llvm-svn: 229568
* Revert "Revert "I had recently added a new SBFrame::GetVariables() overload ↵Zachary Turner2015-02-174-17/+290
| | | | | | | | | | | with yet another bool argument"" Reverting this commit led to other failures which I did not see at first. This turned out to be an easy problem to fix, so I added SBVariablesOptions.cpp to the CMakeLists.txt. In the future please try to make sure new files are added to CMake. llvm-svn: 229516
* Revert "I had recently added a new SBFrame::GetVariables() overload with yet ↵Zachary Turner2015-02-173-289/+17
| | | | | | | | | | | | | | another bool argument" This reverts commit r228975. It was causing link errors on the Windows bots, since last Thursday. http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/725 Conflicts: lldb.xcodeproj/project.pbxproj llvm-svn: 229514
* Use CloseOnExec in Platform::PutFilePavel Labath2015-02-171-2/+3
| | | | | | | | | | | | | | Summary: This does not fix any outstanding issue that I know of, but there is no reason these files should _not_ have CloseOnExec. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7694 llvm-svn: 229506
* Send default register number instead of GDB register number in StopReplyPacket.Chaoren Lin2015-02-171-19/+5
| | | | | | | | | | | | | | | | Summary: Using GDB register numbers confuses ProcessGDBRemote since the rest of LLGS (qRegisterInfo, p, P) uses the default register numbers instead. Test Plan: dosep.py --options --arch x86 ... Reviewers: ovyalov, vharron, sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7635 llvm-svn: 229505
* Watchpoint debug registers should work in i386 as well.Chaoren Lin2015-02-171-12/+12
| | | | llvm-svn: 229504
* Fix small assignment mistake.Chaoren Lin2015-02-171-2/+2
| | | | llvm-svn: 229503
* Handle trailing spaces on "settings set" command more correctlyPavel Labath2015-02-167-30/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently we have some settings which treat "\ " on settings set commands specially. E.g., it is a valid way of specifying an argument of " " to a target. However, this fails if "\ " is the last argument as CommandObjectSettingsSet strips trailing whitespace. This resulted in a surprising argument of "\" to the target. This patch disables the training whitespace removal at a global level. Instead, for each argument type we locally determine whether whitespace stripping makes sense. Currently, I strip whitespace for all simple object type except of regex and format-string, with the rationale that these two object types do their own complex parsing and we want to interfere with them as least as possible. Specifically, stripping the whitespace of a regex "\ " will result in a (surprising?) error "trailing backslash". Furthermore, the default value of dissasembly-format setting already contains a trailing space and there is no way for the user to type this in manually if we strip whitespace. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7592 llvm-svn: 229382
* Disable LaunchNativeProcess in PlatformLinux for non Linux hostsTamas Berghammer2015-02-161-0/+8
| | | | llvm-svn: 229379
* Enable process launching on android from lldb-gdbserverTamas Berghammer2015-02-164-28/+41
| | | | | | | | | Currently it is uses the same code used on linux. Will be replaced with android specific code if needed. Differential Revision: http://reviews.llvm.org/D7613 llvm-svn: 229371
* Extract SBAttachInfo into own set of files - SBAttachInfo.h, ↵Oleksiy Vyalov2015-02-164-225/+246
| | | | | | SBAttachInfo.cpp and SBAttachInfo.i. llvm-svn: 229346
* Correctly handle N_INDR nlist entries and don't rely on the trie information ↵Greg Clayton2015-02-142-31/+114
| | | | | | | | in order to reproduce them since this dyld trie info can be missing. <rdar://problem/19749670> llvm-svn: 229201
* Change the default disassembly format again. First attempt atJason Molenda2015-02-1314-37/+186
| | | | | | | | | | | | | | | | changing it was in r219544 - after living on that for a few months, I wanted to take another crack at this. The disassembly-format setting still exists and the old format can be user specified with a setting like ${current-pc-arrow}${addr-file-or-load}{ <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>}: This patch was discussed in http://reviews.llvm.org/D7578 <rdar://problem/19726421> llvm-svn: 229186
* Fix TestProcessIO.py when run against a remote targetVince Harron2015-02-133-34/+32
| | | | | | | | | | | | | Fixed test case to copy redirected stdout/stderr files from remote target to host llgs wasn't bothering to put the pty master file handle in the right place if stdout/stderr were redirected to a file. It is still needed for stdin. Corrected some log message text llvm-svn: 229141
* Fix Arg0 argument after r229110. The problem was that ↵Ilia K2015-02-132-2/+3
| | | | | | Arg0ValueChangedCallback isn't twitching when Arg0 was updated, therefore target was launched with empty 1st argument or without it at all. In this patch I update Arg0 by hand. llvm-svn: 229125
* Add -exec-arguments commandIlia K2015-02-135-6/+178
| | | | | | | | | | | | | | | | | Summary: This patch adds -exec-arguments command for lldb-mi. -exec-arguments command allows to specify arguments for executable file in MI mode. Also it contains tests for that command. Btw, new added files was formatted by clang-format. Reviewers: abidh, zturner, clayborg Reviewed By: clayborg Subscribers: zturner, emaste, clayborg, jingham, lldb-commits Differential Revision: http://reviews.llvm.org/D6965 llvm-svn: 229110
* Fix build after r229094: replace llvm/PassManager.h -> ↵Ilia K2015-02-131-1/+1
| | | | | | llvm/IR/LegacyPassManager.h llvm-svn: 229100
* Fix configure+make build broken by r228943Tamas Berghammer2015-02-132-1/+7
| | | | llvm-svn: 229098
* Fix the last two warnings I see on Linx building 'lldb': mismatchedChandler Carruth2015-02-131-2/+2
| | | | | | | | | | | | | signed and unsigned types in comparisons. For the text offset, use the addr_t type that is used elsewhere to get these kinds of offsets, and which it is being compared against. This seems to make things more consistent. For the other, the numbers are clearly small and uninteresting, so just cast them to the most boring 'int' type. llvm-svn: 229085
* Fix four missing 'override' specifiers found with the ClangChandler Carruth2015-02-131-4/+4
| | | | | | | | '-Winconsistent-missing-override' warning. I suggest folks use this to ensure that override is consistently used to mark virtual function overrides. llvm-svn: 229084
* Remove an unused variable found with a Clang warning.Chandler Carruth2015-02-131-1/+0
| | | | llvm-svn: 229083
* Add a ModuleList::ForEach(...) which takes the module list mutex calls the ↵Greg Clayton2015-02-131-0/+12
| | | | | | | | std::function argument with each module. If you return true in the callback, iteration will continue, if you return false, iteration will stop and the lock will be released. <rdar://problem/19213054> llvm-svn: 229008
* I had recently added a new SBFrame::GetVariables() overload with yet another ↵Enrico Granata2015-02-123-17/+289
| | | | | | | | | | bool argument We talked about it internally - and came to the conclusion that it's time to have an options class This commit adds an SBVariablesOptions class and goes through all the required dance llvm-svn: 228975
OpenPOWER on IntegriCloud