summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-server/lldb-platform.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Modify "platform connect" to connect to processes as wellTamas Berghammer2015-12-081-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Make lldb-gdbserver to take explicit socket scheme as command line argument.Oleksiy Vyalov2015-10-281-1/+2
| | | | | | http://reviews.llvm.org/D14126 llvm-svn: 251547
* Add domain socket support to gdb-remote protocol and lldb-server.Oleksiy Vyalov2015-10-211-31/+31
| | | | | | http://reviews.llvm.org/D13881 llvm-svn: 250933
* Split Socket class into Tcp/Udp/DomainSocket subclasses.Oleksiy Vyalov2015-10-151-6/+10
| | | | | | http://reviews.llvm.org/D13754 llvm-svn: 250474
* Fix temp port file path generation in lldb-platform.Oleksiy Vyalov2015-07-141-6/+5
| | | | | | http://reviews.llvm.org/D11152 llvm-svn: 242182
* Introduce a MainLoop class and switch llgs to use itPavel Labath2015-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the first part of our effort to make llgs single threaded. Currently, llgs consists of about three threads and the synchronisation between them is a major source of latency when debugging linux and android applications. In order to be able to go single threaded, we must have the ability to listen for events from multiple sources (primarily, client commands coming over the network and debug events from the inferior) and perform necessary actions. For this reason I introduce the concept of a MainLoop. A main loop has the ability to register callback's which will be invoked upon receipt of certain events. MainLoopPosix has the ability to listen for file descriptors and signals. For the moment, I have merely made the GDBRemoteCommunicationServerLLGS class use MainLoop instead of waiting on the network socket directly, but the other threads still remain. In the followup patches I indend to migrate NativeProcessLinux to this class and remove the remaining threads. Reviewers: ovyalov, clayborg, amccarth, zturner, emaste Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D11066 llvm-svn: 242018
* Add --port-file flag to lldb-platform to store port number which platform is ↵Oleksiy Vyalov2015-07-061-3/+57
| | | | | | | | listening. http://reviews.llvm.org/D10886 llvm-svn: 241479
* Don't #include "lldb-python.h" from anywhere.Zachary Turner2015-05-291-2/+0
| | | | | | | | | | | | | Since interaction with the python interpreter is moving towards being more isolated, we won't be able to include this header from normal files anymore, all includes of it should be localized to the python library which will live under source/bindings/API/Python after a future patch. None of the files that were including this header actually depended on it anyway, so it was just a dead include in every single instance. llvm-svn: 238581
* Make log options uniform betwwen lldb-platform and lldb-gdbserverTamas Berghammer2015-05-271-32/+22
| | | | | | | | | | This change also get rid of an unused Debugger instance in GDBRemoteCommunicationServerLLGS and the command interpreter from lldb-platform what was used only for enabling logging. Differential revision: http://reviews.llvm.org/D9876 llvm-svn: 238319
* Print port number that lldb-server binds to in platform modeVince Harron2015-05-261-1/+1
| | | | | | | | | | | | | | | | If binding to port 0 is selected, the actual port is printed. This improves the reliability of platform startup by ensuring that a free port can be found. TEST PLAN ./lldb-server platform --listen *:0 Listening for a connection from <port-number>... Will appear on stdout (with other stuff potentially) llvm-svn: 238173
* Fix lldb-platform usage string.Chaoren Lin2015-05-211-1/+2
| | | | llvm-svn: 237966
* Move several plugin to its own namespaceTamas Berghammer2015-03-311-0/+1
| | | | | | | | | | | | | Affected paths: * Plugins/Platform/Android/* * Plugins/Platform/Linux/* * Plugins/Platform/gdb-server/* * Plugins/Process/Linux/* * Plugins/Process/gdb-remote/* Differential revision: http://reviews.llvm.org/D8654 llvm-svn: 233679
* Increate backlog of lldb-platform's listener socketVince Harron2015-03-311-1/+6
| | | | | | | | | | | | | | | lldb-platform's listener socket only had a backlog of one connection. That means that if more than one client connected simultaneously, the connection would be refused. The test suite can be run remotely with dozens of threads connecting simultaneously. Raised this limit to 100 to effectively eliminate lost connections. Test Plan: run tests against a remote target Differential Revision: http://reviews.llvm.org/D8696 llvm-svn: 233652
* Fix socket leak in lldb-server platformVince Harron2015-03-311-0/+4
| | | | | | | | | | | | | | lldb-server server process was holding on to a connection to every client that connected. This continued until the process hit it's file limit and exited. lldb-server p --listen *:5432 --server run remote tests against that server more than 1000 times Differential Revision: http://reviews.llvm.org/D8697 llvm-svn: 233651
* Allow multiple simultaneous connections to platform.Robert Flack2015-03-251-36/+63
| | | | | | | | | | | | | Adds the --server argument to lldb-server platform which when specified will allow multiple simultaneous connections by forking off to handle each individual connection. This will allow us to run the remote tests in parallel. Test Plan: Run: lldb-server platform --listen *:1234 --server Connect from multiple lldb clients simultaneously. I will also test running the test suite remotely with multiple simultaneous jobs. Differential Revision: http://reviews.llvm.org/D8452 llvm-svn: 233185
* Move lldb-log.cpp to core/Logging.cppZachary Turner2015-03-181-1/+0
| | | | | | | | | So that we don't have to update every single #include in the entire codebase to #include this new header (which used to get included by lldb-private-log.h, we automatically #include "Logging.h" from within "Log.h". llvm-svn: 232653
* Rename test/tools/lldb-gdbserver to test/tools/lldb-serverRobert Flack2015-03-061-2/+2
| | | | | | | | As requested in http://reviews.llvm.org/D7545 this change moves test/tools/lldb-gdbserver to test/tools/lldb-server ot match the name of the target being tested. Differential Revision: http://reviews.llvm.org/D8061 llvm-svn: 231479
* Reduce the number of components initialized by lldb-server to reduce static ↵Robert Flack2015-03-021-3/+0
| | | | | | | | | | binary size. Separate out the necessary component initialization for lldb-server such that the linker can greatly reduce the binary size. With this patch the size of lldb-server on my 64 bit linux release build drops from 46MB to 26MB. Differential Revision: http://reviews.llvm.org/D7880 llvm-svn: 230963
* Merge lldb-platform and lldb-gdbserver into a single binaryTamas Berghammer2015-02-181-0/+314
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
OpenPOWER on IntegriCloud