*ignored first frame name with the TRACE command.

This commit is contained in:
Wang Renxin 2016-01-31 13:18:41 +08:00
parent 6a58615268
commit c4b4a0d53f
3 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,6 @@
Jan. 31 2016
Ignored first frame name with the TRACE command
Jan. 30 2016
Added a TRACE command to the shell
Fixed an infinity loop bug in the mb_debug_get_stack_trace function

Binary file not shown.

View File

@ -1151,12 +1151,15 @@ static int trace(struct mb_interpreter_t* s, void** l) {
mb_assert(s && l);
memset(frames, 0, _countof(frames));
mb_check(mb_attempt_open_bracket(s, l));
mb_check(mb_attempt_close_bracket(s, l));
mb_check(mb_debug_get_stack_trace(s, l, frames, _countof(frames)));
++p;
while(*p) {
_printf("%s", *p);
++p;