From 3484ecc4195b62663c15d9710a36f90ccd6e4931 Mon Sep 17 00:00:00 2001 From: Scott Knight <4534275+knightsc@users.noreply.github.com> Date: Tue, 27 Nov 2018 17:35:54 -0500 Subject: [PATCH] Add support for LLDB qHostInfo packet https://github.com/llvm-mirror/lldb/blob/master/docs/lldb-gdb-remote.txt The qHostInfo command is listed as a high priority to implement for gdb stubs that lldb can connect to. Adding support for this command allows lldb to properly connect with it's `gdb-remote 55555` command and correctly determine the target and allow debugging. --- src/gba/remote.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gba/remote.cpp b/src/gba/remote.cpp index 60124783..4b8d3640 100644 --- a/src/gba/remote.cpp +++ b/src/gba/remote.cpp @@ -3705,6 +3705,8 @@ void remoteQuery(char* p) remotePutPacket("l"); } else if (!strncmp(p, "Supported", 9)) { remotePutPacket("PacketSize=1000"); + } else if (!strncmp(p, "HostInfo", 8)) { + remotePutPacket("cputype:12;cpusubtype:5;ostype:unknown;vendor:nintendo;endian:little;ptrsize:4;"); } else if (!strncmp(p, "Rcmd,", 5)) { p += 5; std::string cmd = HexToString(p);