diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2020-04-30 20:01:19 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2020-05-06 09:29:26 +0100 |
commit | fcedd920867b8eb26ec803901a24db53a38882c5 (patch) | |
tree | c55c9dec8d2ff08e6448cfd9c8cf1fa0abacc758 /include | |
parent | e0a1e2084779fec1adc72866212bda3549fc4c22 (diff) |
gdbstub/linux-user: support debugging over a unix socket
While debugging over TCP is fairly straightforward now we have test
cases that want to orchestrate via make and currently a parallel build
fails as two processes can't use the same listening port. While system
emulation offers a wide cornucopia of connection methods thanks to the
chardev abstraction we are a little more limited for linux user.
Thankfully the programming API for a TCP socket and a local UNIX
socket is pretty much the same once it's set up.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200430190122.4592-7-alex.bennee@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/gdbstub.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 4a2b8e3089..94d8f83e92 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -177,11 +177,15 @@ static inline uint8_t * gdb_get_reg_ptr(GByteArray *buf, int len) #endif -#ifdef CONFIG_USER_ONLY -int gdbserver_start(int); -#else -int gdbserver_start(const char *port); -#endif +/** + * gdbserver_start: start the gdb server + * @port_or_device: connection spec for gdb + * + * For CONFIG_USER this is either a tcp port or a path to a fifo. For + * system emulation you can use a full chardev spec for your gdbserver + * port. + */ +int gdbserver_start(const char *port_or_device); void gdbserver_cleanup(void); |