;;; Source file: /usr/local/lib/jade/3.2/lisp/gdb.jl
;;; Compiled by jsh@orcrist on Sun Oct 16 20:20:44 1994
;;; Jade 3.2

(require (quote shell))

(provide (quote gdb))

(defvar gdb-file-name "gdb" 70109)

(defvar gdb-auto-centre nil 70150)

(defvar gdb-last-frame nil 70248)

(make-variable-buffer-local (quote gdb-last-frame))

(defvar gdb-last-buffer nil 70311)

(defvar gdb-buffer-p nil 70357)

(make-variable-buffer-local (quote gdb-buffer-p))

(defvar gdb-spare-output nil)

(make-variable-buffer-local (quote gdb-spare-output))

(defvar gdb-delete-prompt nil)

(make-variable-buffer-local (quote gdb-delete-prompt))

(defvar gdb-ctrl-c-keymap (copy-sequence shell-ctrl-c-keymap))

(bind-keys gdb-ctrl-c-keymap "Ctrl-n" (quote (gdb-command "next %d
" (prefix-numeric-argument current-prefix-arg))) "Ctrl-s" (quote (gdb-command "step %d
" (prefix-numeric-argument current-prefix-arg))) "Ctrl-i" (quote (gdb-command "stepi %d
" (prefix-numeric-argument current-prefix-arg))) "Ctrl-I" (quote (gdb-command "nexti %d
" (prefix-numeric-argument current-prefix-arg))) "Ctrl-f" (quote (gdb-command "finish
")) "Ctrl-r" (quote (gdb-command "cont
")) "Ctrl-<" (quote (gdb-command "up %d
" (prefix-numeric-argument current-prefix-arg))) "Ctrl->" (quote (gdb-command "down %d
" (prefix-numeric-argument current-prefix-arg))) "Ctrl-b" (quote (gdb-command "break %s:%d
" (gdb-current-file) (gdb-current-line))) "Ctrl-t" (quote (gdb-command "tbreak %s:%d
" (gdb-current-file) (gdb-current-line))) "Ctrl-d" (quote (gdb-command "clear %d
" (gdb-current-line))) "Ctrl-l" (quote gdb-redisplay-frame))

(bind-keys ctrl-x-keymap "Ctrl-a" (quote (setq next-keymap-path (quote (gdb-ctrl-c-keymap)))))

(defun gdb (prog) 70414 (interactive "fProgram to debug:") (jade-byte-code "D	2]ÿ ±G±Hü  	F\"HJ
û $	H	HH	

H&
	*&&I²++F&HH
	
&&&&J& JF&!H\"#	E" [get-buffer "*gdb*" buffer shell-process make-buffer set-buffer-special clear-buffer goto-buffer kill-all-buffer-variables set-buffer-file-name prog gdb-file-name shell-program "-fullname" file-name-nondirectory shell-program-args "^(.*\\(.+\\) *|.+---)" shell-prompt-regexp lambda (x) gdb-output-filter x shell-output-stream shell-mode concat "GDB:" mode-name gdb-mode major-mode gdb-ctrl-c-keymap ctrl-c-keymap gdb-last-buffer gdb-buffer-p mildly-special-buffer eval-hook gdb-hook] 5))

(defun gdb-mode nil 70660 (jade-byte-code "I" [] 1))

(defmacro gdb-get-buffer-var (var) (jade-byte-code "+" [with-buffer gdb-last-buffer var] 3))

(defun gdb-current-file nil (jade-byte-code "ü 
Lû 	" [file-name-nondirectory gdb-buffer-p gdb-last-frame buffer-file-name] 2))

(defun gdb-current-line nil (jade-byte-code "ü 	Mû 	h" [gdb-buffer-p gdb-last-frame pos-line cursor-pos] 2))

(defun gdb-command (format-spec &rest format-args) (jade-byte-code "þ I²F!H±G±HH±	
þ 'JF&
G±H" [gdb-buffer-p gdb-last-buffer apply format shell-process format-spec format-args regexp-match-line "^\\(.*gdb.*\\) *" buffer-end gdb-delete-prompt] 5))

(defun gdb-output-filter (buffer data) (jade-byte-code "DI0±þ 
F$HHþ 	þ .	

HIF&H
þ ~
		H
		
		K	iK&J 	
F$Hû /H
ü ¥
		H
	
F\"û ­	HIF\"G±HHþF&HD±G±H6ü Ïû Ò6M
6I6¶I²F&H L		H!\"	
H#\"		H$ÿI²a]þ%G¶HEE" [new-frame buffer gdb-spare-output concat data goto-buffer-end gdb-delete-prompt regexp-match-line shell-prompt-regexp delete-area match-start match-end regexp-match "([^:
]+):([0-9]+):([0-9]+):.*
" insert substring 0 1 read 2 gdb-last-frame "" gdb-last-buffer frame gdb-buffer-p other-window current-window window pos line-pos old-buf goto-buffer open-file mark-block line-end goto-char gdb-auto-centre centre-display] 9))

(defun gdb-redisplay-frame nil (interactive) (jade-byte-code "þ I²F!HD±G±H3M
6L		H	
	
H
		HE" [gdb-buffer-p gdb-last-buffer gdb-last-frame frame pos 0 line-pos goto-buffer open-file mark-block line-end goto-char centre-display] 4))
