aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-12-21 19:42:59 +0000
committerRichard M. Stallman1994-12-21 19:42:59 +0000
commit2fb419e1ced9b2e9d02a9c15714c49704ad9df42 (patch)
tree98fe2620f6604333fb8694cd7e5173c183b55941
parent700ea80976440f7fedd5bca03bf02066eeb7a584 (diff)
downloademacs-2fb419e1ced9b2e9d02a9c15714c49704ad9df42.tar.gz
emacs-2fb419e1ced9b2e9d02a9c15714c49704ad9df42.zip
(gud-irixdbx-marker-filter): Changes for Irix dbx.
(dbx): gud-up, gud-down are now special cases for Irix.
-rw-r--r--lisp/gud.el30
1 files changed, 23 insertions, 7 deletions
diff --git a/lisp/gud.el b/lisp/gud.el
index 917a0f9ac9f..cf61396cb27 100644
--- a/lisp/gud.el
+++ b/lisp/gud.el
@@ -3,7 +3,6 @@
3 3
4;; Author: Eric S. Raymond <esr@snark.thyrsus.com> 4;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Version: 1.3
7;; Keywords: unix, tools 6;; Keywords: unix, tools
8 7
9;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. 8;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
@@ -239,7 +238,7 @@ and source-file directory for your debugger."
239 'gud-gdb-marker-filter 'gud-gdb-find-file) 238 'gud-gdb-marker-filter 'gud-gdb-find-file)
240 239
241 (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") 240 (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.")
242 (gud-def gud-tbreak "tbreak %f:%l" "\C-t" "Set breakpoint at current line.") 241 (gud-def gud-tbreak "tbreak %f:%l" "\C-t" "Set temporary breakpoint at current line.")
243 (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line") 242 (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
244 (gud-def gud-step "step %p" "\C-s" "Step one source line with display.") 243 (gud-def gud-step "step %p" "\C-s" "Step one source line with display.")
245 (gud-def gud-stepi "stepi %p" "\C-i" "Step one instruction with display.") 244 (gud-def gud-stepi "stepi %p" "\C-i" "Step one instruction with display.")
@@ -541,9 +540,20 @@ and source-file directory for your debugger."
541 540
542(defvar gud-irix-p (string-match "^mips-[^-]*-irix" system-configuration) 541(defvar gud-irix-p (string-match "^mips-[^-]*-irix" system-configuration)
543 "Non-nil to assume the interface appropriate for IRIX dbx. 542 "Non-nil to assume the interface appropriate for IRIX dbx.
544This works in IRIX 4 and probably IRIX 5.") 543This works in IRIX 4, 5 and 6.")
545;; (It's been tested in IRIX 4 and the output from dbx on IRIX 5 looks 544;; [Irix dbx seems to be a moving target. The dbx output changed
546;; the same.) 545;; subtly sometime between OS v4.0.5 and v5.2 so that, for instance,
546;; the output from `up' is no longer spotted by gud (and it's probably
547;; not distinctive enough to try to match it -- use C-<, C->
548;; exclusively) . For 5.3 and 6.0, the $curline variable changed to
549;; `long long'(why?!), so the printf stuff needed changing. The line
550;; number is cast to `long' as a compromise between the new `long
551;; long' and the original `int'. The process filter is also somewhat
552;; unreliable, sometimes not spotting the markers; I don't know
553;; whether there's anything that can be done about that. It would be
554;; much better if SGI could be persuaded to (re?)instate the MIPS
555;; -emacs flag for gdb-like output (which ought to be possible as most
556;; of the communication I've had over it has been from sgi.com).]
547 557
548;; this filter is influenced by the xdb one rather than the gdb one 558;; this filter is influenced by the xdb one rather than the gdb one
549(defun gud-irixdbx-marker-filter (string) 559(defun gud-irixdbx-marker-filter (string)
@@ -625,6 +635,8 @@ and source-file directory for your debugger."
625 635
626 (cond 636 (cond
627 (gud-mips-p 637 (gud-mips-p
638 (gud-def gud-up "up %p" "<" "Up (numeric arg) stack frames.")
639 (gud-def gud-down "down %p" ">" "Down (numeric arg) stack frames.")
628 (gud-def gud-break "stop at \"%f\":%l" 640 (gud-def gud-break "stop at \"%f\":%l"
629 "\C-b" "Set breakpoint at current line.") 641 "\C-b" "Set breakpoint at current line.")
630 (gud-def gud-finish "return" "\C-f" "Finish executing current function.")) 642 (gud-def gud-finish "return" "\C-f" "Finish executing current function."))
@@ -632,10 +644,16 @@ and source-file directory for your debugger."
632 (gud-def gud-break "stop at \"%d%f\":%l" 644 (gud-def gud-break "stop at \"%d%f\":%l"
633 "\C-b" "Set breakpoint at current line.") 645 "\C-b" "Set breakpoint at current line.")
634 (gud-def gud-finish "return" "\C-f" "Finish executing current function.") 646 (gud-def gud-finish "return" "\C-f" "Finish executing current function.")
647 (gud-def gud-up "up %p; printf \"\032\032%1ld:\",(long)$curline;file\n"
648 "<" "Up (numeric arg) stack frames.")
649 (gud-def gud-down "down %p; printf \"\032\032%1ld:\",(long)$curline;file\n"
650 ">" "Down (numeric arg) stack frames.")
635 ;; Make dbx give out the source location info that we need. 651 ;; Make dbx give out the source location info that we need.
636 (process-send-string (get-buffer-process gud-comint-buffer) 652 (process-send-string (get-buffer-process gud-comint-buffer)
637 "printf \"\032\032%1d:\",$curline;file\n")) 653 "printf \"\032\032%1d:\",$curline;file\n"))
638 (t 654 (t
655 (gud-def gud-up "up %p" "<" "Up (numeric arg) stack frames.")
656 (gud-def gud-down "down %p" ">" "Down (numeric arg) stack frames.")
639 (gud-def gud-break "file \"%d%f\"\nstop at %l" 657 (gud-def gud-break "file \"%d%f\"\nstop at %l"
640 "\C-b" "Set breakpoint at current line."))) 658 "\C-b" "Set breakpoint at current line.")))
641 659
@@ -644,8 +662,6 @@ and source-file directory for your debugger."
644 (gud-def gud-stepi "stepi %p" "\C-i" "Step one instruction with display.") 662 (gud-def gud-stepi "stepi %p" "\C-i" "Step one instruction with display.")
645 (gud-def gud-next "next %p" "\C-n" "Step one line (skip functions).") 663 (gud-def gud-next "next %p" "\C-n" "Step one line (skip functions).")
646 (gud-def gud-cont "cont" "\C-r" "Continue with display.") 664 (gud-def gud-cont "cont" "\C-r" "Continue with display.")
647 (gud-def gud-up "up %p" "<" "Up (numeric arg) stack frames.")
648 (gud-def gud-down "down %p" ">" "Down (numeric arg) stack frames.")
649 (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") 665 (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.")
650 666
651 (setq comint-prompt-regexp "^[^)\n]*dbx) *") 667 (setq comint-prompt-regexp "^[^)\n]*dbx) *")