aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-05-11 16:59:04 +0000
committerPavel Labath <labath@google.com>2016-05-11 16:59:04 +0000
commit998bdc5b7536bd2726f3017a7798f25890ee8bf7 (patch)
tree96039510ad9556fd8e02760f237f9cb2ff0bd460 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
parent465a5041e938ef1d3d319847d08ab950f1684fa5 (diff)
downloadllvm-998bdc5b7536bd2726f3017a7798f25890ee8bf7.zip
llvm-998bdc5b7536bd2726f3017a7798f25890ee8bf7.tar.gz
llvm-998bdc5b7536bd2726f3017a7798f25890ee8bf7.tar.bz2
Generalize child process monitoring functions
Summary: This replaces the C-style "void *" baton of the child process monitoring functions with a more C++-like API taking a std::function. The motivation for this was that it was very difficult to handle the ownership of the object passed into the callback function -- each caller ended up implementing his own way of doing it, some doing it better than others. With the new API, one can just pass a smart pointer into the callback and all of the lifetime management will be handled automatically. This has enabled me to simplify the rather complicated handshake in Host::RunShellCommand. I have left handling of MonitorDebugServerProcess (my original motivation for this change) to a separate commit to reduce the scope of this change. Reviewers: clayborg, zturner, emaste, krytarowski Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20106 llvm-svn: 269205
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
index b67eb49..54d77a5 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
@@ -405,11 +405,7 @@ protected:
AsyncThread (void *arg);
static bool
- MonitorDebugserverProcess (void *callback_baton,
- lldb::pid_t pid,
- bool exited,
- int signo,
- int exit_status);
+ MonitorDebugserverProcess(ProcessGDBRemote *process, lldb::pid_t pid, bool exited, int signo, int exit_status);
lldb::StateType
SetThreadStopInfo (StringExtractor& stop_packet);