diff options
| author | Karl Heuer | 1996-07-07 22:29:37 +0000 |
|---|---|---|
| committer | Karl Heuer | 1996-07-07 22:29:37 +0000 |
| commit | ac8da9507a7de118d02daf69f81ce30ae0b4345d (patch) | |
| tree | b10420795d5724016f75b2e464df7884146d7073 | |
| parent | a5ef3fecf0bd3a2e461a6bd2fd0c333adfc06551 (diff) | |
| download | emacs-ac8da9507a7de118d02daf69f81ce30ae0b4345d.tar.gz emacs-ac8da9507a7de118d02daf69f81ce30ae0b4345d.zip | |
(gud-irix-p): Exclude Irix6.1 up.
(gud-dbx-use-stopformat-p): New variable.
(dbx): Use it to send $stopformat for Irix6.
(gud-irixdbx-marker-filter): Cast $curline to int, not long (see
added comments).
(dbx): Likewise.
| -rw-r--r-- | lisp/gud.el | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/lisp/gud.el b/lisp/gud.el index cada35d5ac1..6c5c1abcdf6 100644 --- a/lisp/gud.el +++ b/lisp/gud.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; Maintainer: FSF | 4 | ;; Maintainer: FSF |
| 5 | ;; Keywords: unix, tools | 5 | ;; Keywords: unix, tools |
| 6 | 6 | ||
| 7 | ;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. | 7 | ;; Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
| @@ -648,17 +648,31 @@ containing the executable being debugged.") | |||
| 648 | ;; correct line number, but life's too short. | 648 | ;; correct line number, but life's too short. |
| 649 | ;; d.love@dl.ac.uk (Dave Love) can be blamed for this | 649 | ;; d.love@dl.ac.uk (Dave Love) can be blamed for this |
| 650 | 650 | ||
| 651 | (defvar gud-irix-p (string-match "^mips-[^-]*-irix" system-configuration) | 651 | (defvar gud-irix-p |
| 652 | (and (string-match "^mips-[^-]*-irix" system-configuration) | ||
| 653 | (not (string-match "irix[6-9]\\.[1-9]" system-configuration))) | ||
| 652 | "Non-nil to assume the interface appropriate for IRIX dbx. | 654 | "Non-nil to assume the interface appropriate for IRIX dbx. |
| 653 | This works in IRIX 4, 5 and 6.") | 655 | This works in IRIX 4, 5 and 6, but `gud-dbx-use-stopformat-p' provides |
| 656 | a better solution in 6.1 upwards.") | ||
| 657 | (defvar gud-dbx-use-stopformat-p | ||
| 658 | (string-match "irix[6-9]\\.[1-9]" system-configuration) | ||
| 659 | "Non-nil to use the dbx feature present at least from Irix 6.1 | ||
| 660 | whereby $stopformat=1 produces an output format compatiable with | ||
| 661 | `gud-dbx-marker-filter'.") | ||
| 654 | ;; [Irix dbx seems to be a moving target. The dbx output changed | 662 | ;; [Irix dbx seems to be a moving target. The dbx output changed |
| 655 | ;; subtly sometime between OS v4.0.5 and v5.2 so that, for instance, | 663 | ;; subtly sometime between OS v4.0.5 and v5.2 so that, for instance, |
| 656 | ;; the output from `up' is no longer spotted by gud (and it's probably | 664 | ;; the output from `up' is no longer spotted by gud (and it's probably |
| 657 | ;; not distinctive enough to try to match it -- use C-<, C-> | 665 | ;; not distinctive enough to try to match it -- use C-<, C-> |
| 658 | ;; exclusively) . For 5.3 and 6.0, the $curline variable changed to | 666 | ;; exclusively) . For 5.3 and 6.0, the $curline variable changed to |
| 659 | ;; `long long'(why?!), so the printf stuff needed changing. The line | 667 | ;; `long long'(why?!), so the printf stuff needed changing. The line |
| 660 | ;; number is cast to `long' as a compromise between the new `long | 668 | ;; number was cast to `long' as a compromise between the new `long |
| 661 | ;; long' and the original `int'. The process filter is also somewhat | 669 | ;; long' and the original `int'. This is reported not to work in 6.2, |
| 670 | ;; so it's changed back to int -- don't make your sources too long. | ||
| 671 | ;; From Irix6.1 (but not 6.0?) dbx supports an undocumented feature | ||
| 672 | ;; whereby `set $stopformat=1' reportedly produces output compatible | ||
| 673 | ;; with `gud-dbx-marker-filter', which we prefer. | ||
| 674 | |||
| 675 | ;; The process filter is also somewhat | ||
| 662 | ;; unreliable, sometimes not spotting the markers; I don't know | 676 | ;; unreliable, sometimes not spotting the markers; I don't know |
| 663 | ;; whether there's anything that can be done about that. It would be | 677 | ;; whether there's anything that can be done about that. It would be |
| 664 | ;; much better if SGI could be persuaded to (re?)instate the MIPS | 678 | ;; much better if SGI could be persuaded to (re?)instate the MIPS |
| @@ -685,7 +699,7 @@ This works in IRIX 4, 5 and 6.") | |||
| 685 | ;; prod dbx into printing out the line number and file | 699 | ;; prod dbx into printing out the line number and file |
| 686 | ;; name in a form we can grok as below | 700 | ;; name in a form we can grok as below |
| 687 | (process-send-string (get-buffer-process gud-comint-buffer) | 701 | (process-send-string (get-buffer-process gud-comint-buffer) |
| 688 | "printf \"\032\032%1ld:\",(long)$curline;file\n")) | 702 | "printf \"\032\032%1d:\",(int)$curline;file\n")) |
| 689 | ;; look for result of, say, "up" e.g.: | 703 | ;; look for result of, say, "up" e.g.: |
| 690 | ;; .pplot.pplot(0x800) ["src/pplot.f":261, 0x400c7c] | 704 | ;; .pplot.pplot(0x800) ["src/pplot.f":261, 0x400c7c] |
| 691 | ;; (this will also catch one of the lines printed by "where") | 705 | ;; (this will also catch one of the lines printed by "where") |
| @@ -764,13 +778,16 @@ and source-file directory for your debugger." | |||
| 764 | (gud-def gud-break "stop at \"%d%f\":%l" | 778 | (gud-def gud-break "stop at \"%d%f\":%l" |
| 765 | "\C-b" "Set breakpoint at current line.") | 779 | "\C-b" "Set breakpoint at current line.") |
| 766 | (gud-def gud-finish "return" "\C-f" "Finish executing current function.") | 780 | (gud-def gud-finish "return" "\C-f" "Finish executing current function.") |
| 767 | (gud-def gud-up "up %p; printf \"\032\032%1ld:\",(long)$curline;file\n" | 781 | (gud-def gud-up "up %p; printf \"\032\032%1d:\",(int)$curline;file\n" |
| 768 | "<" "Up (numeric arg) stack frames.") | 782 | "<" "Up (numeric arg) stack frames.") |
| 769 | (gud-def gud-down "down %p; printf \"\032\032%1ld:\",(long)$curline;file\n" | 783 | (gud-def gud-down "down %p; printf \"\032\032%1d:\",(int)$curline;file\n" |
| 770 | ">" "Down (numeric arg) stack frames.") | 784 | ">" "Down (numeric arg) stack frames.") |
| 771 | ;; Make dbx give out the source location info that we need. | 785 | ;; Make dbx give out the source location info that we need. |
| 772 | (process-send-string (get-buffer-process gud-comint-buffer) | 786 | (process-send-string (get-buffer-process gud-comint-buffer) |
| 773 | "printf \"\032\032%1ld:\",(long)$curline;file\n")) | 787 | "printf \"\032\032%1d:\",(int)$curline;file\n")) |
| 788 | (gud-dbx-use-stopformat-p | ||
| 789 | (process-send-string (get-buffer-process gud-comint-buffer) | ||
| 790 | "set $stopformat=1\n")) | ||
| 774 | (t | 791 | (t |
| 775 | (gud-def gud-up "up %p" "<" "Up (numeric arg) stack frames.") | 792 | (gud-def gud-up "up %p" "<" "Up (numeric arg) stack frames.") |
| 776 | (gud-def gud-down "down %p" ">" "Down (numeric arg) stack frames.") | 793 | (gud-def gud-down "down %p" ">" "Down (numeric arg) stack frames.") |