[Lldb-commits] [lldb] 32d35fb - [lldb] Remove unused argument (NFC)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 13 13:44:58 PDT 2020
Author: Jonas Devlieghere
Date: 2020-07-13T13:44:51-07:00
New Revision: 32d35fb74b2672ddf3674188423b71837afea8c4
URL: https://github.com/llvm/llvm-project/commit/32d35fb74b2672ddf3674188423b71837afea8c4
DIFF: https://github.com/llvm/llvm-project/commit/32d35fb74b2672ddf3674188423b71837afea8c4.diff
LOG: [lldb] Remove unused argument (NFC)
Nobody is writing to the stream so there's no point in passing it
around.
Added:
Modified:
lldb/include/lldb/Target/Process.h
lldb/source/API/SBTarget.cpp
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/source/Target/Platform.cpp
lldb/source/Target/Process.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index a3fb3447169e..bf9b64547ed5 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -737,7 +737,7 @@ class Process : public std::enable_shared_from_this<Process>,
///
/// \return
/// Returns an error object.
- virtual Status ConnectRemote(Stream *strm, llvm::StringRef remote_url);
+ virtual Status ConnectRemote(llvm::StringRef remote_url);
bool GetShouldDetach() const { return m_should_detach; }
@@ -925,7 +925,7 @@ class Process : public std::enable_shared_from_this<Process>,
///
/// \return
/// Returns an error object.
- virtual Status DoConnectRemote(Stream *strm, llvm::StringRef remote_url) {
+ virtual Status DoConnectRemote(llvm::StringRef remote_url) {
Status error;
error.SetErrorString("remote connections are not supported");
return error;
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index ca75e91bd906..b84e9f10fafe 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -566,7 +566,7 @@ lldb::SBProcess SBTarget::ConnectRemote(SBListener &listener, const char *url,
if (process_sp) {
sb_process.SetSP(process_sp);
- error.SetError(process_sp->ConnectRemote(nullptr, url));
+ error.SetError(process_sp->ConnectRemote(url));
} else {
error.SetErrorString("unable to create lldb_private::Process");
}
diff --git a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
index 18631a0c5315..21bf7f4ac46d 100644
--- a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
+++ b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
@@ -503,10 +503,10 @@ lldb::ProcessSP PlatformRemoteGDBServer::DebugProcess(
"gdb-remote", nullptr);
if (process_sp) {
- error = process_sp->ConnectRemote(nullptr, connect_url.c_str());
+ error = process_sp->ConnectRemote(connect_url.c_str());
// Retry the connect remote one time...
if (error.Fail())
- error = process_sp->ConnectRemote(nullptr, connect_url.c_str());
+ error = process_sp->ConnectRemote(connect_url.c_str());
if (error.Success())
error = process_sp->Launch(launch_info);
else if (debugserver_pid != LLDB_INVALID_PROCESS_ID) {
@@ -589,7 +589,7 @@ lldb::ProcessSP PlatformRemoteGDBServer::Attach(
target->CreateProcess(attach_info.GetListenerForProcess(debugger),
"gdb-remote", nullptr);
if (process_sp) {
- error = process_sp->ConnectRemote(nullptr, connect_url.c_str());
+ error = process_sp->ConnectRemote(connect_url.c_str());
if (error.Success()) {
ListenerSP listener_sp = attach_info.GetHijackListener();
if (listener_sp)
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index 5b728a5f2960..2f4a8917a78a 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -217,7 +217,7 @@ bool ProcessKDP::GetHostArchitecture(ArchSpec &arch) {
return false;
}
-Status ProcessKDP::DoConnectRemote(Stream *strm, llvm::StringRef remote_url) {
+Status ProcessKDP::DoConnectRemote(llvm::StringRef remote_url) {
Status error;
// Don't let any JIT happen when doing KDP as we can't allocate memory and we
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
index 67f8ac069820..52af56134404 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
@@ -67,8 +67,7 @@ class ProcessKDP : public lldb_private::Process {
WillAttachToProcessWithName(const char *process_name,
bool wait_for_launch) override;
- lldb_private::Status DoConnectRemote(lldb_private::Stream *strm,
- llvm::StringRef remote_url) override;
+ lldb_private::Status DoConnectRemote(llvm::StringRef remote_url) override;
lldb_private::Status DoAttachToProcessWithID(
lldb::pid_t pid,
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index ff263fa16258..1fed8e064267 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -629,8 +629,7 @@ Status ProcessGDBRemote::WillAttachToProcessWithName(const char *process_name,
return WillLaunchOrAttach();
}
-Status ProcessGDBRemote::DoConnectRemote(Stream *strm,
- llvm::StringRef remote_url) {
+Status ProcessGDBRemote::DoConnectRemote(llvm::StringRef remote_url) {
Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
Status error(WillLaunchOrAttach());
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
index 22d86d6cdd75..ba967727ae3b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
@@ -85,7 +85,7 @@ class ProcessGDBRemote : public Process,
Status WillAttachToProcessWithName(const char *process_name,
bool wait_for_launch) override;
- Status DoConnectRemote(Stream *strm, llvm::StringRef remote_url) override;
+ Status DoConnectRemote(llvm::StringRef remote_url) override;
Status WillLaunchOrAttach();
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index 8d4bea214814..95c35ea826a0 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -1806,7 +1806,7 @@ lldb::ProcessSP Platform::ConnectProcess(llvm::StringRef connect_url,
if (!process_sp)
return nullptr;
- error = process_sp->ConnectRemote(&debugger.GetOutputStream(), connect_url);
+ error = process_sp->ConnectRemote(connect_url);
if (error.Fail())
return nullptr;
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 78f75981a94d..d777a2713911 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1270,7 +1270,7 @@ void Process::UpdateThreadListIfNeeded() {
for (size_t i = 0; i < num_old_threads; ++i)
old_thread_list.GetThreadAtIndex(i, false)->ClearBackingThread();
// See if the OS plugin reports all threads. If it does, then
- // it is safe to clear unseen thread's plans here. Otherwise we
+ // it is safe to clear unseen thread's plans here. Otherwise we
// should preserve them in case they show up again:
clear_unused_threads = GetOSPluginReportsAllThreads();
@@ -3096,14 +3096,14 @@ void Process::CompleteAttach() {
}
}
-Status Process::ConnectRemote(Stream *strm, llvm::StringRef remote_url) {
+Status Process::ConnectRemote(llvm::StringRef remote_url) {
m_abi_sp.reset();
m_process_input_reader.reset();
// Find the process and its architecture. Make sure it matches the
// architecture of the current Target, and if not adjust it.
- Status error(DoConnectRemote(strm, remote_url));
+ Status error(DoConnectRemote(remote_url));
if (error.Success()) {
if (GetID() != LLDB_INVALID_PROCESS_ID) {
EventSP event_sp;
More information about the lldb-commits
mailing list