From: Andrew Cottrell Newsgroups: comp.os.msdos.djgpp Subject: Re: remote debug stub and Windows 2000 Date: Thu, 06 Feb 2003 23:14:18 +1100 Organization: ECLiPSE Lines: 54 Message-ID: <9lj44vg0bh43925odl7eu977806vv0ft31@4ax.com> References: NNTP-Posting-Host: p126-tnt7.syd.ihug.com.au Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: lust.ihug.co.nz 1044533660 14240 203.173.144.126 (6 Feb 2003 12:14:20 GMT) X-Complaints-To: abuse AT ihug DOT co DOT nz NNTP-Posting-Date: Thu, 6 Feb 2003 12:14:20 +0000 (UTC) X-Newsreader: Forte Agent 1.92/32.572 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >I have built a demo program that uses i386-stub.c to remote debug from >a Windows 2000 machine. My target machine appears to work correctly. >However I am having problems with GDB on the host. I am using V5.3. > >The problem is as follows: > >+ I start the target – which contains a breakpoint() instruction. > >+ I start GDB on the host, then type "target remote COM1". I know the >host the transmits data correctly as I can see it arriving on the >target. > >+ The first few commands transmitted by GDB are not supported by the >stub, >so I return $#00, as per the DGB FAQ. I know the target transmits >this okay as I can see them arriving if I use a dumb terminal instead >of GDB. > >+ GDB reports errors like "Ignoring packet error, continuing..." * 3, >then >"Couldn't establish connection to remote target ... Malformed response >to >offset query, timeout". > >These errors make it look like GDB does not understand the reply - >however, if I unplug the serial cable the error messages are the same >so I think it is just that GDB is not seeing the replies at all. On >the target Tx and Rx appear to work. On the Windows 2000 host only Tx >appears to work. > >Has anybody any experience of this? Also, does GDB assume hardware >flow control over the serial port? This has been reported by Nvidia in 2001 while DJGPP was being fixed so it woudl work under 2K. The problem is still on the list of items to be looked at, but I have not got to it because of more important issues that have poped up. I had a look a the code in GDB 5.1 & just now the 5.3 code to handle the serial ports and if I remember correctly (please correct me if I am wrong) I suspect that the code has not been updated in a while. If you have a look at PMCOM or DZCOMM and comapre the functions in the GDB 5.3 file gdb\ser-go32.c with the simialr funcitons and I suspect that you may find the problem. I would look at the #ifdef UART_FIFO_WORKS conditional code first up and any other conditional code in the ser-go32.c file. On some ALI chipset based motherbaords the PMCOM library will not, bit DZCOMM will. Let me know how you go and if you get stuck I may be able to point you in the right direction. Andrew