MCPcopy Create free account
hub / github.com/F-Stack/f-stack / db_textdump_cmd

Function db_textdump_cmd

freebsd/ddb/db_textdump.c:533–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533void
534db_textdump_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
535{
536 int t;
537
538 t = db_read_token();
539 if (t != tIDENT) {
540 db_textdump_usage();
541 return;
542 }
543 if (db_read_token() != tEOL) {
544 db_textdump_usage();
545 return;
546 }
547 if (strcmp(db_tok_string, "set") == 0) {
548 textdump_pending = 1;
549 db_printf("textdump set\n");
550 } else if (strcmp(db_tok_string, "status") == 0) {
551 if (textdump_pending)
552 db_printf("textdump is set\n");
553 else
554 db_printf("textdump is not set\n");
555 } else if (strcmp(db_tok_string, "unset") == 0) {
556 textdump_pending = 0;
557 db_printf("textdump unset\n");
558 } else if (strcmp(db_tok_string, "dump") == 0) {
559 textdump_pending = 1;
560 doadump(true);
561 } else {
562 db_textdump_usage();
563 }
564}

Callers

nothing calls this directly

Calls 5

db_read_tokenFunction · 0.85
db_textdump_usageFunction · 0.85
strcmpFunction · 0.85
db_printfFunction · 0.85
doadumpFunction · 0.85

Tested by

no test coverage detected