diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-11-19 02:36:35 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-11-19 02:36:35 -0800 |
commit | f64f1ca50ead1af7feeb76b9a1d86e7a07060387 (patch) | |
tree | 00e8cc7bf87a8338fc9c48641d15c259d83719a9 | |
parent | c6ab07f7006161b7b21181ff3385dcf6bf01770b (diff) | |
download | mu-f64f1ca50ead1af7feeb76b9a1d86e7a07060387.tar.gz |
4125
-rw-r--r-- | 026call.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/026call.cc b/026call.cc index d718a9ce..d44188bf 100644 --- a/026call.cc +++ b/026call.cc @@ -203,3 +203,18 @@ while (current_step_index() >= SIZE(Current_routine->steps())) { // todo: fail if no products returned ++current_step_index(); } + +:(before "End Primitive Recipe Declarations") +_DUMP_CALL_STACK, +:(before "End Primitive Recipe Numbers") +put(Recipe_ordinal, "$dump-call-stack", _DUMP_CALL_STACK); +:(before "End Primitive Recipe Checks") +case _DUMP_CALL_STACK: { + break; +} +:(before "End Primitive Recipe Implementations") +case _DUMP_CALL_STACK: { + for (call_stack::const_reverse_iterator p = Current_routine->calls.rbegin(); p != Current_routine->calls.rend(); ++p) + cerr << get(Recipe, p->running_recipe).name << ":" << p->running_step_index << " -- " << to_string(to_instruction(*p)) << '\n'; + break; +} |