This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[COMMIT PATCH] tsave: Make tilde-expanded filename visible.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 09 Aug 2013 16:44:10 +0100
- Subject: [COMMIT PATCH] 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.
---
gdb/tracepoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index ce61fb7..7dbe54b 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -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