summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-server
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix linking of lldb-server with BUILD_SHARED_LIBSPavel Labath2016-01-291-16/+11
| | | | | | | | | | | | | | | | | | | | Summary: The BUILD_SHARED_LIBS branch of lldb-server link flags was hopelessly broken, at least since we started restricting the symbols exported by liblldb. lldb-server depends on symbols from the lldb_private namespace, so it cannot link to the public interface of liblldb. Instead I make it link to the individual libraries constituting liblldb, just like it does in the !BUILD_SHARED_LIBS case. This does not make the BUILD_SHARED_LIBS build of lldb fully functional yet, due to the way liblldb dependencies are managed, but it's a step in that direction. Reviewers: zturner, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16678 llvm-svn: 259188
* Remove autoconf support from source directories.Eugene Zelenko2016-01-281-25/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* 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
* Add more autotools/gmake NetBSD glueBruce Mitchener2015-11-151-1/+1
| | | | | | | | | | | | | | Summary: This diff approaches building the project natively on NetBSD with the autoconf/gmake framework. Patch by Kamil Rytarowski. Thanks! Reviewers: emaste, clayborg Subscribers: tberghammer, joerg, brucem, lldb-commits Differential Revision: http://reviews.llvm.org/D14531 llvm-svn: 253153
* Make lldb-gdbserver to take explicit socket scheme as command line argument.Oleksiy Vyalov2015-10-283-2/+24
| | | | | | http://reviews.llvm.org/D14126 llvm-svn: 251547
* Add Socket::Create factory method which uses socket protocol to find an ↵Oleksiy Vyalov2015-10-272-21/+77
| | | | | | | | appropriate implementation class. http://reviews.llvm.org/D14085 llvm-svn: 251417
* Add initial CMake glue for the NetBSD platformBruce Mitchener2015-10-241-0/+7
| | | | | | | | | | | | | | | | | 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 lldb-server - write null terminating symbol along with port number.Oleksiy Vyalov2015-10-211-1/+1
| | | | llvm-svn: 250953
* Add domain socket support to gdb-remote protocol and lldb-server.Oleksiy Vyalov2015-10-215-159/+234
| | | | | | 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 handling of LLDB_VERS_GENERATED_FILE.Bruce Mitchener2015-10-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is Darwin only. The symbol defined by ${LLDB_VERS_GENERATED_FILE} is used by source/lldb.cpp, so anything that uses lldb.cpp (which is in lldbBase) should also have the generated symbol. This means that the entire process can be centralized within source/CMakeLists.txt where lldbBase is constructed. Additionally, the custom command should have dependencies on the project file as well as the generation script so that if either changes, the version file is correctly re-generated and everything is re-linked appropriately. * cmake/LLDBDependencies.cmake: Remove everything related to the generated version file from here. * source/CMakeLists.txt: On Darwin, add the generated version file to the sources that make up lldbBase. Also, create a custom target and make lldbBase depend on it to re-generate the generated file as needed. * source/API/CMakeLists.txt: Don't need to build the generated version file here or use it to control linking against swig_wrapper. * tools/lldb-server/CMakeLists.txt: Likewise. Reviewers: dawn, sas, clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13552 llvm-svn: 249806
* [cmake] Fix cmake build on OSX after r249434.Dawn Perchik2015-10-081-0/+5
| | | | | | | | Reviewed by: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13535 llvm-svn: 249684
* Include platform agnostic <HostGetOpt.h> in the place of <getopt.h>Bruce Mitchener2015-10-011-1/+1
| | | | | | | | | | | | | | Summary: Problem caught on NetBSD with missing getopt_long_only(3). Change by Kamil Rytarowski <n54@gmx.com> Reviewers: joerg, brucem Subscribers: brucem, lldb-commits Differential Revision: http://reviews.llvm.org/D12748 llvm-svn: 248990
* [lldb-server] No need to add pthread twice.Daniel Sanders2015-09-211-3/+0
| | | | | | | | | | | | | | Summary: Following on from r247991: pthread is in LLDB_SYSTEM_LIBS so there's no need to explicitly add it to the link. Reviewers: labath Subscribers: lldb-commits, labath, krytarowski Differential Revision: http://reviews.llvm.org/D12964 llvm-svn: 248177
* Fix link failures when BUILD_SHARED_LIBS=ON.Pavel Labath2015-09-181-0/+1
| | | | | | | | | | | | patch by Daniel Sanders. Reviewers: labath, krytarowski Subscribers: krytarowski, labath, lldb-commits Differential Revision: http://reviews.llvm.org/D12900 llvm-svn: 247991
* Fix crash in lldb-server caused by an API change in LLVMTamas Berghammer2015-09-101-1/+1
| | | | llvm-svn: 247267
* Only export public symbols with the cmake build.Bruce Mitchener2015-09-041-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This also moves the xcode support files to be near or the same as the ones used for cmake. The source/API/liblldb.xcodes.exports differs from the source/API/liblldb.exports in that one contains the actual symbol names (_ prefixed) while the other contains the symbol names as they are in the code. The liblldb.exports file is preprocessed by the cmake scripts into the correct per-platform file needed (like a linker script on Linux). This is not enabled on Windows as Windows doesn't use the same name mangling and so it won't be valid there. Also, this is handled already in a different way on Windows (via dll exports). Reviewers: emaste, clayborg, labath, chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12599 llvm-svn: 246822
* [cmake] Remove LLVM_NO_RTTI.Bruce Mitchener2015-09-031-2/+0
| | | | | | | | | | | | | | Summary: This doesn't exist in other LLVM projects any longer and doesn't do anything. Reviewers: chaoren, labath Subscribers: emaste, tberghammer, lldb-commits, danalbert Differential Revision: http://reviews.llvm.org/D12586 llvm-svn: 246749
* Fix liblldb linking on RHEL 6 (bug #24140)Pavel Labath2015-07-171-1/+1
| | | | | | Patch by Eugene Zelenko. llvm-svn: 242525
* 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-132-62/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add -lpthread to LLDB shared lib link line unconditionallyKeno Fischer2015-06-291-1/+1
| | | | | | | | | | | Usually -lpthread is included due to LLVM link options, but when LLVM threading is disabled, this does not happen. pthread is still needed however because LLDB uses threading regardless of whether LLVM is built with threading support or not. Differential Revision: http://reviews.llvm.org/D5431 llvm-svn: 241006
* fix lldb-server linking on RHEL 6 (bug #23774)Pavel Labath2015-06-291-1/+3
| | | | | | Patch by: Eugene Zelenko llvm-svn: 240933
* Don't link ObjCARCOpts twice. Fixes PR22543Keno Fischer2015-06-181-1/+1
| | | | | | | | ObjCARCOpts is already included by ClangCodeGen. Linking it again causes the error in PR22543. Differential Revision: http://reviews.llvm.org/D10399 llvm-svn: 240104
* Fix a variety of typos.Bruce Mitchener2015-06-181-2/+2
| | | | | | No functional change. llvm-svn: 239995
* [lldb] Enable building with Cmake/BUILD_SHARED_LIBSAndrew Wilkins2015-06-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Several changes to fix CMake builds of LLDB with the BUILD_SHARED_LIBS setting on. - Force all internal libraries to be built STATIC. - Add additional library dependencies (pthread, dl, runtimedyld). - modify finalisation of SWIG wrapper to symlink the "lib" dir into python/site-packages, so _lldb.so's RPATH resolves. Test Plan: Verified one test case with "dotest.py". Reviewers: sylvestre.ledru, zturner Reviewed By: zturner Subscribers: zturner, ted, tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D10157 llvm-svn: 239007
* 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-276-76/+128
| | | | | | | | | | 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
* Add support for ./dotest.py --channel and --log-successVince Harron2015-05-102-57/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: New dotest options that allow arbitrary log channels and categories to be enabled. Also enables logging for locally run debug servers. Log messages are separated into separate files per test case. (this makes it possible to log in dosep runs) These new log files are stored side-by-side with trace files in the session directory. These files are deleted by default if the test run is successful. If --log-success is specified, even successful logs are retained. --log-success is useful for creating reference log files. Test Plan: add '--channel "lldb all" --channel "gdb-remote packets" --log-success' to your dotest options Tested on OSX and Linux Differential Revision: http://reviews.llvm.org/D9594 llvm-svn: 236956
* PosixPipes should not be copyable but should be movable.Chaoren Lin2015-05-011-1/+1
| | | | | | | | | | | | | | Summary: This addresses Oleksiy's comment in D9307. Reviewers: clayborg, ovyalov Reviewed By: clayborg, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9405 llvm-svn: 236320
* lldb-gdbserver should not use unnamed pipes on Windows.Chaoren Lin2015-04-291-0/+4
| | | | llvm-svn: 236138
* Add file descriptor constructor for PipePosix.Chaoren Lin2015-04-291-5/+1
| | | | llvm-svn: 236133
* Add an unnamed pipe fail-safe to launching lldb-gdbserver.Chaoren Lin2015-04-271-14/+70
| | | | | | | | | | | | | | | | | | Summary: Currently, launching lldb-gdbserver from platform on Android requires root for mkfifo() and an explicit TMPDIR variable. This should remove both requirements. Test Plan: Successfully launched lldb-gdbserver on a non-rooted Android device. Reviewers: tberghammer, vharron, clayborg Reviewed By: clayborg Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9307 llvm-svn: 235940
* Use non-blocking waitpid in NativeProcessLinuxPavel Labath2015-04-171-0/+7
| | | | | | | | | | | | | | | | | | Summary: This is the first phase of the merging of Monitor and Operation threads in NativeProcessLinux (which is necessary since the two threads race inside Linux kernel). Here, I reimplement the Monitor thread do use non-blocking waitpid calls, which enables later addition of code from the operation thread. Test Plan: Ran the test suite a couple of times, no regressions detected. Reviewers: vharron, ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9048 llvm-svn: 235193
* Force the inclusion of the LLVMSupport lib. Otherwise, the build (might?) ↵Sylvestre Ledru2015-04-081-0/+2
| | | | | | fails with an undefined reference to 'llvm::llvm_is_multithreaded()' llvm-svn: 234407
* Rework LLDB system initialization.Zachary Turner2015-03-311-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an effort to reduce binary size for components not wishing to link against all of LLDB, as well as a parallel effort to reduce link dependencies on Python, this patch splits out the notion of LLDB initialization into "full" and "common" initialization. All code related to initializing the full LLDB suite lives directly in API now. Previously it was only referenced from API, but because it was defined in lldbCore, it would get implicitly linked against by everything including lldb-server, causing a considerable increase in binary size. By moving this to the API layer, it also creates a better layering for the ongoing effort to make the embedded interpreter replacable with one from a different language (or even be completely removeable). One semantic change necessary to get this all working was to remove the notion of a shared debugger refcount. The debugger is either initialized or uninitialized now, and calling Initialize() multiple times will simply have no effect, while the first Terminate() will now shut it down no matter how many times Initialize() was called. This behaves nicely with all of our supported usage patterns though, and allows us to fix a number of nasty hacks from before. Differential Revision: http://reviews.llvm.org/D8462 llvm-svn: 233758
* Move several plugin to its own namespaceTamas Berghammer2015-03-312-0/+2
| | | | | | | | | | | | | 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 initialization/shutdown to Initialization.Zachary Turner2015-03-191-2/+3
| | | | | | | | | | | | | | | | This creates a new top-level folder called Initialization which is intended to hold code specific to LLDB system initialization. Currently this holds the Initialize() and Terminate() functions, as well as the fatal error handler. This provides a means to break the massive dependency cycle which is caused by the fact that Debugger depends on Initialize and Terminate which then depends on the entire LLDB project. With this structure, it will be possible for applications to invoke lldb_private::Initialize() directly, and have that invoke Debugger::Initialize. llvm-svn: 232768
* Move lldb-log.cpp to core/Logging.cppZachary Turner2015-03-183-3/+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
* Initialize ProcessGDBRemoteLog for LLGS to fix remote platform loggingRobert Flack2015-03-111-19/+5
| | | | | | | | This was previously initialized by ProcessGDBRemote::Initialize but lldb-server does not contain ProcessGDBRemote anymore so this needs to be initialized directly. Differential Revision: http://reviews.llvm.org/D8186 llvm-svn: 231966
* Add Debugger::InitializeForLLGS to allow ref counted LLGS initialization.Robert Flack2015-03-101-4/+3
| | | | | | | | | | | | | | After http://reviews.llvm.org/D8133 landed as r231550 process launch on remote platform stopped working. This adds Debugger::InitializeForLLGS and tracks whether one or both of Initialize and InitializeForLLGS have been called, calling only the corresponding lldb_private::Terminate* methods as necessary. Since lldb_private::Terminate calls lldb_private::TerminateForLLGS, the latter method may be called twice if Initialize was called for both however the terminate methods ensure they are only called once after being initialized. This still maintains the reduced binary size, though it does now technically link in lldb_private::Terminate on lldb-server even though this should never be called. This should resolve the issue raised in http://reviews.llvm.org/D8133 where Debugger::Terminate assumed that there were 0 references to debugger and terminated early. Differential Revision: http://reviews.llvm.org/D8183 llvm-svn: 231808
* Initialize ProcessPOSIXLog by NativeProcessLinuxTamas Berghammer2015-03-061-5/+19
| | | | | | | | | | Previously it was initialized by ProcessLinux but lldb-server don't contain ProcessLinux anymore so it have to be initialized by NativeProcessLinux also. Differential revision: http://reviews.llvm.org/D8080 llvm-svn: 231482
* Rename test/tools/lldb-gdbserver to test/tools/lldb-serverRobert Flack2015-03-062-8/+8
| | | | | | | | 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-023-7/+19
| | | | | | | | | | 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
OpenPOWER on IntegriCloud