diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-26 23:21:23 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-17 13:21:47 -0600 |
commit | 15bf30027bcb167833a0ca2c619c03f177ef1ba4 (patch) | |
tree | 117580eb74accac812d65ad76bb839237f0ab4d3 /gdb/guile/guile-internal.h | |
parent | 7eb1a66c26b57803bb4245f84cf15278297bb649 (diff) | |
download | fsf-binutils-gdb-15bf30027bcb167833a0ca2c619c03f177ef1ba4.zip fsf-binutils-gdb-15bf30027bcb167833a0ca2c619c03f177ef1ba4.tar.gz fsf-binutils-gdb-15bf30027bcb167833a0ca2c619c03f177ef1ba4.tar.bz2 |
Change gdbscm_exception_message_to_string to return a unique_xmalloc_ptr
This changes gdbscm_exception_message_to_string to return a
unique_xmalloc_ptr, allowing for the removal of some cleanups.
unique_xmalloc_ptr was chosen because at the root of the call chains
is a function from Guile that returns a malloc'd string.
gdb/ChangeLog
2018-07-17 Tom Tromey <tom@tromey.com>
* guile/scm-param.c (pascm_signal_setshow_error): Update.
* guile/guile-internal.h (gdbscm_exception_message_to_string):
Update.
* guile/scm-cmd.c (cmdscm_function): Update.
* guile/scm-pretty-print.c
(ppscm_print_exception_unless_memory_error): Update.
* guile/scm-exception.c (gdbscm_exception_message_to_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 6bce58e..20e2c70 100644 --- a/gdb/guile/guile-internal.h +++ b/gdb/guile/guile-internal.h @@ -362,7 +362,8 @@ extern void gdbscm_print_exception_with_stack (SCM port, SCM stack, extern void gdbscm_print_gdb_exception (SCM port, SCM exception); -extern char *gdbscm_exception_message_to_string (SCM exception); +extern gdb::unique_xmalloc_ptr<char> gdbscm_exception_message_to_string + (SCM exception); extern excp_matcher_func gdbscm_memory_error_p; |