aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2022-09-27 20:04:10 +0200
committerPavel Labath <pavel@labath.sk>2022-10-06 17:18:51 +0200
commit8d1de7b34af46a089eb5433c700419ad9b2923ee (patch)
tree4ba7c2f22668cfa698f48fc3a7602b06652dbf0f /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
parent561443818a15e7b368ddbb58207a14c60ba55c58 (diff)
downloadllvm-8d1de7b34af46a089eb5433c700419ad9b2923ee.zip
llvm-8d1de7b34af46a089eb5433c700419ad9b2923ee.tar.gz
llvm-8d1de7b34af46a089eb5433c700419ad9b2923ee.tar.bz2
[lldb/gdb-server] Better reporting of launch errors
Use our "rich error" facility to propagate error reported by the stub to the user. lldb-server reports rich launch errors as of D133352. To make this easier to implement, and reduce code duplication, I have moved the vRun/A/qLaunchSuccess handling into a single GDBRemoteCommunicationClient function. Differential Revision: https://reviews.llvm.org/D134754
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
index da060cd..c5911b9 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
@@ -80,8 +80,6 @@ public:
lldb::pid_t GetCurrentProcessID(bool allow_lazy = true);
- bool GetLaunchSuccess(std::string &error_str);
-
bool LaunchGDBServer(const char *remote_accept_hostname, lldb::pid_t &pid,
uint16_t &port, std::string &socket_name);
@@ -90,19 +88,11 @@ public:
bool KillSpawnedProcess(lldb::pid_t pid);
- /// Sends a GDB remote protocol 'A' packet that delivers program
- /// arguments to the remote server.
- ///
- /// \param[in] launch_info
- /// A NULL terminated array of const C strings to use as the
- /// arguments.
+ /// Launch the process using the provided arguments.
///
- /// \return
- /// Zero if the response was "OK", a positive value if the
- /// the response was "Exx" where xx are two hex digits, or
- /// -1 if the call is unsupported or any other unexpected
- /// response was received.
- int SendArgumentsPacket(const ProcessLaunchInfo &launch_info);
+ /// \param[in] args
+ /// A list of program arguments. The first entry is the program being run.
+ llvm::Error LaunchProcess(const Args &args);
/// Sends a "QEnvironment:NAME=VALUE" packet that will build up the
/// environment that will get used when launching an application