diff options
Diffstat (limited to 'gdb/guile/scm-math.c')
-rw-r--r-- | gdb/guile/scm-math.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/guile/scm-math.c b/gdb/guile/scm-math.c index 8b7fe9b..a88c805 100644 --- a/gdb/guile/scm-math.c +++ b/gdb/guile/scm-math.c @@ -776,6 +776,8 @@ vlscm_convert_typed_value_from_scheme (const char *func_name, } else if (scm_is_string (obj)) { + size_t len; + if (type != NULL) { except_scm = gdbscm_make_misc_error (func_name, type_arg_pos, @@ -787,14 +789,12 @@ vlscm_convert_typed_value_from_scheme (const char *func_name, { /* TODO: Provide option to specify conversion strategy. */ gdb::unique_xmalloc_ptr<char> s - = gdbscm_scm_to_string (obj, nullptr, + = gdbscm_scm_to_string (obj, &len, target_charset (gdbarch), 0 /*non-strict*/, &except_scm); if (s != NULL) - value = value_cstring (s.get (), strlen (s.get ()) + 1, - language_string_char_type (language, - gdbarch)); + value = language->value_string (gdbarch, s.get (), len); else value = NULL; } |