diff options
author | David Edelsohn <dje.gcc@gmail.com> | 1996-01-23 17:21:16 +0000 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 1996-01-23 17:21:16 +0000 |
commit | fc941258cc0629e1b0cfea4d1acb9c4fd75f8b8d (patch) | |
tree | 07b0da549dd2179ef323d2d2f3fda7e5a11b4929 /gdb/gdbtk.c | |
parent | 01d1f728cd4ffd6d7e5a269f16a4e622ea020b35 (diff) | |
download | gdb-fc941258cc0629e1b0cfea4d1acb9c4fd75f8b8d.zip gdb-fc941258cc0629e1b0cfea4d1acb9c4fd75f8b8d.tar.gz gdb-fc941258cc0629e1b0cfea4d1acb9c4fd75f8b8d.tar.bz2 |
* gdbtk.c (gdb_disassemble): Rework disassemble_info initialization.
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r-- | gdb/gdbtk.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index d9ba642..3132e9a 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -789,16 +789,17 @@ gdb_disassemble (clientData, interp, argc, argv) { CORE_ADDR pc, low, high; int mixed_source_and_assembly; - static disassemble_info di = { - (fprintf_ftype) fprintf_unfiltered, /* fprintf_func */ - gdb_stdout, /* stream */ - NULL, /* application_data */ - 0, /* flags */ - NULL, /* private_data */ - NULL, /* read_memory_func */ - dis_asm_memory_error, /* memory_error_func */ - dis_asm_print_address /* print_address_func */ - }; + static disassemble_info di; + static int di_initialized; + + if (! di_initialized) + { + INIT_DISASSEMBLE_INFO (di, gdb_stdout); + di.fprintf_func = (fprintf_ftype) fprintf_unfiltered; + di.memory_error_func = dis_asm_memory_error; + di.print_address_func = dis_asm_print_address; + di_initialized = 1; + } if (argc != 3 && argc != 4) error ("wrong # args"); |