Oh, I found it was -gdb tcp::1235. (I had tried only -gdb tcp:1235) I think the manual should better have this information there.
From: Chan Kim <c...@etri.re.kr> Sent: Saturday, January 29, 2022 11:38 AM To: 'qemu-discuss' <qemu-discuss@nongnu.org> Subject: How can I use different tcp port other than 1234 to use gdb for application debug on qemu? Hi all! I think I knew this but can't remember now.. To connect qemu with gdb, we give -s -S option. According to manual(https://qemu.readthedocs.io/en/latest/system/gdb.html), this -s option makes qemu wait for incoming gdb connection at tcp port 1234. And it says : "If you want to specify which TCP port to use or to use something other than TCP for the gdbstub connection, use the -gdb dev option instead of -s. See <https://qemu.readthedocs.io/en/latest/system/gdb.html#using-unix-sockets> Using unix sockets for an example." But if I just want to use different port number, but the example doesn't show how. The -gdb option seems to expect char device. I think I have used different port for debugging qemu itself and another port for the application on it in the past, but forgot how to do it. (can't find any memo) How should I do it? (using different port) Thanks! Chan Kim