# gdb =fstat
[...]
(gdb) break 349
Breakpoint 1 at 0x8049110: file /usr/src/usr.bin/fstat/fstat.c, line 349.
(gdb) run
Starting program: /usr/bin/fstat
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W
root     fstat      13709 root /             2 drwxr-xr-x    1536  r
root     fstat      13709   wd /usr     368364 drwxr-xr-x     512  r
root     fstat      13709 text /usr     351906 -r-xr-sr-x  129809  r

Breakpoint 1, dofiles (kp=0x8050000) at /usr/src/usr.bin/fstat/fstat.c:349
349                     bcopy(filed0.fd_dfiles, ofiles, (filed.fd_lastfile+1) * 
FPSIZE);
(gdb) p filed0.fd_fd.fd_lastfile + 1
$1 = 327686
(gdb) p filed0.fd_dfiles
$2 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x0}
(gdb) c
Continuing.

Program received signal SIGBUS, Bus error.
0x280fec8a in bcopy () from /usr/lib/libc.so.5
(gdb) where
#0  0x280fec8a in bcopy () from /usr/lib/libc.so.5
#1  0x0 in ?? ()

fd_lastfile is obviously bogus.  Alfred, is this a consequence of your
fd work in the kernel?

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to