This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] add-inferior: expand tilde in -exec FILENAME argument
- From: Pedro Alves <palves at redhat dot com>
- To: Sanimir Agovic <sanimir dot agovic at intel dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 28 Feb 2013 15:32:39 +0000
- Subject: Re: [PATCH] add-inferior: expand tilde in -exec FILENAME argument
- References: <1362062885-6620-1-git-send-email-sanimir.agovic@intel.com>
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