diff options
author | Stu Grossman <grossman@cygnus> | 1995-02-03 19:35:54 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1995-02-03 19:35:54 +0000 |
commit | a76ef70a1469a892f712549afda41511220462cf (patch) | |
tree | f77e4d17351335833522af284cd2546c95b99545 /gdb/gdbtk.c | |
parent | 1b552670ac82a18385c05fb51fe51b6384a44e29 (diff) | |
download | gdb-a76ef70a1469a892f712549afda41511220462cf.zip gdb-a76ef70a1469a892f712549afda41511220462cf.tar.gz gdb-a76ef70a1469a892f712549afda41511220462cf.tar.bz2 |
* core.c (dis_asm_read_memory), defs.h, gdbtk.c (gdb_disassemble),
top.c : Get rid of dis_asm_read_memory_hook. We can now call the
disassemblers directly and have no need for this hook anymore.
* defs.h, printcmd.c: Make print_insn be static.
* ser-go32.c (dos_comisr): Make this 8 bit clean.
* (dos_open dos_close): Allow multiple opens to the same device.
Use a ref count to prevent unwanted deallocations.
* sparcl-tdep.c: Put #ifdefs around all socket stuff to make GO32
happy.
* (sparclite_ops): Switch to download_stratum.
* target.h (enum strata): Move download_stratum before
process_stratum so that executable targets get pushed on top of
download targets.
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r-- | gdb/gdbtk.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index 35b2a91..5951b08 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -667,8 +667,6 @@ call_wrapper (clientData, interp, argc, argv) finish_saving_output (); /* Restore stdout to normal */ - dis_asm_read_memory_hook = 0; /* Restore disassembly hook */ - gdb_flush (gdb_stderr); /* Flush error output */ gdb_flush (gdb_stdout); /* Sometimes error output comes here as well */ @@ -783,6 +781,16 @@ gdb_disassemble (clientData, interp, argc, argv) { CORE_ADDR pc, low, high; int mixed_source_and_assembly; + static disassemble_info di = { + (fprintf_ftype) fprintf_filtered, /* 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 */ + }; if (argc != 3 && argc != 4) { @@ -836,7 +844,9 @@ gdb_disassemble (clientData, interp, argc, argv) disassemble_from_exec = 1; /* It's remote, read the exec file */ if (disassemble_from_exec) - dis_asm_read_memory_hook = gdbtk_dis_asm_read_memory; + di.read_memory_func = gdbtk_dis_asm_read_memory; + else + di.read_memory_func = dis_asm_read_memory; /* If just doing straight assembly, all we need to do is disassemble everything between low and high. If doing mixed source/assembly, we've @@ -940,7 +950,7 @@ gdb_disassemble (clientData, interp, argc, argv) fputs_unfiltered (" ", gdb_stdout); print_address (pc, gdb_stdout); fputs_unfiltered (":\t ", gdb_stdout); - pc += print_insn (pc, gdb_stdout); + pc += tm_print_insn (pc, &di); fputs_unfiltered ("\n", gdb_stdout); } } @@ -954,13 +964,11 @@ assembly_only: fputs_unfiltered (" ", gdb_stdout); print_address (pc, gdb_stdout); fputs_unfiltered (":\t ", gdb_stdout); - pc += print_insn (pc, gdb_stdout); + pc += tm_print_insn (pc, &di); fputs_unfiltered ("\n", gdb_stdout); } } - dis_asm_read_memory_hook = 0; - gdb_flush (gdb_stdout); return TCL_OK; |