;ELC   
;;; compiled by jwz@thalidomide on Fri Jan  7 22:56:35 1994
;;; from file /th/jwz/emacs19/lisp/comint/gdb.el
;;; emacs version 19.9 Lucid (beta13).
;;; bytecomp version 2.22; 22-dec-93.
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19")))
    (error "This file was compiled for Emacs 19."))

(byte-code "!!" [require comint shell] 2)
(defvar gdb-prompt-pattern "^(.*gdb[+]?) *" "\
A regexp to recognize the prompt for gdb or gdb+.")
(defvar gdb-mode-map nil "\
Keymap for gdb-mode.")
(byte-code " \"\"######M" [gdb-mode-map make-sparse-keymap set-keymap-name set-keymap-parent comint-mode-map define-key "" gdb-refresh "" gdb-control-c-subjob "	" comint-dynamic-complete "" comint-dynamic-list-completions ctl-x-map " " gdb-break "&" send-gdb-command def-gdb (macro . #[(name key &optional doc) "\"!FF		DDFE*" [intern format "gdb-%s" name fun if (not (= 1 arg)) "%s %s" arg cstr progn defun (arg) doc "" (interactive "p") gdb-call key define-key gdb-mode-map quote] 8])] 4)
(fset 'gdb-step #[(arg) "	U	#!" [gdb-call arg 1 format "%s %s" "step"] 5 "\
Step one source line with display" "p"])
(define-key gdb-mode-map "" 'gdb-step)
(fset 'gdb-stepi #[(arg) "	U	#!" [gdb-call arg 1 format "%s %s" "stepi"] 5 "\
Step one instruction with display" "p"])
(define-key gdb-mode-map "" 'gdb-stepi)
(fset 'gdb-finish #[(arg) "	U	#!" [gdb-call arg 1 format "%s %s" "finish"] 5 "\
Finish executing current function" "p"])
(define-key gdb-mode-map "" 'gdb-finish)
(fset 'gdb-next #[(arg) "	U	#!" [gdb-call arg 1 format "%s %s" "next"] 5 "\
Step one source line (skip functions)" "p"])
(fset 'gdb-cont #[(arg) "	U	#!" [gdb-call arg 1 format "%s %s" "cont"] 5 "\
Proceed with the program" "p"])
(fset 'gdb-up #[(arg) "	U	#!" [gdb-call arg 1 format "%s %s" "up"] 5 "\
Go up N stack frames (numeric arg) with display" "p"])
(define-key gdb-mode-map "<" 'gdb-up)
(fset 'gdb-down #[(arg) "	U	#!" [gdb-call arg 1 format "%s %s" "down"] 5 "\
Go down N stack frames (numeric arg) with display" "p"])
(define-key gdb-mode-map ">" 'gdb-down)
(fset 'gdb-mode #[nil " \n!!\"	\n!!" [comint-mode use-local-map gdb-mode-map set-syntax-table c-mode-syntax-table mapcar make-local-variable (gdb-last-frame-displayed-p gdb-last-frame gdb-delete-prompt-marker gdb-filter-accumulator) nil gdb-last-frame gdb-delete-prompt-marker gdb-filter-accumulator gdb-mode major-mode "Inferior GDB" mode-name gdb-prompt-pattern comint-prompt-regexp t gdb-last-frame-displayed-p shell-dirtrackp shell-directory-tracker comint-input-sentinel run-hooks gdb-mode-hook] 3 "\
Major mode for interacting with an inferior Gdb process.
The following commands are available:

\\{gdb-mode-map}

\\[gdb-display-frame] displays in the other window
the last line referred to in the gdb buffer.

\\[gdb-step],\\[gdb-next], and \\[gdb-nexti] in the gdb window,
call gdb to step,next or nexti and then update the other window
with the current file and position.

If you are in a source file, you may select a point to break
at, by doing \\[gdb-break].

Commands:
Many commands are inherited from comint mode. 
Additionally we have:

\\[gdb-display-frame] display frames file in other window
\\[gdb-step] advance one line in program
\\[send-gdb-command] used for special printing of an arg at the current point.
C-x SPACE sets break point at current line." nil])
(byte-code "!" [boundp current-gdb-buffer nil] 2)
(defvar gdb-command-name "gdb" "\
Pathname for executing gdb.")
(fset 'gdb #[(path) "	!	!Q!	!n ˱P!&p!\"p!\"  )" [expand-file-name path file-name-nondirectory file switch-to-buffer "*gdb-" "*" file-name-directory default-directory newline "Current directory is " "\n" make-comint "gdb-" substitute-in-file-name gdb-command-name nil "-fullname" "-cd" set-process-filter get-buffer-process gdb-filter set-process-sentinel gdb-sentinel gdb-mode gdb-set-buffer] 8 "\
Run gdb on program FILE in buffer *gdb-FILE*.
The directory containing FILE becomes the initial working directory
and source-file directory for GDB.  If you wish to change this, use
the GDB commands `cd DIR' and `directory'." "fRun gdb on file: "])
(byte-code "MMMMMM" [gdb-set-buffer #[nil "=p" [major-mode gdb-mode current-gdb-buffer] 2] gdb-filter #[(proc string) "\n\nP\"\")" [t inhibit-quit gdb-filter-accumulator gdb-filter-accumulate-marker proc string gdb-filter-scan-input] 4] gdb-filter-accumulate-marker #[(proc string) "\nGV\nHU\n\"\n#\n\n\nT#\n\nO\n\nTO!B*\nTO\"\n)\"\nO\"\n" [nil gdb-filter-accumulator string 1 26 string-match "\n" end ":" 2 first-colon second-colon string-to-int gdb-last-frame gdb-last-frame-displayed-p gdb-filter-scan-input proc gdb-filter-insert ""] 6] gdb-filter-scan-input #[(proc string) "\"O\"O\"\")" [string "" nil gdb-filter-accumulator string-match "" start gdb-filter-insert proc 0 gdb-filter-accumulate-marker] 6] gdb-filter-insert #[(proc string) "`	!U`	!Wp	!qȎ	!b`\n!	!` p!?\"*	!b," [process-mark proc nil start old-buffer output-after-point moving process-buffer ((set-buffer old-buffer)) insert-before-markers string gdb-maybe-delete-prompt gdb-display-frame get-buffer-window t] 4] gdb-sentinel #[(proc msg) "\n!!\n\"\n!>\n!!P\np̎\n!q !mdb)\n!*" [buffer-name process-buffer proc nil overlay-arrow-position set-process-buffer process-status (signal exit) ": " symbol-name mode-line-process obuf ((set-buffer obuf)) set-buffer-modified-p buffer-modified-p 10 mode-name " " msg delete-process] 4]] 2)
(fset 'gdb-refresh #[(&optional arg) "	! " [recenter arg gdb-display-frame] 2 "\
Fix up a possibly garbled display, and redraw the arrow." "P"])
(fset 'gdb-display-frame #[(&optional nodisplay noauto) " 	\n??	@	A\"Ɖ" [gdb-set-buffer gdb-last-frame nodisplay gdb-last-frame-displayed-p noauto gdb-display-line t] 3 "\
Find, obey and delete the last filename-and-line marker from GDB.
The marker looks like \\032\\032FILENAME:LINE:CHARPOS\\n.
Obeying it means displaying in another window the specified file and line." nil])
(fset 'gdb-display-line #[(true-file line) "!\"	q~!`	 `p)	eW	dV~	b)\"-" [nil pre-display-buffer-function t pop-up-windows find-file-noselect true-file buffer display-buffer window pos goto-line line "=>" overlay-arrow-string overlay-arrow-position make-marker set-window-point] 3])
(fset 'gdb-call #[(command) "db\n!!b`y`U? `Z`{E* \n!	P\"" [process-mark get-buffer-process current-gdb-buffer pt 0 point-marker gdb-delete-prompt-marker gdb-set-buffer process-send-string command "\n"] 4 "\
Invoke gdb COMMAND displaying source in other window." nil])
(fset 'gdb-maybe-delete-prompt #[nil "8A@@\n\\b`\n\\dX``\n\\{``\n\\|h`!!U?@ǉǉ*" [gdb-delete-prompt-marker 2 length prompt process-mark get-buffer-process current-gdb-buffer nil] 4])
(fset 'gdb-break #[(temp) "	!~y`\"T)	!\n˪ΰ\"*" [file-name-nondirectory buffer-file-name 0 count-lines 1 line file-name process-send-string get-buffer-process current-gdb-buffer temp "tbreak " "break " ":" "\n"] 7 "\
Set GDB breakpoint at this source line.  With ARG set temporary breakpoint." "P"])
(fset 'gdb-read-address #[nil "`Z#`u\n!u`{!u`u!u	`{," [nil begin found pt search-backward "0x" 7 t 2 re-search-forward "[^0-9a-f]" -1 re-search-backward "[^0-9]" 1] 5 "\
Return a string containing the core-address found in the buffer at point."])
(defvar gdb-commands nil "\
List of strings or functions used by send-gdb-command.
It is for customization by you.")
(fset 'send-gdb-command #[(arg) "8 p=`!\n\n;\n	\"\n	!	!db\nc*" [nil addr comm arg gdb-commands gdb-read-address current-gdb-buffer set-mark format switch-to-buffer] 3 "\
This command reads the number where the cursor is positioned.  It
 then inserts this ADDR at the end of the gdb buffer.  A numeric arg
 selects the ARG'th member COMMAND of the list gdb-print-command.  If
 COMMAND is a string, (format COMMAND ADDR) is inserted, otherwise
 (funcall COMMAND ADDR) is inserted.  eg. \"p (rtx)%s->fld[0].rtint\"
 is a possible string to be a member of gdb-commands.  " "P"])
(fset 'gdb-control-c-subjob #[nil "p!\"" [process-send-string get-buffer-process ""] 3 "\
Send a Control-C to the subprocess." nil])
(provide 'gdb)
