;;; compiled by rms@mole.gnu.ai.mit.edu on Mon May 31 01:52:48 1993
;;; from file /home/fsf/rms/e19/lisp/gud.el
;;; emacs version 19.10.3.
;;; bytecomp version FSF 2.08
;;; optimization is on.

(byte-code "!!" [require comint etags] 2)
(defvar gud-key-prefix "" "\
Prefix of all GUD commands valid in C buffers.")
(byte-code "	P\"\"" [global-set-key gud-key-prefix "" gud-refresh " " gud-break] 3)
(defalias 'gud-overload-functions #[(gud-overload-alist) "\n\"" [mapcar #[(p) "@AKM" [p] 2] gud-overload-alist] 3 "\
Overload functions defined in GUD-OVERLOAD-ALIST.
This association list has elements of the form
     (ORIGINAL-FUNCTION-NAME  OVERLOAD-FUNCTION)"])
(byte-code "MMM" [gud-debugger-startup #[(file args) "!" [error "GUD not properly entered."] 2] gud-marker-filter #[(str) "!" [error "GUD not properly entered."] 2] gud-find-file #[(f) "!" [error "GUD not properly entered."] 2]] 2)
(defalias 'gud-def '(macro . #[(func cmd key &optional doc) "\n 	E&! PDF0 EDEF" [progn list defun func (arg) doc "" (interactive "p") gud-call cmd arg key define-key (current-local-map) "" quote global-set-key concat gud-key-prefix] 10 "\
Define FUNC to be a command sending STR and bound to KEY, with
optional doc string DOC.  Certain %-escapes in the string arguments
are interpreted specially if present.  These are:

  %f	name of current source file. 
  %l	number of current source line
  %e	text of the C lvalue or function-call expression surrounding point.
  %a	text of the hexadecimal address surrounding point
  %p	prefix argument to the command (if any) as a number

  The `current' source file is the file of the current buffer (if
we're in a C file) or the source file current at the last break or
step (if we're in the GUD buffer).
  The `current' line is that of the current buffer (if we're in a
source file) or the source line number at the last break or step (if
we're in the GUD buffer)."]))
(byte-code "! MMM" [boundp gud-last-frame nil gud-gdb-debugger-startup #[(file args) "P&" [apply make-comint "gud-" file "gdb" nil "-fullname" args] 7] gud-gdb-marker-filter #[(string) "\n\"* \n!!O\n!!O!B\n!O\n!OP\n" [string-match "\\([^:\n]*\\):\\([0-9]*\\):.*\n" string match-beginning 1 match-end string-to-int 2 gud-last-frame 0 nil] 6] gud-gdb-find-file #[(f) "	!" [find-file-noselect f] 2]] 2)
(defalias 'gdb #[(args) "!!M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"5!" [gud-overload-functions ((gud-debugger-startup . gud-gdb-debugger-startup) (gud-marker-filter . gud-gdb-marker-filter) (gud-find-file . gud-gdb-find-file)) gud-common-init args gud-break #[(arg) "\n\"" [gud-call "break %f:%l" arg] 3 "Set breakpoint at current line." "p"] define-key current-local-map "" global-set-key gud-key-prefix "" gud-tbreak #[(arg) "\n\"" [gud-call "tbreak %f:%l" arg] 3 "Set breakpoint at current line." "p"] "" "" gud-remove #[(arg) "\n\"" [gud-call "clear %l" arg] 3 "Remove breakpoint at current line" "p"] "" "" gud-step #[(arg) "\n\"" [gud-call "step %p" arg] 3 "Step one source line with display." "p"] "" "" gud-stepi #[(arg) "\n\"" [gud-call "stepi %p" arg] 3 "Step one instruction with display." "p"] "	" "	" gud-next #[(arg) "\n\"" [gud-call "next %p" arg] 3 "Step one line (skip functions)." "p"] "" "" gud-cont #[(arg) "\n\"" [gud-call "cont" arg] 3 "Continue with display." "p"] "" "" gud-finish #[(arg) "\n\"" [gud-call "finish" arg] 3 "Finish executing current function." "p"] "" "" gud-up #[(arg) "\n\"" [gud-call "up %p" arg] 3 "Up N stack frames (numeric arg)." "p"] "<" "<" gud-down #[(arg) "\n\"" [gud-call "down %p" arg] 3 "Down N stack frames (numeric arg)." "p"] ">" ">" gud-print #[(arg) "\n\"" [gud-call "print %e" arg] 3 "Evaluate C expression at point." "p"] "" "" "^(.*gdb[+]?) *" comint-prompt-regexp run-hooks gdb-mode-hook] 4 "\
Run gdb on program FILE in buffer *gud-FILE*.
The directory containing FILE becomes the initial working directory
and source-file directory for your debugger." "sRun gdb (like this): gdb "])
(defvar gud-sdb-needs-tags (byte-code "!?" [file-exists-p "/var"] 2) "\
If nil, we're on a System V Release 4 and don't need the tags hack.")
(byte-code "! MMM" [boundp gud-sdb-lastfile nil gud-sdb-debugger-startup #[(file args) "P%" [apply make-comint "gud-" file "sdb" nil args] 6] gud-sdb-marker-filter #[(string) "\n\" \n!!O\n!!O!BT \n\"3 \n!!O\nT \nQ \n\"Q \n\n!!O!BT \n\n" [string-match "\\(^0x\\w* in \\|^\\|\n\\)\\([^:\n]*\\):\\([0-9]*\\):.*\n" string match-beginning 2 match-end string-to-int 3 gud-last-frame "^\\(BREAKPOINT\\|STEPPED\\) process [0-9]+ function [^ ]+ in \\(.+\\)\n" gud-sdb-lastfile "^\\([0-9]+\\):" 1 nil] 6] gud-sdb-find-file #[(f) " \n!\n!" [gud-sdb-needs-tags find-tag-noselect f find-file-noselect] 2]] 2)
(defalias 'sdb #[(args) " ! \n! !!	!M #P\"M #P\"M #P\"M #P\"M #P\"M #P\"M #P\"M #P\"/!" [gud-sdb-needs-tags boundp tags-file-name file-exists-p error "The sdb support requires a valid tags table to work." gud-overload-functions ((gud-debugger-startup . gud-sdb-debugger-startup) (gud-marker-filter . gud-sdb-marker-filter) (gud-find-file . gud-sdb-find-file)) gud-common-init args gud-break #[(arg) "\n\"" [gud-call "%l b" arg] 3 "Set breakpoint at current line." "p"] define-key current-local-map "" global-set-key gud-key-prefix "" gud-tbreak #[(arg) "\n\"" [gud-call "%l c" arg] 3 "Set temporary breakpoint at current line." "p"] "" "" gud-remove #[(arg) "\n\"" [gud-call "%l d" arg] 3 "Remove breakpoint at current line" "p"] "" "" gud-step #[(arg) "\n\"" [gud-call "s %p" arg] 3 "Step one source line with display." "p"] "" "" gud-stepi #[(arg) "\n\"" [gud-call "i %p" arg] 3 "Step one instruction with display." "p"] "	" "	" gud-next #[(arg) "\n\"" [gud-call "S %p" arg] 3 "Step one line (skip functions)." "p"] "" "" gud-cont #[(arg) "\n\"" [gud-call "c" arg] 3 "Continue with display." "p"] "" "" gud-print #[(arg) "\n\"" [gud-call "%e/" arg] 3 "Evaluate C expression at point." "p"] "" "" "\\(^\\|\n\\)\\*" comint-prompt-regexp run-hooks sdb-mode-hook] 4 "\
Run sdb on program FILE in buffer *gud-FILE*.
The directory containing FILE becomes the initial working directory
and source-file directory for your debugger." "sRun sdb (like this): sdb "])
(byte-code "MMM" [gud-dbx-debugger-startup #[(file args) "P%" [apply make-comint "gud-" file "dbx" nil args] 6] gud-dbx-marker-filter #[(string) "\n\" \n!!O\n!!O!B\n" [string-match "stopped in .* at line \\([0-9]*\\) in file \"\\([^\"]*\\)\"" string match-beginning 2 match-end string-to-int 1 gud-last-frame] 6] gud-dbx-find-file #[(f) "	!" [find-file-noselect f] 2]] 2)
(defalias 'dbx #[(args) "!!M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"M #\nP\"-!" [gud-overload-functions ((gud-debugger-startup . gud-dbx-debugger-startup) (gud-marker-filter . gud-dbx-marker-filter) (gud-find-file . gud-dbx-find-file)) gud-common-init args gud-break #[(arg) "\n\"" [gud-call "stop at \"%f\":%l" arg] 3 "Set breakpoint at current line." "p"] define-key current-local-map "" global-set-key gud-key-prefix "" gud-remove #[(arg) "\n\"" [gud-call "clear %l" arg] 3 "Remove breakpoint at current line" "p"] "" "" gud-step #[(arg) "\n\"" [gud-call "step %p" arg] 3 "Step one line with display." "p"] "" "" gud-stepi #[(arg) "\n\"" [gud-call "stepi %p" arg] 3 "Step one instruction with display." "p"] "	" "	" gud-next #[(arg) "\n\"" [gud-call "next %p" arg] 3 "Step one line (skip functions)." "p"] "" "" gud-cont #[(arg) "\n\"" [gud-call "cont" arg] 3 "Continue with display." "p"] "" "" gud-up #[(arg) "\n\"" [gud-call "up %p" arg] 3 "Up (numeric arg) stack frames." "p"] "<" "<" gud-down #[(arg) "\n\"" [gud-call "down %p" arg] 3 "Down (numeric arg) stack frames." "p"] ">" ">" gud-print #[(arg) "\n\"" [gud-call "print %e" arg] 3 "Evaluate C expression at point." "p"] "" "" "^[^)]*dbx) *" comint-prompt-regexp run-hooks dbx-mode-hook] 4 "\
Run dbx on program FILE in buffer *gud-FILE*.
The directory containing FILE becomes the initial working directory
and source-file directory for your debugger." "sRun dbx (like this): dbx"])
(byte-code "! " [boundp gud-delete-prompt-marker nil] 2)
(defalias 'gud-mode #[nil " 	!!!!! !" [comint-mode gud-mode major-mode "Debugger" mode-name (": %s") mode-line-process use-local-map copy-keymap comint-mode-map make-local-variable gud-last-frame nil comint-prompt-regexp gud-delete-prompt-marker make-marker run-hooks gud-mode-hook] 3 "\
Major mode for interacting with an inferior debugger process.

   You start it up with one of the commands M-x gdb, M-x sdb, or
M-x dbx.  Each entry point finishes by executing a hook; gdb-mode-hook,
sdb-mode-hook or dbx-mode-hook respectively.

After startup, the following commands are available in both the GUD
interaction buffer and any source buffer GUD visits due to a breakpoint stop
or step operation:

\\[gud-break] sets a breakpoint at the current file and line.  In the
GUD buffer, the current file and line are those of the last breakpoint or
step.  In a source buffer, they are the buffer's file and current line.

\\[gud-remove] removes breakpoints on the current file and line.

\\[gud-refresh] displays in the source window the last line referred to
in the gud buffer.

\\[gud-step], \\[gud-next], and \\[gud-stepi] do a step-one-line,
step-one-line (not entering function calls), and step-one-instruction
and then update the source window with the current file and position.
\\[gud-cont] continues execution.

\\[gud-print] tries to find the largest C lvalue or function-call expression
around point, and sends it to the debugger for value display.

The above commands are common to all supported debuggers.

Under gdb and sdb, \\[gud-tbreak] behaves exactly like \\[gud-break],
except that the breakpoint is temporary; that is, it is removed when
execution stops on it.

Under gdb and dbx, \\[gud-up] pops up through an enclosing stack
frame.  \\[gud-down] drops back down through one.

If you are using gdb, \\[gdb-finish] runs execution to the return from
the current function and stops.

All the keystrokes above have synonyms (in the GUD buffer only) with
a prefix of C-c (this is for backward compatibility with old gdb.el).

All pre-defined functions for which the concept make sense repeat
themselves the appropriate number of times if you give a prefix
argument.

You may use the gud-def macro in the initialization hook to define other
commands.

Other commands for interacting with the debugger process are inherited from
comint mode, which see." nil])
(byte-code "! MMMM" [boundp gud-comint-buffer nil gud-common-init #[(args) "\" W !q cdbcebc#9 #( eb#M #<  !p!)GSYv 	8HUv 	8	S\\ \n!!Q!!n  ccc\", p!\"p!\" " [nil i file string= args "" get-buffer-create "*gud-scratch*" erase-buffer "\")" "(\"" re-search-forward " +" t replace-match "\" \"" "\"\"" read buffer-string kill-buffer 0 45 expand-file-name path file-name-nondirectory filepart switch-to-buffer "*gud-" "*" file-name-directory default-directory newline "Current directory is " "\n" gud-debugger-startup gud-mode set-process-filter get-buffer-process gud-filter set-process-sentinel gud-sentinel gud-set-buffer] 5] gud-set-buffer #[nil "=	 p" [major-mode gud-mode gud-comint-buffer] 2] gud-filter #[(proc string) "!qĉ!b	!& `	\"	\"!!`!U`!WL L p!L  )V !b," [t inhibit-quit process-buffer proc nil output-after-point moving process-mark marker-buffer gud-delete-prompt-marker delete-region set-marker insert-before-markers gud-marker-filter string gud-last-frame get-buffer-window gud-display-frame] 3] gud-sentinel #[(proc msg) "\n!! \n\"\n!>] \n!!P\np̎\n!q !mF ccccY dbcccc)\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)
(defalias 'gud-display-frame #[nil "  @A\"É" [gud-last-frame gud-set-buffer gud-display-line nil] 3 "\
Find and obey the last filename-and-line marker from the debugger.
Obeying it means displaying in another window the specified file and line." nil])
(byte-code "MM" [gud-display-line #[(true-file line) "	!\n!\nq 	!`'  `p#)eW= dVD  b)\"+" [gud-find-file true-file buffer display-buffer window nil pos widen goto-line line "=>" overlay-arrow-string overlay-arrow-position make-marker set-marker set-window-point] 4] gud-format-command #[(str arg) "p=?\", !!O	  ! \n@!!!OQ\"^ !!O	Q ! `\"T*T \nA!!OQ\"y !!O !!OQ\" !!O !!OQ\" !!O ! !!OQ)" [gud-comint-buffer insource string-match "\\(.*\\)%f\\(.*\\)" str match-beginning 1 match-end file-name-nondirectory buffer-file-name gud-last-frame 2 "\\(.*\\)%l\\(.*\\)" forward-line 0 widen count-lines "\\(.*\\)%e\\(.*\\)" find-c-expr "\\(.*\\)%a\\(.*\\)" gud-read-address "\\(.*\\)%p\\(.*\\)" arg int-to-string ""] 6]] 2)
(defalias 'gud-read-address #[nil "`Z# `* !\n!!`\"D !!`!!!	`\"," [nil begin found pt search-backward "0x" 7 t forward-char 2 buffer-substring 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."])
(fset (quote gud-call) #[(fmt &optional arg) "	\n\"\"!!)" [gud-format-command fmt arg msg message "Command: %s" sit-for 0 gud-basic-call] 3])
(defalias 'gud-basic-call #[(command) " 	P!q!b!\n!% `\")	\"*" [gud-set-buffer command "\n" get-buffer-process gud-comint-buffer proc process-mark forward-line 0 looking-at comint-prompt-regexp set-marker gud-delete-prompt-marker process-send-string] 3 "\
Invoke the debugger COMMAND displaying source in other window." nil])
(defalias 'gud-refresh #[(&optional arg) "	! " [recenter arg gud-display-frame] 2 "\
Fix up a possibly garbled display, and redraw the arrow." "P"])
(defalias 'find-c-expr #[nil "`  	\n\"& 	@\nAB@b  b \n	\"? \n@	AB , \n@\nA\"," [nil test-expr expr p expr-cur expr-prev expr-compound expr-next buffer-substring] 4 "\
Returns the C expr that surrounds point." nil])
(defalias 'expr-cur #[nil "` ` `	Y  b `\nb\n	+B" [nil end begin p back-expr forw-expr] 3 "\
Returns the expr that point is in; point is set to beginning of expr.
The expr is represented as a cons cell, where the car specifies the point in
the current buffer that marks the beginning of the expr and the cdr specifies 
the character after the end of the expr"])
(defalias 'back-expr #[nil "" [nil (backward-sexp) ((error t))] 3 "\
Version of backward-sexp that catches errors"])
(defalias 'forw-expr #[nil "" [nil (forward-sexp) ((error t))] 3 "\
Version of forward-sexp that catches errors"])
(defalias 'expr-prev #[nil " ` `\nb\n	*B" [nil end begin back-expr forw-expr] 2 "\
Returns the previous expr, point is set to beginning of that expr.
The expr is represented as a cons cell, where the car specifies the point in
the current buffer that marks the beginning of the expr and the cdr specifies 
the character after the end of the expr"])
(defalias 'expr-next #[nil "  ` `	*B" [nil end begin forw-expr back-expr] 3 "\
Returns the following expr, point is set to beginning of that expr.
The expr is represented as a cons cell, where the car specifies the point in
the current buffer that marks the beginning of the expr and the cdr specifies 
the character after the end of the expr"])
(defalias 'expr-compound-sep #[(span-start span-end) "WM f!UE \nUE fU) E \nUA \\fUA \\E \\ *" [32 nil syntax result span-start span-end char-syntax 46 45 1 62 63] 3 "\
Returns '.' for '->' & '.', returns ' ' for white space,
returns '?' for other puctuation."])
(defalias 'expr-compound #[(first second) "A	@\"@	@U j A	AU% j U/ Ȃj Ui ZffUG Ȃj UQ Ȃj U[ Ȃj Ue Ȃj j +" [first second nil syntax span-end span-start expr-compound-sep 46 t 32 1 41 93 40 91] 3 "\
Returns non-nil if the concatenation of two exprs results in a single C 
token. The two exprs are represented as a cons cells, where the car 
specifies the point in the current buffer that marks the beginning of the 
expr and the cdr specifies the character after the end of the expr
Link exprs of the form:
      Expr -> Expr
      Expr . Expr
      Expr (Expr)
      Expr [Expr]
      (Expr) Expr
      [Expr] Expr"])
