aboutsummaryrefslogtreecommitdiff
path: root/gdb/proc-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/proc-api.c')
-rw-r--r--gdb/proc-api.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/proc-api.c b/gdb/proc-api.c
index 5f60eee..40bde78 100644
--- a/gdb/proc-api.c
+++ b/gdb/proc-api.c
@@ -50,14 +50,14 @@ struct trans {
static bool procfs_trace = false;
static FILE *procfs_file = NULL;
-static char *procfs_filename;
+static std::string procfs_filename = "procfs_trace";
static void
prepare_to_trace (void)
{
if (procfs_trace) /* if procfs tracing turned on */
if (procfs_file == NULL) /* if output file not yet open */
- procfs_file = fopen (procfs_filename, "a"); /* open output file */
+ procfs_file = fopen (procfs_filename.c_str (), "a"); /* open output file */
}
static void
@@ -425,7 +425,6 @@ Show tracing for /proc api calls."), NULL,
NULL, /* FIXME: i18n: */
&setlist, &showlist);
- procfs_filename = xstrdup ("procfs_trace");
add_setshow_filename_cmd ("procfs-file", no_class, &procfs_filename, _("\
Set filename for /proc tracefile."), _("\
Show filename for /proc tracefile."), NULL,