From: Dmitry Dzhus <dima@sphinx.net.ru>
To: help-gnu-emacs@gnu.org
Cc: Geralt <usr.gentoo@googlemail.com>
Subject: Re: Problems with gdb and program files in another directory than current working directory
Date: Tue, 21 Jul 2009 21:24:14 +0400 [thread overview]
Message-ID: <87my6yvtj5.fsf@sphinx.net.ru> (raw)
In-Reply-To: mailman.2917.1248190194.2239.help-gnu-emacs@gnu.org
[-- Attachment #1: Type: text/plain, Size: 572 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: no-source-file-fix.patch --]
[-- Type: text/x-patch, Size: 442 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 178 bytes --]
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
む
next parent reply other threads:[~2009-07-21 17:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2917.1248190194.2239.help-gnu-emacs@gnu.org>
2009-07-21 17:24 ` Dmitry Dzhus [this message]
2009-07-21 15:29 Problems with gdb and program files in another directory than current working directory Geralt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87my6yvtj5.fsf@sphinx.net.ru \
--to=dima@sphinx.net.ru \
--cc=help-gnu-emacs@gnu.org \
--cc=usr.gentoo@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).