228 |
(with-current-buffer buf |
(with-current-buffer buf |
229 |
(set (make-local-variable 'gud-minor-mode) minor-mode) |
(set (make-local-variable 'gud-minor-mode) minor-mode) |
230 |
(set (make-local-variable 'tool-bar-map) gud-tool-bar-map) |
(set (make-local-variable 'tool-bar-map) gud-tool-bar-map) |
231 |
|
(when (memq gud-minor-mode '(gdbmi gdba)) |
232 |
|
(make-local-variable 'gdb-define-alist) |
233 |
|
(unless gdb-define-alist (gdb-create-define-alist)) |
234 |
|
(add-hook 'after-save-hook 'gdb-create-define-alist nil t)) |
235 |
(make-local-variable 'gud-keep-buffer)) |
(make-local-variable 'gud-keep-buffer)) |
236 |
buf))) |
buf))) |
237 |
|
|
478 |
|
|
479 |
;; Extract the frame position from the marker. |
;; Extract the frame position from the marker. |
480 |
gud-last-frame (cons (match-string 1 gud-marker-acc) |
gud-last-frame (cons (match-string 1 gud-marker-acc) |
481 |
(string-to-int (match-string 2 gud-marker-acc))) |
(string-to-number (match-string 2 gud-marker-acc))) |
482 |
|
|
483 |
;; Append any text before the marker to the output we're going |
;; Append any text before the marker to the output we're going |
484 |
;; to return - we don't include the marker in this text. |
;; to return - we don't include the marker in this text. |
779 |
gud-marker-acc start) |
gud-marker-acc start) |
780 |
(setq gud-last-frame |
(setq gud-last-frame |
781 |
(cons (match-string 3 gud-marker-acc) |
(cons (match-string 3 gud-marker-acc) |
782 |
(string-to-int (match-string 4 gud-marker-acc))))) |
(string-to-number (match-string 4 gud-marker-acc))))) |
783 |
;; System V Release 4.0 quite often clumps two lines together |
;; System V Release 4.0 quite often clumps two lines together |
784 |
((string-match "^\\(BREAKPOINT\\|STEPPED\\) process [0-9]+ function [^ ]+ in \\(.+\\)\n\\([0-9]+\\):" |
((string-match "^\\(BREAKPOINT\\|STEPPED\\) process [0-9]+ function [^ ]+ in \\(.+\\)\n\\([0-9]+\\):" |
785 |
gud-marker-acc start) |
gud-marker-acc start) |
786 |
(setq gud-sdb-lastfile (match-string 2 gud-marker-acc)) |
(setq gud-sdb-lastfile (match-string 2 gud-marker-acc)) |
787 |
(setq gud-last-frame |
(setq gud-last-frame |
788 |
(cons gud-sdb-lastfile |
(cons gud-sdb-lastfile |
789 |
(string-to-int (match-string 3 gud-marker-acc))))) |
(string-to-number (match-string 3 gud-marker-acc))))) |
790 |
;; System V Release 4.0 |
;; System V Release 4.0 |
791 |
((string-match "^\\(BREAKPOINT\\|STEPPED\\) process [0-9]+ function [^ ]+ in \\(.+\\)\n" |
((string-match "^\\(BREAKPOINT\\|STEPPED\\) process [0-9]+ function [^ ]+ in \\(.+\\)\n" |
792 |
gud-marker-acc start) |
gud-marker-acc start) |
795 |
gud-marker-acc start)) |
gud-marker-acc start)) |
796 |
(setq gud-last-frame |
(setq gud-last-frame |
797 |
(cons gud-sdb-lastfile |
(cons gud-sdb-lastfile |
798 |
(string-to-int (match-string 1 gud-marker-acc))))) |
(string-to-number (match-string 1 gud-marker-acc))))) |
799 |
(t |
(t |
800 |
(setq gud-sdb-lastfile nil))) |
(setq gud-sdb-lastfile nil))) |
801 |
(setq start (match-end 0))) |
(setq start (match-end 0))) |
881 |
gud-marker-acc start)) |
gud-marker-acc start)) |
882 |
(setq gud-last-frame |
(setq gud-last-frame |
883 |
(cons (match-string 2 gud-marker-acc) |
(cons (match-string 2 gud-marker-acc) |
884 |
(string-to-int (match-string 1 gud-marker-acc))) |
(string-to-number (match-string 1 gud-marker-acc))) |
885 |
start (match-end 0))) |
start (match-end 0))) |
886 |
|
|
887 |
;; Search for the last incomplete line in this chunk |
;; Search for the last incomplete line in this chunk |
928 |
;; Extract the frame position from the marker. |
;; Extract the frame position from the marker. |
929 |
gud-last-frame |
gud-last-frame |
930 |
(cons (match-string 1 gud-marker-acc) |
(cons (match-string 1 gud-marker-acc) |
931 |
(string-to-int (match-string 2 gud-marker-acc))) |
(string-to-number (match-string 2 gud-marker-acc))) |
932 |
|
|
933 |
;; Append any text before the marker to the output we're going |
;; Append any text before the marker to the output we're going |
934 |
;; to return - we don't include the marker in this text. |
;; to return - we don't include the marker in this text. |
1036 |
(if (file-exists-p file) |
(if (file-exists-p file) |
1037 |
(setq gud-last-frame |
(setq gud-last-frame |
1038 |
(cons (match-string 1 result) |
(cons (match-string 1 result) |
1039 |
(string-to-int (match-string 2 result)))))) |
(string-to-number (match-string 2 result)))))) |
1040 |
result) |
result) |
1041 |
((string-match ; kluged-up marker as above |
((string-match ; kluged-up marker as above |
1042 |
"\032\032\\([0-9]*\\):\\(.*\\)\n" result) |
"\032\032\\([0-9]*\\):\\(.*\\)\n" result) |
1044 |
(if (and file (file-exists-p file)) |
(if (and file (file-exists-p file)) |
1045 |
(setq gud-last-frame |
(setq gud-last-frame |
1046 |
(cons file |
(cons file |
1047 |
(string-to-int (match-string 1 result)))))) |
(string-to-number (match-string 1 result)))))) |
1048 |
(setq result (substring result 0 (match-beginning 0)))))) |
(setq result (substring result 0 (match-beginning 0)))))) |
1049 |
(or result ""))) |
(or result ""))) |
1050 |
|
|
1081 |
(while (string-match re gud-marker-acc start) |
(while (string-match re gud-marker-acc start) |
1082 |
(setq gud-last-frame |
(setq gud-last-frame |
1083 |
(cons (match-string 4 gud-marker-acc) |
(cons (match-string 4 gud-marker-acc) |
1084 |
(string-to-int (match-string 3 gud-marker-acc))) |
(string-to-number (match-string 3 gud-marker-acc))) |
1085 |
start (match-end 0))) |
start (match-end 0))) |
1086 |
|
|
1087 |
;; Search for the last incomplete line in this chunk |
;; Search for the last incomplete line in this chunk |
1200 |
result) |
result) |
1201 |
(string-match "[^: \t]+:[ \t]+\\([^:]+\\): [^:]+: \\([0-9]+\\):" |
(string-match "[^: \t]+:[ \t]+\\([^:]+\\): [^:]+: \\([0-9]+\\):" |
1202 |
result)) |
result)) |
1203 |
(let ((line (string-to-int (match-string 2 result))) |
(let ((line (string-to-number (match-string 2 result))) |
1204 |
(file (gud-file-name (match-string 1 result)))) |
(file (gud-file-name (match-string 1 result)))) |
1205 |
(if file |
(if file |
1206 |
(setq gud-last-frame (cons file line)))))) |
(setq gud-last-frame (cons file line)))))) |
1302 |
;; Extract the frame position from the marker. |
;; Extract the frame position from the marker. |
1303 |
gud-last-frame |
gud-last-frame |
1304 |
(cons (match-string 1 gud-marker-acc) |
(cons (match-string 1 gud-marker-acc) |
1305 |
(string-to-int (match-string 3 gud-marker-acc))) |
(string-to-number (match-string 3 gud-marker-acc))) |
1306 |
|
|
1307 |
;; Append any text before the marker to the output we're going |
;; Append any text before the marker to the output we're going |
1308 |
;; to return - we don't include the marker in this text. |
;; to return - we don't include the marker in this text. |
1400 |
gud-last-frame |
gud-last-frame |
1401 |
(let ((file (match-string gud-pdb-marker-regexp-file-group |
(let ((file (match-string gud-pdb-marker-regexp-file-group |
1402 |
gud-marker-acc)) |
gud-marker-acc)) |
1403 |
(line (string-to-int |
(line (string-to-number |
1404 |
(match-string gud-pdb-marker-regexp-line-group |
(match-string gud-pdb-marker-regexp-line-group |
1405 |
gud-marker-acc)))) |
gud-marker-acc)))) |
1406 |
(if (string-equal file "<string>") |
(if (string-equal file "<string>") |
2032 |
;; (<file-name> . <line-number>) . |
;; (<file-name> . <line-number>) . |
2033 |
(if (if (match-beginning 1) |
(if (if (match-beginning 1) |
2034 |
(let (n) |
(let (n) |
2035 |
(setq n (string-to-int (substring |
(setq n (string-to-number (substring |
2036 |
gud-marker-acc |
gud-marker-acc |
2037 |
(1+ (match-beginning 1)) |
(1+ (match-beginning 1)) |
2038 |
(- (match-end 1) 2)))) |
(- (match-end 1) 2)))) |
2043 |
(gud-jdb-find-source (match-string 2 gud-marker-acc))) |
(gud-jdb-find-source (match-string 2 gud-marker-acc))) |
2044 |
(setq gud-last-frame |
(setq gud-last-frame |
2045 |
(cons file-found |
(cons file-found |
2046 |
(string-to-int |
(string-to-number |
2047 |
(let |
(let |
2048 |
((numstr (match-string 4 gud-marker-acc))) |
((numstr (match-string 4 gud-marker-acc))) |
2049 |
(if (string-match "[.,]" numstr) |
(if (string-match "[.,]" numstr) |
2191 |
;; Extract the frame position from the marker. |
;; Extract the frame position from the marker. |
2192 |
gud-last-frame |
gud-last-frame |
2193 |
(cons (match-string 2 gud-marker-acc) |
(cons (match-string 2 gud-marker-acc) |
2194 |
(string-to-int (match-string 4 gud-marker-acc))) |
(string-to-number (match-string 4 gud-marker-acc))) |
2195 |
|
|
2196 |
;; Append any text before the marker to the output we're going |
;; Append any text before the marker to the output we're going |
2197 |
;; to return - we don't include the marker in this text. |
;; to return - we don't include the marker in this text. |
2981 |
(message "gud-find-class: class for file %s not found in gud-jdb-class-source-alist!" f) |
(message "gud-find-class: class for file %s not found in gud-jdb-class-source-alist!" f) |
2982 |
nil)))) |
nil)))) |
2983 |
|
|
2984 |
|
|
2985 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2986 |
;;; GDB script mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;; GDB script mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2987 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |