/* * help.c * $Id: help.c,v 1.12 2005/01/24 12:17:39 mah Exp $ * Christoph Berg * * 010729 */ #include #include #include // TODO maybe this should be in a different file, is also referenced by non-interactive parts void die(char *format, ...) { va_list arg; va_start(arg, format); vfprintf(stderr, format, arg); va_end(arg); puts(""); exit(1); } void help() { printf("List of available commands:\n"); printf(" bindump START [LENGTH] - show binary dump of memory contents\n" ); printf(" disassemble START [LENGTH] - disassemble instructions in memory\n" ); printf(" dump START [LENGTH] - show hex dump of memory contents\n" ); printf(" exit - exit the simulator\n" ); printf(" explain ADDR - decode the instruction at an address\n" ); printf(" exrequest NUMBER - raise external event line\n" ); printf(" exservice NUMBER - lower external event line\n" ); printf(" explain ADDR - decode the instruction at an address\n" ); printf(" fill START LENGTH PATTERN - fill memory region\n" ); printf(" fillcount START LENGTH - special fill, RTFS\n" ); printf(" fpr - show FPR contents\n" ); printf(" fpr.s [REG VALUE] - show / set FPR contents (singles only)\n" ); printf(" fpr.d [REG VALUE] - show / set FPR contents (double only)\n" ); printf(" gpr [REG VALUE] - show / set GPR contents\n" ); printf(" help - show this help message\n" ); printf(" hexdump START [LENGTH] - see dump\n" ); printf(" jump ADDR - jump to a target address \n" ); printf(" load FILE - load an object file\n" ); printf(" number NUM - show number in different formats\n" ); printf(" poke ADDR DATA - write a word to the memory\n" ); printf(" prof - show profiling information\n" ); printf(" quit - exit the simulator\n" ); printf(" reset - initialize the machine\n" ); printf(" run STEP - run many steps\n" ); printf(" runto ADDR - run until some address\n" ); printf(" set [no]OPTION - set option, RTFS\n" ); printf(" spr [REG VALUE] - show / set SPR contents\n" ); printf(" state - show important registers\n" ); printf(" step - execute a single step\n" ); printf(" stepbb - step through one basic block\n" ); // TODO allow extra file argument for dump, I don't like separate command fdump printf(" fdump START [LENGTH] - same as dump, but writes to file kerneloutput.txt\n" ); }