Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2007 22:15:55 -0800
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        FreeBSD Current <current@freebsd.org>
Subject:   Re: remote gdb failures in recent builds (last 6 months or so.)
Message-ID:  <A0AD827F-10BE-44CF-AA9A-A870C5571F63@mac.com>
In-Reply-To: <4754EE5A.7050904@elischer.org>
References:  <4754D411.6060608@elischer.org> <A3A1F0CB-CF92-4D42-8211-241A561D2130@mac.com> <4754E54C.20104@elischer.org> <E907A5BE-297F-4B62-9BBC-252EF630B110@mac.com> <4754EE5A.7050904@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 3, 2007, at 10:06 PM, Julian Elischer wrote:

> first the kernel panic'd then I was in kdb on the serial console  
> (com1)
> then I typed "gdb" followed by 's'. I'm not worried so much about  
> the panic
> as its an experimental kernel, but by not being able to debug it..

Seems everything is just right. The only thing I can think of
is that the GDB stub in the kernel doesn't get the packets as
they are intended. It seems that even if gdb sends the ack.
(i.e. the + character), the GDB stub retransmits its original
packet. This seems to indicate that the GDB stub doesn't
receive the ack.

Try the following patch and see if the kernel receives the
packets correctly as well:

Index: gdb_main.c
===================================================================
RCS file: /home/ncvs/src/sys/gdb/gdb_main.c,v
retrieving revision 1.7
diff -u -r1.7 gdb_main.c
--- gdb_main.c	26 May 2006 11:52:59 -0000	1.7
+++ gdb_main.c	4 Dec 2007 06:15:04 -0000
@@ -115,7 +115,7 @@

  	thr_iter = NULL;
  	while (gdb_rx_begin() == 0) {
-		/* printf("GDB: got '%s'\n", gdb_rxp); */
+		printf("GDB: got '%s'\n", gdb_rxp);
  		switch (gdb_rx_char()) {
  		case '?':	/* Last signal. */
  			gdb_tx_begin('S');

FYI,

-- 
Marcel Moolenaar
xcllnt@mac.com





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A0AD827F-10BE-44CF-AA9A-A870C5571F63>