summaryrefslogtreecommitdiff
path: root/src/core/gdbstub/gdbstub.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gdbstub/gdbstub.cpp')
-rw-r--r--src/core/gdbstub/gdbstub.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp
index 25ce63b29..15e6f36a0 100644
--- a/src/core/gdbstub/gdbstub.cpp
+++ b/src/core/gdbstub/gdbstub.cpp
@@ -186,7 +186,7 @@ static u8 ReadByte() {
186 size_t received_size = recv(gdbserver_socket, reinterpret_cast<char*>(&c), 1, MSG_WAITALL); 186 size_t received_size = recv(gdbserver_socket, reinterpret_cast<char*>(&c), 1, MSG_WAITALL);
187 if (received_size != 1) { 187 if (received_size != 1) {
188 LOG_ERROR(Debug_GDBStub, "recv failed : %ld", received_size); 188 LOG_ERROR(Debug_GDBStub, "recv failed : %ld", received_size);
189 Deinit(); 189 Shutdown();
190 } 190 }
191 191
192 return c; 192 return c;
@@ -322,7 +322,7 @@ static void SendReply(const char* reply) {
322 int sent_size = send(gdbserver_socket, reinterpret_cast<char*>(ptr), left, 0); 322 int sent_size = send(gdbserver_socket, reinterpret_cast<char*>(ptr), left, 0);
323 if (sent_size < 0) { 323 if (sent_size < 0) {
324 LOG_ERROR(Debug_GDBStub, "gdb: send failed"); 324 LOG_ERROR(Debug_GDBStub, "gdb: send failed");
325 return Deinit(); 325 return Shutdown();
326 } 326 }
327 327
328 left -= sent_size; 328 left -= sent_size;
@@ -773,7 +773,7 @@ void HandlePacket() {
773 HandleSignal(); 773 HandleSignal();
774 break; 774 break;
775 case 'k': 775 case 'k':
776 Deinit(); 776 Shutdown();
777 LOG_INFO(Debug_GDBStub, "killed by gdb"); 777 LOG_INFO(Debug_GDBStub, "killed by gdb");
778 return; 778 return;
779 case 'g': 779 case 'g':
@@ -829,7 +829,7 @@ void ToggleServer(bool status) {
829 else { 829 else {
830 // Stop server 830 // Stop server
831 if (IsConnected()) { 831 if (IsConnected()) {
832 Deinit(); 832 Shutdown();
833 } 833 }
834 834
835 g_server_enabled = status; 835 g_server_enabled = status;
@@ -908,7 +908,7 @@ void Init() {
908 Init(gdbstub_port); 908 Init(gdbstub_port);
909} 909}
910 910
911void Deinit() { 911void Shutdown() {
912 if (!g_server_enabled) { 912 if (!g_server_enabled) {
913 return; 913 return;
914 } 914 }