diff --git a/sys/kern/debug.c b/sys/kern/debug.c index 5b76e73..c1c624f 100644 --- a/sys/kern/debug.c +++ b/sys/kern/debug.c @@ -146,11 +146,15 @@ void Debug_Dump(int argc, const char *argv[]) { uint64_t off, len; - if (argc == 3) + + if (argc != 3) { - off = Debug_SymbolToInt(argv[1]); - len = Debug_SymbolToInt(argv[2]); + kprintf("Dump requires 3 arguments\n"); + return; } + + off = Debug_SymbolToInt(argv[1]); + len = Debug_SymbolToInt(argv[2]); kprintf("Dump 0x%llx 0x%llx\n", off, len); Debug_PrintHex((const char *)off, len, 0, len); } @@ -185,13 +189,13 @@ Debug_Prompt() // execute command if (strcmp(argv[0], "help") == 0) { - Debug_Help(argc, argv); + Debug_Help(argc, (const char **)argv); } else if (strcmp(argv[0], "dump") == 0) { - Debug_Dump(argc, argv); + Debug_Dump(argc, (const char **)argv); } else if (strcmp(argv[0], "registers") == 0) { - Debug_Registers(argc, argv); + Debug_Registers(argc, (const char **)argv); } else if (strcmp(argv[0], "echo") == 0) { - Debug_Echo(argc, argv); + Debug_Echo(argc, (const char **)argv); } else if (strcmp(argv[0], "") != 0) { kprintf("Unknown command '%s'\n", argv[0]); }