diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-08-10 19:39:39 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-08-10 19:39:39 +0000 |
commit | c5b1161eac7a9e74a903806fba19f36288845966 (patch) | |
tree | 6334a2f6bc3483792fc83ed111dca25acb2db2fc /sys/ddb/db_command.c | |
parent | e55a17530b2fdc822fc5210e1c6702ed306d77b0 (diff) |
With a CTF kernel, DDB's print command will now pretty-print symbols.
Casting a type is not yet supported.
ok kettenis@, jasper@
Diffstat (limited to 'sys/ddb/db_command.c')
-rw-r--r-- | sys/ddb/db_command.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index bece0279d5d..94bb0a837e2 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.72 2017/04/20 12:59:36 visa Exp $ */ +/* $OpenBSD: db_command.c,v 1.73 2017/08/10 19:39:38 mpi Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -79,6 +79,7 @@ db_addr_t db_next; /* next address to be examined int db_cmd_search(char *, struct db_command *, struct db_command **); void db_cmd_list(struct db_command *); +void db_ctf_pprint_cmd(db_expr_t, int, db_expr_t,char *); void db_map_print_cmd(db_expr_t, int, db_expr_t, char *); void db_buf_print_cmd(db_expr_t, int, db_expr_t, char *); void db_malloc_print_cmd(db_expr_t, int, db_expr_t, char *); @@ -616,7 +617,12 @@ struct db_command db_command_table[] = { /* this must be the first entry, if it exists */ { "machine", NULL, 0, NULL}, #endif +#ifdef DDBCTF + { "print", db_ctf_pprint_cmd, CS_OWN, NULL }, + { "p", db_ctf_pprint_cmd, CS_OWN, NULL }, +#else { "print", db_print_cmd, 0, NULL }, +#endif { "examine", db_examine_cmd, CS_SET_DOT, NULL }, { "x", db_examine_cmd, CS_SET_DOT, NULL }, { "search", db_search_cmd, CS_OWN|CS_SET_DOT, NULL }, |