From owner-freebsd-hackers Sat Sep 2 17:36:48 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id F203F37B422 for ; Sat, 2 Sep 2000 17:36:37 -0700 (PDT) Received: (from grog@localhost) by wantadilla.lemis.com (8.11.0/8.9.3) id e830aQR47215; Sun, 3 Sep 2000 10:06:26 +0930 (CST) (envelope-from grog) Date: Sun, 3 Sep 2000 10:06:26 +0930 From: Greg Lehey To: Christopher Stein Cc: freebsd-hackers@freebsd.org Subject: Re: gdb remote connection Message-ID: <20000903100625.F66079@wantadilla.lemis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from stein@eecs.harvard.edu on Fri, Sep 01, 2000 at 02:18:25PM -0400 Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Friday, 1 September 2000 at 14:18:25 -0400, Christopher Stein wrote: > > Hi, I discovered the source of my problem and solved it. For those > interested, here is an explanation: > > The flags of the serial I/O device to be used for remote debugging > needs to be changed in the config file. I told you this a while ago. You can also set them with UserConfig or in the loader configuration. > I plugged a null modem cable across the two ports labeled 1 (the > other one labeled 2) on the back of the computer. I assumed that > these correspond to serial port 1 as the FreeBSD kernel sees the > world (wrong assumption). Therefore, I only changed the permissions > of sio0 in the config file. You can't change permissions in the config file. What did you really do? > I was able to communicate across the serial line using device > /dev/cuaa1 and doing things like echo "hello" > /dev/cuaa1. /dev/cuaa1 isn't sio0. It's sio1. > GDB, however, was unable to establish a remote connection when I did > "target remote /dev/cuaa1" in kgdb. I started wondering about why > the device has the number "1" and not "0". So I decided to change > the permissions of sio1 in addition. It works! Yes, that's reasonable. > So it turns out the FreeBSD maps the physically labelled > (i.e. etched in metal) port 2 to sio0 and port 1 to sio1! No, this is completely incorrect. First, what's etched in metal has nothing to do with the matter. Secondly, the first serial port is sio0. The second serial port is sio1. If this is different on your computer, then that's where the problem lies. This is all described in the man page, of course: sio(4). Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message