/[emacs]/emacs/lisp/progmodes/gud.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/gud.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.34 by nickrob, Wed Apr 20 10:08:21 2005 UTC revision 1.35 by nickrob, Tue May 3 06:47:18 2005 UTC
# Line 228  Uses `gud-<MINOR-MODE>-directories' to f Line 228  Uses `gud-<MINOR-MODE>-directories' to f
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    
# Line 474  off the specialized speedbar mode." Line 478  off the specialized speedbar mode."
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.
# Line 775  SKIP is the number of chars to skip on e Line 779  SKIP is the number of chars to skip on e
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)
# Line 791  SKIP is the number of chars to skip on e Line 795  SKIP is the number of chars to skip on e
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)))
# Line 877  containing the executable being debugged Line 881  containing the executable being debugged
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
# Line 924  containing the executable being debugged Line 928  containing the executable being debugged
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.
# Line 1032  a better solution in 6.1 upwards.") Line 1036  a better solution in 6.1 upwards.")
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)
# Line 1040  a better solution in 6.1 upwards.") Line 1044  a better solution in 6.1 upwards.")
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    
# Line 1077  This was tested using R4.11.") Line 1081  This was tested using R4.11.")
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
# Line 1196  containing the executable being debugged Line 1200  containing the executable being debugged
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))))))
# Line 1298  into one that invokes an Emacs-enabled d Line 1302  into one that invokes an Emacs-enabled d
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.
# Line 1396  and source-file directory for your debug Line 1400  and source-file directory for your debug
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>")
# Line 2028  nil) Line 2032  nil)
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))))
# Line 2039  nil) Line 2043  nil)
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)
# Line 2187  gud, see `gud-mode'." Line 2191  gud, see `gud-mode'."
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.
# Line 2977  class of the file (using s to separate n Line 2981  class of the file (using s to separate n
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  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26