diff options
author | Greg Clayton <gclayton@apple.com> | 2011-07-17 20:36:25 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-07-17 20:36:25 +0000 |
commit | 3a29bdbe9b4217e47e0689a4c310ab198a4b71d5 (patch) | |
tree | 94d3cdc3e8308d44b512e6b894e0f5c06c5b2e0b /lldb/source/Target/Process.cpp | |
parent | 76d51c6c892bbde50582b23f29c31f1804c48aaf (diff) | |
download | bcm5719-llvm-3a29bdbe9b4217e47e0689a4c310ab198a4b71d5.tar.gz bcm5719-llvm-3a29bdbe9b4217e47e0689a4c310ab198a4b71d5.zip |
Added a boolean to the pure virtual lldb_private::Process::CanDebug(...)
method so process plug-ins that are requested by name can answer yes when
asked if they can debug a target that might not have any file in the target.
Modified the ConnectionFileDescriptor to have both a read and a write file
descriptor. This allows us to support UDP, and eventually will allow us to
support pipes. The ConnectionFileDescriptor class also has a file descriptor
type for each of the read and write file decriptors so we can use the correct
read/recv/recvfrom call when reading, or write/send/sendto for writing.
Finished up an initial implementation of UDP where you can use the "udp://"
URL to specify a host and port to connect to:
(lldb) process connect --plugin kdp-remote udp://host:41139
This will cause a ConnectionFileDescriptor to be created that can send UDP
packets to "host:41139", and it will also bind to a localhost port that can
be given out to receive the connectionless UDP reply.
Added the ability to get to the IPv4/IPv6 socket port number from a
ConnectionFileDescriptor instance if either file descriptor is a socket.
The ProcessKDP can now successfully connect to a remote kernel and detach
using the above "processs connect" command!!! So far we have the following
packets working:
KDP_CONNECT
KDP_DISCONNECT
KDP_HOSTINFO
KDP_VERSION
KDP_REATTACH
Now that the packets are working, adding new packets will go very quickly.
llvm-svn: 135363
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 756f9995080..857495d9e83 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -549,7 +549,7 @@ Process::FindPlugin (Target &target, const char *plugin_name, Listener &listener if (create_callback) { std::auto_ptr<Process> debugger_ap(create_callback(target, listener)); - if (debugger_ap->CanDebug(target)) + if (debugger_ap->CanDebug(target, true)) return debugger_ap.release(); } } @@ -558,7 +558,7 @@ Process::FindPlugin (Target &target, const char *plugin_name, Listener &listener for (uint32_t idx = 0; (create_callback = PluginManager::GetProcessCreateCallbackAtIndex(idx)) != NULL; ++idx) { std::auto_ptr<Process> debugger_ap(create_callback(target, listener)); - if (debugger_ap->CanDebug(target)) + if (debugger_ap->CanDebug(target, false)) return debugger_ap.release(); } } |