diff options
author | Pedro Alves <palves@redhat.com> | 2016-11-08 15:26:44 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-11-08 15:26:44 +0000 |
commit | 3ab692db7f4d96022a132379614031a852de6f35 (patch) | |
tree | dcc4b2cdf8d475300d5b72633589d458820166d8 /gdb/guile/scm-breakpoint.c | |
parent | 09b0e4b047b44063cf4c8c00527886743619c24e (diff) | |
download | fsf-binutils-gdb-3ab692db7f4d96022a132379614031a852de6f35.zip fsf-binutils-gdb-3ab692db7f4d96022a132379614031a852de6f35.tar.gz fsf-binutils-gdb-3ab692db7f4d96022a132379614031a852de6f35.tar.bz2 |
Use ui_file_as_string in gdb/guile/
gdb/ChangeLog:
2016-11-08 Pedro Alves <palves@redhat.com>
* guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
ui_file_as_string and adjust to use std::string.
* guile/scm-disasm.c (gdbscm_arch_disassemble): Likewise.
* guile/scm-frame.c (frscm_print_frame_smob): Likewise.
* guile/scm-type.c (tyscm_type_name): Use ui_file_as_string and
adjust to use std::string. Throw exception directly instead of
returning it in EXCP output parameter.
(tyscm_print_type_smob, gdbscm_type_print_name): Adjust to
tyscm_type_name interface change.
* guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
Use ui_file_as_string and std::string.
Diffstat (limited to 'gdb/guile/scm-breakpoint.c')
-rw-r--r-- | gdb/guile/scm-breakpoint.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c index baecf01..61d16da 100644 --- a/gdb/guile/scm-breakpoint.c +++ b/gdb/guile/scm-breakpoint.c @@ -981,7 +981,6 @@ gdbscm_breakpoint_commands (SCM self) struct ui_file *string_file; struct cleanup *chain; SCM result; - char *cmdstr; bp = bp_smob->bp; @@ -1004,9 +1003,8 @@ gdbscm_breakpoint_commands (SCM self) } END_CATCH - cmdstr = ui_file_xstrdup (string_file, &length); - make_cleanup (xfree, cmdstr); - result = gdbscm_scm_from_c_string (cmdstr); + std::string cmdstr = ui_file_as_string (string_file); + result = gdbscm_scm_from_c_string (cmdstr.c_str ()); do_cleanups (chain); return result; |