From owner-freebsd-current@FreeBSD.ORG Tue Nov 9 02:08:42 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15681106564A for ; Tue, 9 Nov 2010 02:08:42 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from out-0.mx.aerioconnect.net (outg.internet-mail-service.net [216.240.47.230]) by mx1.freebsd.org (Postfix) with ESMTP id ED4C38FC18 for ; Tue, 9 Nov 2010 02:08:41 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id oA928eA7028978 for ; Mon, 8 Nov 2010 18:08:40 -0800 X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 7843D2D6015 for ; Mon, 8 Nov 2010 18:08:40 -0800 (PST) Message-ID: <4CD8AD2B.5000505@freebsd.org> Date: Mon, 08 Nov 2010 18:08:43 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: FreeBSD Current References: <4CD8970D.6030003@freebsd.org> In-Reply-To: <4CD8970D.6030003@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: Subject: Re: kgdb and .ko files X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2010 02:08:42 -0000 relying to self with more info.. On 11/8/10 4:34 PM, Julian Elischer wrote: > my usual command set for doing .ko debugging issomething like: > %kgdb /sys/amd64/compile/DEBUG/kernel.symbols > (kgdb) target remote pu_serial2:7005 > (kgdb) sharedlibrary driver.ko > (kgdb) directory /home/me/branches/blah/obj/ > > (kgdb) info sharedlibrary >> From To Syms Read Shared Object >> Library > 0xffffffff81222000 0xffffffff8129dac0 Yes > home/me/branches/blah/freebsd8-amd64/output/driver.ko > > but recently the last line has started returning: > >> From To Syms Read Shared Object >> Library > Yes > home/me/branches/blah/freebsd8-amd64/output/driver.ko > > Now I can guess that the problem might be something to do with > readinf symbols as our > method of generating the .ko changed a while back but when I look at > it I do see: > > awk -f /sys/conf/kmod_syms.awk driver.ko.debug export_syms | xargs > -J% objcopy %driver.ko.debug > objcopy --only-keep-debug driver.ko.debug driver.ko.symbols > objcopy --strip-debug --add-gnu-debuglink=driver.ko.symbols > driver.ko.debug driver.ko > > so theoretically the plain driver.ko should result in (k)gdb looking > up the symbol file driver.ko.symbols > which should have all the symbol information needed for debugging.. > or am I misreading this? > > doesn't seem to work but it does seem to improve if I link the .ko > file to the symbols file.. it seems changing the first objcopy line to give the full path name of the symbol file seems to help > > this is in 8.1 rather than -current but I can't test -current. > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org" >