summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Modernize the Args access pattern in a few more commands.Zachary Turner2016-12-095-105/+66
| | | | llvm-svn: 289164
* Clean up the new TestInterruptThreadNames test a bit.Jason Molenda2016-12-081-23/+39
| | | | llvm-svn: 289155
* Fixed a crasher that has been borking out heap for a long time. Greg Clayton2016-12-083-4/+5
| | | | | | | | | | ThreadList had an assignment operator that didn't lock the "rhs" thread list object. This means a thread list can be mutated while it is being copied. The copy constructor calls the assignment operator as well. So this fixes the unsafe threaded access to ThreadList which we believe is responsible for a lot of crashes. <rdar://problem/28075793> llvm-svn: 289100
* When we interrupt a process, it was possible or the thread namesJason Molenda2016-12-084-5/+187
| | | | | | | | | | | | | | | | | | to not be set by Process::WillPublicStop() so the driver won't get access to them. The fix is straightforward, moving the call to WillPublicStop above the early return for the interrupt case. (the interrupt case does an early return because the rest of the function is concerned with running stop hooks etc and those are not applicable when we've interrupted the process). Also added a test case for it. The test case is a little complicated because I needed to drive lldb asynchronously to give the program a chance to get up and running before I interrupt it. Running to a breakpoint was not sufficient to catch this bug. <rdar://problem/22693778> llvm-svn: 289026
* Increase timeout for Frontboard app launch request from 9 to 20 secondsJason Molenda2016-12-081-1/+1
| | | | | | to match other timeouts. llvm-svn: 289023
* Set the address size based on the target's arch insteadJason Molenda2016-12-081-3/+2
| | | | | | | of using the address of the all_image_infos struct. <rdar://problem/29547847> llvm-svn: 289016
* Convert CommandObjectFrame to entry-based Args access.Zachary Turner2016-12-081-37/+22
| | | | | | | | In the process, discovered a bug related to the use of an uninitialized-pointer, and fixed as suggested by Enrico in an lldb-dev mailing list thread. llvm-svn: 289015
* Convert CommandObjectCommands to entry-based Args access.Zachary Turner2016-12-081-168/+154
| | | | llvm-svn: 289012
* Work around a bogus warning on MSVC.Zachary Turner2016-12-081-0/+12
| | | | llvm-svn: 289009
* Improve crashlog.py so it can handle more iOS crashlog files.Greg Clayton2016-12-081-0/+11
| | | | | | <rdar://problem/29191857> llvm-svn: 289006
* Fix an unannotated fallthrough that was causing a warning.Greg Clayton2016-12-071-1/+2
| | | | llvm-svn: 289000
* Fixed DoConnectRemote issues where ProcessKDP wasn't switched over to use ↵Greg Clayton2016-12-072-53/+54
| | | | | | the version that needed a StringRef as the URL, and also updated all virtual functions to say "override" to make sure this doesn't happen again. llvm-svn: 288999
* Use Timeout<> in EvaluateExpressionOptions classPavel Labath2016-12-0619-93/+77
| | | | llvm-svn: 288797
* [CMake] Don't add gtest if it is already thereChris Bieneman2016-12-051-1/+1
| | | | | | LLVM build trees export the gtest library through a special export set. If you're building against a build tree you shouldn't need to re-add gtest, but if you're building against an installed LLVM you do. llvm-svn: 288691
* [lldb] Update the check for Linux or FreeBSD in SymbolFileDWARF::FindFunctionsAlexander Shaposhnikov2016-12-052-4/+9
| | | | | | | | | | | | | | | | | | | This diff 1. Adds a comment to ObjectFileELF.cpp about the current approach to determining the OS. 2. Replaces the check in SymbolFileDWARF.cpp with a more robust one. Test plan: Built (on Linux) a test binary linked to a c++ shared library which contains just an implementation of a function TestFunction, the library (the binary itself) doesn't contain ELF notes and EI_OSABI is set to System V. Checked in lldb that now "p TestFunction()" works fine (and doesn't work without this patch). Differential revision: https://reviews.llvm.org/D27380 llvm-svn: 288687
* Remove superfluous android includePavel Labath2016-12-051-1/+0
| | | | | | | This file is not in the include path when building with a non-standalone toolchain. In does not seem to be necessary anyway. llvm-svn: 288674
* Remove one more if(__ANDROID_NDK__) I missedPavel Labath2016-12-051-9/+7
| | | | llvm-svn: 288673
* Clean up some use of __ANDROID_NDK__ in the cmake filesPavel Labath2016-12-055-16/+13
| | | | | | | | | | | | | | | Rationale: scripts/Python/modules: android is excluded at a higher level, so no point in checking here tools/lldb-mi: lldb-mi builds fine (with some cosmetic tweaks) on android, and there is no reason it shouldn't. tools/lldb-server: LLDB_DISABLE_LIBEDIT/CURSES already take the platform into account, so there is no point in checking again. I am reasonably confident this should not break the build on any platform, but I'll keep an eye out on the bots. llvm-svn: 288661
* [CMake] Use add_llvm_tool_symlink's OUTPUT_DIR optionChris Bieneman2016-12-051-1/+2
| | | | | | This is updating to take r288632 into account. llvm-svn: 288633
* Update test expectations after AddressSanitizer text descriptions changed in ↵Kuba Mracek2016-12-022-2/+2
| | | | | | r288535. llvm-svn: 288542
* Support more report types in AddressSanitizerRuntime.cpp, re-word existing ones.Kuba Mracek2016-12-021-26/+41
| | | | | | | | In r288065, we added more report types into ASan that will be reported via the debugging API. This patch in LLDB provides human-friendly bug descriptions. This also improves wording on existing bug descriptions. Differential Revision: https://reviews.llvm.org/D27017 llvm-svn: 288535
* Replace __ANDROID_NDK__ with __ANDROID__Pavel Labath2016-12-0218-37/+25
| | | | | | | | | | | | | | | | | | | | Summary: This replaces all the uses of the __ANDROID_NDK__ define with __ANDROID__. This is a preparatory step to remove our custom android toolchain file and rely on the standard android NDK one instead, which does not provide this define. Instead I rely, on __ANDROID__, which is set by the compiler. I haven't yet removed the cmake variable with the same name, as we will need to do something completely different there -- NDK toolchain defines CMAKE_SYSTEM_NAME to Android, while our current one pretends it's linux. Reviewers: tberghammer, zturner Subscribers: danalbert, srhines, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27305 llvm-svn: 288494
* Handle empty strings when looking for a CFString's encoding.Sean Callanan2016-12-011-1/+1
| | | | | | Should fix the bots. llvm-svn: 288403
* Remove another hack from the android toolchain filePavel Labath2016-12-011-9/+0
| | | | | | This is no longer an issue with recent versions of the android ndk. llvm-svn: 288387
* Handle UTF-16 and UTF-32 constant CFStringsSean Callanan2016-12-013-53/+74
| | | | | | | | | | | | | | | We have a longstanding issue where the expression parser does not handle wide CFStrings (e.g., @"凸凹") correctly, producing the useless error message Internal error [IRForTarget]: An Objective-C constant string's string initializer is not an array error: warning: expression result unused error: The expression could not be prepared to run in the target This is just a side effect of the fact that we don't handle wide string constants when converting these to CFStringCreateWithBytes. That function takes the string's encoding as an argument, so I made it work and added a testcase. https://reviews.llvm.org/D27291 <rdar://problem/13190557> llvm-svn: 288386
* Remove a hack from the Android toolchain filePavel Labath2016-12-011-24/+0
| | | | | | | | | | | | | | Summary: The fix is to make sure llvm does not pull in dlopen() in configurations where it is not available. Reviewers: tberghammer, beanz Subscribers: danalbert, srhines, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D26505 llvm-svn: 288331
* Use Timeout<> in Process::RunThreadPlanPavel Labath2016-12-011-94/+72
| | | | | | | | | | | | | | | | Summary: Since the function is way too big already, I tried at least to factor out the timeout computation stuff into a separate function. I've tried to make the new code semantically equivalent, and it also makes sense when I look at it as a done deal. Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D27258 llvm-svn: 288326
* Add another address to look for the kernel load addr inJason Molenda2016-11-301-1/+3
| | | | | | | | | DynamicLoaderDarwinKernel::SearchForKernelWithDebugHints on 32-bit devices. <rdar://problem/29423290> llvm-svn: 288284
* PR31214: Make a test tolerate "line 0" when stepping by instruction.Paul Robinson2016-11-301-4/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D27282 llvm-svn: 288282
* Fix handling of consecutive slashes in FileSpec::GetNormalizedPath()Pavel Labath2016-11-302-1/+5
| | | | | | | | | | The core of the function was actually handling them correctly. However, the early exit was being too optimistic and did not give the function a chance to fire if the path did not contain dots as well. Fix that and add a couple of unit tests. llvm-svn: 288247
* Convert most of the Process class to Timeout<>Pavel Labath2016-11-304-91/+64
| | | | | | | | | | | This changes most of the class to use the new Timeout class. The one function left is RunThreadPlan, which I left for a separate change as the function is massive. A couple of things to call out: - I've renamed the affected functions to match the listener interface names. This should also help catch any places I did not convert at compile time. - I've deleted the WaitForState function as it was unused. llvm-svn: 288241
* Fix OSX build for r288238Pavel Labath2016-11-301-2/+3
| | | | llvm-svn: 288239
* Use Timeout<> in the Listener classPavel Labath2016-11-3012-160/+125
| | | | | | | | | | | | | | | | | | | | Summary: Communication classes use the Timeout<> class to specify the timeout. Listener class was converted to chrono some time ago, but it used a different meaning for a timeout of zero (Listener: infinite wait, Communication: no wait). Instead, Listener provided separate functions which performed a non-blocking event read. This converts the Listener class to the new Timeout class, to improve consistency. It also allows us to get merge the different GetNextEvent*** and WaitForEvent*** functions into one. No functional change intended. Reviewers: jingham, clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D27136 llvm-svn: 288238
* Remove a spurious reference to ProcessElfCorePavel Labath2016-11-302-7/+1
| | | | | | | | | | | We were referencing a the process class from a register context, which seems intuitively wrong. Also, the comment above that code is now definitely incorrect, as ProcessElfCore now does support floating point registers. Also, the code wasn't really doing anything, as it was just skipping a zero-initialization of a field that was most likely zero-initialized anyway. Linux elf core FPR test still passes after this. llvm-svn: 288237
* Remove an x86-ism from RegisterInfoInterfacePavel Labath2016-11-306-16/+1
| | | | | | | | | | | | | | | | | Summary: While adding FPR support to x86 elf core files (D26300), we ended up adding a very x86-specific function to the general RegisterInfoInterface class, which I didn't catch in review. This removes that function. The only reason we needed it was to find the offset of the FXSAVE area. This is the same as the offset of the first register within that area, so we might as well use that. Reviewers: clayborg, dvlahovski Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D27222 llvm-svn: 288236
* Add back some of the previous lldb-server dependenciesPavel Labath2016-11-291-0/+5
| | | | | | | | It seems a debug build of lldb-server will not complete without these, as the linker is not able to strip out code that aggressively. Add those back until I can figure out how to break the dependency chains. llvm-svn: 288181
* Remove some OS-specific plugins from lldb-server dependenciesPavel Labath2016-11-291-29/+0
| | | | | | | | I don't believe the code in those plugins could be in any way useful for lldb-server, but I can't be sure if this will break some transitive dependencies. Builtbots should be able to tell us that. llvm-svn: 288169
* Remove assorted other plugins which are not needed by lldb-serverPavel Labath2016-11-291-14/+0
| | | | | | language runtime, structured data, sanitizers, process plugins. llvm-svn: 288166
* Remove dynamic loader, platform and ABI plugins from lldb-server dependenciesPavel Labath2016-11-291-27/+0
| | | | | | These packages are not used on the server. llvm-svn: 288164
* Specify the dependencies of lldb-server manuallyPavel Labath2016-11-291-1/+209
| | | | | | | | | | | | | | | | | | | | | Summary: This basically just inlines the LLDBDependencies.cmake file into lldb-server CMakeLists.txt. The reason is that most of these dependencies are not actually necessary for lldb-server (some of them can't be removed because of cross-dependencies, but most of the plugins can). I intend to start cleaning these up in follow-up commits, but I want to do this first, so the subsequent ones can be easily reverted if they don't build in some configurations. When I cleaned these up locally, I was able to get a 30%--50% improvement in lldb-server size. Reviewers: zturner, beanz, tfiala Subscribers: danalbert, srhines, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D26975 llvm-svn: 288159
* Remove ConnectionSharedMemoryPavel Labath2016-11-294-214/+0
| | | | | | This class is unused. llvm-svn: 288122
* Fix a typo.Hafiz Abid Qadeer2016-11-291-1/+1
| | | | llvm-svn: 288118
* Remove ConnectionMachPortPavel Labath2016-11-294-345/+0
| | | | | | | | | | | | | | Summary: This class is unused, and since the StringRef refactor, it does not even implement the Connection interface. Reviewers: clayborg, jingham Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27134 llvm-svn: 288117
* [lldb] Fix compilation of SymbolFileDWARF.cpp with ENABLE_DEBUG_PRINTF setAlexander Shaposhnikov2016-11-291-1/+2
| | | | | | | | This diff adds missing semicolon in SymbolFileDWARF.cpp Differential revision: https://reviews.llvm.org/D27177 llvm-svn: 288094
* fix up Xcode build for r287916Todd Fiala2016-11-281-12/+6
| | | | llvm-svn: 288044
* Fix floating point register reads x86_64 linux on targets with no AVX supportPavel Labath2016-11-281-3/+14
| | | | | | | | | | | | | | | | Summary: On for 64-bit targets, the correct register set to read the fxsave are is NT_PRFPREG (only 32-bit targets need NT_PRXFPREG, presumably for historic reasons). Reference: <https://github.com/torvalds/linux/blob/v4.8/arch/x86/kernel/ptrace.c#L1261>. Reviewers: tberghammer, valentinagiusti Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D27161 llvm-svn: 288038
* XFAIL: TestNoreturnUnwind on android x86_64Pavel Labath2016-11-281-0/+1
| | | | llvm-svn: 288032
* skip android in @skipIfHostIncompatibleWithRemotePavel Labath2016-11-281-1/+3
| | | | | | | | | | | | The current implementation of the decorator does not skip if the android target arch is the same as host arch (as in both cases the platform comes out as linux). Nonetheless android x86_64 binaries are not compatible with linux ones. Technically this should be "skip if target is android and host is *not* android", but currently nobody runs lldb test suite on an android host, so we don't even have a way of specifying that the host is android. llvm-svn: 288027
* Fix a crash in ProcessPOSIXLogPavel Labath2016-11-281-2/+2
| | | | | | | We are getting a null pointer for the list of categories here (presumably due to the args refactor). llvm-svn: 288026
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-2659-65/+102
| | | | | | | | | | | | | This diff fixes typos in file headers (incorrect file names). Test plan: Under llvm/tools/lldb/source: find ./* -type f | grep -e '\(cpp\|h\)$' | while read F; do B=$(basename $F); echo $F head -n 1 $F | grep -v $B | wc -l ; done Differential revision: https://reviews.llvm.org/D27115 llvm-svn: 287966
OpenPOWER on IntegriCloud