summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
Commit message (Collapse)AuthorAgeFilesLines
...
* Set the signals based on the OS in the qHostInfo packetTamas Berghammer2015-03-041-1/+1
| | | | | | | | | | Setting it from the Target architecture cause problems when the target archiutecture is filled just by examining the executable because in that case the OS isn't set. Differential revision: http://reviews.llvm.org/D8035 llvm-svn: 231234
* Further reduce header footprint of Debugger.h.Zachary Turner2015-03-041-0/+2
| | | | llvm-svn: 231202
* Fix errors building on linux.Zachary Turner2015-03-031-0/+1
| | | | llvm-svn: 231169
* Further reduce the header footprint of Process.hZachary Turner2015-03-033-0/+3
| | | | | | | No functional change here, only deletes unnecessary headers and moves one function's body from the .h file to the .cpp. llvm-svn: 231145
* Fix FileSpec::GetPath to return null-terminated stringsIlia K2015-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this fix the FileSpec::GetPath() returned string which might be without '\0' at the end. It could have happened if the size of buffer for path was less than actual path. Test case: ``` FileSpec test("/path/to/file", false); char buf[]="!!!!!!"; test.GetPath(buf, 3); ``` Before fix: ``` 233 FileSpec test("/path/to/file", false); 234 char buf[]="!!!!!!"; 235 test.GetPath(buf, 3); 236 -> 237 if (core_file) 238 { 239 if (!core_file.Exists()) 240 { (lldb) print buf (char [7]) $0 = "/pa!!!" ``` After fix: ``` 233 FileSpec test("/path/to/file", false); 234 char buf[]="!!!!!!"; 235 test.GetPath(buf, 3); 236 -> 237 if (core_file) 238 { 239 if (!core_file.Exists()) 240 { (lldb) print buf (char [7]) $0 = "/p" ``` Reviewers: zturner, abidh, clayborg Reviewed By: abidh, clayborg Subscribers: tberghammer, vharron, lldb-commits, clayborg, zturner, abidh Differential Revision: http://reviews.llvm.org/D7553 llvm-svn: 230787
* Increase default packet timeout for android to 20sTamas Berghammer2015-02-261-0/+9
| | | | | | Differential revision: http://reviews.llvm.org/D7853 llvm-svn: 230626
* Add qModuleInfo request in order to get module information (uuid, triple,..) ↵Oleksiy Vyalov2015-02-254-1/+96
| | | | | | | | by module path from remote platform. http://reviews.llvm.org/D7709 llvm-svn: 230556
* Fix logging in GDBRemoteCommunicationServerPlatform.Oleksiy Vyalov2015-02-251-3/+3
| | | | llvm-svn: 230418
* Fix qLaunchGDBServer packet parsing in GDBRemoteCommunicationServerPlatform.Oleksiy Vyalov2015-02-241-2/+2
| | | | llvm-svn: 230390
* Create ScopedTimeout class for GDBRemoteCommunicationTamas Berghammer2015-02-244-27/+48
| | | | | | | | | | This new class makes it easier to change the timeout of a GDBRemoteCommunication instance for a short time and then restore it to its original value. Differential revision: http://reviews.llvm.org/D7826 llvm-svn: 230319
* Fix the communication in qPlatform_[mkdir,chmod]Tamas Berghammer2015-02-232-19/+25
| | | | | | | | | | | | With the previous implementation the protocol used by the client and the server for the response was different and worked only by an accident. With this change the communication is fixed and the return code from mkdir and chmod correctly captured by lldb. The change also add documentation for the qPlatform__[mkdir,chmod] packages. Differential revision: http://reviews.llvm.org/D7786 llvm-svn: 230213
* Prevent LLGS from crashing when exiting - make NativeProcessLinux to wait ↵Oleksiy Vyalov2015-02-191-0/+7
| | | | | | | | until ThreadStateCoordinator is fully stopped before entering ~NativeProcessLinux. http://reviews.llvm.org/D7692 llvm-svn: 229875
* Fix warning that not all control-paths return from function.Zachary Turner2015-02-181-1/+1
| | | | llvm-svn: 229718
* 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
* 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
* Fix small assignment mistake.Chaoren Lin2015-02-171-2/+2
| | | | llvm-svn: 229503
* 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 windows build (broken by r228823)Tamas Berghammer2015-02-111-0/+3
| | | | llvm-svn: 228828
* Separate monolithic GDBRemoteCommunicationServer class into 4 partTamas Berghammer2015-02-1114-4945/+4957
| | | | | | | | | | | GDBRemoteCommunicationServer: Basic packet handling, handler registration LLDBCommonPacketHandler: Common packet handling for lldb-platform and lldb-gdbserver LLDBPlatformPacketHandler: lldb-platform specific packet handling LLGSPacketHandler: lldb-gdbserver specific packet handling Differential Revision: http://reviews.llvm.org/D7538 llvm-svn: 228823
* Fix 'process launch -i' for remote processesVince Harron2015-02-101-22/+28
| | | | | | | | | | | | | | | | | | We want to forward stdin when stdio is not disabled and when we're not redirecting stdin from a file. renamed m_stdio_disable to m_stdin_forward and inverted value because that's what we want to remember. There was previously a bug that if you redirected stdin from a file, stdout and stderr would also be redirected to /dev/null Adds support for remote target to TestProcessIO.py Fixes ProcessIOTestCase.test_stdin_redirection_with_dwarf for remote Linux targets llvm-svn: 228744
* Make lldb-platform to clear m_process_launch_info when hanlding qProcessInfo ↵Oleksiy Vyalov2015-02-061-0/+1
| | | | | | request - otherwise subsequent process launches will reuse data from previous launch. llvm-svn: 228430
* Add support for SBProcess::PutSTDIN to remote processesVince Harron2015-02-065-0/+84
| | | | | | | | | | | | | | Processes running on a remote target can already send $O messages to send stdout but there is no way to send stdin to a remote inferior. This allows processes using the API to pump stdin into a remote inferior process. It fixes a hang in TestProcessIO.py when running against a remote target. llvm-svn: 228419
* Fix warning about the use of mktemp and make platform agnostic by adding and ↵Oleksiy Vyalov2015-02-051-25/+11
| | | | | | | | using PipeBase::CreateWithUniqueName - on behalf of flackr. http://reviews.llvm.org/D7348 llvm-svn: 228307
* Extend SBPlatform with capability to launch/terminate a process remotely. ↵Oleksiy Vyalov2015-02-043-31/+42
| | | | | | | | Integrate this change into test framework in order to spawn processes on a remote target. http://reviews.llvm.org/D7263 llvm-svn: 228230
* Fix TestThreadStepOut on Linux with LLGSChaoren Lin2015-02-031-4/+0
| | | | | | | | Remove implicit stop action on $vCont package for threads where no explicit action or default action specified based on the specification (they have to stay in there original state). llvm-svn: 227933
* Add missing switch cases to silence warnings.Chaoren Lin2015-02-033-9/+13
| | | | llvm-svn: 227931
* Implement setting and clearing watchpoints.Chaoren Lin2015-02-035-70/+156
| | | | llvm-svn: 227930
* Moving header files from source/Host/common to proper location.Chaoren Lin2015-02-032-4/+4
| | | | llvm-svn: 227929
* Share crash information between LLGS and local POSIX debugging withChaoren Lin2015-02-032-33/+37
| | | | | | | CrashReason class. Deliver crash information from LLGS to lldb via description field of thread stop packet. llvm-svn: 227926
* Added support for writing registers larger than 64 bitsChaoren Lin2015-02-031-5/+9
| | | | llvm-svn: 227919
* Launch lldb-gdbserver in same process group when launched remotely using ↵Oleksiy Vyalov2015-01-283-4/+13
| | | | | | | | lldb-platform - commit on behalf of flackr. http://reviews.llvm.org/D7211 llvm-svn: 227329
* Fixing TestRegisters on Linux with LLGSVince Harron2015-01-231-5/+5
| | | | | | | | | | | | | | This patch fixes TestRegisters on Linux with LLGS Introduce GetUserRegisterCount on RegisterInfoInterface to distinguish lldb internal registers (e.g.: DR0-DR7) during register counting. Update GDBRemoteCommunicationServer to skip lldb internal registers on read/write register and on discover register. Submitted for Tamas Berghammer llvm-svn: 226959
* This patch gets remote-linux platform able to run processesVince Harron2015-01-214-4/+21
| | | | | | | | | | | | | | | | Make sure the selected platform is always used Make sure that the host uses the connect://hostname to connect to both the lldb-platform and the lldb-gdbserver rather than what the platform reports as the hostname of the lldb-gdbserver Make sure that lldb-platform uses the IP address on it's connection back to the host instead of the hostname that the host sends to it when launching lldb-gdbserver with the remote host information Tested on OSX and Linux llvm-svn: 226712
* Moved Args::StringToXIntYZ to StringConvert::ToXIntYZVince Harron2015-01-154-44/+48
| | | | | | | | | | The refactor was motivated by some comments that Greg made http://reviews.llvm.org/D6918 and also to break a dependency cascade that caused functions linking in string->int conversion functions to pull in most of lldb llvm-svn: 226199
* Extend PipePosix with support for named pipes/timeout-based IO and integrate ↵Oleksiy Vyalov2015-01-141-3/+2
| | | | | | | | it with GDBRemoteCommunication / lldb-gdbserver - include reviews fixes. http://reviews.llvm.org/D6954 llvm-svn: 225923
* Extend PipePosix with support for named pipes/timeout-based IO and integrate ↵Oleksiy Vyalov2015-01-131-18/+36
| | | | | | | | it with GDBRemoteCommunication / lldb-gdbserver. http://reviews.llvm.org/D6954 llvm-svn: 225849
* Add D request handler to GDBRemoteCommunicationServer in order to support ↵Oleksiy Vyalov2014-12-102-1/+73
| | | | | | detach from inferior. llvm-svn: 223901
* Add Linux support for HostInfo::GetOSBuildString and ↵Oleksiy Vyalov2014-12-091-2/+0
| | | | | | HostInfo::GetOSKernelDescription. llvm-svn: 223737
* Revert "Use timeout when reading debugserver's port from a named pipe."Zachary Turner2014-12-041-55/+12
| | | | | | | | | | This reverts commit 4a5ad2c077166cc3d6e7ab4cc6e3dcbbe922af86. Windows doesn't support select() for pipe objects, and this also fails to compile on Windows. Reverting this until we can get it sorted out to keep the windows build working. llvm-svn: 223392
* Use timeout when reading debugserver's port from a named pipe.Oleksiy Vyalov2014-12-031-12/+55
| | | | | | http://reviews.llvm.org/D6490 llvm-svn: 223251
* for Oleksiy Vyalov - Redirect stdin, stdout and stderr to /dev/null when ↵Shawn Best2014-11-051-2/+6
| | | | | | launching LLGS process. Differential Revision: http://reviews.llvm.org/D6105 llvm-svn: 221324
* Fix one more [-Werror,-Winconsistent-missing-override] error.Eric Christopher2014-11-041-1/+1
| | | | llvm-svn: 221232
* Fix a bunch of [-Werror,-Winconsistent-missing-override] errors.Eric Christopher2014-11-041-42/+42
| | | | llvm-svn: 221231
* The change previously committed as 220983 broke large binary memory reads. I ↵Greg Clayton2014-11-031-58/+55
| | | | | | | | | | kept the "idx - 1" fix from 220983, but reverted the while loop that was incorrectly added. The details are: large packets (like large memory reads (m packets) or large binary memory reads (x packet)) can get responses that come in across multiple read() calls. The while loop that was added meant that if only a partial packet came in (like only "$abc" coming for a response) GDBRemoteCommunication::CheckForPacket() was called, it would deadlock in the while loop because no more data is going to come in as this function needs to be called again with more data from another read. So the original fix will need to be corrected and resubmitted. <rdar://problem/18853744> llvm-svn: 221181
* commit on behalf of Oleksiy Vyalov Fix junk content handling within ↵Shawn Best2014-10-311-55/+58
| | | | | | GDBRemoteCOmmunication::CheckForPacket 1. Avoid removing of an extra symbol from m_bytes. 2. iterate over m_bytes until useful content is found. Differential Revision: http://reviews.llvm.org/D6042 llvm-svn: 220983
* llgs: fixes to PTY/gdb-remote inferior stdout/stderr handling, logging addtions.Todd Fiala2014-10-113-21/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, both local-process llgs and remote-target llgs stdout/stderr handling from inferior work correctly. Several log lines have been added around PTY and stdout/stderr redirection logic on the lldb client side. Regarding remote llgs execution, see the following: With these changes, remote llgs with $O now works properly: $ lldb (lldb) platform select remote-linux (lldb) target create ~/some/inferior/exe (lldb) gdb-remote {some-target}:{port} (lldb) run The sequence above will correctly redirect stdout/stderr over gdb-remote $O, as is needed for remote debugging. That sequence assumes there is a lldb-gdbserver exe running on the target with {some-host}:{port}. You can replace the gdb-remote command with a '(lldb) platform connect connect://{target-ip}:{target-port}'. If you do this and have a lldb-platform running on the remote end, it will go ahead and launch llgs for lldb for each target instance that is run/attached. For local debugging with llgs, the following sequence also works, and uses local PTYs instead to avoid $O and extra gdb-remote messages: $ lldb (lldb) settings set platform.plugin.linux.use-llgs true (lldb) target create ~/some/inferior/exe (lldb) run The above will run the inferior using llgs on the local host, and will use PTYs rather than $O redirection. This change also removes the logging that happened after the fork but before the exec when llgs is launching a new inferior process. Some aspect of the file handling during that portion of code would not do the right thing with log handling. We might want to go back later and have that communicate over a pipe from the child to parent to pass along any messages that previously were logged in that section of code. llvm-svn: 219578
* Added a bit of logging around ↵Todd Fiala2014-10-091-0/+5
| | | | | | GDBRemoteCommunicationClient::SendGDBStoppointTypePacket. llvm-svn: 219374
* Move ConnectionFileDescriptor to platform-specific Host directory.Zachary Turner2014-10-064-4/+4
| | | | | | | | | | | | As part of getting ConnectionFileDescriptor working on Windows, there is going to be alot of platform specific work to be done. As a result, the implementation is moving into Host. This patch performs the code move and fixes up call-sites appropriately. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5548 llvm-svn: 219143
* Enable llgs to build against experimental Android AOSP ↵Todd Fiala2014-09-271-1/+0
| | | | | | | | | | | | lldb/llvm/clang/compiler-rt repos. See http://reviews.llvm.org/D5495 for more details. These are changes that are part of an effort to support building llgs, within the AOSP source tree, using the Android.mk build system, when using the llvm/clang/lldb git repos from AOSP replaced with the experimental ones currently in github.com/tfiala/aosp-{llvm,clang,lldb,compiler-rt}. llvm-svn: 218568
OpenPOWER on IntegriCloud