aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2025-02-20 11:13:46 -0800
committerGitHub <noreply@github.com>2025-02-20 11:13:46 -0800
commit78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc (patch)
tree1b99cd3d655c9c3b6b30f195e97d43ea3f7221e4 /lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
parent6d84fae60ed2c227dfcb349a144cbc0cdd3bcc4b (diff)
downloadllvm-78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc.zip
llvm-78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc.tar.gz
llvm-78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc.tar.bz2
[lldb] Store StreamAsynchronousIO in a unique_ptr (NFC) (#127961)
Make StreamAsynchronousIO an unique_ptr instead of a shared_ptr. I tried passing the class by value, but the llvm::raw_ostream forwarder stored in the Stream parent class isn't movable and I don't think it's worth changing that. Additionally, there's a few places that expect a StreamSP, which are easily created from a StreamUP.
Diffstat (limited to 'lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp')
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index 9b2907c..406e1d4 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -321,20 +321,10 @@ Status ProcessKDP::DoConnectRemote(llvm::StringRef remote_url) {
SetID(1);
GetThreadList();
SetPrivateState(eStateStopped);
- StreamSP async_strm_sp(target.GetDebugger().GetAsyncOutputStream());
- if (async_strm_sp) {
- const char *cstr;
- if ((cstr = m_comm.GetKernelVersion()) != NULL) {
- async_strm_sp->Printf("Version: %s\n", cstr);
- async_strm_sp->Flush();
- }
- // if ((cstr = m_comm.GetImagePath ()) != NULL)
- // {
- // async_strm_sp->Printf ("Image Path:
- // %s\n", cstr);
- // async_strm_sp->Flush();
- // }
- }
+ const char *cstr;
+ if ((cstr = m_comm.GetKernelVersion()) != NULL)
+ target.GetDebugger().GetAsyncOutputStream()->Printf("Version: %s\n",
+ cstr);
} else {
return Status::FromErrorString("KDP_REATTACH failed");
}