From ae442212be02b16b7e8b2d4e7d1e683040a28532 Mon Sep 17 00:00:00 2001 From: Yeongjin Jang Date: Mon, 1 Apr 2019 01:22:52 -0700 Subject: [PATCH] hint --- kern/monitor.c | 5 ++++- lib/printfmt.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kern/monitor.c b/kern/monitor.c index e137e92..ee25809 100644 --- a/kern/monitor.c +++ b/kern/monitor.c @@ -21,6 +21,7 @@ struct Command { int (*func)(int argc, char** argv, struct Trapframe* tf); }; +// LAB 1: add your command to here... static struct Command commands[] = { { "help", "Display this list of commands", mon_help }, { "kerninfo", "Display information about the kernel", mon_kerninfo }, @@ -57,7 +58,9 @@ mon_kerninfo(int argc, char **argv, struct Trapframe *tf) int mon_backtrace(int argc, char **argv, struct Trapframe *tf) { - // Your code here. + // LAB 1: Your code here. + // HINT 1: use read_ebp(). + // HINT 2: print the current ebp on the first line (not current_ebp[0]) return 0; } diff --git a/lib/printfmt.c b/lib/printfmt.c index 28e01c9..802adcd 100644 --- a/lib/printfmt.c +++ b/lib/printfmt.c @@ -205,7 +205,7 @@ vprintfmt(void (*putch)(int, void*), void *putdat, const char *fmt, va_list ap) // (unsigned) octal case 'o': - // Replace this with your code. + // LAB 1: Replace this with your code. putch('X', putdat); putch('X', putdat); putch('X', putdat);