diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-11-09 01:23:30 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-11-09 01:23:30 +0000 |
commit | 11cf87416416e13eff634a70b4954fe6a3912720 (patch) | |
tree | a6dc7a21bb3d45b89c3f95e4b5862ec9d2fab83b /gdb/tui/tuiDisassem.c | |
parent | 98007ce7b0dea06f0c04d833d39b5a9c9773a07a (diff) | |
download | gdb-11cf87416416e13eff634a70b4954fe6a3912720.zip gdb-11cf87416416e13eff634a70b4954fe6a3912720.tar.gz gdb-11cf87416416e13eff634a70b4954fe6a3912720.tar.bz2 |
import gdb-1999-11-08 snapshot
Diffstat (limited to 'gdb/tui/tuiDisassem.c')
-rw-r--r-- | gdb/tui/tuiDisassem.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gdb/tui/tuiDisassem.c b/gdb/tui/tuiDisassem.c index 1bc1b95..a39574b 100644 --- a/gdb/tui/tuiDisassem.c +++ b/gdb/tui/tuiDisassem.c @@ -66,7 +66,7 @@ tuiSetDisassemContent (s, startAddr) threshold = (lineWidth - 1) + offset; /* now init the gdb_file structure */ - gdb_dis_out = gdb_file_init_astring (threshold); + gdb_dis_out = tui_sfileopen (threshold); INIT_DISASSEMBLE_INFO_NO_ARCH (asmInfo, gdb_dis_out, (fprintf_ftype) fprintf_filtered); asmInfo.read_memory_func = dis_asm_read_memory; @@ -82,27 +82,27 @@ tuiSetDisassemContent (s, startAddr) print_address (pc, gdb_dis_out); - curLen = strlen (gdb_file_get_strbuf (gdb_dis_out)); + curLen = strlen (tui_file_get_strbuf (gdb_dis_out)); i = curLen - ((curLen / tab_len) * tab_len); /* adjust buffer length if necessary */ - gdb_file_adjust_strbuf ((tab_len - i > 0) ? (tab_len - i) : 0, gdb_dis_out); + tui_file_adjust_strbuf ((tab_len - i > 0) ? (tab_len - i) : 0, gdb_dis_out); /* Add spaces to make the instructions start onthe same column */ while (i < tab_len) { - gdb_file_get_strbuf (gdb_dis_out)[curLen] = ' '; + tui_file_get_strbuf (gdb_dis_out)[curLen] = ' '; i++; curLen++; } - gdb_file_get_strbuf (gdb_dis_out)[curLen] = '\0'; + tui_file_get_strbuf (gdb_dis_out)[curLen] = '\0'; newpc = pc + ((*tm_print_insn) (pc, &asmInfo)); /* Now copy the line taking the offset into account */ - if (strlen (gdb_file_get_strbuf (gdb_dis_out)) > offset) + if (strlen (tui_file_get_strbuf (gdb_dis_out)) > offset) strcpy (element->whichElement.source.line, - &(gdb_file_get_strbuf (gdb_dis_out)[offset])); + &(tui_file_get_strbuf (gdb_dis_out)[offset])); else element->whichElement.source.line[0] = '\0'; element->whichElement.source.lineOrAddr.addr = (Opaque) pc; @@ -116,9 +116,10 @@ tuiSetDisassemContent (s, startAddr) curLine++; pc = newpc; /* reset the buffer to empty */ - gdb_file_get_strbuf (gdb_dis_out)[0] = '\0'; + tui_file_get_strbuf (gdb_dis_out)[0] = '\0'; } - gdb_file_deallocate (&gdb_dis_out); + gdb_file_delete (gdb_dis_out); + gdb_dis_out = NULL; disassemWin->generic.contentSize = curLine; ret = TUI_SUCCESS; } |