[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/7] linux-user: Exit with an error if we couldn't s
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PATCH 3/7] linux-user: Exit with an error if we couldn't set up gdbserver |
Date: |
Fri, 9 Sep 2011 12:32:27 +0300 |
From: Peter Maydell <address@hidden>
If gdbserver_start() fails (usually because we couldn't bind to the
requested TCP port) then exit qemu rather than blithely continuing.
This brings the linux-user behaviour in to line with system mode.
Signed-off-by: Riku Voipio <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
linux-user/main.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index 25cb4dd..8910d2c 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3655,7 +3655,11 @@ int main(int argc, char **argv, char **envp)
#endif
if (gdbstub_port) {
- gdbserver_start (gdbstub_port);
+ if (gdbserver_start(gdbstub_port) < 0) {
+ fprintf(stderr, "qemu: could not open gdbserver on port %d\n",
+ gdbstub_port);
+ exit(1);
+ }
gdb_handlesig(env, 0);
}
cpu_loop(env);
--
1.7.4.1
- [Qemu-devel] [PATCH 0/7] pending linux-user patches, riku . voipio, 2011/09/09
- [Qemu-devel] [PATCH 4/7] linux-user: Fix MIPS indirect syscall handling, riku . voipio, 2011/09/09
- [Qemu-devel] [PATCH 5/7] linux-user: Verify MIPS syscall arguments, riku . voipio, 2011/09/09
- [Qemu-devel] [PATCH 3/7] linux-user: Exit with an error if we couldn't set up gdbserver,
riku . voipio <=
- [Qemu-devel] [PATCH 2/7] linux-user: Implement new ARM 64 bit cmpxchg kernel helper, riku . voipio, 2011/09/09
- [Qemu-devel] [PATCH 6/7] linux-user: Implement setxattr/getxattr/removexattr syscalls, riku . voipio, 2011/09/09
- [Qemu-devel] [PATCH 1/7] linux-user: Fix initialization of the heap contents when allocating new pages, riku . voipio, 2011/09/09
- [Qemu-devel] [PATCH 7/7] introduce environment variables for all qemu-user options, riku . voipio, 2011/09/09