#
1681092f |
| 27-Feb-2014 |
Greg Clayton <gclayton@apple.com> |
Remove an assertion that was being hit due to slow DNS name lookups on MacOSX for "localhost".
Changed all "localhost" to "127.0.0.1" to prevent potentially long name lookups.
<rdar://problem/1615
Remove an assertion that was being hit due to slow DNS name lookups on MacOSX for "localhost".
Changed all "localhost" to "127.0.0.1" to prevent potentially long name lookups.
<rdar://problem/16154630>
llvm-svn: 202424
show more ...
|
#
b8b49ec9 |
| 28-Jan-2014 |
Todd Fiala <tfiala@google.com> |
Modified GDBProcessCommunicationServer to launch via the platform.
GDBProcessCommunicationServer now optionally takes a PlatformSP that defaults to the default platform for the host. GDBProcessCommu
Modified GDBProcessCommunicationServer to launch via the platform.
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
show more ...
|
#
9f377373 |
| 27-Jan-2014 |
Todd Fiala <tfiala@google.com> |
convert gdb-remote 'A' launch to use LaunchProcess ()
This change modifies the 'A' command handler's launch code to launch with LaunchProcess (). The net effect is that the default process monitorin
convert gdb-remote 'A' launch to use LaunchProcess ()
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
show more ...
|
#
3e92a2b0 |
| 24-Jan-2014 |
Todd Fiala <tfiala@google.com> |
Added reaper for commandline-launched processes.
GDBRemoteCommunicationServer::LaunchProcess () now uses the built-up ProcessLaunchArgs rather than clearing and setting items from the function argum
Added reaper for commandline-launched processes.
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
show more ...
|
#
403edc5c |
| 23-Jan-2014 |
Todd Fiala <tfiala@google.com> |
Move process launching into GDBRemoteCommunicationServer.
lldb-gdbserver was launching the commandline-specified launch process directly, without GDBRemoteCommunicationServer knowing anything about
Move process launching into GDBRemoteCommunicationServer.
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
show more ...
|
#
a9ddb0e1 |
| 18-Jan-2014 |
Todd Fiala <tfiala@google.com> |
Added distribution info to ArchSpec and qHostInfo message.
ArchSpec now contains an optional distribution_id, with getters and setters. Host::GetArchitecture () sets it on non-Apple platforms using
Added distribution info to ArchSpec and qHostInfo message.
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
show more ...
|
#
263fde06 |
| 14-Jan-2014 |
Deepak Panickal <deepak@codeplay.com> |
Fix return type for Windows
llvm-svn: 199202
|
#
fda4fab5 |
| 10-Jan-2014 |
Greg Clayton <gclayton@apple.com> |
Revert to getting a random port and sending that down to debugserver for iOS. The sandboxing is not letting debugserver reverse connect back to lldb.
<rdar://problem/15789865>
llvm-svn: 198963
|
Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3 |
|
#
3dedae12 |
| 06-Dec-2013 |
Greg Clayton <gclayton@apple.com> |
Fixed the GDBRemoteCommuncation to return a new GDBRemoteCommuncation::PacketResult enum for all packet sends/receives.
<rdar://problem/15600045>
Due to other recent changes, all connections to GDB
Fixed the GDBRemoteCommuncation to return a new GDBRemoteCommuncation::PacketResult enum for all packet sends/receives.
<rdar://problem/15600045>
Due to other recent changes, all connections to GDB servers that didn't support the "QStartNoAckMode" packet would cause us to fail to attach to the remote GDB server.
The problem was that SendPacket* and WaitForResponse* packets would return a size_t indicating the number of bytes sent/received. The other issue was WaitForResponse* packets would strip the leading '$' and the trailing "#CC" (checksum) bytes, so the unimplemented response packet of "$#00" would get stripped and the WaitForResponse* packets would return 0.
These new error codes give us flexibility to to more intelligent things in response to what is returned.
llvm-svn: 196610
show more ...
|
#
00fe87b4 |
| 05-Dec-2013 |
Greg Clayton <gclayton@apple.com> |
Modified local spawning in debugserver processes to use a new --reverse-connect option so that debugserver actually connects back to LLDB instead of LLDB connecting to debugserver.
This gets rid of
Modified local spawning in debugserver processes to use a new --reverse-connect option so that debugserver actually connects back to LLDB instead of LLDB connecting to debugserver.
This gets rid of our hacky "get_random_port()" which would grab a random port and tell debugserver to open that port. Now LLDB creates, binds, listens and accepts a connection by binding to port zero and sending the correctly bound port down as the host:port to connect back to.
Fixed the "ConnectionFileDescriptor" to be able to correctly listen for connections from a specified host, localhost, or any host. Prior to this fix "listen://" only accepted the following format:
listen://<port>
But now it can accept:
listen://<port> // Listen for connection from localhost on port <port> listen://<host>:<port> // Listen for connection from <host> and <port> listen://*:<port> // Listen for connection from any host on port <port>
llvm-svn: 196547
show more ...
|
#
0fefa676 |
| 05-Dec-2013 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Extends StringExtractorGDBRemote to support debugger packets.
CC: lldb-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2337
llvm-svn: 196525
|
#
91a9b247 |
| 04-Dec-2013 |
Greg Clayton <gclayton@apple.com> |
Switch local launching of debugserver over to always use a FIFO in order to handshake with the launched debugserver.
This helps ensure that the launched debugserver is ready and listening for a conn
Switch local launching of debugserver over to always use a FIFO in order to handshake with the launched debugserver.
This helps ensure that the launched debugserver is ready and listening for a connection. Prior to this we had a race condition.
Consolidate the launching of debugserver into a single place: a static function in GDBRemoteCommunication.
llvm-svn: 196401
show more ...
|
Revision tags: llvmorg-3.4.0-rc2 |
|
#
909bb7a3 |
| 26-Nov-2013 |
Colin Riley <colin@codeplay.com> |
Fix MSVC build
Added _WIN32 guards to new platform features. Using correct SetErrorStringWithFormat within Host when LLDB_DISABLE_POSIX is defined. Also fixed an if defined block.
llvm-svn: 195766
|
#
2b98c569 |
| 22-Nov-2013 |
Greg Clayton <gclayton@apple.com> |
Fixed functions to always reply to packets and added a port offset.
Fixed a bunch of issues with many functions that were added for the platform host IO calls where they might not reply to the packe
Fixed functions to always reply to packets and added a port offset.
Fixed a bunch of issues with many functions that were added for the platform host IO calls where they might not reply to the packet if the packet was malformed.
Cleaned up error codes.
Added a port offset to allow for connections across a USB mux.
llvm-svn: 195485
show more ...
|
#
29b8fc4d |
| 21-Nov-2013 |
Greg Clayton <gclayton@apple.com> |
Added new options to lldb-platform: --gdbserver-port PORT --min-gdbserver-port PORT --max-gdbserver-port PORT The --gdbserver-port option can be specified multiple times to tell lldb
Added new options to lldb-platform: --gdbserver-port PORT --min-gdbserver-port PORT --max-gdbserver-port PORT The --gdbserver-port option can be specified multiple times to tell lldb-platform which ports it can use when launching child GDB server processes. The --min-gdbserver-port and --max-gdbserver-port options allow a range of ports to be specified for use when launching child GDB server processes.
Fixed the code to manage these ports correctly in GDBRemoteCommunicationServer.
Also changed GDBRemoteCommunicationClient to not set a port when sending the "qLaunchGDBServer" packet so that the remote lldb-platform can decide which ports to use. If the lldb-platform was launched with no --gdbserver-port or --min-gdbserver-port/--max-gdbserver-port options, then port 0 is always used and a unix socket is used between the lldb-platform and child GDB server process to coordinate the use of valid port.
llvm-svn: 195300
show more ...
|
#
fbb76349 |
| 20-Nov-2013 |
Greg Clayton <gclayton@apple.com> |
Expose SBPlatform through the public API.
Example code:
remote_platform = lldb.SBPlatform("remote-macosx"); remote_platform.SetWorkingDirectory("/private/tmp") debugger.SetSelectedPlatform(remote_
Expose SBPlatform through the public API.
Example code:
remote_platform = lldb.SBPlatform("remote-macosx"); remote_platform.SetWorkingDirectory("/private/tmp") debugger.SetSelectedPlatform(remote_platform)
connect_options = lldb.SBPlatformConnectOptions("connect://localhost:1111"); err = remote_platform.ConnectRemote(connect_options) if err.Success(): print >> result, 'Connected to remote platform:' print >> result, 'hostname: %s' % (remote_platform.GetHostname()) src = lldb.SBFileSpec("/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework", False) dst = lldb.SBFileSpec() # copy src to platform working directory since "dst" is empty err = remote_platform.Install(src, dst); if err.Success(): print >> result, '%s installed successfully' % (src) else: print >> result, 'error: failed to install "%s": %s' % (src, err)
Implemented many calls needed in lldb-platform to be able to install a directory that contains symlinks, file and directories.
The remote lldb-platform can now launch GDB servers on the remote system so that remote debugging can be spawned through the remote platform when connected to a remote platform.
The API in SBPlatform is subject to change and will be getting many new functions.
llvm-svn: 195273
show more ...
|
Revision tags: llvmorg-3.4.0-rc1 |
|
#
faa63ce2 |
| 28-Sep-2013 |
Sylvestre Ledru <sylvestre@debian.org> |
* Improve the wording (thanks to Ed Maste for the suggestion) * Add a TODO item
llvm-svn: 191620
|
#
d28b9937 |
| 28-Sep-2013 |
Sylvestre Ledru <sylvestre@debian.org> |
* mktemp is insecure as it always creates or uses insecure temporary file. Switch to mkstemp.
* Get and display the error message when an error occurs while creating the temporary file
llvm-svn: 19
* mktemp is insecure as it always creates or uses insecure temporary file. Switch to mkstemp.
* Get and display the error message when an error occurs while creating the temporary file
llvm-svn: 191616
show more ...
|
#
b027bd21 |
| 28-Sep-2013 |
Sylvestre Ledru <sylvestre@debian.org> |
Remove trailing spaces
llvm-svn: 191613
|
#
bb247fb5 |
| 27-Aug-2013 |
Daniel Malea <daniel.malea@intel.com> |
Fix 'platform shell' command for Linux host and remote lldb-platform connections - add default timeout of 10s (unil qPlatform_RunCommand supports timeout packets and CommandObjectPlatform is updated
Fix 'platform shell' command for Linux host and remote lldb-platform connections - add default timeout of 10s (unil qPlatform_RunCommand supports timeout packets and CommandObjectPlatform is updated to read a timeout flag/setting) - add a few tests for platform shell
llvm-svn: 189405
show more ...
|
#
338803fa |
| 27-Aug-2013 |
Michael Sartain <mikesart@valvesoftware.com> |
warning cleanup (use LLDB_INVALID_HOST_THREAD instead of NULL)
llvm-svn: 189393
|
#
ae12a364 |
| 27-Aug-2013 |
Virgile Bello <virgile.bello@gmail.com> |
Fix MinGW build after lldb-platform-work merge:
- mode_t is defined in <sys/types.h> - reorganized S_* user rights into win32.h - Use Host::Kill instead of kill - Currently #ifdef functions using pr
Fix MinGW build after lldb-platform-work merge:
- mode_t is defined in <sys/types.h> - reorganized S_* user rights into win32.h - Use Host::Kill instead of kill - Currently #ifdef functions using pread/pwrite.
llvm-svn: 189364
show more ...
|
#
e0f8f574 |
| 26-Aug-2013 |
Daniel Malea <daniel.malea@intel.com> |
merge lldb-platform-work branch (and assorted fixes) into trunk
Summary: This merge brings in the improved 'platform' command that knows how to interface with remote machines; that is, q
merge lldb-platform-work branch (and assorted fixes) into trunk
Summary: This merge brings in the improved 'platform' command that knows how to interface with remote machines; that is, query OS/kernel information, push and pull files, run shell commands, etc... and implementation for the new communication packets that back that interface, at least on Darwin based operating systems via the POSIXPlatform class. Linux support is coming soon.
Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS X Mountain Lion.
Additional improvements (not in the source SVN branch 'lldb-platform-work'): - cmake build scripts for lldb-platform - cleanup test suite - documentation stub for qPlatform_RunCommand - use log class instead of printf() directly - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely. - add new logging category 'platform'
Reviewers: Matt Kopec, Greg Clayton
Review: http://llvm-reviews.chandlerc.com/D1493
llvm-svn: 189295
show more ...
|
#
b2f1fb29 |
| 23-Aug-2013 |
Virgile Bello <virgile.bello@gmail.com> |
MingW compilation (windows). Includes various refactoring to improve portability.
llvm-svn: 189107
|
Revision tags: llvmorg-3.3.1-rc1 |
|
#
a297a97e |
| 19-Jun-2013 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Sort out a number of mismatched integer types in order to cut down the number of compiler warnings.
llvm-svn: 184333
|