gcore: Make tilde-expanded filename visible.
Most commands in GDB show the tilde-expanded filename in user visible
output. This makes gcore behave the same.
Before:
(gdb) generate-core-file ~/a/b
Failed to open '~/a/b' for output.
(gdb) generate-core-file ~/core
Saved corefile ~/core
After:
(gdb) generate-core-file ~/a/b
Failed to open '/home/pedro/a/b' for output.
(gdb) generate-core-file ~/core
Saved corefile /home/pedro/core
Tested on x86_64 Fedora 17.
gdb/
2013-08-09 Pedro Alves <palves@redhat.com>
* gcore.c (create_gcore_bfd): Don't use tilde_expand here.
(gcore_command): Use tilde_expand here, and when showing the
filename to the user, show the expanded version.