summaryrefslogtreecommitdiffstats
path: root/src/core/debugger/debugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/debugger/debugger.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/core/debugger/debugger.cpp b/src/core/debugger/debugger.cpp
index 68ab33e46..8d64990ed 100644
--- a/src/core/debugger/debugger.cpp
+++ b/src/core/debugger/debugger.cpp
@@ -20,15 +20,16 @@ template <typename Readable, typename Buffer, typename Callback>
static void AsyncReceiveInto(Readable& r, Buffer& buffer, Callback&& c) {
static_assert(std::is_trivial_v<Buffer>);
auto boost_buffer{boost::asio::buffer(&buffer, sizeof(Buffer))};
- r.async_read_some(boost_buffer, [&](const boost::system::error_code& error, size_t bytes_read) {
- if (!error.failed()) {
- const u8* buffer_start = reinterpret_cast<const u8*>(&buffer);
- std::span<const u8> received_data{buffer_start, buffer_start + bytes_read};
- c(received_data);
- }
+ r.async_read_some(
+ boost_buffer, [&, c](const boost::system::error_code& error, size_t bytes_read) {
+ if (!error.failed()) {
+ const u8* buffer_start = reinterpret_cast<const u8*>(&buffer);
+ std::span<const u8> received_data{buffer_start, buffer_start + bytes_read};
+ c(received_data);
+ }
- AsyncReceiveInto(r, buffer, c);
- });
+ AsyncReceiveInto(r, buffer, c);
+ });
}
template <typename Readable, typename Buffer>
@@ -65,7 +66,7 @@ public:
}
stopped = true;
- signal_pipe.write_some(boost::asio::buffer(&thread, sizeof(thread)));
+ boost::asio::write(signal_pipe, boost::asio::buffer(&thread, sizeof(thread)));
return true;
}
@@ -74,7 +75,7 @@ public:
}
void WriteToClient(std::span<const u8> data) override {
- client_socket.write_some(boost::asio::buffer(data.data(), data.size_bytes()));
+ boost::asio::write(client_socket, boost::asio::buffer(data.data(), data.size_bytes()));
}
void SetActiveThread(Kernel::KThread* thread) override {