From e3fd25b18198709348af195dedadaceb88feb568 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 29 Sep 2008 21:46:58 +0000 Subject: 25775: fix logical problem with function line numbering inside eval-style traps --- Src/signals.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Src/signals.c') diff --git a/Src/signals.c b/Src/signals.c index 2cedeb2b9..ac5ffaa21 100644 --- a/Src/signals.c +++ b/Src/signals.c @@ -1076,6 +1076,13 @@ int intrap; /**/ int trapisfunc; +/* + * If the current trap is not a function, at what function depth + * did the trap get called? + */ +/**/ +int traplocallevel; + /* * sig is the signal number. * *sigtr is the value to be taken as the field in sigtrapped (since @@ -1132,6 +1139,7 @@ dotrapargs(int sig, int *sigtr, void *sigfn) /* execsave will save the old trap_return and trap_state */ execsave(); breaks = retflag = 0; + traplocallevel = locallevel; runhookdef(BEFORETRAPHOOK, NULL); if (*sigtr & ZSIG_FUNC) { int osc = sfcontext; -- cgit 1.4.1