diff options
author | Andy Wingo <wingo@pobox.com> | 2015-11-27 12:31:16 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2015-12-01 11:30:54 +0100 |
commit | 9a8c2995aefcbc39381215f18e2733c6943060e9 (patch) | |
tree | 209eab613e0899a82ded56af7ccfca823df9a750 /libguile/frames.c | |
parent | 029af6f68ab7bbe02e1cc189c8f99e7e754daf74 (diff) | |
download | guile-9a8c2995aefcbc39381215f18e2733c6943060e9.tar.gz |
More robust low-level frame printer
* libguile/frames.c (scm_i_frame_print): Print using
frame-procedure-name, not frame-procedure.
Diffstat (limited to 'libguile/frames.c')
-rw-r--r-- | libguile/frames.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libguile/frames.c b/libguile/frames.c index 7432f8d84..7492adfb2 100644 --- a/libguile/frames.c +++ b/libguile/frames.c @@ -43,9 +43,17 @@ scm_i_frame_print (SCM frame, SCM port, scm_print_state *pstate) { scm_puts_unlocked ("#<frame ", port); scm_uintprint (SCM_UNPACK (frame), 16, port); - scm_putc_unlocked (' ', port); - scm_write (scm_frame_procedure (frame), port); - /* don't write args, they can get us into trouble. */ + if (scm_module_system_booted_p) + { + SCM name = scm_frame_procedure_name (frame); + + if (scm_is_true (name)) + { + scm_putc_unlocked (' ', port); + scm_write (name, port); + } + } + /* Don't write args, they can be ridiculously long. */ scm_puts_unlocked (">", port); } |