From owner-freebsd-current Thu Apr 22 23: 6: 2 1999 Delivered-To: freebsd-current@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id BFD9D15138 for ; Thu, 22 Apr 1999 23:05:55 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id PAA09482 for ; Fri, 23 Apr 1999 15:33:25 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id PAA96610 for FreeBSD-current@FreeBSD.ORG; Fri, 23 Apr 1999 15:33:24 +0930 (CST) Date: Fri, 23 Apr 1999 15:33:23 +0930 From: Greg Lehey To: FreeBSD current users Subject: Problems with symbol sequences in recent kernels Message-ID: <19990423153323.P91260@freebie.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i 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 Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've just had a strange experience. I have some gdb macros which I use for debugging Vinum. One, ps, gives me a ps-like listing: (kgdb) ps Check your .gdbinit, it contains a y command pid proc addr uid ppid pgrp flag stat comm wchan 1544 c68a5100 c6df3000 0 1534 1544 004006 2 Vinum 1534 c68a57e0 c6ddb000 0 1524 1534 004086 3 bash wait c68a57e0 1524 c68a5c00 c6dc9000 1004 1516 1524 004086 3 bash wait c68a5c00 Another macro helps me load symbols from a kld: Without: (kgdb) bt #0 Debugger (msg=0xc11696a0 "vinum debug") at ../../i386/i386/db_interface.c:318 #1 0xc1163585 in ?? () #2 0xc01826ea in spec_ioctl (ap=0xc6df4e1c) at ../../miscfs/specfs/spec_vnops.c:440 With: (kgdb) bt #0 Debugger (msg=0xc11696a0 "vinum debug") at ../../i386/i386/db_interface.c:318 #1 0xc1163585 in vinumioctl (dev=0x40001901, cmd=0xc008464b, data=0xc6df4ee0 "", flag=0x3, p=0xc68a5100) at /src/PANIC/src/sys/modules/Vinum/../../dev/Vinum/vinumioctl.c:96 #2 0xc01826ea in spec_ioctl (ap=0xc6df4e1c) at ../../miscfs/specfs/spec_vnops.c:440 This has worked quite nicely for some time. Since yesterday, after building a kernel with newbus support, I get strange messages if I read in the Vinum symbols before reading in the kernel symbols: (kgdb) bt #0 Debugger (msg=0xc11696a0 "vinum debug") at ../../i386/i386/db_interface.c:318 #1 0xc1163585 in vinumioctl (dev=0x40001901, cmd=0xc008464b, data=0xc6df4ee0 "", flag=0x3, p=0xc68a5100) at /src/PANIC/src/sys/modules/Vinum/../../dev/Vinum/vinumioctl.c:96 During symbol reading, "repeated" header file opt_global.h not previously seen, at symtab pos 23. During symbol reading, Invalid symbol data: type number (2,2) out of range at symtab pos 25.. #2 0xc01826ea in spec_ioctl (ap=0xc6df4e1c) at ../../miscfs/specfs/spec_vnops.c:440 The following stack frames also look strange: #5 0xc017ccdd in vn_ioctl (fp=, com=, data=, p=) at vnode_if.h:395 #6 0xc015c5f7 in ioctl (p=0xc68a5100, uap=0xc6df4f94) at ../../kern/sys_generic.c:564 #7 0xc021e916 in syscall (frame=) at ../../i386/i386/trap.c:1071 I debugged gdb and found that it was finding these references (opt_global.h) in cd9660_rrip.o, which it read after reading the Vinum kld symbols. If I can convince it to read the kernel symbols first, I don't have any trouble. I don't think that it's anything to do with that particular file; there must be about 30 files in a typical kernel build which refer to this symbol. If I don't get any response on the list, I'll put in a PR, but I thought there's a good chance that somebody will recognize this problem and be able to fix it. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message