aboutsummaryrefslogtreecommitdiff
path: root/gdb/ctf.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2017-09-22 17:00:33 -0300
committerAlexandre Oliva <aoliva@redhat.com>2017-09-22 17:00:33 -0300
commit9e0703de64a6dd4deae2ebd569955f14337f2710 (patch)
treecec45139f1febef6441deabae142c3fb3f2c61f3 /gdb/ctf.c
parent13b9f79a1904081d984a64037af6457c1e3ff7b6 (diff)
parent43573013c9836f2b91b74b9b29dac35fdb41e06b (diff)
downloadgdb-9e0703de64a6dd4deae2ebd569955f14337f2710.zip
gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.tar.gz
gdb-9e0703de64a6dd4deae2ebd569955f14337f2710.tar.bz2
Merge remote-tracking branch 'remotes/master' into users/aoliva/SFN
Updated local changes to binutils/testsuite/binutils-all/readelf.exp to match the unresolved (failed to assemble) messages introduced by Alan Modra.
Diffstat (limited to 'gdb/ctf.c')
-rw-r--r--gdb/ctf.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/gdb/ctf.c b/gdb/ctf.c
index 82e7013..d719163 100644
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -311,8 +311,6 @@ ctf_target_save (struct trace_file_writer *self,
static void
ctf_start (struct trace_file_writer *self, const char *dirname)
{
- char *file_name;
- struct cleanup *old_chain;
struct ctf_trace_file_writer *writer
= (struct ctf_trace_file_writer *) self;
int i;
@@ -325,24 +323,20 @@ ctf_start (struct trace_file_writer *self, const char *dirname)
memset (&writer->tcs, '\0', sizeof (writer->tcs));
- file_name = xstrprintf ("%s/%s", dirname, CTF_METADATA_NAME);
- old_chain = make_cleanup (xfree, file_name);
+ std::string file_name = string_printf ("%s/%s", dirname, CTF_METADATA_NAME);
- writer->tcs.metadata_fd = fopen (file_name, "w");
+ writer->tcs.metadata_fd = fopen (file_name.c_str (), "w");
if (writer->tcs.metadata_fd == NULL)
error (_("Unable to open file '%s' for saving trace data (%s)"),
- file_name, safe_strerror (errno));
- do_cleanups (old_chain);
+ file_name.c_str (), safe_strerror (errno));
ctf_save_metadata_header (&writer->tcs);
- file_name = xstrprintf ("%s/%s", dirname, CTF_DATASTREAM_NAME);
- old_chain = make_cleanup (xfree, file_name);
- writer->tcs.datastream_fd = fopen (file_name, "w");
+ file_name = string_printf ("%s/%s", dirname, CTF_DATASTREAM_NAME);
+ writer->tcs.datastream_fd = fopen (file_name.c_str (), "w");
if (writer->tcs.datastream_fd == NULL)
error (_("Unable to open file '%s' for saving trace data (%s)"),
- file_name, safe_strerror (errno));
- do_cleanups (old_chain);
+ file_name.c_str (), safe_strerror (errno));
}
/* This is the implementation of trace_file_write_ops method
@@ -1731,10 +1725,6 @@ Specify the filename of the CTF directory.";
#endif
-/* -Wmissing-prototypes */
-
-extern initialize_file_ftype _initialize_ctf;
-
/* module initialization */
void