From owner-freebsd-hackers Tue Aug 22 9:47:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 8235037B423 for ; Tue, 22 Aug 2000 09:47:26 -0700 (PDT) Received: from sol.cs.binghamton.edu (sol.cs.binghamton.edu [128.226.123.100]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with ESMTP id MAA00344 for ; Tue, 22 Aug 2000 12:47:26 -0400 (EDT) Date: Tue, 22 Aug 2000 12:44:14 -0400 (EDT) From: Zhihui Zhang To: freebsd-hackers@freebsd.org Subject: kernel debugging on 4.1-release Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I try to trace some system call using remote debugging and find something that I can not explain myself (the related source is ffs_write()): case 1: ------- 443 if (object) (gdb) break 430 Breakpoint 6 at 0xc0289cea: file ../../ufs/ufs/ufs_readwrite.c, line 430. (gdb) c Continuing. Breakpoint 6, ffs_write (ap=0xc64f5e70) at ../../ufs/ufs/ufs_readwrite.c:438 438 p = uio->uio_procp; In the above case, even if I set breakpoint 6 at line 430, it insists on line 438. case 2: ------- (gdb) print p->p_limit $1 = (struct plimit *) 0xffffffff In the above case, the statement has just used p->p_limit to do some comparison and yet gdb says its value is -1. The statement using it is: if (vp->v_type == VREG && p && uio->uio_offset + uio->uio_resid > p->p_rlimit[RLIMIT_FSIZE].rlim_cur) { Are these bugs of gdb or am I doing something wrong? I notice that 4.1-release install KLD files at the same time you install kernel. In the past, I only copy the file kernel.debug to the target machine. Do I have to copy those .ko files to the target machine as well? Any help is appreciated. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message