summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2009-08-27 21:50:46 +0100
committerNeil Jerram <neil@ossau.uklinux.net>2009-08-27 21:58:12 +0100
commit248ee86a0bd9d1481dff4d76508bbc7595a04314 (patch)
tree76341ebe28d05aaa5ccc60bbdd713bfec35cdccd
parentfa316af70ff11767d9a8eb971d9e0b888152a15c (diff)
Remove superfluous ice-9-debugger-extensions code for old Guile versions
* module/ice-9/debugging/ice-9-debugger-extensions.scm: Remove all code checking for version < 1.7, and move code for versions >= 1.7 up to top level. Comment out dummy mutex definitions for now, as I'm not sure how to rewrite them correctly for psyntax.
-rw-r--r--module/ice-9/debugging/ice-9-debugger-extensions.scm58
-rwxr-xr-xmodule/ice-9/gds-client.scm21
2 files changed, 18 insertions, 61 deletions
diff --git a/module/ice-9/debugging/ice-9-debugger-extensions.scm b/module/ice-9/debugging/ice-9-debugger-extensions.scm
index a8b8c970e..5d7bfc8b5 100644
--- a/module/ice-9/debugging/ice-9-debugger-extensions.scm
+++ b/module/ice-9/debugging/ice-9-debugger-extensions.scm
@@ -5,11 +5,8 @@
;;; Upgrade the debugger state object so that it can carry a flag
;;; indicating whether the debugging session is continuable.
-(cond ((string>=? (version) "1.7")
- (use-modules (ice-9 debugger state))
- (define-module (ice-9 debugger state)))
- (else
- (define-module (ice-9 debugger))))
+(use-modules (ice-9 debugger state))
+(define-module (ice-9 debugger state))
(set! state-rtd (make-record-type "debugger-state" '(stack index flags)))
(set! state? (record-predicate state-rtd))
@@ -26,18 +23,15 @@
;;; Add commands that (ice-9 debugger) doesn't currently have, for
;;; continuing or single stepping program execution.
-(cond ((string>=? (version) "1.7")
- (use-modules (ice-9 debugger command-loop))
- (define-module (ice-9 debugger command-loop)
- #:use-module (ice-9 debugger)
- #:use-module (ice-9 debugger state)
- #:use-module (ice-9 debugging traps))
- (define new-define-command define-command)
- (set! define-command
- (lambda (name argument-template documentation procedure)
- (new-define-command name argument-template procedure))))
- (else
- (define-module (ice-9 debugger))))
+(use-modules (ice-9 debugger command-loop))
+(define-module (ice-9 debugger command-loop)
+ #:use-module (ice-9 debugger)
+ #:use-module (ice-9 debugger state)
+ #:use-module (ice-9 debugging traps))
+(define new-define-command define-command)
+(set! define-command
+ (lambda (name argument-template documentation procedure)
+ (new-define-command name argument-template procedure)))
(use-modules (ice-9 debugging steps))
@@ -106,14 +100,6 @@ print the result obtained."
"Continue until entry to @var{n}th next frame in same file."
debugger:next)
-;;; Export a couple of procedures for use by (ice-9 debugging trace).
-
-(cond ((string>=? (version) "1.7"))
- (else
- (define-module (ice-9 debugger))
- (export write-frame-short/expression
- write-frame-short/application)))
-
;;; Provide a `debug-trap' entry point in (ice-9 debugger). This is
;;; designed so that it can be called to explore the stack at a
;;; breakpoint, and to single step from the breakpoint.
@@ -124,11 +110,6 @@ print the result obtained."
(define *not-yet-introduced* #t)
-(cond ((string>=? (version) "1.7"))
- (else
- (define (debugger-command-loop state)
- (read-and-dispatch-commands state (current-input-port)))))
-
(define-public (debug-trap trap-context)
"Invoke the Guile debugger to explore the stack at the specified @var{trap}."
(start-stack 'debugger
@@ -154,19 +135,4 @@ print the result obtained."
(write-state-short-with-source-location state)
(debugger-command-loop state))))
-(define write-state-short-with-source-location
- (cond ((string>=? (version) "1.7")
- write-state-short)
- (else
- (lambda (state)
- (let* ((frame (stack-ref (state-stack state) (state-index state)))
- (source (frame-source frame))
- (position (and source (source-position source))))
- (format #t "Frame ~A at " (frame-number frame))
- (if position
- (display-position position)
- (display "unknown source location"))
- (newline)
- (write-char #\tab)
- (write-frame-short frame)
- (newline))))))
+(define write-state-short-with-source-location write-state-short)
diff --git a/module/ice-9/gds-client.scm b/module/ice-9/gds-client.scm
index 960015abd..cdca7b652 100755
--- a/module/ice-9/gds-client.scm
+++ b/module/ice-9/gds-client.scm
@@ -13,16 +13,7 @@
run-utility
gds-accept-input))
-(cond ((string>=? (version) "1.7")
- (use-modules (ice-9 debugger utils)))
- (else
- (define the-ice-9-debugger-module (resolve-module '(ice-9 debugger)))
- (module-export! the-ice-9-debugger-module
- '(source-position
- write-frame-short/application
- write-frame-short/expression
- write-frame-args-long
- write-frame-long))))
+(use-modules (ice-9 debugger utils))
(use-modules (ice-9 debugger))
@@ -204,11 +195,11 @@
(else
(format #f "~A (PID ~A)" arg (getpid))))))))
-(if (not (defined? 'make-mutex))
- (begin
- (define (make-mutex) #f)
- (define lock-mutex noop)
- (define unlock-mutex noop)))
+;;(if (not (defined? 'make-mutex))
+;; (begin
+;; (define (make-mutex) #f)
+;; (define lock-mutex noop)
+;; (define unlock-mutex noop)))
(define write-mutex (make-mutex))