From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Dzhus Newsgroups: gmane.emacs.help Subject: Re: Problems with gdb and program files in another directory than current working directory Date: Tue, 21 Jul 2009 21:24:14 +0400 Organization: albasani.net Message-ID: <87my6yvtj5.fsf@sphinx.net.ru> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1248198048 17637 80.91.229.12 (21 Jul 2009 17:40:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jul 2009 17:40:48 +0000 (UTC) Cc: Geralt To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 21 19:40:41 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MTJKR-0000lQ-6j for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Jul 2009 19:40:39 +0200 Original-Received: from localhost ([127.0.0.1]:51098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTJKQ-0000Gz-L3 for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Jul 2009 13:40:38 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-2.dfn.de!news.dfn.de!newsfeed.straub-nv.de!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 52 Original-X-Trace: news.albasani.net uskGYObVHyocP2dq9R73tP0c6pNMypG5pgzungo+0WRpbXvEXAhu69R402U522OfPqgg/171Lk8RxwND1bKW8umPkTKXs5kEEFL+C2Dcg6FKsUWt9Vgv/0hUIviyhL6J Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Tue, 21 Jul 2009 17:25:20 +0000 (UTC) X-User-ID: kYvHXz1X/49l7yW4LKO4jPJA3oXPxz9AS+/W1QheXYI= Cancel-Lock: sha1:ne8IiJuDHRd2/LGMJpHdYvwAlzA= sha1:fNr8Hs1y/S/vVc8qsZJcCTfTiHg= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-NNTP-Posting-Host: 0vMkdVFWbEC4WiWCT7KmFB5UDzlDrszMw/TCe+l6in0= Original-Xref: news.stanford.edu gnu.emacs.help:171133 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66322 Archived-At: --=-=-= Hello Geralt! > when running gdb on a program in a subdirectory (like gdb -mi > debug/myprogram) and the source files sitting in the current working I > get always the following output, after setting a breakpoint: > Breakpoint 1 at 0x8048c87: file foobar.c, line 52. > (gdb) No source file named . > <--------- point is now here > > Is there a way to solve this? When running gdb in a terminal I don't > have this problem. I'm working on the code in gdb-mi.el: http://emacswiki.org/emacs/GDB-MI/. I've tracked down the bug which causes your problem. Here's the patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=no-source-file-fix.patch diff -r 3003bc3e6d38 gdb-mi.el --- a/gdb-mi.el +++ b/gdb-mi.el @@ -2420,7 +2420,7 @@ (let ((breakpoint (get-text-property (point) 'gdb-breakpoint))) (if breakpoint (let ((bptno (gdb-get-field breakpoint 'number)) - (file (gdb-get-field breakpoint 'file)) + (file (gdb-get-field breakpoint 'fullname)) (line (gdb-get-field breakpoint 'line))) (save-selected-window (let* ((buffer (find-file-noselect --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit It fixes the problem for me. This will be in the trunk soon. Thank you for you report. Please, use M-x report-emacs-bug next time. -- Happy Hacking. http://sphinx.net.ru む --=-=-=--