This is the mail archive of the gdb-patches@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]

Re: [PATCH] add-inferior: expand tilde in -exec FILENAME argument


Thanks.

On 02/28/2013 02:48 PM, Sanimir Agovic wrote:
> I could not come up with a solid testcase, hints are welcome.

Not sure either.

I assume this fixes:

(gdb) add-inferior -exec ~/gdb/tests/main
Added inferior 2
~/gdb/tests/main: No such file or directory.

even though the file does exist.

I wondered if other similar places expand the tilde early
or just before file open, and confirmed that at least "file"
and "info files" have expanded the tilde before any visible
strings is shown:

(gdb) file ~/gdb/tests/main
Load new symbol table from "/home/pedro/gdb/tests/main"? (y or n)

(gdb) info files
Symbols from "/home/pedro/gdb/tests/main".
Local exec file:
        `/home/pedro/gdb/tests/main', file type elf64-x86-64.

> 2013-02-28  Sanimir Agovic  <sanimir.agovic@intel.com>
> 
> 	* inferior.c: Include "readline/readline.h".
> 	(add_inferior_command): Tilde expand filename.

OK.

Thanks again for the patch.

-- 
Pedro Alves


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