summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove PC -1 offset from FreeBSD arm64 UpdateAfterBreakpointEd Maste2015-12-221-2/+0
| | | | | | It was a copy-and-paste leftover. llvm-svn: 256248
* The lldb side changes to go along with r255711 where a newJason Molenda2015-12-186-0/+144
| | | | | | | | | | | | | | | | | | | | | | "thread-pcs" key is added to the T (questionmark) packet in gdb-remote protocol so that lldb doesn't need to query the pc values of every thread before it resumes a process. The only odd part with this is that I'm sending the pc values in big endian order, so we need to know the endianness of the remote process before we can use them. All other register values in gdb-remote protocol are sent in native-endian format so this requirement doesn't exist. This addition is a performance enhancement -- lldb will fall back to querying the pc of each thread individually if it needs to -- so when we don't have the byte order for the process yet, we don't use these values. Practically speaking, the only way I've been able to elicit this condition is for the first T packet when we attach to a process. <rdar://problem/21963031> llvm-svn: 255942
* Welcome to NetBSD signalsKamil Rytarowski2015-12-153-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Signals 1-32 are matching the default UNIX platform. There are platform specific ones above 32. From the `/usr/include/sys/signal.h` header: ``` #define SIGPWR 32 /* power fail/restart (not reset when caught) */ #ifdef _KERNEL #define SIGRTMIN 33 /* Kernel only; not exposed to userland yet */ #define SIGRTMAX 63 /* Kernel only; not exposed to userland yet */ #endif ``` Reviewers: emaste, joerg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15482 llvm-svn: 255592
* Remove unused mips typedefs.Oleksiy Vyalov2015-12-121-3/+1
| | | | llvm-svn: 255419
* [LLDB][MIPS] Adding call to IsMSAAvailable() while creating ↵Sagar Thakur2015-12-092-7/+11
| | | | | | | | RegisterInfoInterface This patch will fix the test case test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs_* of TestLldbGdbServer.py on mips. The test fails because we were sending RegisterInfo for msa registers to client even when msa registers are not available. With this commit server will send E45(end of resigters) response if msa registers are not available. llvm-svn: 255108
* Fix DoReadMemory for Windows mini dumps.Adrian McCarthy2015-12-091-1/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D15359 llvm-svn: 255083
* Fix MSVC build after rL255016Tamas Berghammer2015-12-081-2/+4
| | | | llvm-svn: 255017
* Modify "platform connect" to connect to processes as wellTamas Berghammer2015-12-086-66/+183
| | | | | | | | | | | | | | | | | | | | | | | | The standard remote debugging workflow with gdb is to start the application on the remote host under gdbserver (e.g.: gdbserver :5039 a.out) and then connect to it with gdb. The same workflow is supported by debugserver/lldb-gdbserver with a very similar syntax but to access all features of lldb we need to be connected also to an lldb-platform instance running on the target. Before this change this had to be done manually with starting a separate lldb-platform on the target machine and then connecting to it with lldb before connecting to the process. This change modifies the behavior of "platform connect" with automatically connecting to the process instance if it was started by the remote platform. With this command replacing gdbserver in a gdb based worflow is usually as simple as replacing the command to execute gdbserver with executing lldb-platform. Differential revision: http://reviews.llvm.org/D14952 llvm-svn: 255016
* Implement GetMemoryRegionInfo for mini dumps.Adrian McCarthy2015-12-045-12/+96
| | | | | | Differential Revision: http://reviews.llvm.org/D15218 llvm-svn: 254780
* Fill in the generic register kind if in AugmentRegisterInfoViaABI if it is ↵Greg Clayton2015-12-041-4/+9
| | | | | | available. llvm-svn: 254743
* Improve the functionality of JSONNumberTamas Berghammer2015-12-041-1/+1
| | | | | | | | | * Add support for representing signed integers * Add new constructors taking any signed or unsigned integer types Differential revision: http://reviews.llvm.org/D15187 llvm-svn: 254715
* [LLDB][MIPS] Using enum instead of a constant to fetch PC and CAUSE registers.Jaydeep Patil2015-12-031-2/+2
| | | | | | | SUMMARY: Using enum instead of a constant to fetch PC and CAUSE registers. llvm-svn: 254590
* [LLDB][MIPS] fix watchpoint searched on client side for same masked variablesMohit K. Bhakkad2015-12-021-3/+6
| | | | | | | | Reviewers: clayborg. Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits. Differential Revision: http://reviews.llvm.org/D15106 llvm-svn: 254522
* PTRACE ABI to read FXSAVE area for 32-bit inferiorAbhishek Aggarwal2015-12-021-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Problem occurs when: -- 32-bit inferiors run on x86_32 machine and the architecture doesn't have AVX feature -- This causes FPRType to be set to eFPRTypeFXSAVE -- PTRACE_GETFPREGS was being used to read FXSAVE area -- For 32-bit inferiors running on x86_32 machine, PTRACE_GETFPREGS reads FSAVE area and not FXSAVE area - Changed ptrace API to PTRACE_GETREGSET for 32-bit inferiors -- This reads FPR data in FXSAVE format. -- For 64-bit inferiors, no change has been made. - Modified XFAIL for TestReturnValue.py -- Earlier, this test was passing for Linux OS -- Now, it passes for Android OS as well Change-Id: Ieed72bc969b79516fc7b263b32493aa1e7a1a2ac Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: ovyalov, jingham, lldb-commits, tberghammer, labath Subscribers: jevinskie, labath, tberghammer, danalbert Differential Revision: http://reviews.llvm.org/D15042 llvm-svn: 254499
* [LLDB][MIPS] Clear bug 25194 - LLDB-Server Assertion raised when single ↵Sagar Thakur2015-12-011-0/+3
| | | | | | | | | | | | | | | | | | | stepping on MIPS This patch will clear bug 25194 - LLDB-Server Assertion raised when single stepping on MIPS. The problem was that while emulating instructions, old and new pc values would have garbage value in their upper 32 bits. Therefore checking if pc was changed (old_pc == new_pc) would always return false, because of which pc was not getting updated. /* If we haven't changed the PC, change it here */ if (old_pc == new_pc) { new_pc += 4; Context context; return false; } Reviewers: tberghammer, clayborg Subscribers: dsanders, lldb-commits, mohit.bhakkad, bhushan, jaydeep, nitesh.jain Differential: http://reviews.llvm.org/D14633 llvm-svn: 254379
* [LLGS] Don't forward I/O when process is stoppedPavel Labath2015-11-272-28/+45
| | | | | | | | | | | | | | | | | | | | | Summary: This makes sure we do not attempt to send output over the gdb-remote protocol when the client is not expecting it (i.e., after sending the stop-reply packet). Normally, this should not happen (the process cannot generate output when it is stopped), but due to the fact that pty communication is asynchronous in the linux kernel (llvm.org/pr25652), we may sometimes get this output too late. Instead, we just hold the output, and send it next time we resume. This is not ideal, but at least it makes sure we do not violate the remote protocol. Given that this happens extremely rarely it's not worth trying to work around it with sleeps or something like that. I also remove the m_stdio_communication_mutex, as all of LLGS is now single-threaded anyway. Reviewers: tberghammer, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15019 llvm-svn: 254200
* Add 64/128 bit arm neon register definitions on linuxTamas Berghammer2015-11-266-63/+411
| | | | | | Differential revision: http://reviews.llvm.org/D14985 llvm-svn: 254152
* Prevent ProcessGDBRemote from launching local debug server in case of remote ↵Oleksiy Vyalov2015-11-232-36/+31
| | | | | | | | debug server connection failure. http://reviews.llvm.org/D14895 llvm-svn: 253906
* [LLDB][MIPS] Getting 0 index for H/W watchpoint is not necessarily an errorMohit K. Bhakkad2015-11-231-2/+2
| | | | | | | | Reviewers: jaydeep. Subscribers: bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D14860 llvm-svn: 253864
* Fix to solve Bug 23139 & Bug 23560Abhishek Aggarwal2015-11-132-1/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Reason of both bugs: 1. For the very first frame, Unwinder doesn't check the validity of Full UnwindPlan before creating StackFrame from it: When 'process launch' command is run after setting a breakpoint in inferior, the Unwinder runs and saves only Frame 0 (the frame in which breakpoint was set) in thread's StackFrameList i.e. m_curr_frames_sp. However, it doesn't check the validity of the Full UnwindPlan for this frame by unwinding 2 more frames further. 2. Unwinder doesn't update the CFA value of Cursor when Full UnwindPlan fails and FallBack UnwindPlan succeeds in providing valid CFA values for frames: Sometimes during unwinding of stack frames, the Full UnwindPlan inside the RegisterContextLLDB object may fail to provide valid CFA values for these frames. Then the Fallback UnwindPlan is used to unwind the frames. If the Fallback UnwindPlan succeeds, then it provides a valid new CFA value. The RegisterContextLLDB::m_cfa field of Cursor object is updated during the Fallback UnwindPlan execution. However, UnwindLLDB misses the implementation to update the 'cfa' field of this Cursor with this valid new CFA value. - This patch fixes both these issues. - Remove XFAIL in test files corresponding to these 2 Bugs Change-Id: I932ea407545ceee2d628f946ecc61a4806d4cc86 Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: jingham, lldb-commits, jasonmolenda Subscribers: lldb-commits, ovyalov, tberghammer Differential Revision: http://reviews.llvm.org/D14226 llvm-svn: 253026
* Implement RegisterContext for Mini Dumps.Adrian McCarthy2015-11-1215-307/+290
| | | | | | Differential Revision: http://reviews.llvm.org/D14591 llvm-svn: 252950
* Avoid sending bare '*' and '}' in an lldb-server packetTim Northover2015-11-091-0/+1
| | | | | | | | | | They get treated as special RLE encoding symbols and packets get corrupted. Most other packet types already know about this apparently, but QEnvironment missed these two. Should fix PR25300. llvm-svn: 252521
* Make lldb::endian::InlHostByteOrder() private.Bruce Mitchener2015-11-077-18/+18
| | | | | | | | | | | | | | | | | | Summary: Since this is within the lldb namespace, the compiler tries to export a symbol for it. Unfortunately, since it is inlined, the symbol is hidden and this results in a mess of warnings when building on OS X with cmake. Moving it to the lldb_private namespace eliminates that problem. Reviewers: clayborg Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D14417 llvm-svn: 252396
* Fix for AArch64 watchpoint cache corruption in case of ptrace failureOmair Javaid2015-11-061-1/+49
| | | | | | | | | | Same fix has been submitted for Arm. Review can be found here: Differential revision: http://reviews.llvm.org/D14051 llvm-svn: 252298
* Use Process::IsAlive instead of just checking for eStateExited.Jason Molenda2015-11-051-4/+4
| | | | | | Two minor tweaks to GetLoadedDynamicLibrariesInfos. llvm-svn: 252242
* GDBRemoteCommunicationClient::SendEnvironmentPacket should use the hex-encodedJason Molenda2015-11-051-0/+1
| | | | | | env packet if the '*' character used for run length encoding is present. llvm-svn: 252239
* Add support for the new (added last week) llvm::Triple::WatchOS and ::TvOSJason Molenda2015-11-051-1/+3
| | | | | | | | | | in places where we check for Triple::IOS. They're mostly the same as far as lldb is conerned. . Also add a base cass implementation for Process::IsAlive - Greg added this last year but it didn't get upstreamed. llvm-svn: 252227
* Let the process help figure out the Host OS if nobody elseJim Ingham2015-11-052-0/+17
| | | | | | can figure it out. llvm-svn: 252224
* Fix x64 build on Windows, which was broken by my refactor from last week.Adrian McCarthy2015-11-043-1/+212
| | | | | | No build bots build x64 on Windows yet, but this was spotted by another developer who emailed me directly. llvm-svn: 252100
* [FreeBSD] Add missing overrides.Davide Italiano2015-11-042-4/+4
| | | | llvm-svn: 252094
* Fix a deadlock when connecting to a remote GDB server that might not support ↵Greg Clayton2015-11-031-16/+20
| | | | | | | | all packets that lldb-server or debugserver supports. The issue was the m_last_stop_packet_mutex mutex was being held by another thread and it was deadlocking getting the thread list. We now try to lock the m_last_stop_packet_mutex, and only continue if we successfully lock it. Else we fall back to qfThreadInfo/qsThreadInfo. <rdar://problem/22140023> llvm-svn: 252005
* [LLDB][MIPS] Fix GetUserRegisterInfoCount to count no of regs which are ↵Mohit K. Bhakkad2015-11-034-10/+26
| | | | | | | | | | physically present Reviewers: clayborg, labath. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D13859 llvm-svn: 251906
* Fix Clang-tidy modernize-use-nullptr warnings in ↵Eugene Zelenko2015-10-307-415/+449
| | | | | | source/Plugins/Process/Utility headers; other minor fixes. llvm-svn: 251676
* Make sure we don't over specify an architecture when we connect to KDP and ↵Greg Clayton2015-10-282-15/+33
| | | | | | | | use the CPU type and subtype to fill out an architecture. We do this by letting the vendor be an unspecified unknown, or any. We also grab the target architecture, get the KDP host arch, and then merge the two before putting it back into the target. Also change MH_PRELOAD to be use "unspecified unknown" (any) for the OS and vendor since these mach files can really be anything. llvm-svn: 251579
* Make lldb-gdbserver to take explicit socket scheme as command line argument.Oleksiy Vyalov2015-10-282-2/+7
| | | | | | http://reviews.llvm.org/D14126 llvm-svn: 251547
* Refactor Windows process plugin to allow code sharing between live and mini ↵Adrian McCarthy2015-10-2830-1761/+2059
| | | | | | dump debugging. llvm-svn: 251540
* Make core files not crash when you load a core file into LLDB with just ↵Greg Clayton2015-10-282-2/+56
| | | | | | | | | | | | | | | "lldb -c core". To do this I added a few new ways to determine the OS from PT_NOTE notes in the ELF file: 1 - Look for "LINUX" notes which indicate "linux" should be the OS 2 - Look through the "CORE" notes with NT_FILE as the type and sniff data from the paths listed in this section. On Ubuntu they contain "/lib/x86_64-linux-gnu" which has the triple and allows us to set "linux" as the OS in the architecture returned from ObjectFileELF::GetArchitecture(). Setting the OS correctly allows us to get the triple correct so we can extract registers without asserting and killing LLDB. Also use the data from the NT_FILE to set the main executable if one isn't set in ProcessElfCore::DoLoadCore(). llvm-svn: 251537
* Fix race condition in process resumePavel Labath2015-10-271-1/+7
| | | | | | | | | | | | | | | | | | Summary: Gdb-remote's async thread sent out the eBroadcastBitRunPacketSent message *before* actually sending out the continue packet. Since it's this message the actually triggers the public state transition, it could happen (and it did happen in TestAttachResume, which does an "process interrupt" right after a continue) that we attempt to stop the inferior before it was actually started (which obviously did not end well). This fixes the problem by moving the broadcast after the packet was actually sent. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14083 llvm-svn: 251399
* Fix for Arm watchpoint cache corruption in case of ptrace failureOmair Javaid2015-10-271-0/+48
| | | | | | Differential revision: http://reviews.llvm.org/D14051 llvm-svn: 251386
* [lldb-server] Send PC of every thread along in the stop-reply packetPavel Labath2015-10-261-14/+14
| | | | | | | | This avoids the need to query the PC for private resume operations (public resumes have the PC from the bigger jStopInfo packet) and speeds up the stepping on an android target by about 10% (it some cases even more). llvm-svn: 251301
* Corrects return values and typos in Arm watchpoint codeOmair Javaid2015-10-251-4/+4
| | | | | | | This is just a trivial patch that corrects a couple of return value account to function's return type. Also corrects typo in hardware breakpoint handler. llvm-svn: 251269
* Revert r251167 in source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp to ↵Eugene Zelenko2015-10-241-32/+84
| | | | | | fix MSVC builds failures. llvm-svn: 251170
* Fix Clang-tidy modernize-use-override warnings in some files in ↵Eugene Zelenko2015-10-249-270/+177
| | | | | | source/Plugins; other minor fixes. llvm-svn: 251167
* Add initial CMake glue for the NetBSD platformBruce Mitchener2015-10-241-0/+2
| | | | | | | | | | | | | | | | | Summary: These changes aren't everything what is needed for the CMake target, but it's significantly approaching it. These changes shouldn't effect the build process on other platforms. Patch by Kamil Rytarowski, thanks! Reviewers: joerg, brucem Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13711 llvm-svn: 251164
* Fix arm lldb-server on aarch64 deviceTamas Berghammer2015-10-232-0/+56
| | | | | | | | | | * Use PTRACE_GETVFPREGS/PTRACE_SETVFPREGS to access the floating point registers instead of the old PTRACE_GETFPREGS/PTRACE_SETFPREGS. The new call is available since armv5. * Work around a kernel issue in PTRACE_POKEUSER with reading out the full register set, modifying the neccessary value and then writing it back. llvm-svn: 251111
* Add arm64 FreeBSD ProcessMonitor register contextEd Maste2015-10-231-0/+4
| | | | llvm-svn: 251088
* Add domain socket support to gdb-remote protocol and lldb-server.Oleksiy Vyalov2015-10-217-64/+149
| | | | | | http://reviews.llvm.org/D13881 llvm-svn: 250933
* Fix Clang-tidy modernize-use-override warnings in some files in ↵Eugene Zelenko2015-10-215-134/+126
| | | | | | | | source/Plugins; other minor fixes. Differential Revision: http://reviews.llvm.org/D13951 llvm-svn: 250925
* [LLDB] Insert names with same signo as alias instead of a new entryMohit K. Bhakkad2015-10-203-202/+198
| | | | | | | | Reviewers: clayborg, labath. Subscribers: jaydeep, dsanders, bhushan, sagar, nitesh.jain, emaste,lldb-commits. Differential Revision: http://reviews.llvm.org/D13646 llvm-svn: 250801
* Allow LLDB.framework to locate debugserver even when it doesn't exist in the ↵Greg Clayton2015-10-194-9/+22
| | | | | | | | | | LLDB.framework. This allows open source MacOSX clients to not have to build debugserver and the current LLDB can find debugserver inside the selected Xcode.app on your system. <rdar://problem/23167253> llvm-svn: 250735
OpenPOWER on IntegriCloud