tsave: Make tilde-expanded filename visible.

Before:

  (gdb) tsave ~/a/b
  Unable to open file '~/a/b' for saving trace data (No such file or directory)

After:

  (gdb) tsave ~/a/b
  Unable to open file '/home/pedro/a/b' for saving trace data (No such file or directory)

Tested on x86_64 Fedora 17.

gdb/
2013-08-09  Pedro Alves  <palves@redhat.com>

	* tracepoint.c (tfile_start): Show tilde-expanded filename in
	error message.
This commit is contained in:
Pedro Alves 2013-08-09 15:35:03 +00:00
parent c718be4726
commit 3f12a589a0
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-08-09 Pedro Alves <palves@redhat.com>
* tracepoint.c (tfile_start): Show tilde-expanded filename in
error message.
2013-08-09 Pedro Alves <palves@redhat.com>
* breakpoint.c (save_breakpoints): Show tilde-expanded filename in

View File

@ -3163,7 +3163,7 @@ tfile_start (struct trace_file_writer *self, const char *filename)
writer->fp = gdb_fopen_cloexec (writer->pathname, "wb");
if (writer->fp == NULL)
error (_("Unable to open file '%s' for saving trace data (%s)"),
filename, safe_strerror (errno));
writer->pathname, safe_strerror (errno));
}
/* This is the implementation of trace_file_write_ops method