summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a new SBThread::GetQueue() method to get the queue that is Jason Molenda2014-04-251-0/+16
| | | | | | | | | | currently associated with a given thread, on relevant targets. Change the queue detection code to verify that the queues associated with all live threads are included in the list. <rdar://problem/16411314> llvm-svn: 207160
* m_interrupt_sent wasn't being initialized, and wasn't being reset after anJim Ingham2014-04-161-0/+3
| | | | | | interrupt. Do both of those. llvm-svn: 206350
* sweep up -Wformat warnings from gccSaleem Abdulrasool2014-04-041-11/+7
| | | | | | | This is a purely mechanical change explicitly casting any parameters for printf style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux. llvm-svn: 205607
* Add a missing arm64 idef.Jason Molenda2014-04-021-1/+1
| | | | llvm-svn: 205488
* sanitise sign comparisonsSaleem Abdulrasool2014-04-022-5/+5
| | | | | | | | This is a mechanical change addressing the various sign comparison warnings that are identified by both clang and gcc. This helps cleanup some of the warning spew that occurs during builds. llvm-svn: 205390
* lldb arm64 import.Jason Molenda2014-03-296-73/+460
| | | | | | | | | | | | | | | | These changes were written by Greg Clayton, Jim Ingham, Jason Molenda. It builds cleanly against TOT llvm with xcodebuild. I updated the cmake files by visual inspection but did not try a build. I haven't built these sources on any non-Mac platforms - I don't think this patch adds any code that requires darwin, but please let me know if I missed something. In debugserver, MachProcess.cpp and MachTask.cpp were renamed to MachProcess.mm and MachTask.mm as they picked up some new Objective-C code needed to launch processes when running on iOS. llvm-svn: 205113
* Wait for the reply from the 'D' detach packet before tearing down the ↵Jim Ingham2014-03-281-2/+4
| | | | | | | | | | | | debugger. Avoids a race condition where we could end up killing debugserver (and thus the target) before it had a chance to detach. Also fix debugserver to send the OK AFTER it detaches to avoid the same race condition. <rdar://problem/16202713> llvm-svn: 205043
* Move calls to DisableAllBreakpointSites() and ↵Andrew MacPherson2014-03-251-4/+0
| | | | | | m_thread_list.DiscardThreadPlans() into base Process::Destroy() instead of in subclass DoDestroy() methods. llvm-svn: 204752
* JITed functions can now have debug info and be debugged with debug and ↵Greg Clayton2014-03-241-0/+1
| | | | | | | | | | | | | | | | | | | source info: (lldb) b puts (lldb) expr -g -i0 -- (int)puts("hello") First we will stop at the entry point of the expression before it runs, then we can step over a few times and hit the breakpoint in "puts", then we can continue and finishing stepping and fininsh the expression. Main features: - New ObjectFileJIT class that can be easily created for JIT functions - debug info can now be enabled when parsing expressions - source for any function that is run throught the JIT is now saved in LLDB process specific temp directory and cleaned up on exit - "expr -g --" allows you to single step through your expression function with source code <rdar://problem/16382881> llvm-svn: 204682
* Quiet Clang warning about signed/unsigned comparisonEd Maste2014-03-201-1/+1
| | | | llvm-svn: 204360
* cleanup unreferenced functionsSaleem Abdulrasool2014-03-202-25/+5
| | | | | | | | | | | | | This is a mechanical cleanup of unused functions. In the case where the functions are referenced (in comment form), I've simply commented out the functions. A second pass to clean that up is warranted. The functions which are otherwise unused have been removed. Some of these were introduced in the initial commit and not in use prior to that point! NFC llvm-svn: 204310
* Update copy-and-pasted log messageEd Maste2014-03-171-1/+1
| | | | llvm-svn: 204057
* Add a SBQueue::GetKind() method to retrieve the type of libdispatch queue ↵Jason Molenda2014-03-132-0/+22
| | | | | | | | (serial or concurrent). <rdar://problem/7964505> llvm-svn: 203748
* Replace some _MSC_VER with _WIN32.Hafiz Abid Qadeer2014-03-121-1/+1
| | | | | | | This allows to use some code for mingw which was previously only used for MSVC. llvm-svn: 203651
* If you are disabling a hardware breakpoint, use z1 not z0.Jim Ingham2014-03-071-1/+9
| | | | | | <rdar://problem/16256532> llvm-svn: 203232
* Add ProcessGDBRemote::GetAuxvData() and fix multiple-packet concatenation ↵Steve Pucci2014-03-044-6/+38
| | | | | | | | | | for binary data. ProcessGDBRemote::GetAuxvData obtains the auxv from a remote gdbserver (via a binary-data packet), and returns the data as a DataBufferSP. The patch includes a small fix to GDBRemoteCommunicationClient::SendPacketsAndConcatenateResponses() to support binary file format packet returns (by not assuming each binary packet is a null-terminated string when concatenating them). llvm-svn: 202907
* Be sure to propagate the error back out SBTarget::Attach() when we fail to ↵Greg Clayton2014-02-281-22/+25
| | | | | | | | launch debugserver as root. <rdar://problem/15669788> llvm-svn: 202536
* Remove an assertion that was being hit due to slow DNS name lookups on ↵Greg Clayton2014-02-274-13/+21
| | | | | | | | | | MacOSX for "localhost". Changed all "localhost" to "127.0.0.1" to prevent potentially long name lookups. <rdar://problem/16154630> llvm-svn: 202424
* remove useless declarationSylvestre Ledru2014-02-261-2/+0
| | | | llvm-svn: 202281
* Don’t process the stop reply packet as a generic signal if we already ↵Jim Ingham2014-02-241-1/+1
| | | | | | figured out what it was from other data in the packet. llvm-svn: 202066
* Fix handling of gdbserver binary packets with escape characters.Steve Pucci2014-02-241-0/+7
| | | | | | | We were not properly handling the escape character 0x7d ('}') in responses from gdbserver which used the binary protocol. llvm-svn: 202062
* Patch for fixing the handling of hardware breakpoints.Deepak Panickal2014-02-242-59/+97
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2826 llvm-svn: 202028
* Oops, probably ought to turn on that fix...Jim Ingham2014-02-211-1/+1
| | | | llvm-svn: 201897
* We have to call waitpid on the lldb side for Mac OS X (even though we've ↵Jim Ingham2014-02-211-0/+18
| | | | | | | | successfully called it on the debugserver side) when we kill a process or it leaves a zombie around. llvm-svn: 201896
* Improved the GDBRemoteCommunicationClient::TestPacketSpeed() function so it ↵Greg Clayton2014-02-211-32/+68
| | | | | | tests how long it takes to send a 4MB buffer from the REMOTE GDB server to LLDB. llvm-svn: 201875
* Improve the handling of stop-reply packet when it does not containHafiz Abid Qadeer2014-02-201-0/+15
| | | | | | thread information. llvm-svn: 201773
* Fixed deadlocks that could occur when using python for breakpoints, ↵Greg Clayton2014-02-131-1/+5
| | | | | | | | | operating system plugins, and other async python usage. <rdar://problem/16054348> <rdar://problem/16040833> llvm-svn: 201372
* hostname is guarantee to never be null in this branch.Jean-Daniel Dupas2014-02-081-1/+1
| | | | llvm-svn: 201027
* Change the Mac OS X SystemRuntime plugin from using the placeholderJason Molenda2014-02-051-6/+7
| | | | | | | | | | | | | | libldi library to collect extended backtrace information; switch to the libBacktraceRecording library and its APIs. Complete the work of adding QueueItems to Queues and allow for the QueueItems to be interrogated about their extended backtraces in turn. There's still cleanup and documentation to do on this code but the code is functional and I it's a good time to get the work-in-progress checked in. <rdar://problem/15314027> llvm-svn: 200822
* Modified GDBProcessCommunicationServer to launch via the platform.Todd Fiala2014-01-282-2/+25
| | | | | | | | | | | | | | | | | | | GDBProcessCommunicationServer now optionally takes a PlatformSP that defaults to the default platform for the host. GDBProcessCommunicationServer::LaunchProcess () now uses the platform to launch the process. lldb-gdbserver now takes an optional --platform={platform_plugin_name} or -p {platform_plugin_name} command line option. If no platform is specified, the default platform for the host is used; otherwise, if the platform_plugin_name matches a registered platform plugin or matches the default platform's name (which is not necessarily registered by name in the case of 'host'), that platform is used. If the platform name cannot be resolved, lldb-gdbserver exits after printing all the available platform plugin names and the default platform plugin name. llvm-svn: 200266
* Merging the iohandler branch back into main. Greg Clayton2014-01-272-30/+0
| | | | | | | | | | | | The many many benefits include: 1 - Input/Output/Error streams are now handled as real streams not a push style input 2 - auto completion in python embedded interpreter 3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use 4 - it is now possible to use curses to drive LLDB (please try the "gui" command) We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases. llvm-svn: 200263
* Change DecodeProcessInfoResponse to set the ProcessInfo's architecture Jason Molenda2014-01-271-0/+31
| | | | | | | | | if the remote stub provided enough information to identify it in the qProcessInfo packet response. (e.g. for an Apple device where we know it is Mach-O, the cpu type & cpu sub type). <rdar://problem/15847901> llvm-svn: 200253
* convert gdb-remote 'A' launch to use LaunchProcess ()Todd Fiala2014-01-271-1/+4
| | | | | | | | | | | | This change modifies the 'A' command handler's launch code to launch with LaunchProcess (). The net effect is that the default process monitoring that LaunchProcess () adds will kick in, allowing the GDBRemoteCommunicationServer to be able to reap processes started with this facility correctly. Later, in the case of lldb-gdbserver, we'll also have the proper process monitoring going on to really debug the inferior process. llvm-svn: 200246
* Support for debugging against a remote stock gdbserver.Steve Pucci2014-01-253-3/+189
| | | | | | | | | | There are a couple of pieces: * some lazy-evaluation members that store info listed in a qSupported response * new method SendPacketsAndConcatenateResponses which is used for fetching fixed-size objects from the remote gdbserver by using multiple packets if necessary (first use will be to fetch shared-library XML files). llvm-svn: 200072
* Initialize the named_pipe_path in ↵Jason Molenda2014-01-251-7/+1
| | | | | | | | | | GDBRemoteCommunication::StartDebugserverProcess right after the space for it is allocated on the stack, instead of trying to initialize it in all the different places in this method. It's too easy for another uninitialized code path to sneak in as it is written right now. llvm-svn: 200066
* Terminate an unused char* buffer correctly so we don't try to openJason Molenda2014-01-241-0/+1
| | | | | | | | it later in GDBRemoteCommunication::StartDebugserverProcess and report an error. <rdar://problem/15820813> llvm-svn: 200047
* Added reaper for commandline-launched processes.Todd Fiala2014-01-242-11/+83
| | | | | | | | | | | | | | | | | | GDBRemoteCommunicationServer::LaunchProcess () now uses the built-up ProcessLaunchArgs rather than clearing and setting items from the function arguments. I added setters for the arguments and launch flags, which lldb-gdbserver uses for its specification of the commandline-specified startup app (if one is specified). LaunchProcess () also adds a new reaper monitor that it applies to the launched process if no process monitor has already been applied. This addresses an issue where the 'k' command would generate (possibly false) warnings about not being able to positively state whether a killed process actually terminated. GDBRemoteCommunicationServer now definitely knows the disposition of its children. llvm-svn: 199959
* Move process launching into GDBRemoteCommunicationServer.Todd Fiala2014-01-232-31/+161
| | | | | | | | | | | | | | | | | | lldb-gdbserver was launching the commandline-specified launch process directly, without GDBRemoteCommunicationServer knowing anything about it. As GDBRemoteCommunicationServer is the piece that manages and knows about processes that the gdb remote protocol discusses with the client end, it is important that it know about launched processes. This change also implements the k gdb remote protocol message, having it kill all known spawned processes when it is received. (Note: in lldb-gdbserver, the spawned processes are not properly monitored yet. The response to the k packet will complain that spawned processes do not really appear to be getting killed even if they are. This will get addressed soon.) llvm-svn: 199945
* Added distribution info to ArchSpec and qHostInfo message.Todd Fiala2014-01-182-1/+19
| | | | | | | | | | | | | | | | | | | ArchSpec now contains an optional distribution_id, with getters and setters. Host::GetArchitecture () sets it on non-Apple platforms using Host::GetDistributionId (). The distribution_id is ignored during ArchSpec comparisons. The gdb remote qHostInfo message transmits it, if set, via the distribution_id={id-value} key/value pair. Updated gdb remote docs to reflect this change. As before, GetDistributionId () returns nothing on non-Linux platforms at this time. On Linux, it is returned only if the lsb_platform command is installed (in /bin or /usr/bin), and only if the distributor id key is returned by 'lsb_platform -i'. This id is lowercased, and whitespace is replaced with underscores. llvm-svn: 199539
* Test new committer permission with one-line trailing whitespace removal.Steve Pucci2014-01-161-1/+1
| | | | llvm-svn: 199432
* Fix return type for WindowsDeepak Panickal2014-01-141-2/+1
| | | | llvm-svn: 199202
* Fixed the Visual Studio Windows buildDeepak Panickal2014-01-131-0/+4
| | | | llvm-svn: 199111
* Revert to getting a random port and sending that down to debugserver for ↵Greg Clayton2014-01-104-37/+100
| | | | | | | | iOS. The sandboxing is not letting debugserver reverse connect back to lldb. <rdar://problem/15789865> llvm-svn: 198963
* Fixes a bug preventing reading of the python register file.Todd Fiala2014-01-081-0/+4
| | | | | | | | | | This change fixes a bug recently introduced in ProcessGDBRemote that prevented the Python register definition file from getting loaded when the qRegisterInfo0 response returned $00#. Patch by Steve Pucci. llvm-svn: 198742
* Remove wait_for_launch parameter from DoAttachToProcessWithName(). This ↵Jean-Daniel Dupas2013-12-232-3/+2
| | | | | | | | | | parameter is redundant as this information is already provided by the ProcessAttachInfo parameter. CC: lldb-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2463 llvm-svn: 197923
* Any time ProcessGDBRemote tries to get the remote's ProcessArchitecture,Jason Molenda2013-12-211-5/+20
| | | | | | | | | | it needs to fall back to using the HostArchitecture if a valid one is not returned. When doing low-level system debugging we may not have a process (or the remote stub may not support the qProcessInfo packet) in which case we should fall back to the architecture we determined via qHostInfo. <rdar://problem/15713180> llvm-svn: 197857
* Workaround QEMU GDB server issue. Ed Maste2013-12-181-0/+8
| | | | | | | | | During testing I observed QEMU send "$T02thread:01;#04" upon connection, before any command from LLDB. This change from gclayton accepts (and discards) a packet immediately after sending the initial ack, to flush the GDB remote pipeline. llvm-svn: 197579
* Fix a bug introduced in asynchronous packet sends. We were not setting the ↵Jim Ingham2013-12-182-6/+10
| | | | | | | | | | packet result, and so it looked like the async packet send always failed. <rdar://problem/15657157> llvm-svn: 197543
* Centralized the launching of a process into Target::Launch()Greg Clayton2013-12-131-1/+1
| | | | | | | | | | | | | While investigating test suite failures when running the test suite remotely, I noticed we had 3 copies of code that launched a process: 1 - in "process launch" command 2 - SBTarget::Launch() with args 3 - SBTarget::Launch() with SBLaunchInfo "process launch" was launching through the platform if it was supported (this is needed for remote debugging) and the 2 and 3 were not. Now all code is in one place. llvm-svn: 197247
* <rdar://problem/15639995>Han Ming Ong2013-12-121-4/+0
| | | | | | debugserver's launch info was cleared unnecessarily. It has important user ID set. Reviewed by Greg Clayton. llvm-svn: 197182
OpenPOWER on IntegriCloud