summaryrefslogtreecommitdiff
path: root/libguile/backtrace.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2014-04-16 14:33:20 +0200
committerAndy Wingo <wingo@pobox.com>2014-04-16 14:33:20 +0200
commit4819276185a35001d56af93177fc29a6a7700000 (patch)
tree8f7a38f23d453dc9e4f9eef3368790ab8c88b64f /libguile/backtrace.c
parentd856931d8dedf3aeea2f5e8d530f43162b9dfaa5 (diff)
downloadguile-4819276185a35001d56af93177fc29a6a7700000.tar.gz
Better backtraces from C, especially for optimized closures
* libguile/frames.h: * libguile/frames.c (scm_frame_call_representation): New interface; dispatches to Scheme. * libguile/backtrace.c (display_application): Use scm_frame_call_representation. This should be monotonically better, given that scm_frame_arguments (which was previously called) also dispatched to Scheme and actually ended up calling frame-call-representation.
Diffstat (limited to 'libguile/backtrace.c')
-rw-r--r--libguile/backtrace.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libguile/backtrace.c b/libguile/backtrace.c
index e247aa7af..fa12a5dd0 100644
--- a/libguile/backtrace.c
+++ b/libguile/backtrace.c
@@ -1,5 +1,5 @@
/* Printing of backtraces and error messages
- * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010, 2011 Free Software Foundation
+ * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010, 2011, 2014 Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -262,14 +262,7 @@ display_frame_expr (char *hdr, SCM exp, char *tlr, int indentation, SCM sport, S
static void
display_application (SCM frame, int indentation, SCM sport, SCM port, scm_print_state *pstate)
{
- SCM proc = scm_frame_procedure (frame);
- SCM name = (scm_is_true (scm_procedure_p (proc))
- ? scm_procedure_name (proc)
- : SCM_BOOL_F);
- display_frame_expr ("[",
- scm_cons (scm_is_true (name) ? name : proc,
- scm_frame_arguments (frame)),
- "]",
+ display_frame_expr ("[", scm_frame_call_representation (frame), "]",
indentation,
sport,
port,