[Lldb-commits] [lldb] [lldb][NFC] Separated GDBRemoteCommunication::GetDebugserverPath() (PR #107388)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 5 15:31:32 PDT 2024
================
@@ -943,8 +935,20 @@ Status GDBRemoteCommunication::StartDebugserverProcess(
}
}
}
+ return debugserver_file_spec;
+}
- if (debugserver_exists) {
+Status GDBRemoteCommunication::StartDebugserverProcess(
+ const char *url, Platform *platform, ProcessLaunchInfo &launch_info,
+ uint16_t *port, const Args *inferior_args, shared_fd_t pass_comm_fd) {
+ Log *log = GetLog(GDBRLog::Process);
+ LLDB_LOGF(log, "GDBRemoteCommunication::%s(url=%s, port=%" PRIu16 ")",
+ __FUNCTION__, url ? url : "<empty>", port ? *port : uint16_t(0));
+
+ Status error;
+ FileSpec &debugserver_file_spec = launch_info.GetExecutableFile();
+ if (debugserver_file_spec = GetDebugserverPath(platform)) {
+ char debugserver_path[PATH_MAX];
----------------
JDevlieghere wrote:
Looks like we're immediately converting this to a `StringRef`. Since we're already touching this line, could we make this `std::string debugserver_path = debugserver_file_spec.GetPath()`?
https://github.com/llvm/llvm-project/pull/107388
More information about the lldb-commits
mailing list