diff options
author | Michael Snyder <msnyder@vmware.com> | 2002-01-08 01:52:12 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2002-01-08 01:52:12 +0000 |
commit | 21c1c9207f4f68fd7a2a2b3e29595af7be75c64a (patch) | |
tree | 22f9194fccf723e6eccfa46cec1064a558cf228a /gdb | |
parent | 5bbd998e61b090489407086b72dba187aab37263 (diff) | |
download | gdb-21c1c9207f4f68fd7a2a2b3e29595af7be75c64a.zip gdb-21c1c9207f4f68fd7a2a2b3e29595af7be75c64a.tar.gz gdb-21c1c9207f4f68fd7a2a2b3e29595af7be75c64a.tar.bz2 |
2002-01-07 Michael Snyder <msnyder@redhat.com>
* tracepoint.c (tracepoint_save_command): From Klee Deines --
use tilde_expand and strerror for opening save-tracepoints file.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/tracepoint.c | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 028960b..1ab3eb4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2002-01-07 Michael Snyder <msnyder@redhat.com> + * tracepoint.c (tracepoint_save_command): From Klee Dienes -- + use tilde_expand and strerror for opening save-tracepoints file. + * thread-db.c (thread_db_new_objfile): Indendation fix. * infptrace.c (GDB_MAX_ALLOCA): New define. diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 7e2f112..0ccdf6f 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -2263,7 +2263,7 @@ tracepoint_save_command (char *args, int from_tty) struct action_line *line; FILE *fp; char *i1 = " ", *i2 = " "; - char *indent, *actionline; + char *indent, *actionline, *pathname; char tmp[40]; if (args == 0 || *args == 0) @@ -2275,9 +2275,12 @@ tracepoint_save_command (char *args, int from_tty) return; } - if (!(fp = fopen (args, "w"))) - error ("Unable to open file '%s' for saving tracepoints"); - + pathname = tilde_expand (args); + if (!(fp = fopen (pathname, "w"))) + error ("Unable to open file '%s' for saving tracepoints (%s)", + args, strerror (errno)); + xfree (pathname); + ALL_TRACEPOINTS (tp) { if (tp->addr_string) |