aboutsummaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-08-29 23:03:09 -0600
committerTom Tromey <tom@tromey.com>2018-09-13 16:22:34 -0600
commit803c08d083556154cd4d27368e58b359e9de8b93 (patch)
tree900369c589d11a5926ca59fe244987389692a526 /gdb/exec.c
parent5b4cbbe357aaf6462a68e1a15c9532dd3d01e06d (diff)
downloadgdb-803c08d083556154cd4d27368e58b359e9de8b93.zip
gdb-803c08d083556154cd4d27368e58b359e9de8b93.tar.gz
gdb-803c08d083556154cd4d27368e58b359e9de8b93.tar.bz2
Return std::string from gdb_bfd_errmsg
This changes gdb_bfd_errmsg to return a std::string, removing a cleanup. This approach may be slightly less efficient than the previous code, but I don't believe this is very important in this situation. gdb/ChangeLog 2018-09-13 Tom Tromey <tom@tromey.com> * utils.h (gdb_bfd_errmsg): Return std::string. * exec.c (exec_file_attach): Update. * compile/compile-object-load.c (compile_object_load): Update. * utils.c (gdb_bfd_errmsg): Return std::string.
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index 3023ff7..6e44b0e 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -362,7 +362,7 @@ exec_file_attach (const char *filename, int from_tty)
exec_close ();
error (_("\"%s\": not in executable format: %s"),
scratch_pathname,
- gdb_bfd_errmsg (bfd_get_error (), matching));
+ gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
}
if (build_section_table (exec_bfd, &sections, &sections_end))