gdbstub: Report the actual qemu-user pid
commitdc14a7a6e95571122ec2428abb355fe2c43e05c6
authorIlya Leoshkevich <iii@linux.ibm.com>
Fri, 30 Jun 2023 18:04:20 +0000 (30 19:04 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Mon, 3 Jul 2023 11:52:34 +0000 (3 12:52 +0100)
tree6be72eca29560d63416a7b1b2ec5785558b6bc42
parenta3fcc111fa2bd8333f53883efb41d539d95b3cd0
gdbstub: Report the actual qemu-user pid

Currently qemu-user reports pid 1 to GDB. Resolve the TODO and report
the actual PID. Using getpid() relies on the assumption that there is
only one GDBProcess. Add an assertion to make sure that future changes
don't break it.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230621203627.1808446-6-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230630180423.558337-36-alex.bennee@linaro.org>
gdbstub/gdbstub.c