all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 8378a0c6cc9015363ca05ac92b1b053231bcd99e 1378 bytes (raw)
name: examples/gud-break.scm 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
 
#! /bin/sh
# -*-scheme-*-
exec guile -e main -s "$0" "$@"
!#
;; Experimental GUD support for Guile REPL
;; Find a gud.el that you want to patch, e.g.
;;     zcat /usr/share/emacs/24.3/lisp/progmodes/gud.el.gz > ~/.emacs.d/gud.el
;; or
;;     M-x find-function gdb RET
;;     C-x C-w ~/.emacs.d/gud.el RET
;; Patch it
;;     patch ~/.emacs.d/gud.el < 0001-Initial-Guile-REPL-guiler-debugger-support-for-GUD.patch
;; M-x load-library ~/.emacs.d/gud.el RET
;; M-x guiler RET
;; ,m gud-break
;; ,br main
;; ,r
;; ,n
;; ,n # no easy RET shortcut yet
;;
;; And see |> marker in Emac's left margin track the program's execution.

(read-set! keywords 'prefix)

(define (main . args)
  (eval '(main (command-line)) (resolve-module '(gud-break))))

(define-module (gud-break)
  :export (main))

(define (stderr fmt . args)
  (apply format (cons (current-error-port) (cons* fmt args)))
  (force-output (current-error-port)))

(define (main . args) 
  (stderr "~a:hello world\n" (current-source-location))
  (let
      ((a #f)
       (b #f))
    (set! a 1)
    (stderr "set: a=~a\n" a)
    (set! b 2)
    (stderr "set: b=~a\n" b)
    (let
        ((c #f)
         (d #f))
      (set! c 3)
      (stderr "set: c=~a\n" c)
      (set! d 4)
      (stderr "set: d=~a\n" d))
    (stderr "~a:leaving...\n" (current-source-location)))
  (stderr "~a:goodbye world\n" (current-source-location)))





debug log:

solving 8378a0c ...
found 8378a0c in https://yhetil.org/emacs/1407244906-12754-2-git-send-email-janneke@gnu.org/

applying [1/1] https://yhetil.org/emacs/1407244906-12754-2-git-send-email-janneke@gnu.org/
diff --git a/examples/gud-break.scm b/examples/gud-break.scm
new file mode 100644
index 0000000..8378a0c

1:41: trailing whitespace.
(define (main . args) 
Checking patch examples/gud-break.scm...
1:59: new blank line at EOF.
+
Applied patch examples/gud-break.scm cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 8378a0c6cc9015363ca05ac92b1b053231bcd99e	examples/gud-break.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.