Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!BBN.COM!gildea From: gildea@BBN.COM (Stephen Gildea) Newsgroups: gnu.emacs.bug Subject: gdb-break can get wrong line number Message-ID: <8909220225.AA13201@life.ai.mit.edu> Date: 22 Sep 89 02:20:47 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 24 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"))))