diff options
author | 2017-10-13 17:32:22 +0000 | |
---|---|---|
committer | 2017-10-13 17:32:22 +0000 | |
commit | 1c302ed16e149d9e1c2dd4d76c3aa82c072ba8cd (patch) | |
tree | a06ba41768ef6c3daff0a3538ef3d08373b9fb4a /sys/ddb/db_ctf.c | |
parent | Comment trap handlers (diff) | |
download | wireguard-openbsd-1c302ed16e149d9e1c2dd4d76c3aa82c072ba8cd.tar.xz wireguard-openbsd-1c302ed16e149d9e1c2dd4d76c3aa82c072ba8cd.zip |
- use db_printf()
- refuse to pretty-print if there's no CTF
ok mpi@
Diffstat (limited to 'sys/ddb/db_ctf.c')
-rw-r--r-- | sys/ddb/db_ctf.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/ddb/db_ctf.c b/sys/ddb/db_ctf.c index d06c6c27b86..642d153e598 100644 --- a/sys/ddb/db_ctf.c +++ b/sys/ddb/db_ctf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_ctf.c,v 1.22 2017/10/11 18:21:38 jasper Exp $ */ +/* $OpenBSD: db_ctf.c,v 1.23 2017/10/13 17:32:22 jasper Exp $ */ /* * Copyright (c) 2016-2017 Martin Pieuchot @@ -91,7 +91,7 @@ db_ctf_init(void) db_ctf.dlen = db_ctf.cth->cth_stroff + db_ctf.cth->cth_strlen; if ((db_ctf.cth->cth_flags & CTF_F_COMPRESS) == 0) { - printf("unsupported non-compressed CTF section\n"); + db_printf("unsupported non-compressed CTF section\n"); return; } @@ -558,6 +558,11 @@ db_ctf_pprint_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) const struct ctf_type *ctt; int t; + if (!db_ctf.ctf_found) { + db_printf("No CTF data found\n"); + db_flush_lex(); + } + /* * Read the struct name from the debugger input. */ |