diff options
Diffstat (limited to 'gdb/compile/compile-c-support.c')
-rw-r--r-- | gdb/compile/compile-c-support.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c index c42daba..641b0fd 100644 --- a/gdb/compile/compile-c-support.c +++ b/gdb/compile/compile-c-support.c @@ -326,7 +326,7 @@ generate_register_struct (struct ui_file *stream, struct gdbarch *gdbarch, to the inferior when the expression was created, and EXPR_PC indicates the value of $PC. */ -char * +std::string c_compute_program (struct compile_instance *inst, const char *input, struct gdbarch *gdbarch, @@ -334,7 +334,7 @@ c_compute_program (struct compile_instance *inst, CORE_ADDR expr_pc) { struct ui_file *buf, *var_stream = NULL; - char *code; + std::string code; struct cleanup *cleanup; struct compile_c_instance *context = (struct compile_c_instance *) inst; @@ -435,7 +435,7 @@ c_compute_program (struct compile_instance *inst, fputs_unfiltered ("}\n", buf); add_code_footer (inst->scope, buf); - code = ui_file_xstrdup (buf, NULL); + code = ui_file_as_string (buf); do_cleanups (cleanup); return code; } |