Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Aug 2000 12:44:14 -0400 (EDT)
From:      Zhihui Zhang <zzhang@cs.binghamton.edu>
To:        freebsd-hackers@freebsd.org
Subject:   kernel debugging on 4.1-release
Message-ID:  <Pine.SOL.4.21.0008221234370.9065-100000@sol.cs.binghamton.edu>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.4.21.0008221234370.9065-100000>