diff options
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 9a1fb8d..3737b8f 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1607,10 +1607,16 @@ print_return_value (struct value *function, struct type *value_type) } else { + struct cleanup *oldchain; + char *type_name; + + type_name = type_to_string (value_type); + oldchain = make_cleanup (xfree, type_name); ui_out_text (uiout, "Value returned has type: "); - ui_out_field_string (uiout, "return-type", TYPE_NAME (value_type)); + ui_out_field_string (uiout, "return-type", type_name); ui_out_text (uiout, "."); ui_out_text (uiout, " Cannot determine contents\n"); + do_cleanups (oldchain); } } |