mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 05:12:28 +08:00
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.
This commit is contained in:
@ -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.
|
||||
|
@ -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,8 +2275,11 @@ 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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user