Skip to contentSkip to conversation

Win32 support for the GDB stub

PATCH In review Filip Navara 2 participants 4 messages Jan 22, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Win32 support for the GDB stub

just what the subject says...

Filip Navara
[email protected]

Index: configure
===================================================================
RCS file: /cvsroot/qemu/qemu/configure,v
retrieving revision 1.51

configure +0 -1
diff -u -r1.51 configure
@@ -184,7 +184,6 @@
 if test "$mingw32" = "yes" ; then
     linux="no"
     EXESUF=".exe"
-    gdbstub="no"
     oss="no"
 fi
 

Index: gdbstub.c
===================================================================
RCS file: /cvsroot/qemu/qemu/gdbstub.c,v
retrieving revision 1.23

gdbstub.c +42 -1

117 lines not on this page · raw message

Index: vl.c
===================================================================
RCS file: /cvsroot/qemu/qemu/vl.c,v
retrieving revision 1.117

vl.c +129 -67

226 lines not on this page · raw message

#1 lore raw
Quoted 1 line · Filip Navara

just what the subject says...

Why guards around recv/read send/write? And to the best of my knowlege checking errno after WSA calls wouldn't do much good, WSAGetError should be used, though i might be way off here.

Signature · 1 line
mailto:[email protected]
#2 lore raw
Quoted 6 lines · malc
Quoted 1 line · Filip Navara

just what the subject says...

Why guards around recv/read send/write?

Sockets are Win32 handles, while handles from "open" & friends are CRT handles. You can't call "read"/"write" on socket handle in Win32.

Quoted 3 lines

And to the best of my knowlege
checking errno after WSA calls wouldn't do much good, WSAGetError should be used, though i might be way off here.

You mean in the gdbstub.c code? I simply overlooked that...

- Filip

#3 lore raw
Quoted 10 lines · Filip Navara
Quoted 6 lines · malc
Quoted 1 line · Filip Navara

just what the subject says...

Why guards around recv/read send/write?

Sockets are Win32 handles, while handles from "open" & friends are CRT handles. You can't call "read"/"write" on socket handle in Win32.

But you can call recv/send, on any fd, under *nixes, so the guards are strictly speaking unecessary (given that MSG_NOSGINAL is passed to recv/send, MSG_NOSIGNAL must be defined to 0 for WIN32, thus reducing the number of guards to the bare minimum)

Quoted 6 lines
Quoted 4 lines

And to the best of my knowlege
checking errno after WSA calls wouldn't do much good, WSAGetError should be used, though i might be way off here.

You mean in the gdbstub.c code? I simply overlooked that...

Yes.

Signature · 1 line
mailto:[email protected]