summaryrefslogtreecommitdiff
path: root/libguile/frames.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-10-04 19:55:12 +0200
committerAndy Wingo <wingo@pobox.com>2013-10-04 19:55:12 +0200
commitf8fb13ef8c3c491983a90bfcfac1257e93a8186d (patch)
treefa4a381a0286626277664500f08f4aae21bd0063 /libguile/frames.c
parentfea115c33f35b95c89ebb9142faaa06a43d83036 (diff)
downloadguile-f8fb13ef8c3c491983a90bfcfac1257e93a8186d.tar.gz
better RTL debugging
* libguile/frames.c (scm_frame_source, scm_frame_instruction_pointer): Fix to work with RTL programs. * module/system/vm/debug.scm (find-debug-context): Allow for the possibility of there being no ELF image. (find-program-debug-info, find-program-arities) (program-minimum-arity, find-program-docstring) (find-program-properties, find-source-for-addr) (find-program-die, find-program-sources): Don't bail if we couldn't get the debug context. * module/system/vm/frame.scm (frame-next-source) (frame-call-representation): Allow RTL programs. * module/system/vm/program.scm (program-arguments-alist): Placeholder implementation for RTL programs. (program-arguments-alists): Don't bail if we couldn't get the arities.
Diffstat (limited to 'libguile/frames.c')
-rw-r--r--libguile/frames.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libguile/frames.c b/libguile/frames.c
index 8ce5aa0b0..448a0cbbe 100644
--- a/libguile/frames.c
+++ b/libguile/frames.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -110,7 +110,7 @@ SCM_DEFINE (scm_frame_source, "frame-source", 1, 0, 0,
proc = scm_frame_procedure (frame);
- if (SCM_PROGRAM_P (proc))
+ if (SCM_PROGRAM_P (proc) || SCM_RTL_PROGRAM_P (proc))
return scm_program_source (scm_frame_procedure (frame),
scm_frame_instruction_pointer (frame),
SCM_UNDEFINED);
@@ -260,6 +260,10 @@ SCM_DEFINE (scm_frame_instruction_pointer, "frame-instruction-pointer", 1, 0, 0,
SCM_VALIDATE_VM_FRAME (1, frame);
program = scm_frame_procedure (frame);
+ if (SCM_RTL_PROGRAM_P (program))
+ return scm_from_ptrdiff_t (SCM_VM_FRAME_IP (frame) -
+ (scm_t_uint8 *) SCM_RTL_PROGRAM_CODE (program));
+
if (!SCM_PROGRAM_P (program))
return SCM_INUM0;