i'm not sure if someone has brought this up before (i cant find anything in the archives), but using the gdbstub with qemu seems to cause quite a bit of useless cpu chewing.
in gdbstub.c:gdb_accept(), after the connection has been established, we see: fcntl(fd, F_SETFL, O_NONBLOCK); then, when the gdb connection is idle (the process is stopped, and gdb is waiting for input from the user), the main polling loop in gdb_handlesig() will call read() over and over again as fast as possible and thus eat a cpu. is there any need for this to be nonblocking ? ive commented out that one line and have yet to notice a problem during my development (using singlestep, breakpoints, continue, etc...). -mike