[gnu.emacs.bug] gdb-break can get wrong line number

gildea@BBN.COM (Stephen Gildea) (09/22/89)

The function gdb-break uses the wrong line number if point is not at
the beginning of a line.  The diff below (from 18.55) fixes this.

 < Stephen


diff -c2 /usr/local/emacs/lisp/gdb.el gdb.el
*** /usr/local/emacs/lisp/gdb.el        Sun May 22 18:10:29 1988
--- gdb.el     Thu Sep 21 22:15:37 1989
***************
*** 346,350
        (line (save-restriction
                (widen)
!               (1+ (count-lines 1 (point))))))
      (send-string (get-buffer-process current-gdb-buffer)
                 (concat "break " file-name ":" line "\n"))))

--- 346,351 -----
        (line (save-restriction
                (widen)
!               (1+ (count-lines 1 (save-excursion
!                                    (beginning-of-line) (point)))))))
      (send-string (get-buffer-process current-gdb-buffer)
                 (concat "break " file-name ":" line "\n"))))