diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-01-20 22:39:17 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-01-20 22:39:17 -0800 |
commit | c6d7e940e105958e4303eba504cf147b7f428cdf (patch) | |
tree | 34bcb7d5f5cad29e415dca73392253e5eb0861fb /eval.c | |
parent | 1a80b87961607dbf8026a98ee0c6fc4d3f7db96d (diff) | |
download | txr-c6d7e940e105958e4303eba504cf147b7f428cdf.tar.gz txr-c6d7e940e105958e4303eba504cf147b7f428cdf.tar.bz2 txr-c6d7e940e105958e4303eba504cf147b7f428cdf.zip |
fix --no-debug-support configuration.
* debug.h (debug_init): Define as ((void) 0) macro in the
no debug support case.
* unwind.h (uw_last_form_expanded): No-debug-support version
must yield a value, not void.
* unwind.c (ffcal_frame_type, eval_frame_type, expand_frame_type):
Define only if CONFIG_DEBUG_SUPPORT is enabled, to suppress
unused warnings.
* eval.c (do_eval): Conditionally define debug-related code.
The uw_push_eval function doesn't exist if CONFIG_DEBUG_SUPPORT
isn't enabled.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1609,13 +1609,17 @@ static val do_eval(val form, val env, val ctx, val (*lookup)(val env, val sym)) { val self = lit("eval"); +#if CONFIG_DEBUG_SUPPORT uw_frame_t *ev = 0; +#endif val ret = nil; +#if CONFIG_DEBUG_SUPPORT if (dbg_backtrace) { ev = coerce(uw_frame_t *, alloca(sizeof *ev)); uw_push_eval(ev, form, env); } +#endif sig_check_fast(); @@ -1669,8 +1673,10 @@ static val do_eval(val form, val env, val ctx, ret = form; } +#if CONFIG_DEBUG_SUPPORT if (ev != 0) uw_pop_frame(ev); +#endif return ret; } |