This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

editing source files in gdb


Hi,
    I referred to the  manual on editing source files from inside gdb
using an editor. I gave commands

EDITOR=/usr/bin/vim
export EDITOR
gdb a.out

The problem is that when i give 'edit' from inside gdb to edit the
current source file, gdb is opening a new file in the editor under a
different name. The funny thing is that the new file has the name of
the absolute path of the file with a slash between directory and file
missing. For eg: if file 'test.cpp' is in directory '/home/kiran' then
gdb is opening the file as /home/kirantest.cpp. Could any one help me
in this ?

This feature (coupled with make from inside gdb) would be useful to me
as dont have to exit from gdb for editing the source file if i find a
mistake in my code.

Thanks in advance
Kiran.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]