diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-26 23:26:39 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-17 13:21:47 -0600 |
commit | a1a31cb8dce7d1bfa7878dc08c28af330ef2ed69 (patch) | |
tree | 7819771634fdc0ad4ef245800c3b354abf6382e4 /gdb/guile/guile-internal.h | |
parent | 15bf30027bcb167833a0ca2c619c03f177ef1ba4 (diff) | |
download | fsf-binutils-gdb-a1a31cb8dce7d1bfa7878dc08c28af330ef2ed69.zip fsf-binutils-gdb-a1a31cb8dce7d1bfa7878dc08c28af330ef2ed69.tar.gz fsf-binutils-gdb-a1a31cb8dce7d1bfa7878dc08c28af330ef2ed69.tar.bz2 |
Return unique_xmalloc_ptr from gdbscm_safe_eval_string
This changes gdbscm_safe_eval_string to return a unique_xmalloc_ptr.
This allows for the removal of some cleanups. It also fixes a
potential latent memory leak in gdbscm_set_backtrace.
gdb/ChangeLog
2018-07-17 Tom Tromey <tom@tromey.com>
* guile/guile.c (gdbscm_eval_from_control_command): Update.
* guile/guile-internal.h (gdbscm_safe_eval_string): Update.
* guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
* guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
unique_xmalloc_ptr.
Diffstat (limited to 'gdb/guile/guile-internal.h')
-rw-r--r-- | gdb/guile/guile-internal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h index 20e2c70..e0feb9f 100644 --- a/gdb/guile/guile-internal.h +++ b/gdb/guile/guile-internal.h @@ -402,7 +402,8 @@ extern SCM gdbscm_safe_apply_1 (SCM proc, SCM arg0, SCM args, extern SCM gdbscm_unsafe_call_1 (SCM proc, SCM arg0); -extern char *gdbscm_safe_eval_string (const char *string, int display_result); +extern gdb::unique_xmalloc_ptr<char> gdbscm_safe_eval_string + (const char *string, int display_result); extern char *gdbscm_safe_source_script (const char *filename); |