* Problems with gdb and program files in another directory than current working directory
@ 2009-07-21 15:29 Geralt
0 siblings, 0 replies; 2+ messages in thread
From: Geralt @ 2009-07-21 15:29 UTC (permalink / raw)
To: Emacs Help List
Hi,
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.
Geralt.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problems with gdb and program files in another directory than current working directory
[not found] <mailman.2917.1248190194.2239.help-gnu-emacs@gnu.org>
@ 2009-07-21 17:24 ` Dmitry Dzhus
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Dzhus @ 2009-07-21 17:24 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: Geralt
[-- 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
む
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-21 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 15:29 Problems with gdb and program files in another directory than current working directory Geralt
[not found] <mailman.2917.1248190194.2239.help-gnu-emacs@gnu.org>
2009-07-21 17:24 ` Dmitry Dzhus
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).