diff options
| author | Nick Roberts | 2003-12-23 20:31:21 +0000 |
|---|---|---|
| committer | Nick Roberts | 2003-12-23 20:31:21 +0000 |
| commit | 44e902c11fecb9b856808489739f9f5fed9426b6 (patch) | |
| tree | 86e04cf054b58fd193572c5c5a4699f9fe9277b7 | |
| parent | 3086713187dd17117da047db4396a2f71425d49d (diff) | |
| download | emacs-44e902c11fecb9b856808489739f9f5fed9426b6.tar.gz emacs-44e902c11fecb9b856808489739f9f5fed9426b6.zip | |
(gdba, gdb-assembler-mode): Call the mode "Machine" as
a mode called "Assembler" already exists.
(gdb-use-colon-colon-notation, gdb-show-changed-values): New
options.
(gud-watch): Use format option. Remove font properties from
string.
(gdb-var-create-handler, gdb-var-list-children-handler): Don't
bother about properties as there are none.
(gdb-var-create-handler, gdb-var-list-children-handler)
(gdb-var-update-handler): Call gdb-var-evaluate-expression-handler
with two arguments.
(gdb-var-evaluate-expression-handler, gdb-post-prompt): Let
speedbar show value changes with a different font.
(gdb-edit-value): New defun.
(gdb-clear-partial-output, gdb-clear-inferior-io)
(def-gdb-auto-update-handler): Use erase-buffer.
(gdb-frame-handler): Display watch expressions in
FUNCTION::VARIABLE format if required.
| -rw-r--r-- | lisp/gdb-ui.el | 99 |
1 files changed, 65 insertions, 34 deletions
diff --git a/lisp/gdb-ui.el b/lisp/gdb-ui.el index 8166edd83c7..2c9b3390b58 100644 --- a/lisp/gdb-ui.el +++ b/lisp/gdb-ui.el | |||
| @@ -35,16 +35,15 @@ | |||
| 35 | 35 | ||
| 36 | ;; Start the debugger with M-x gdba. | 36 | ;; Start the debugger with M-x gdba. |
| 37 | 37 | ||
| 38 | ;; This file is based on gdba.el from GDB 5.0 written by Tom Lord and Jim | 38 | ;; This file has evolved from gdba.el from GDB 5.0 written by Tom Lord and Jim |
| 39 | ;; Kingdon and uses GDB's annotation interface. You don't need to know about | 39 | ;; Kingdon and uses GDB's annotation interface. You don't need to know about |
| 40 | ;; annotations to use this mode as a debugger, but if you are interested | 40 | ;; annotations to use this mode as a debugger, but if you are interested |
| 41 | ;; developing the mode itself, then see the Annotations section in the GDB | 41 | ;; developing the mode itself, then see the Annotations section in the GDB |
| 42 | ;; info manual. | 42 | ;; info manual. Some GDB/MI commands are also used through th CLI command |
| 43 | ;; 'interpreter mi <mi-command>'. | ||
| 43 | ;; | 44 | ;; |
| 44 | ;; Known Bugs: | 45 | ;; Known Bugs: |
| 45 | ;; Does not auto-display arrays of structures or structures containing arrays. | 46 | ;; |
| 46 | ;; On MS Windows, Gdb 5.1.1 from MinGW 2.0 does not flush the output from the | ||
| 47 | ;; inferior. | ||
| 48 | 47 | ||
| 49 | ;;; Code: | 48 | ;;; Code: |
| 50 | 49 | ||
| @@ -121,7 +120,7 @@ The following interactive lisp functions help control operation : | |||
| 121 | (set (make-local-variable 'gud-minor-mode) 'gdba) | 120 | (set (make-local-variable 'gud-minor-mode) 'gdba) |
| 122 | (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) | 121 | (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) |
| 123 | ;; | 122 | ;; |
| 124 | (gud-def gud-break (if (not (string-equal mode-name "Assembler")) | 123 | (gud-def gud-break (if (not (string-equal mode-name "Machine")) |
| 125 | (gud-call "break %f:%l" arg) | 124 | (gud-call "break %f:%l" arg) |
| 126 | (save-excursion | 125 | (save-excursion |
| 127 | (beginning-of-line) | 126 | (beginning-of-line) |
| @@ -129,7 +128,7 @@ The following interactive lisp functions help control operation : | |||
| 129 | (gud-call "break *%a" arg))) | 128 | (gud-call "break *%a" arg))) |
| 130 | "\C-b" "Set breakpoint at current line or address.") | 129 | "\C-b" "Set breakpoint at current line or address.") |
| 131 | ;; | 130 | ;; |
| 132 | (gud-def gud-remove (if (not (string-equal mode-name "Assembler")) | 131 | (gud-def gud-remove (if (not (string-equal mode-name "Machine")) |
| 133 | (gud-call "clear %f:%l" arg) | 132 | (gud-call "clear %f:%l" arg) |
| 134 | (save-excursion | 133 | (save-excursion |
| 135 | (beginning-of-line) | 134 | (beginning-of-line) |
| @@ -137,7 +136,7 @@ The following interactive lisp functions help control operation : | |||
| 137 | (gud-call "clear *%a" arg))) | 136 | (gud-call "clear *%a" arg))) |
| 138 | "\C-d" "Remove breakpoint at current line or address.") | 137 | "\C-d" "Remove breakpoint at current line or address.") |
| 139 | ;; | 138 | ;; |
| 140 | (gud-def gud-until (if (not (string-equal mode-name "Assembler")) | 139 | (gud-def gud-until (if (not (string-equal mode-name "Machine")) |
| 141 | (gud-call "until %f:%l" arg) | 140 | (gud-call "until %f:%l" arg) |
| 142 | (save-excursion | 141 | (save-excursion |
| 143 | (beginning-of-line) | 142 | (beginning-of-line) |
| @@ -175,15 +174,23 @@ The following interactive lisp functions help control operation : | |||
| 175 | ;; | 174 | ;; |
| 176 | (run-hooks 'gdba-mode-hook)) | 175 | (run-hooks 'gdba-mode-hook)) |
| 177 | 176 | ||
| 177 | (defcustom gdb-use-colon-colon-notation t | ||
| 178 | "Non-nil means use FUNCTION::VARIABLE format to display variables in the | ||
| 179 | speedbar." | ||
| 180 | :type 'boolean | ||
| 181 | :group 'gud) | ||
| 182 | |||
| 178 | (defun gud-watch () | 183 | (defun gud-watch () |
| 179 | "Watch expression at point." | 184 | "Watch expression at point." |
| 180 | (interactive) | 185 | (interactive) |
| 181 | (let ((expr (tooltip-identifier-from-point (point)))) | 186 | (let ((expr (tooltip-identifier-from-point (point)))) |
| 182 | (if (string-equal gdb-current-language "c") | 187 | (if (and (string-equal gdb-current-language "c") |
| 188 | gdb-use-colon-colon-notation) | ||
| 183 | (setq expr (concat gdb-current-frame "::" expr))) | 189 | (setq expr (concat gdb-current-frame "::" expr))) |
| 184 | (catch 'already-watched | 190 | (catch 'already-watched |
| 185 | (dolist (var gdb-var-list) | 191 | (dolist (var gdb-var-list) |
| 186 | (if (string-equal expr (car var)) (throw 'already-watched nil))) | 192 | (if (string-equal expr (car var)) (throw 'already-watched nil))) |
| 193 | (set-text-properties 0 (length expr) nil expr) | ||
| 187 | (gdb-enqueue-input | 194 | (gdb-enqueue-input |
| 188 | (list (concat "server interpreter mi \"-var-create - * " expr "\"\n") | 195 | (list (concat "server interpreter mi \"-var-create - * " expr "\"\n") |
| 189 | `(lambda () (gdb-var-create-handler ,expr)))))) | 196 | `(lambda () (gdb-var-create-handler ,expr)))))) |
| @@ -197,10 +204,10 @@ The following interactive lisp functions help control operation : | |||
| 197 | (goto-char (point-min)) | 204 | (goto-char (point-min)) |
| 198 | (if (re-search-forward gdb-var-create-regexp nil t) | 205 | (if (re-search-forward gdb-var-create-regexp nil t) |
| 199 | (let ((var (list expr | 206 | (let ((var (list expr |
| 200 | (match-string-no-properties 1) | 207 | (match-string 1) |
| 201 | (match-string-no-properties 2) | 208 | (match-string 2) |
| 202 | (match-string-no-properties 3) | 209 | (match-string 3) |
| 203 | nil))) | 210 | nil nil))) |
| 204 | (push var gdb-var-list) | 211 | (push var gdb-var-list) |
| 205 | (speedbar 1) | 212 | (speedbar 1) |
| 206 | (if (equal (nth 2 var) "0") | 213 | (if (equal (nth 2 var) "0") |
| @@ -208,13 +215,13 @@ The following interactive lisp functions help control operation : | |||
| 208 | (list (concat "server interpreter mi \"-var-evaluate-expression " | 215 | (list (concat "server interpreter mi \"-var-evaluate-expression " |
| 209 | (nth 1 var) "\"\n") | 216 | (nth 1 var) "\"\n") |
| 210 | `(lambda () (gdb-var-evaluate-expression-handler | 217 | `(lambda () (gdb-var-evaluate-expression-handler |
| 211 | ,(nth 1 var))))) | 218 | ,(nth 1 var) nil)))) |
| 212 | (setq gdb-var-changed t))) | 219 | (setq gdb-var-changed t))) |
| 213 | (if (re-search-forward "Undefined command" nil t) | 220 | (if (re-search-forward "Undefined command" nil t) |
| 214 | (message "Watching expressions requires gdb 6.0 onwards") | 221 | (message "Watching expressions requires gdb 6.0 onwards") |
| 215 | (message "No symbol %s in current context." expr))))) | 222 | (message "No symbol %s in current context." expr))))) |
| 216 | 223 | ||
| 217 | (defun gdb-var-evaluate-expression-handler (varnum) | 224 | (defun gdb-var-evaluate-expression-handler (varnum changed) |
| 218 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) | 225 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) |
| 219 | (goto-char (point-min)) | 226 | (goto-char (point-min)) |
| 220 | (re-search-forward ".*value=\"\\(.*?\\)\"" nil t) | 227 | (re-search-forward ".*value=\"\\(.*?\\)\"" nil t) |
| @@ -223,7 +230,8 @@ The following interactive lisp functions help control operation : | |||
| 223 | (dolist (var gdb-var-list) | 230 | (dolist (var gdb-var-list) |
| 224 | (if (string-equal varnum (cadr var)) | 231 | (if (string-equal varnum (cadr var)) |
| 225 | (progn | 232 | (progn |
| 226 | (setcar (nthcdr 4 var) (match-string-no-properties 1)) | 233 | (if changed (setcar (nthcdr 5 var) t)) |
| 234 | (setcar (nthcdr 4 var) (match-string 1)) | ||
| 227 | (setcar (nthcdr num gdb-var-list) var) | 235 | (setcar (nthcdr num gdb-var-list) var) |
| 228 | (throw 'var-found nil))) | 236 | (throw 'var-found nil))) |
| 229 | (setq num (+ num 1)))))) | 237 | (setq num (+ num 1)))))) |
| @@ -247,10 +255,11 @@ The following interactive lisp functions help control operation : | |||
| 247 | (progn | 255 | (progn |
| 248 | (push var var-list) | 256 | (push var var-list) |
| 249 | (while (re-search-forward gdb-var-list-children-regexp nil t) | 257 | (while (re-search-forward gdb-var-list-children-regexp nil t) |
| 250 | (let ((varchild (list (match-string-no-properties 2) | 258 | (let ((varchild (list (match-string 2) |
| 251 | (match-string-no-properties 1) | 259 | (match-string 1) |
| 252 | (match-string-no-properties 3) | 260 | (match-string 3) |
| 253 | (match-string-no-properties 4) | 261 | (match-string 5) |
| 262 | (match-string 4) | ||
| 254 | nil))) | 263 | nil))) |
| 255 | (dolist (var1 gdb-var-list) | 264 | (dolist (var1 gdb-var-list) |
| 256 | (if (string-equal (cadr var1) (cadr varchild)) | 265 | (if (string-equal (cadr var1) (cadr varchild)) |
| @@ -263,7 +272,7 @@ The following interactive lisp functions help control operation : | |||
| 263 | "server interpreter mi \"-var-evaluate-expression " | 272 | "server interpreter mi \"-var-evaluate-expression " |
| 264 | (nth 1 varchild) "\"\n") | 273 | (nth 1 varchild) "\"\n") |
| 265 | `(lambda () (gdb-var-evaluate-expression-handler | 274 | `(lambda () (gdb-var-evaluate-expression-handler |
| 266 | ,(nth 1 varchild))))))))) | 275 | ,(nth 1 varchild) nil)))))))) |
| 267 | (push var var-list))) | 276 | (push var var-list))) |
| 268 | (setq gdb-var-list (nreverse var-list)))))) | 277 | (setq gdb-var-list (nreverse var-list)))))) |
| 269 | 278 | ||
| @@ -281,12 +290,12 @@ The following interactive lisp functions help control operation : | |||
| 281 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) | 290 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) |
| 282 | (goto-char (point-min)) | 291 | (goto-char (point-min)) |
| 283 | (while (re-search-forward gdb-var-update-regexp nil t) | 292 | (while (re-search-forward gdb-var-update-regexp nil t) |
| 284 | (let ((varnum (match-string-no-properties 1))) | 293 | (let ((varnum (match-string 1))) |
| 285 | (gdb-enqueue-input | 294 | (gdb-enqueue-input |
| 286 | (list (concat "server interpreter mi \"-var-evaluate-expression " | 295 | (list (concat "server interpreter mi \"-var-evaluate-expression " |
| 287 | varnum "\"\n") | 296 | varnum "\"\n") |
| 288 | `(lambda () (gdb-var-evaluate-expression-handler | 297 | `(lambda () (gdb-var-evaluate-expression-handler |
| 289 | ,varnum))))))) | 298 | ,varnum t))))))) |
| 290 | (gdb-set-pending-triggers | 299 | (gdb-set-pending-triggers |
| 291 | (delq 'gdb-var-update (gdb-get-pending-triggers)))) | 300 | (delq 'gdb-var-update (gdb-get-pending-triggers)))) |
| 292 | 301 | ||
| @@ -299,7 +308,7 @@ The following interactive lisp functions help control operation : | |||
| 299 | (var (assoc expr gdb-var-list)) | 308 | (var (assoc expr gdb-var-list)) |
| 300 | (varnum (cadr var))) | 309 | (varnum (cadr var))) |
| 301 | (gdb-enqueue-input | 310 | (gdb-enqueue-input |
| 302 | (list (concat "server interpreter mi \"-var-delete " varnum "\"\n") | 311 | (list (concat "server interpreter mi \"-var-delete " varnum "\"\n") |
| 303 | 'ignore)) | 312 | 'ignore)) |
| 304 | (setq gdb-var-list (delq var gdb-var-list)) | 313 | (setq gdb-var-list (delq var gdb-var-list)) |
| 305 | (dolist (varchild gdb-var-list) | 314 | (dolist (varchild gdb-var-list) |
| @@ -307,6 +316,23 @@ The following interactive lisp functions help control operation : | |||
| 307 | (setq gdb-var-list (delq varchild gdb-var-list))))) | 316 | (setq gdb-var-list (delq varchild gdb-var-list))))) |
| 308 | (setq gdb-var-changed t))) | 317 | (setq gdb-var-changed t))) |
| 309 | 318 | ||
| 319 | (defun gdb-edit-value (text token indent) | ||
| 320 | "Assign a value to a variable displayed in the speedbar" | ||
| 321 | (interactive) | ||
| 322 | (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) | ||
| 323 | (varnum (cadr var)) (value)) | ||
| 324 | (setq value (read-string "New value: ")) | ||
| 325 | (gdb-enqueue-input | ||
| 326 | (list (concat "server interpreter mi \"-var-assign " | ||
| 327 | varnum " " value "\"\n") | ||
| 328 | 'ignore)))) | ||
| 329 | |||
| 330 | (defcustom gdb-show-changed-values t | ||
| 331 | "Non-nil means use font-lock-warning-face to display values that have | ||
| 332 | recently changed in the speedbar." | ||
| 333 | :type 'boolean | ||
| 334 | :group 'gud) | ||
| 335 | |||
| 310 | (defun gdb-speedbar-expand-node (text token indent) | 336 | (defun gdb-speedbar-expand-node (text token indent) |
| 311 | "Expand the node the user clicked on. | 337 | "Expand the node the user clicked on. |
| 312 | TEXT is the text of the button we clicked on, a + or - item. | 338 | TEXT is the text of the button we clicked on, a + or - item. |
| @@ -732,6 +758,11 @@ output from the current command if that happens to be appropriate." | |||
| 732 | (gdb-invalidate-registers) | 758 | (gdb-invalidate-registers) |
| 733 | (gdb-invalidate-locals) | 759 | (gdb-invalidate-locals) |
| 734 | (gdb-invalidate-threads) | 760 | (gdb-invalidate-threads) |
| 761 | (dolist (frame (frame-list)) | ||
| 762 | (when (string-equal (frame-parameter frame 'name) "Speedbar") | ||
| 763 | (setq gdb-var-changed t) ; force update | ||
| 764 | (dolist (var gdb-var-list) | ||
| 765 | (setcar (nthcdr 5 var) nil)))) | ||
| 735 | (gdb-var-update))) | 766 | (gdb-var-update))) |
| 736 | (let ((sink (gdb-get-output-sink))) | 767 | (let ((sink (gdb-get-output-sink))) |
| 737 | (cond | 768 | (cond |
| @@ -822,7 +853,7 @@ output from the current command if that happens to be appropriate." | |||
| 822 | 853 | ||
| 823 | (defun gdb-clear-partial-output () | 854 | (defun gdb-clear-partial-output () |
| 824 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) | 855 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) |
| 825 | (delete-region (point-min) (point-max)))) | 856 | (erase-buffer))) |
| 826 | 857 | ||
| 827 | (defun gdb-append-to-inferior-io (string) | 858 | (defun gdb-append-to-inferior-io (string) |
| 828 | (with-current-buffer (gdb-get-create-buffer 'gdb-inferior-io) | 859 | (with-current-buffer (gdb-get-create-buffer 'gdb-inferior-io) |
| @@ -833,7 +864,7 @@ output from the current command if that happens to be appropriate." | |||
| 833 | 864 | ||
| 834 | (defun gdb-clear-inferior-io () | 865 | (defun gdb-clear-inferior-io () |
| 835 | (with-current-buffer (gdb-get-create-buffer 'gdb-inferior-io) | 866 | (with-current-buffer (gdb-get-create-buffer 'gdb-inferior-io) |
| 836 | (delete-region (point-min) (point-max)))) | 867 | (erase-buffer))) |
| 837 | 868 | ||
| 838 | 869 | ||
| 839 | ;; One trick is to have a command who's output is always available in a buffer | 870 | ;; One trick is to have a command who's output is always available in a buffer |
| @@ -883,7 +914,7 @@ output from the current command if that happens to be appropriate." | |||
| 883 | (with-current-buffer buf | 914 | (with-current-buffer buf |
| 884 | (let ((p (point)) | 915 | (let ((p (point)) |
| 885 | (buffer-read-only nil)) | 916 | (buffer-read-only nil)) |
| 886 | (delete-region (point-min) (point-max)) | 917 | (erase-buffer) |
| 887 | (insert-buffer-substring (gdb-get-create-buffer | 918 | (insert-buffer-substring (gdb-get-create-buffer |
| 888 | 'gdb-partial-output-buffer)) | 919 | 'gdb-partial-output-buffer)) |
| 889 | (goto-char p))))) | 920 | (goto-char p))))) |
| @@ -1258,7 +1289,7 @@ the source buffer." | |||
| 1258 | 1289 | ||
| 1259 | (def-gdb-auto-updated-buffer gdb-threads-buffer | 1290 | (def-gdb-auto-updated-buffer gdb-threads-buffer |
| 1260 | gdb-invalidate-threads | 1291 | gdb-invalidate-threads |
| 1261 | "info threads\n" | 1292 | "server info threads\n" |
| 1262 | gdb-info-threads-handler | 1293 | gdb-info-threads-handler |
| 1263 | gdb-info-threads-custom) | 1294 | gdb-info-threads-custom) |
| 1264 | 1295 | ||
| @@ -1308,7 +1339,6 @@ the source buffer." | |||
| 1308 | (re-search-backward "^\\s-*\\([0-9]*\\)" nil t) | 1339 | (re-search-backward "^\\s-*\\([0-9]*\\)" nil t) |
| 1309 | (match-string-no-properties 1))) | 1340 | (match-string-no-properties 1))) |
| 1310 | 1341 | ||
| 1311 | |||
| 1312 | (defun gdb-threads-select () | 1342 | (defun gdb-threads-select () |
| 1313 | "Make the thread on the current line become the current thread and display the | 1343 | "Make the thread on the current line become the current thread and display the |
| 1314 | source in the source buffer." | 1344 | source in the source buffer." |
| @@ -1506,7 +1536,7 @@ the source buffer." | |||
| 1506 | (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) | 1536 | (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) |
| 1507 | (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer)) | 1537 | (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer)) |
| 1508 | (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) | 1538 | (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) |
| 1509 | ; (define-key menu [assembler] '("Assembler" . gdb-frame-assembler-buffer)) | 1539 | ; (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) |
| 1510 | ) | 1540 | ) |
| 1511 | 1541 | ||
| 1512 | (let ((menu (make-sparse-keymap "GDB-Windows"))) | 1542 | (let ((menu (make-sparse-keymap "GDB-Windows"))) |
| @@ -1518,7 +1548,7 @@ the source buffer." | |||
| 1518 | (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) | 1548 | (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) |
| 1519 | (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer)) | 1549 | (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer)) |
| 1520 | (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) | 1550 | (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) |
| 1521 | ; (define-key menu [assembler] '("Assembler" . gdb-display-assembler-buffer)) | 1551 | ; (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) |
| 1522 | ) | 1552 | ) |
| 1523 | 1553 | ||
| 1524 | (let ((menu (make-sparse-keymap "View"))) | 1554 | (let ((menu (make-sparse-keymap "View"))) |
| @@ -1527,7 +1557,7 @@ the source buffer." | |||
| 1527 | ; (define-key menu [both] '(menu-item "Both" gdb-view-both | 1557 | ; (define-key menu [both] '(menu-item "Both" gdb-view-both |
| 1528 | ; :help "Display both source and assembler" | 1558 | ; :help "Display both source and assembler" |
| 1529 | ; :button (:radio . (eq gdb-selected-view 'both)))) | 1559 | ; :button (:radio . (eq gdb-selected-view 'both)))) |
| 1530 | (define-key menu [assembler] '(menu-item "Assembler" gdb-view-assembler | 1560 | (define-key menu [assembler] '(menu-item "Machine" gdb-view-assembler |
| 1531 | :help "Display assembler only" | 1561 | :help "Display assembler only" |
| 1532 | :button (:radio . (eq gdb-selected-view 'assembler)))) | 1562 | :button (:radio . (eq gdb-selected-view 'assembler)))) |
| 1533 | (define-key menu [source] '(menu-item "Source" gdb-view-source-function | 1563 | (define-key menu [source] '(menu-item "Source" gdb-view-source-function |
| @@ -1829,7 +1859,7 @@ BUFFER nil or omitted means use the current buffer." | |||
| 1829 | 1859 | ||
| 1830 | \\{gdb-assembler-mode-map}" | 1860 | \\{gdb-assembler-mode-map}" |
| 1831 | (setq major-mode 'gdb-assembler-mode) | 1861 | (setq major-mode 'gdb-assembler-mode) |
| 1832 | (setq mode-name "Assembler") | 1862 | (setq mode-name "Machine") |
| 1833 | (setq left-margin-width 2) | 1863 | (setq left-margin-width 2) |
| 1834 | (setq fringes-outside-margins t) | 1864 | (setq fringes-outside-margins t) |
| 1835 | (setq buffer-read-only t) | 1865 | (setq buffer-read-only t) |
| @@ -1910,7 +1940,8 @@ BUFFER nil or omitted means use the current buffer." | |||
| 1910 | (gdb-get-create-buffer 'gdb-assembler-buffer)) | 1940 | (gdb-get-create-buffer 'gdb-assembler-buffer)) |
| 1911 | ;;update with new frame for machine code if necessary | 1941 | ;;update with new frame for machine code if necessary |
| 1912 | (gdb-invalidate-assembler)))))) | 1942 | (gdb-invalidate-assembler)))))) |
| 1913 | (if (looking-at "source language \\(\\S-*\\)") | 1943 | (forward-line) |
| 1944 | (if (looking-at " source language \\(\\S-*\\)\.") | ||
| 1914 | (setq gdb-current-language (match-string 1)))) | 1945 | (setq gdb-current-language (match-string 1)))) |
| 1915 | 1946 | ||
| 1916 | (provide 'gdb-ui) | 1947 | (provide 'gdb-ui) |