diff --git a/nemu/src/monitor/sdb/watchpoint.c b/nemu/src/monitor/sdb/watchpoint.c index b70ce79..d283a7d 100644 --- a/nemu/src/monitor/sdb/watchpoint.c +++ b/nemu/src/monitor/sdb/watchpoint.c @@ -110,6 +110,9 @@ WP* get_wp(int NO) { void free_wp(WP *_wp) { WP* wp = del_wp(&head, _wp); + if (wp == NULL) { + printf("free_wp: no such watchpoint\n"); + } wp->next = free_; free_ = wp; wp->expr[0] = '\0';