%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/progmodes/ |
Current File : //usr/local/share/emacs/27.2/lisp/progmodes/gud.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\301\302!\210\303\304\305\306\307\310\307\311&\210\312\300\313\314\315DD\316\317\320\307\304&\210\321\322\323\"\324\"\207" [gud-key-prefix require comint custom-declare-group gud nil "The \"Grand Unified Debugger\" interface.\nSupported debuggers include gdb, sdb, dbx, xdb, perldb,\npdb (Python), and jdb." :group processes tools custom-declare-variable funcall function #[0 "\300\207" [#1=""] 1 #1#] "Prefix of all GUD commands valid in C buffers." :type key-sequence global-set-key vconcat "\f" gud-refresh] 8) (defvar gud-marker-filter nil) (put 'gud-marker-filter 'permanent-local t) (defvar gud-find-file nil) (put 'gud-find-file 'permanent-local t) #@19 (fn &rest ARGS) (defalias 'gud-marker-filter #[128 "\301\"\207" [gud-marker-filter apply] 4 (#$ . 1081)]) (defvar gud-minor-mode nil) (put 'gud-minor-mode 'permanent-local t) (defvar gud-comint-buffer nil) (defvar gud-keep-buffer nil) #@242 Return the symbol used for SYM in MINOR-MODE. MINOR-MODE defaults to `gud-minor-mode'. The symbol returned is `gud-<MINOR-MODE>-<SYM>'. If SOFT is non-nil, returns nil if the symbol doesn't already exist. (fn SYM &optional SOFT MINOR-MODE) (defalias 'gud-symbol #[769 "\211\204\f \204\f \301\302!\210\203 \303\202 \304\305\306\206 #!\207" [gud-minor-mode error "Gud internal error" intern-soft intern format "gud-%s-%s"] 8 (#$ . 1327)]) #@87 Return the value of `gud-symbol' SYM. Default to nil. (fn SYM &optional MINOR-MODE) (defalias 'gud-val #[513 "\300\301#\302!\205 \211J\207" [gud-symbol t boundp] 6 (#$ . 1780)]) #@82 Non-nil if debugged program is running. Used to gray out relevant toolbar icons. (defvar gud-running nil (#$ . 1970)) #@66 The apparent name of the program being debugged in a gud buffer. (defvar gud-target-name "--unknown--" (#$ . 2094)) #@33 Go to relevant Emacs info node. (defalias 'gud-goto-info #[0 "\301=\203\n \302\303!\207\302\304!\207" [gud-minor-mode gdbmi info-other-window "(emacs)GDB Graphical Interface" "(emacs)Debuggers"] 2 (#$ . 2216) nil]) (defalias 'gud-tool-bar-item-visible-no-fringe #[0 "\301\302\303 \"\304=\206 \301\302\303 \"\305=\206 \306=\205 \307 @\310V?\207" [gud-minor-mode buffer-local-value major-mode window-buffer speedbar-mode gdb-memory-mode gdbmi window-fringes 0] 3]) (defalias 'gud-stop-subjob #[0 "rq\210 \303\230\203 \304 \202% \n\305\267\202# \306\307!\202% \306\310\311!!\202% \312 )\207" [gud-comint-buffer gud-target-name gud-minor-mode "emacs" comint-stop-subjob #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (jdb 21 gdbmi 27)) gud-call "suspend" gdb-gud-context-command "-exec-interrupt" comint-interrupt-subjob] 3 nil nil]) #@22 Menu for `gud-mode'. (defconst gud-menu-map (byte-code "\301\302\303\304\300!\205\n \305\306D$\207" [gud-menu-map easy-mmode-define-keymap (([help] "Info (debugger)" . gud-goto-info) ([tooltips] menu-item "Show GUD tooltips" gud-tooltip-mode :enable (and (not emacs-basic-display) (display-graphic-p) (fboundp 'x-show-tip)) :visible (memq gud-minor-mode '(gdbmi guiler dbx sdb xdb pdb)) :button (:toggle . gud-tooltip-mode)) ([refresh] "Refresh" . gud-refresh) ([run] menu-item "Run" gud-run :enable (not gud-running) :visible (or (memq gud-minor-mode '(gdb dbx jdb)) (and (eq gud-minor-mode 'gdbmi) (or (not (gdb-show-run-p)) (bound-and-true-p gdb-active-process))))) ([go] menu-item (if (bound-and-true-p gdb-active-process) "Continue" "Run") gud-go :visible (and (eq gud-minor-mode 'gdbmi) (gdb-show-run-p))) ([stop] menu-item "Stop" gud-stop-subjob :visible (or (not (memq gud-minor-mode '(gdbmi pdb))) (and (eq gud-minor-mode 'gdbmi) (gdb-show-stop-p)))) ([until] menu-item "Continue to selection" gud-until :enable (not gud-running) :visible (and (memq gud-minor-mode '(gdbmi gdb perldb)) (gud-tool-bar-item-visible-no-fringe))) ([remove] menu-item "Remove Breakpoint" gud-remove :enable (not gud-running) :visible (gud-tool-bar-item-visible-no-fringe)) ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak :enable (not gud-running) :visible (memq gud-minor-mode '(gdbmi gdb sdb xdb))) ([break] menu-item "Set Breakpoint" gud-break :enable (not gud-running) :visible (gud-tool-bar-item-visible-no-fringe)) ([up] menu-item "Up Stack" gud-up :enable (not gud-running) :visible (memq gud-minor-mode '(gdbmi gdb guiler dbx xdb jdb pdb))) ([down] menu-item "Down Stack" gud-down :enable (not gud-running) :visible (memq gud-minor-mode '(gdbmi gdb guiler dbx xdb jdb pdb))) ([pp] menu-item "Print S-expression" gud-pp :enable (and (not gud-running) (bound-and-true-p gdb-active-process)) :visible (and (string-equal (buffer-local-value 'gud-target-name gud-comint-buffer) "emacs") (eq gud-minor-mode 'gdbmi))) ([print*] menu-item (if (eq gud-minor-mode 'jdb) "Dump object" "Print Dereference") gud-pstar :enable (not gud-running) :visible (memq gud-minor-mode '(gdbmi gdb jdb))) ([print] menu-item "Print Expression" gud-print :enable (not gud-running)) ([watch] menu-item "Watch Expression" gud-watch :enable (not gud-running) :visible (eq gud-minor-mode 'gdbmi)) ([finish] menu-item "Finish Function" gud-finish :enable (not gud-running) :visible (memq gud-minor-mode '(gdbmi gdb guiler xdb jdb pdb))) ([stepi] menu-item "Step Instruction" gud-stepi :enable (not gud-running) :visible (memq gud-minor-mode '(gdbmi gdb dbx))) ([nexti] menu-item "Next Instruction" gud-nexti :enable (not gud-running) :visible (memq gud-minor-mode '(gdbmi gdb dbx))) ([step] menu-item "Step Line" gud-step :enable (not gud-running)) ([next] menu-item "Next Line" gud-next :enable (not gud-running)) ([cont] menu-item "Continue" gud-cont :enable (not gud-running) :visible (not (eq gud-minor-mode 'gdbmi)))) nil boundp :name "Gud"] 6) (#$ . 3097)) #@28 Map used in visited files. (defconst gud-minor-mode-map (byte-code "\303\304\305\306BBC ?\205\206 \307\310\311\312\313#\314BB\315\310\316\312\313#\317BB\320\310\321\312\313#\322BB\323\310\324\312\313#\325BB\326\310\327\312\313#\330BB\331\332\310\333\312\313#\334BBB\335\332\310\336\312\313#\337BBB\340\332\310\341\312\313#\342BBB\343\332\310\344\312\313#\345BBB\346\332\310\347\312\313#\350BBB\351\310\352\312\313#\353BB\354BBBBBBBBBBB\"\355\356\302!\205\217 \n\355$\207" [gud-menu-map window-system gud-minor-mode-map easy-mmode-define-keymap append [menu-bar debug] "Gud" [menu-bar down] propertize "down" face font-lock-doc-face gud-down [menu-bar up] "up" gud-up [menu-bar finish] "finish" gud-finish [menu-bar step] "step" gud-step [menu-bar next] "next" gud-next [menu-bar until] menu-item "until" (gud-until :visible (memq gud-minor-mode '(gdbmi gdb perldb))) [menu-bar cont] "cont" (gud-cont :visible (not (eq gud-minor-mode 'gdbmi))) [menu-bar run] "run" (gud-run :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) [menu-bar go] " go " (gud-go :visible (and (eq gud-minor-mode 'gdbmi) (gdb-show-run-p))) [menu-bar stop] "stop" (gud-stop-subjob :visible (or (and (eq gud-minor-mode 'gdbmi) (gdb-show-stop-p)) (not (eq gud-minor-mode 'gdbmi)))) [menu-bar print] "print" gud-print (([menu-bar tools] . undefined) ([menu-bar buffer] . undefined) ([menu-bar options] . undefined) ([menu-bar edit] . undefined) ([menu-bar file] . undefined)) nil boundp] 18) (#$ . 6135)) (byte-code "\302\236 \203 \241\210\202 \302B\211\262B\210\207" [minor-mode-map-alist gud-minor-mode-map gud-minor-mode] 4) #@20 `gud-mode' keymap. (defvar gud-mode-map (make-sparse-keymap) (#$ . 7751)) (defvar gud-tool-bar-map (byte-code "\301 \302\211\203 \211@\303@A$\210A\266\202\202 \262\207" [gud-minor-mode-map make-sparse-keymap ((gud-break . "gud/break") (gud-remove . "gud/remove") (gud-print . "gud/print") (gud-pstar . "gud/pstar") (gud-pp . "gud/pp") (gud-watch . "gud/watch") (gud-run . "gud/run") (gud-go . "gud/go") (gud-stop-subjob . "gud/stop") (gud-cont . "gud/cont") (gud-until . "gud/until") (gud-next . "gud/next") (gud-step . "gud/step") (gud-finish . "gud/finish") (gud-nexti . "gud/nexti") (gud-stepi . "gud/stepi") (gud-up . "gud/up") (gud-down . "gud/down") (gud-goto-info . "info")) tool-bar-local-item-from-menu] 8)) #@128 Transform a relative file name to an absolute file name. Uses `gud-<MINOR-MODE>-directories' to find the source files. (fn F) (defalias 'gud-file-name #[257 "\301!\206 \302P\262\303!\203 \304!\207\305\306!\307\2036 \304@\"\303!\203. \211\262\307\262\210A\262\202 \207" [default-directory file-remote-p "" file-exists-p expand-file-name gud-val directories nil] 6 (#$ . 8484)]) #@13 (fn FILE) (defalias 'gud-find-file #[257 "\306\307\"\203 \310\311\312\211$\262\202 \206 \313!\211;\203+ \314!\205) \315\316\"\262\211\205g r\211q\210\317\300!\210\320\303!\203E \317\303!\210\n\f\203a \321=\203a \317\305!\210 \204Z \322 \210\323\324\322\325\312$\210\317\326!\210)\211\207" [gud-minor-mode gud-find-file gud-tool-bar-map tool-bar-map gud-tooltip-mode gdb-define-alist string-match "//+" replace-match "/" t gud-file-name file-readable-p find-file-noselect nowarn make-local-variable boundp gdbmi gdb-create-define-alist add-hook after-save-hook nil gud-keep-buffer] 8 (#$ . 8884)]) #@1051 Define FUNC to be a command sending CMD and bound to KEY, with optional doc string DOC. Certain %-escapes in the string arguments are interpreted specially if present. These are: %f -- Name (without directory) of current source file. %F -- Name (without directory or extension) of current source file. %d -- Directory 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. %c -- Fully qualified class name derived from the expression surrounding point (jdb only). 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). (fn FUNC CMD KEY &optional DOC) (defalias 'gud-def '(macro . #[1027 "\300\301\302D\303\304\305\205 C\306\307\310\f;\203# \311 \312BB\202% \fED\"BBE\2058 \313\314P\302DE\205G \315\316\317E\302 DEF\207" [progn defalias quote lambda (arg) append (interactive "p") if (not gud-running) gud-call (arg) local-set-key "" global-set-key vconcat gud-key-prefix] 17 (#$ . 9507)])) (defvar gud-last-frame nil) (defvar gud-last-last-frame nil) #@126 Description of the currently displayed GUD stack. The value t means that there is no stack, and we are in display-file mode. (defvar gud-last-speedbar-stackframe nil (#$ . 10983)) #@47 Keymap used when in the buffers display mode. (defvar gud-speedbar-key-map nil (#$ . 11169)) #@56 Display the data type of the watch expression element. (defalias 'gud-speedbar-item-info #[0 "\301`!\302Z8\3038\203 \304\305\3038\3068#\202 \304\307\3068\"\207" [gdb-var-list line-number-at-pos 2 7 dframe-message "%s: %s" 3 "%s"] 6 (#$ . 11268)]) #@62 Install those variables used by speedbar to enhance gud/gdb. (defalias 'gud-install-speedbar-variables #[0 "\204+ \302 \303\304\305#\210\303\306\305#\210\303\307\305#\210\303\310\311#\210\303\312\313#\210\303\314\315#\210\316\317!\210\320 \235\2037 \207\320 B\211\207" [gud-speedbar-key-map speedbar-mode-functions-list speedbar-make-specialized-keymap define-key "j" speedbar-edit-line "e" " " " " speedbar-toggle-line-expansion "D" gdb-var-delete "p" gud-pp speedbar-add-expansion-list ("GUD" gud-speedbar-menu-items gud-speedbar-key-map gud-expansion-speedbar-buttons) ("GUD" (speedbar-item-info . gud-speedbar-item-info) (speedbar-line-directory . ignore))] 4 (#$ . 11528)]) #@53 Additional menu items to add to the speedbar frame. (defvar gud-speedbar-menu-items '(["Jump to stack frame" speedbar-edit-line :visible (not (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdbmi))] ["Edit value" speedbar-edit-line :visible (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdbmi)] ["Delete expression" gdb-var-delete :visible (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdbmi)] ["Auto raise frame" gdb-speedbar-auto-raise :style toggle :selected gdb-speedbar-auto-raise :visible (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdbmi)] ("Output Format" :visible (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdbmi) ["Binary" (gdb-var-set-format "binary") t] ["Natural" (gdb-var-set-format "natural") t] ["Hexadecimal" (gdb-var-set-format "hexadecimal") t])) (#$ . 12223)) (byte-code "\300\301!\203\f \302 \210\202 \303\304\302\"\210\300\207" [featurep speedbar gud-install-speedbar-variables add-hook speedbar-load-hook] 3) #@138 Wrapper for call to `speedbar-add-expansion-list'. DIRECTORY and ZERO are not used, but are required by the caller. (fn DIRECTORY ZERO) (defalias 'gud-expansion-speedbar-buttons #[514 "\301!\207" [gud-comint-buffer gud-speedbar-buttons] 4 (#$ . 13236)]) #@227 Create a speedbar display based on the current state of GUD. If the GUD BUFFER is not running a supported debugger, then turn off the specialized speedbar mode. BUFFER is not used, but is required by the caller. (fn BUFFER) (defalias 'gud-speedbar-buttons #[257 "\205\306!\205r\211q\210 )\307p\310\"\311!\312!\313=\203\215\314 \210\315c\210\n\316\203\210\316\310\211@\211@A@\3178\203B \3178\202C \320\3218\3228\3238\324\310G\325 %\210\324\310G\325\f%\210\326\327\n#\203y T\262 \310\224T\262\202b \310=\203\203 \316\262\211\203\215 \211\330\230\203\345 \3318\330\232\204\246 \3318\332\232\203\345 \326\333\"\203\345 \334\335\336\316\211 \337 Q\206\272 \340=?\205\277 \341\316 \203\334 \206\335 \342\267\202\330 \343\202\335 \344\202\335 \345\202\335 \345& \210\202\340=\203\356 \344\262A@\203 \326\327P A@@\"\203 \346\262\n\202\f\347\262\n\326\350\"\203X\334\335\351 \337\n\337\260\206-\340=?\2052\341\316 \203O\206P \352\267\202K\343\202P\344\202P\345\202P\345& \210\202\334\335\351 \337\nQ\316\211\204q \203y \203y\344\202z\345& \210\266\nA\262\202( \266\202 \212eb\210\353\354!)\203\240=>\232\204 \355=\203\254\356!\202\261\357!\210\316\314 \210\211\204\276\360c\210\202\301\361c\210\211\211\203\211@\211A@\362\261\210\211G\331U\203\344\363@\364\316\211\211\345&\210\202\374\363@\365\366\n\367>\203\364\370\202\367\371\372!\345&\210A\266\202\202\302\266=>\373\"\210\374\"\266\204\207" [gud-comint-buffer gud-minor-mode gdb-var-list font-lock-variable-name-face font-lock-type-face gdb-show-changed-values buffer-name get-buffer-window 0 window-start window-point gdbmi erase-buffer "Watch Expressions:\n" nil 3 " " 4 5 6 put-text-property face string-match "\\." "0" 2 "1" "char \\*$" speedbar-make-tag-line bracket 63 " " out-of-scope gdb-edit-value #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (changed 208 out-of-scope 212)) font-lock-warning-face shadow t 45 43 "\\*$\\|\\*&$" gdb-speedbar-expand-node #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (changed 323 out-of-scope 327)) looking-at "Current Stack:" gdb gud-gdb-get-stackframe speedbar-remove-localized-speedbar-support "No Stack frames\n" "Current Stack:\n" ":\n" speedbar-insert-button speedbar-directory-face speedbar-file-face speedbar-highlight-face (gdbmi gdb) gud-gdb-goto-stackframe error "Should never be here" set-window-start set-window-point gud-last-last-frame gud-last-speedbar-stackframe] 27 (#$ . 13499)]) (defvar gud-gdb-history nil) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable gud-gud-gdb-command-name funcall function #[0 "\300\207" [#1="gdb --fullname"] 1 #1#] "Default command to run an executable under GDB in text command mode.\nThe option \"--fullname\" must be included in this value." :type string :group gud] 8) (defvar gud-gdb-marker-regexp "\\(.:?[^:\n]*\\):\\([0-9]*\\):.*\n") (defvar gud-marker-acc "") (make-variable-buffer-local 'gud-marker-acc) #@15 (fn STRING) (defalias 'gud-gdb-marker-filter #[257 "P\303\304 \"\203+ \305\306\"\307\305\310\"!B\211\311\312\211\224#P\262\311\312\225\"\202 \304\313\"\203E \211\311\312\211\224#P\262\311\312\225\"\202+ \304\314\"\203_ \211\311\312\211\224#P\262\311\312\224\"\202f \211P\262\303\211\207" [gud-marker-acc gud-gdb-marker-regexp gud-last-frame "" string-match match-string 1 string-to-number 2 substring 0 "\n\\(.*\\)\n" "\\(\n\\)?\\(.*\\)?\\'"] 7 (#$ . 16621)]) #@57 Keymap for minibuffer prompting of gud startup command. (defconst gud-minibuffer-local-map (byte-code "\302\303\304\305\300!\205\n \306 D$\207" [gud-minibuffer-local-map minibuffer-local-map easy-mmode-define-keymap ((" " . comint-dynamic-complete-filename)) nil boundp :inherit] 6) (#$ . 17117)) #@34 (fn MINOR-MODE &optional INIT) (defalias 'gud-query-cmdline #[513 "\302\303\304#\305\306\"\307!\204 \304L\210\310\311\312\"J\242\206^ \206' \313!\314\206] \304\315!\211\203X \211@\316!\203Q \317!\204Q \203N \320\"\203Q \211\262A\266\202\2021 \262\262Q \304%\207" [default-directory gud-minibuffer-local-map gud-symbol history nil gud-val command-name boundp read-from-minibuffer format "Run %s (like this): " symbol-name " " directory-files file-executable-p file-directory-p file-newer-than-file-p] 14 (#$ . 17421)]) (defvar gdb-first-prompt t) #@75 Non-nil means this is text that has been saved for later in `gud-filter'. (defvar gud-filter-pending-text nil (#$ . 18001)) #@213 Completion function for GDB commands. It receives two arguments: COMMAND, the prefix for which we seek completion; and CONTEXT, the text before COMMAND on the line. It should return a list of completion strings. (defvar gud-gdb-completion-function nil (#$ . 18132)) #@512 Run gdb passing it COMMAND-LINE as arguments. If COMMAND-LINE names a program FILE to debug, gdb will run in a buffer named *gud-FILE*, and the directory containing FILE becomes the initial working directory and source-file directory for your debugger. If COMMAND-LINE requests that gdb attaches to a process PID, gdb will run in *gud-PID*, otherwise it will run in *gud*; in these cases the initial working directory is the default-directory of the buffer in which this command was invoked. (fn COMMAND-LINE) (defalias 'gud-gdb #[257 "\203\"