summaryrefslogtreecommitdiffstats
path: root/sys/ddb/ddb.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-12-25 23:06:51 +0000
committerrwatson <rwatson@FreeBSD.org>2007-12-25 23:06:51 +0000
commit58739243681aa81940b676b9227a070fff00887c (patch)
tree088e1e3ce0a641612ba90e21c693b49eeadaa8d6 /sys/ddb/ddb.h
parent6bd00b26895bffe336f45242c749e29dddbc834f (diff)
downloadFreeBSD-src-58739243681aa81940b676b9227a070fff00887c.zip
FreeBSD-src-58739243681aa81940b676b9227a070fff00887c.tar.gz
Add a new DDB(4) facility, output capture. Input and output from DDB may be
captured to a memory buffer for later inspection using sysctl(8), or in the future, to a textdump. A new DDB command, "capture", is added, which accepts arguments "on", "off", "reset", and "status". A new DDB sysctl tree, debug.ddb.capture, is added, which can be used to resize the capture buffer and extract buffer contents. MFC after: 3 months
Diffstat (limited to 'sys/ddb/ddb.h')
-rw-r--r--sys/ddb/ddb.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h
index 716740b..cb516cc 100644
--- a/sys/ddb/ddb.h
+++ b/sys/ddb/ddb.h
@@ -37,6 +37,10 @@
#ifndef _DDB_DDB_H_
#define _DDB_DDB_H_
+#ifdef SYSCTL_DECL
+SYSCTL_DECL(_debug_ddb);
+#endif
+
#include <machine/db_machdep.h> /* type definitions */
#ifndef DB_MAXARGS
@@ -126,6 +130,7 @@ int db_value_of_name(const char *name, db_expr_t *valuep);
int db_write_bytes(vm_offset_t addr, size_t size, char *data);
db_cmdfcn_t db_breakpoint_cmd;
+db_cmdfcn_t db_capture_cmd;
db_cmdfcn_t db_continue_cmd;
db_cmdfcn_t db_delete_cmd;
db_cmdfcn_t db_deletehwatch_cmd;
@@ -168,4 +173,14 @@ struct command {
struct command_table *more; /* another level of command */
};
+/*
+ * Interface between DDB and the DDB output capture facility.
+ */
+struct dumperinfo;
+void db_capture_dump(struct dumperinfo *di);
+void db_capture_enterpager(void);
+void db_capture_exitpager(void);
+void db_capture_write(char *buffer, u_int buflen);
+void db_capture_writech(char ch);
+
#endif /* !_DDB_DDB_H_ */
OpenPOWER on IntegriCloud