Mercurial > vim
comparison src/debugger.c @ 21493:7449921216bc v8.2.1297
patch 8.2.1297: when a test fails it's often not easy to see where
Commit: https://github.com/vim/vim/commit/a5d0423fa16f18b4576a2a07e50034e489587a7d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 26 15:37:02 2020 +0200
patch 8.2.1297: when a test fails it's often not easy to see where
Problem: When a test fails it's often not easy to see what the call stack
is.
Solution: Add more entries from the call stack in the exception message.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 26 Jul 2020 15:45:04 +0200 |
parents | d9ea4f0bfd34 |
children | a607f02fd17a |
comparison
equal
deleted
inserted
replaced
21492:fb81749507a4 | 21493:7449921216bc |
---|---|
103 { | 103 { |
104 smsg(_("Newval = \"%s\""), debug_newval); | 104 smsg(_("Newval = \"%s\""), debug_newval); |
105 vim_free(debug_newval); | 105 vim_free(debug_newval); |
106 debug_newval = NULL; | 106 debug_newval = NULL; |
107 } | 107 } |
108 sname = estack_sfile(); | 108 sname = estack_sfile(FALSE); |
109 if (sname != NULL) | 109 if (sname != NULL) |
110 msg((char *)sname); | 110 msg((char *)sname); |
111 vim_free(sname); | 111 vim_free(sname); |
112 if (SOURCING_LNUM != 0) | 112 if (SOURCING_LNUM != 0) |
113 smsg(_("line %ld: %s"), SOURCING_LNUM, cmd); | 113 smsg(_("line %ld: %s"), SOURCING_LNUM, cmd); |
342 debug_backtrace_level = 0; | 342 debug_backtrace_level = 0; |
343 msg(_("frame is zero")); | 343 msg(_("frame is zero")); |
344 } | 344 } |
345 else | 345 else |
346 { | 346 { |
347 char_u *sname = estack_sfile(); | 347 char_u *sname = estack_sfile(FALSE); |
348 int max = get_maxbacktrace_level(sname); | 348 int max = get_maxbacktrace_level(sname); |
349 | 349 |
350 if (debug_backtrace_level > max) | 350 if (debug_backtrace_level > max) |
351 { | 351 { |
352 debug_backtrace_level = max; | 352 debug_backtrace_level = max; |
363 char *cur; | 363 char *cur; |
364 char *next; | 364 char *next; |
365 int i = 0; | 365 int i = 0; |
366 int max; | 366 int max; |
367 | 367 |
368 sname = estack_sfile(); | 368 sname = estack_sfile(FALSE); |
369 max = get_maxbacktrace_level(sname); | 369 max = get_maxbacktrace_level(sname); |
370 if (sname != NULL) | 370 if (sname != NULL) |
371 { | 371 { |
372 cur = (char *)sname; | 372 cur = (char *)sname; |
373 while (!got_int) | 373 while (!got_int) |