From owner-freebsd-hackers Fri Feb 27 17:14:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA12317 for freebsd-hackers-outgoing; Fri, 27 Feb 1998 17:14:04 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA12197 for ; Fri, 27 Feb 1998 17:13:54 -0800 (PST) (envelope-from grog@lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.8.7/8.8.5) with ESMTP id LAA04639 for ; Sat, 28 Feb 1998 11:43:50 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id LAA15226; Sat, 28 Feb 1998 11:43:50 +1030 (CST) (envelope-from grog) Message-ID: <19980228114349.01329@freebie.lemis.com> Date: Sat, 28 Feb 1998 11:43:49 +1030 From: Greg Lehey To: FreeBSD Hackers Subject: Kernel debugging: what's going on here? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89i WWW-Home-Page: http://www.lemis.com/~grog 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-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Can anybody explain this to me? I'm writing a disk block, and am currently at bwrite: (kgdb) bt #0 bwrite (bp=0xf051ec00) at ../../kern/vfs_bio.c:364 #1 0xf0138d6a in vop_stdbwrite (ap=0xf2a76c74) at ../../kern/vfs_default.c:283 #2 0xf0138bb1 in vop_defaultop (ap=0xf2a76c74) at ../../kern/vfs_default.c:130 #3 0xf0146639 in spec_vnoperate (ap=0xf2a76c74) at ../../miscfs/specfs/spec_vnops.c:127 #4 0xf01c5679 in ufs_vnoperatespec (ap=0xf2a76c74) at ../../ufs/ufs/ufs_vnops.c:2242 #5 0xf2aab097 in VOP_BWRITE (bp=0xf051ec00) at vnode_if.h:1117 #6 0xf2aa95c4 in vinumstart (vol=0xf0563000, bp=0xf10f1bb0) at request.c:228 #7 0xf2aa9189 in vinumstrategy (bp=0xf10f1bb0) at request.c:71 #8 0xf2aa7b63 in vinum_writedisklabel (vol=0xf0563000, lp=0xf0563110) at io.c:830 I've handed a buffer header up from frame 6 (not the bp in the parameter list). When it gets to bwrite, it has a different content. gdb tells me different contents depending on the frame it's in: (kgdb) f 0 #0 bwrite (bp=0xf051ec00) at ../../kern/vfs_bio.c:364 364 int oldflags = bp->b_flags; (kgdb) p bp->b_vp $13 = (struct vnode *) 0xf29ecbc0 (kgdb) p ((struct vnode *) 0xf29ecbc0)->v_type $14 = VBLK (kgdb) f 6 #6 0xf2aa95c4 in vinumstart (vol=0xf0563000, bp=0xf10f1bb0) at request.c:228 228 VOP_BWRITE (&rqe->b); /* do an asynchronous write */ (kgdb) p ((struct vnode *) 0xf29ecbc0)->v_type $15 = VNON (kgdb) Significant parts of the vnode are different; I just showed v_type to demonstrate it. What's going on here? I don't see any remapping of memory going on anwhere here. Is this a bug in gdb, or in me? Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message