From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 18 04:43:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9558316A4CE for ; Sat, 18 Sep 2004 04:43:20 +0000 (GMT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13E1443D54 for ; Sat, 18 Sep 2004 04:43:20 +0000 (GMT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id EBC182BD7B for ; Sat, 18 Sep 2004 14:43:17 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 109DB51221; Sat, 18 Sep 2004 14:13:16 +0930 (CST) Date: Sat, 18 Sep 2004 14:13:16 +0930 From: Greg 'groggy' Lehey To: Jerry Toung Message-ID: <20040918044315.GE67689@wantadilla.lemis.com> References: <200409171702.58905.jtoung@arc.nasa.gov> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="10jrOL3x2xqLmOsH" Content-Disposition: inline In-Reply-To: <200409171702.58905.jtoung@arc.nasa.gov> User-Agent: Mutt/1.4.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: freebsd-hackers@freebsd.org Subject: Re: add-symbol-file X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2004 04:43:20 -0000 --10jrOL3x2xqLmOsH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Format recovered--see http://www.lemis.com/email/email-format.html] Important output wrapped. On Friday, 17 September 2004 at 17:02:58 -0700, Jerry Toung wrote: > Hello list, > Could somebody tell me why I can't "list" the source code of this kld? > I built the module with COPTS=3D-g, it is loaded in the kernel and I run = kgdb in > /usr/obj/...../MYKERNEL. Everything seems to go well, except kgdb still > doesn't like it. However if I run kldsyms, it only loads acpi.ko.debug an= d I > can list it. It looks like you're not doing it the way it was intended. As it says: > Type 'getsyms' after connection to load kld symbols. This does the add-symbol-file for you. Take a look at gdb(4) for more details. > If you're debugging a local system, you can use 'kldsyms' instead > to load the kld symbols. That's a less obnoxious interface. > doadump () at pcpu.h:159 > (kgdb) add-symbol-file /usr/local/src/nren-6.0current/osr_src/if_osr.ko > 0xc24b3184 -s .data 0xc24b6900 -s .bss 0xc24b6cc0 I'm assuming that this was broken by your MUA, and it's not the way you put it in, which must have been: > (kgdb) add-symbol-file /usr/local/src/nren-6.0current/osr_src/if_osr.ko 0= xc24b3184 -s .data 0xc24b6900 -s .bss 0xc24b6cc0 Where did you get these addresses from? They're all outside the bounds of the kld as shown below. > (kgdb) kldstat > During symbol reading, Incomplete CFI data; unspecified registers at > 0xc05ff7d1. > Id Refs Address Size Name > 1 4 0xc0400000 5d63e4 kernel > 2 14 0xc09d7000 54784 acpi.ko > 3 1 0xc2326000 6000 if_osr.ko In any case, I'm not sure that you need getsyms any more. It used to be needed to get round various gdb restrictions. What happens if you don't do anything? If that doesn't work, how about running getsyms, as suggested? Please let me know either way what happens. Greg -- When replying to this message, please take care not to mutilate the original text. =20 For more information, see http://www.lemis.com/email.html See complete headers for address and phone numbers. --10jrOL3x2xqLmOsH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFBS7zjIubykFB6QiMRAp8kAJ9I/CjGn+fs0sgyI4XgucJbqxi62ACffjY5 tjnij7PkWHCGY/KXAhNeqTg= =Hr7y -----END PGP SIGNATURE----- --10jrOL3x2xqLmOsH--