337 |
(file-name-nondirectory file) ":1\n") |
(file-name-nondirectory file) ":1\n") |
338 |
`(lambda () (gdb-set-gud-minor-mode ,buffer))))))))) |
`(lambda () (gdb-set-gud-minor-mode ,buffer))))))))) |
339 |
|
|
340 |
|
(defun gdb-find-watch-expression () |
341 |
|
(let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list)) |
342 |
|
(varno (nth 1 var)) (expr)) |
343 |
|
(string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varno) |
344 |
|
(dolist (var1 gdb-var-list) |
345 |
|
(if (string-equal (nth 1 var1) (match-string 1 varno)) |
346 |
|
(setq expr (concat (car var1) "." (match-string 2 varno))))) |
347 |
|
expr)) |
348 |
|
|
349 |
(defun gdb-ann3 () |
(defun gdb-ann3 () |
350 |
(setq gdb-debug-log nil) |
(setq gdb-debug-log nil) |
351 |
(set (make-local-variable 'gud-minor-mode) 'gdba) |
(set (make-local-variable 'gud-minor-mode) 'gdba) |
378 |
(gud-def gud-go (gud-call (if gdb-active-process "continue" "run") arg) |
(gud-def gud-go (gud-call (if gdb-active-process "continue" "run") arg) |
379 |
nil "Start or continue execution.") |
nil "Start or continue execution.") |
380 |
|
|
381 |
|
;; For debugging Emacs only. |
382 |
|
(gud-def gud-pp |
383 |
|
(gud-call |
384 |
|
(concat |
385 |
|
"pp1 " (if (eq (buffer-local-value |
386 |
|
'major-mode (window-buffer)) 'speedbar-mode) |
387 |
|
(gdb-find-watch-expression) "%e")) arg) |
388 |
|
nil "Print the emacs s-expression.") |
389 |
|
|
390 |
(define-key gud-minor-mode-map [left-margin mouse-1] |
(define-key gud-minor-mode-map [left-margin mouse-1] |
391 |
'gdb-mouse-set-clear-breakpoint) |
'gdb-mouse-set-clear-breakpoint) |
392 |
(define-key gud-minor-mode-map [left-fringe mouse-1] |
(define-key gud-minor-mode-map [left-fringe mouse-1] |