Update for the KDB debugger framework:

o  Make debugging code conditional upon KDB.
o  Use kdb_backtrace() instead of backtrace().
o  Remove inclusion of opt_ddb.h.
This commit is contained in:
marcel 2004-07-10 20:45:47 +00:00
parent 45362e9f41
commit 1c77791271
2 changed files with 5 additions and 6 deletions

View File

@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/bio.h>
#include <sys/buf.h>
#include <sys/kdb.h>
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/proc.h>
@ -5866,7 +5867,7 @@ getdirtybuf(bpp, mtx, waitfor)
if ((bp = *bpp) == NULL)
return (0);
if (bp->b_vp == NULL)
backtrace();
kdb_backtrace();
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) == 0) {
if ((bp->b_vflags & BV_BKGRDINPROG) == 0)
break;

View File

@ -39,8 +39,6 @@ __FBSDID("$FreeBSD$");
#include <ufs/ffs/fs.h>
#include "fsck.h"
#else
#include "opt_ddb.h"
#include <sys/systm.h>
#include <sys/lock.h>
#include <sys/malloc.h>
@ -58,7 +56,7 @@ __FBSDID("$FreeBSD$");
#include <ufs/ffs/ffs_extern.h>
#include <ufs/ffs/fs.h>
#ifdef DDB
#ifdef KDB
void ffs_checkoverlap(struct buf *, struct inode *);
#endif
@ -168,7 +166,7 @@ ffs_fragacct(fs, fragmap, fraglist, cnt)
}
}
#ifdef DDB
#ifdef KDB
void
ffs_checkoverlap(bp, ip)
struct buf *bp;
@ -197,7 +195,7 @@ ffs_checkoverlap(bp, ip)
panic("ffs_checkoverlap: Disk buffer overlap");
}
}
#endif /* DDB */
#endif /* KDB */
/*
* block operations