wingo pushed a commit to branch master
in repository guile.
commit 9a8c2995aefcbc39381215f18e2733c6943060e9
Author: Andy Wingo <[email protected]>
Date: Fri Nov 27 12:31:16 2015 +0100
More robust low-level frame printer
* libguile/frames.c (scm_i_frame_print): Print using
frame-procedure-name, not frame-procedure.
---
libguile/frames.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/libguile/frames.c b/libguile/frames.c
index 7432f8d..7492adf 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);
}