[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with gdb and program files in another directory than curren
From: |
Dmitry Dzhus |
Subject: |
Re: Problems with gdb and program files in another directory than current working directory |
Date: |
Tue, 21 Jul 2009 21:24:14 +0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
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:
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
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
む