From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 06:40:45 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 5613516A4CE; Sun, 19 Sep 2004 06:40:45 +0000 (GMT) Received: from bittern.mail.pas.earthlink.net (bittern.mail.pas.earthlink.net [207.217.120.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26FD343D55; Sun, 19 Sep 2004 06:40:41 +0000 (GMT) (envelope-from jtoung@arc.nasa.gov) Received: from h-68-164-93-54.snvacaid.dynamic.covad.net ([68.164.93.54] helo=there) by bittern.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1C8vNI-0001Gv-00; Sat, 18 Sep 2004 23:40:40 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Jerry Toung Organization: ARC To: "Greg 'groggy' Lehey" Date: Sat, 18 Sep 2004 23:43:22 -0700 User-Agent: KMail/1.4.3 References: <200409171702.58905.jtoung@arc.nasa.gov> <20040918044315.GE67689@wantadilla.lemis.com> In-Reply-To: <20040918044315.GE67689@wantadilla.lemis.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200409182343.22827.jtoung@arc.nasa.gov> 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: Sun, 19 Sep 2004 06:40:45 -0000 Greg, I am not using remote debugging, that's why I made a call to kldsyms (loc= al=20 system) but it only loaded acpi.ko. May be I should try over a serial console. The system wasn't crashed or = in db=20 prompt though. As for the question regarding where I got the addresses from, I typed: asf -k -f -s -x modulepath .asf, this created the ".asf" file and its con= tain=20 was "add-symbol-file /usr/local/src/nren-6.0current/osr_src/if_osr.ko 0xc24b3184 -s .data 0xc24b6900 -s .bss 0xc24b6cc0" then I copied and past it to the kgdb prompt, all went ok. but when I wa= nt to=20 list *0xc24b3184, it complained about "No source code available" or somet= hing=20 like that. That's where I am puzzled. I will do what you suggested and over serial console and repost if any=20 problems. Thank you, Jerry > > 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 > > 0xc24b3184 -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. > > > > > 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