diff options
| author | Stefan Kangas | 2025-02-07 21:22:38 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2025-02-07 21:22:38 +0100 |
| commit | 0c0f5f5df24947f0658c274f9fa62829ef5401dd (patch) | |
| tree | 6044458bec28257eae04800a4f7f568a20445ced | |
| parent | 280b25e0096bb97fb473a8da9b4635fb2d6e5385 (diff) | |
| download | emacs-0c0f5f5df24947f0658c274f9fa62829ef5401dd.tar.gz emacs-0c0f5f5df24947f0658c274f9fa62829ef5401dd.zip | |
Mark IRIX support in GUD as obsolete
* lisp/progmodes/gud.el (gud-irix-p, gud-dbx-use-stopformat-p)
(gud-irixdbx-marker-filter): Mark as obsolete. We stopped supporting
IRIX in Emacs 26.1 (commit 6bc8689c0428).
* lisp/progmodes/gud.el (dbx): Suppress obsoletion warnings.
| -rw-r--r-- | lisp/progmodes/gud.el | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index b63de1abff2..7ced54170ff 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -1261,42 +1261,16 @@ containing the executable being debugged." | |||
| 1261 | 1261 | ||
| 1262 | output)) | 1262 | output)) |
| 1263 | 1263 | ||
| 1264 | ;; The dbx in IRIX is a pain. It doesn't print the file name when | ||
| 1265 | ;; stopping at a breakpoint (but you do get it from the `up' and | ||
| 1266 | ;; `down' commands...). The only way to extract the information seems | ||
| 1267 | ;; to be with a `file' command, although the current line number is | ||
| 1268 | ;; available in $curline. Thus we have to look for output which | ||
| 1269 | ;; appears to indicate a breakpoint. Then we prod the dbx sub-process | ||
| 1270 | ;; to output the information we want with a combination of the | ||
| 1271 | ;; `printf' and `file' commands as a pseudo marker which we can | ||
| 1272 | ;; recognize next time through the marker-filter. This would be like | ||
| 1273 | ;; the gdb marker but you can't get the file name without a newline... | ||
| 1274 | ;; Note that gud-remove won't work since Irix dbx expects a breakpoint | ||
| 1275 | ;; number rather than a line number etc. Maybe this could be made to | ||
| 1276 | ;; work by listing all the breakpoints and picking the one(s) with the | ||
| 1277 | ;; correct line number, but life's too short. | ||
| 1278 | ;; d.love@dl.ac.uk (Dave Love) can be blamed for this | ||
| 1279 | |||
| 1280 | (defvar gud-irix-p nil | 1264 | (defvar gud-irix-p nil |
| 1281 | "Non-nil to assume the interface appropriate for IRIX dbx. | 1265 | "Non-nil to assume the interface appropriate for IRIX dbx. |
| 1282 | This works in IRIX 4, 5 and 6, but `gud-dbx-use-stopformat-p' provides | 1266 | This works in IRIX 4, 5 and 6, but `gud-dbx-use-stopformat-p' provides |
| 1283 | a better solution in 6.1 upwards.") | 1267 | a better solution in 6.1 upwards.") |
| 1268 | (make-obsolete-variable 'gud-irix-p nil "31.1") | ||
| 1284 | (defvar gud-dbx-use-stopformat-p nil | 1269 | (defvar gud-dbx-use-stopformat-p nil |
| 1285 | "Non-nil to use the dbx feature present at least from Irix 6.1 | 1270 | "Non-nil to use the dbx feature present at least from Irix 6.1 |
| 1286 | whereby $stopformat=1 produces an output format compatible with | 1271 | whereby $stopformat=1 produces an output format compatible with |
| 1287 | `gud-dbx-marker-filter'.") | 1272 | `gud-dbx-marker-filter'.") |
| 1288 | ;; [Irix dbx seemed to be a moving target. The dbx output changed | 1273 | (make-obsolete-variable 'gud-dbx-use-stopformat-p nil "31.1") |
| 1289 | ;; subtly sometime between OS v4.0.5 and v5.2 so that, for instance, | ||
| 1290 | ;; the output from `up' is no longer spotted by gud (and it's probably | ||
| 1291 | ;; not distinctive enough to try to match it -- use C-<, C-> | ||
| 1292 | ;; exclusively) . For 5.3 and 6.0, the $curline variable changed to | ||
| 1293 | ;; `long long'(why?!), so the printf stuff needed changing. The line | ||
| 1294 | ;; number was cast to `long' as a compromise between the new `long | ||
| 1295 | ;; long' and the original `int'. This was reported not to work in 6.2, | ||
| 1296 | ;; so it's changed back to int -- don't make your sources too long. | ||
| 1297 | ;; From Irix6.1 (but not 6.0?) dbx supported an undocumented feature | ||
| 1298 | ;; whereby `set $stopformat=1' reportedly produces output compatible | ||
| 1299 | ;; with `gud-dbx-marker-filter', which we prefer. | ||
| 1300 | 1274 | ||
| 1301 | (defvar-keymap gud-dbx-repeat-map | 1275 | (defvar-keymap gud-dbx-repeat-map |
| 1302 | :doc "Keymap to repeat `dbx' stepping instructions \\`C-x C-a C-n n n'. | 1276 | :doc "Keymap to repeat `dbx' stepping instructions \\`C-x C-a C-n n n'. |
| @@ -1313,13 +1287,8 @@ Used in `repeat-mode'." | |||
| 1313 | gud-irix-p) | 1287 | gud-irix-p) |
| 1314 | (keymap-set gud-dbx-repeat-map "f" #'gud-finish)) | 1288 | (keymap-set gud-dbx-repeat-map "f" #'gud-finish)) |
| 1315 | 1289 | ||
| 1316 | |||
| 1317 | ;; The process filter is also somewhat | ||
| 1318 | ;; unreliable, sometimes not spotting the markers; I don't know | ||
| 1319 | ;; whether there's anything that can be done about that.] | ||
| 1320 | |||
| 1321 | ;; this filter is influenced by the xdb one rather than the gdb one | ||
| 1322 | (defun gud-irixdbx-marker-filter (string) | 1290 | (defun gud-irixdbx-marker-filter (string) |
| 1291 | (declare (obsolete nil "31.1")) | ||
| 1323 | (let (result (case-fold-search nil)) | 1292 | (let (result (case-fold-search nil)) |
| 1324 | (if (or (string-match comint-prompt-regexp string) | 1293 | (if (or (string-match comint-prompt-regexp string) |
| 1325 | (string-match ".*\012" string)) | 1294 | (string-match ".*\012" string)) |
| @@ -1417,8 +1386,9 @@ and source-file directory for your debugger." | |||
| 1417 | (gud-mips-p | 1386 | (gud-mips-p |
| 1418 | (gud-common-init command-line nil 'gud-mipsdbx-marker-filter)) | 1387 | (gud-common-init command-line nil 'gud-mipsdbx-marker-filter)) |
| 1419 | (gud-irix-p | 1388 | (gud-irix-p |
| 1420 | (gud-common-init command-line 'gud-dbx-massage-args | 1389 | (with-suppressed-warnings ((obsolete gud-irixdbx-marker-filter)) |
| 1421 | 'gud-irixdbx-marker-filter)) | 1390 | (gud-common-init command-line 'gud-dbx-massage-args |
| 1391 | #'gud-irixdbx-marker-filter))) | ||
| 1422 | (t | 1392 | (t |
| 1423 | (gud-common-init command-line 'gud-dbx-massage-args | 1393 | (gud-common-init command-line 'gud-dbx-massage-args |
| 1424 | 'gud-dbx-marker-filter))) | 1394 | 'gud-dbx-marker-filter))) |