aboutsummaryrefslogtreecommitdiff
path: root/gdb/disasm.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-03-27 19:08:37 +0000
committerPedro Alves <palves@redhat.com>2012-03-27 19:08:37 +0000
commitf99d8bf46c55bc0192b3765e7738fd644c20619e (patch)
tree2fb350823defa26f0a9bf4c46085288f4862c546 /gdb/disasm.c
parent72508ac0bfe7aae764ddce41ea504e2377fecd1d (diff)
downloadfsf-binutils-gdb-f99d8bf46c55bc0192b3765e7738fd644c20619e.zip
fsf-binutils-gdb-f99d8bf46c55bc0192b3765e7738fd644c20619e.tar.gz
fsf-binutils-gdb-f99d8bf46c55bc0192b3765e7738fd644c20619e.tar.bz2
2012-03-27 Pedro Alves <palves@redhat.com>
Eliminate struct ui_stream. * ui-out.h (struct ui_stream): Delete. (ui_out_field_stream): Adjust prototype. (ui_out_stream_new, ui_out_stream_delete) (make_cleanup_ui_out_stream_delete): Delete declarations. * ui-out.c (ui_out_field_stream): Change prototype to take a ui_file instead of a ui_stream. Adjust. (ui_out_stream_new, ui_out_stream_delete, do_stream_delete) (make_cleanup_ui_out_stream_delete): Delete. * breakpoint.c (print_breakpoint_location) (print_one_detail_ranged_breakpoint, print_it_watchpoint): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * disasm.c (dump_insns): Ditto. (do_mixed_source_and_assembly, do_assembly_only): Adjust prototype. (gdb_disassembly): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * infcmd.c (print_return_value): Ditto. * osdata.c (info_osdata_command): Don't allocate a local ui_stream. * stack.c (print_frame_arg, print_frame_args, print_frame): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * tracepoint.c (print_one_static_tracepoint_marker): Don't allocate a local ui_stream. * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. (list_args_or_locals): Don't allocate a local ui_stream. * mi/mi-main.c (get_register, mi_cmd_data_evaluate_expression) (mi_cmd_data_read_memory): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * cli/cli-setshow.c (do_setshow_command): Ditto.
Diffstat (limited to 'gdb/disasm.c')
-rw-r--r--gdb/disasm.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 89bd829..e3d3349 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -97,7 +97,7 @@ static int
dump_insns (struct gdbarch *gdbarch, struct ui_out *uiout,
struct disassemble_info * di,
CORE_ADDR low, CORE_ADDR high,
- int how_many, int flags, struct ui_stream *stb)
+ int how_many, int flags, struct ui_file *stb)
{
int num_displayed = 0;
CORE_ADDR pc;
@@ -145,7 +145,7 @@ dump_insns (struct gdbarch *gdbarch, struct ui_out *uiout,
if (name != NULL)
xfree (name);
- ui_file_rewind (stb->stream);
+ ui_file_rewind (stb);
if (flags & DISASSEMBLY_RAW_INSN)
{
CORE_ADDR old_pc = pc;
@@ -155,9 +155,9 @@ dump_insns (struct gdbarch *gdbarch, struct ui_out *uiout,
/* Build the opcodes using a temporary stream so we can
write them out in a single go for the MI. */
- struct ui_stream *opcode_stream = ui_out_stream_new (uiout);
+ struct ui_file *opcode_stream = mem_fileopen ();
struct cleanup *cleanups =
- make_cleanup_ui_out_stream_delete (opcode_stream);
+ make_cleanup_ui_file_delete (opcode_stream);
pc += gdbarch_print_insn (gdbarch, pc, di);
for (;old_pc < pc; old_pc++)
@@ -165,7 +165,7 @@ dump_insns (struct gdbarch *gdbarch, struct ui_out *uiout,
status = (*di->read_memory_func) (old_pc, &data, 1, di);
if (status != 0)
(*di->memory_error_func) (status, old_pc, di);
- fprintf_filtered (opcode_stream->stream, "%s%02x",
+ fprintf_filtered (opcode_stream, "%s%02x",
spacer, (unsigned) data);
spacer = " ";
}
@@ -177,7 +177,7 @@ dump_insns (struct gdbarch *gdbarch, struct ui_out *uiout,
else
pc += gdbarch_print_insn (gdbarch, pc, di);
ui_out_field_stream (uiout, "inst", stb);
- ui_file_rewind (stb->stream);
+ ui_file_rewind (stb);
do_cleanups (ui_out_chain);
ui_out_text (uiout, "\n");
}
@@ -195,7 +195,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
struct linetable_entry *le,
CORE_ADDR low, CORE_ADDR high,
struct symtab *symtab,
- int how_many, int flags, struct ui_stream *stb)
+ int how_many, int flags, struct ui_file *stb)
{
int newlines = 0;
struct dis_line_entry *mle;
@@ -342,7 +342,7 @@ static void
do_assembly_only (struct gdbarch *gdbarch, struct ui_out *uiout,
struct disassemble_info * di,
CORE_ADDR low, CORE_ADDR high,
- int how_many, int flags, struct ui_stream *stb)
+ int how_many, int flags, struct ui_file *stb)
{
int num_displayed = 0;
struct cleanup *ui_out_chain;
@@ -402,9 +402,9 @@ gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout,
char *file_string, int flags, int how_many,
CORE_ADDR low, CORE_ADDR high)
{
- struct ui_stream *stb = ui_out_stream_new (uiout);
- struct cleanup *cleanups = make_cleanup_ui_out_stream_delete (stb);
- struct disassemble_info di = gdb_disassemble_info (gdbarch, stb->stream);
+ struct ui_file *stb = mem_fileopen ();
+ struct cleanup *cleanups = make_cleanup_ui_file_delete (stb);
+ struct disassemble_info di = gdb_disassemble_info (gdbarch, stb);
/* To collect the instruction outputted from opcodes. */
struct symtab *symtab = NULL;
struct linetable_entry *le = NULL;