From: "Theodor Willax" theodor_willax@hotmail.com Reply-To: ReactOS Development List ros-dev@reactos.com To: ros-dev@reactos.com Subject: [ros-dev] connect gdb to named pipe in ms virtual pc session Date: Wed, 03 Nov 2004 11:40:35 +0000
Hi,
could anybody tell me how to connect gdb.exe to my named pipe "\.\pipe\roscom2" of a virtual pc session (on virtual com2 port). I'm running gdb on Win XP SP2 and use ros 0.2.5-cvs last updated 11/03/04. I set up "pipetunnel.exe roscom2" in one command prompt window, started virtual pc session in debug mode and now try to connect gdb to pipetunnel. pipetunnel is now listening on tcp port 9999.
Thanks, Theo
Hi,
it's me again. Some more questions: a) Do I need to compile the cvs snapshot with special make options to debug trough serial ports? b) Works the named pipe approach with ms virtual pc? c) Do I need a special gdb version? I've this one:
D:\home\willaxt\Entwicklung\ros>gdb -version GNU gdb 5.2.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-mingw32".
Many thank's, Theo
_________________________________________________________________ Geschlossene Gesellschaft. MSN Hotmail mit McAfee® Anti-Virus. http://www.msn.de/email/antivirus/ Jetzt kostenlos anmelden und Viren bleiben vor der Tür!
Theodor Willax wrote:
a) Do I need to compile the cvs snapshot with special make options to debug trough serial ports?
Generally no, but for Virtual PC you need to get do a CVS build of HAL with hacked serial port detection. The standard detection approach doesn't work in VPC because of "bug" in the emulated hardware. (Yes, it's really broken. It works in Linux because it assumes that two ports always exist and skips the detection. See the Linux source for details.) I don't have the original patch I used while debugging the S3 driver under VPC anymore, but the attached one should work (I hope)...
BTW, I'm not able to answer your other questions, sorry.
Regards, Filip
Index: hal/halx86/kdbg.c =================================================================== RCS file: /CVS/ReactOS/reactos/hal/halx86/kdbg.c,v retrieving revision 1.8 diff -u -r1.8 kdbg.c --- hal/halx86/kdbg.c 29 Apr 2004 17:06:21 -0000 1.8 +++ hal/halx86/kdbg.c 3 Nov 2004 18:32:30 -0000 @@ -102,6 +102,7 @@ /* clear all modem output bits */ WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x10);
+#if 0 /* read the Modem Status Register */ msr = READ_PORT_UCHAR (SER_MSR(BaseAddress));
@@ -123,6 +124,7 @@ */ if ((msr & 0xF0) == 0xF0) { +#endif /* * setup a resonable state for the port: * enable fifo and clear recieve/transmit buffers @@ -133,8 +135,10 @@ READ_PORT_UCHAR (SER_RBR(BaseAddress)); WRITE_PORT_UCHAR (SER_IER(BaseAddress), 0); found = TRUE; +#if 0 } } +#endif
/* restore MCR */ WRITE_PORT_UCHAR (SER_MCR(BaseAddress), mcr);