diff options
author | nobody <> | 2003-03-03 20:50:21 +0000 |
---|---|---|
committer | nobody <> | 2003-03-03 20:50:21 +0000 |
commit | 900958cda09af0ca2839cc7e2a7c46355b051c83 (patch) | |
tree | 45e564da9eaed919ca56fc52f793cb0578b02a8b /gdb/disasm.c | |
parent | cddd45abf62af6ed70c8c67601a9f09da0a939b0 (diff) | |
download | binutils-gdb-900958cda09af0ca2839cc7e2a7c46355b051c83.tar.gz |
This commit was manufactured by cvs2svn to create branchcagney_offbyone-20030303-branchpoint
'cagney_offbyone-20030303-branch'.
Sprout from interps-20030202-branch 2003-02-02 23:00:07 UTC nobody 'This commit was manufactured by cvs2svn to create branch'
Cherrypick from master 2003-03-03 20:50:20 UTC Andrew Cagney <cagney@redhat.com> '2003-03-03 Andrew Cagney <cagney@redhat.com>':
ChangeLog
Makefile.def
Makefile.in
Makefile.tpl
bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/archures.c
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/coff-h8300.c
bfd/coff-ppc.c
bfd/coffcode.h
bfd/config.bfd
bfd/cpu-arm.c
bfd/doc/ChangeLog
bfd/doc/bfd.texinfo
bfd/doc/fdl.texi
bfd/ecoff.c
bfd/elf-bfd.h
bfd/elf-eh-frame.c
bfd/elf.c
bfd/elf32-arm.h
bfd/elf32-cris.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-m68k.c
bfd/elf32-mips.c
bfd/elf32-ppc.c
bfd/elf32-ppc.h
bfd/elf32-s390.c
bfd/elf32-sh.c
bfd/elf32-sparc.c
bfd/elf32-vax.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-mips.c
bfd/elf64-mmix.c
bfd/elf64-ppc.c
bfd/elf64-ppc.h
bfd/elf64-s390.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elfcore.h
bfd/elflink.c
bfd/elflink.h
bfd/elfn32-mips.c
bfd/elfxx-ia64.c
bfd/elfxx-mips.c
bfd/format.c
bfd/ieee.c
bfd/libbfd.h
bfd/libcoff.h
bfd/mmo.c
bfd/oasys.c
bfd/po/da.po
bfd/reloc.c
bfd/section.c
bfd/syms.c
bfd/targets.c
bfd/version.h
config.guess
config.sub
configure
configure.in
gdb/ChangeLog
gdb/MAINTAINERS
gdb/Makefile.in
gdb/NEWS
gdb/PROBLEMS
gdb/TODO
gdb/acinclude.m4
gdb/aclocal.m4
gdb/ada-exp.y
gdb/ada-lang.c
gdb/ada-lang.h
gdb/ada-typeprint.c
gdb/alpha-tdep.c
gdb/arch-utils.c
gdb/arm-linux-tdep.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/ax-gdb.c
gdb/block.c
gdb/block.h
gdb/blockframe.c
gdb/breakpoint.c
gdb/breakpoint.h
gdb/buildsym.c
gdb/buildsym.h
gdb/c-exp.y
gdb/c-valprint.c
gdb/cli-out.c
gdb/cli-out.h
gdb/cli/cli-cmds.c
gdb/cli/cli-decode.c
gdb/cli/cli-dump.c
gdb/cli/cli-interp.c
gdb/cli/cli-script.c
gdb/cli/cli-setshow.c
gdb/coff-pe-read.c
gdb/coff-pe-read.h
gdb/coffread.c
gdb/config.in
gdb/config/djgpp/fnchange.lst
gdb/config/h8500/h8500.mt
gdb/config/h8500/tm-h8500.h
gdb/config/i386/nm-i386.h
gdb/config/i386/nm-i386sco5.h
gdb/config/i386/nm-i386sol2.h
gdb/config/i386/tm-ptx.h
gdb/config/ia64/tm-ia64.h
gdb/config/m32r/m32r.mt
gdb/config/m32r/tm-m32r.h
gdb/config/mn10200/mn10200.mt
gdb/config/mn10200/tm-mn10200.h
gdb/config/pa/tm-hppa.h
gdb/config/pa/tm-hppa64.h
gdb/config/s390/nm-linux.h
gdb/config/sparc/nm-sun4sol2.h
gdb/config/sparc/tm-sp64.h
gdb/config/sparc/tm-sparc.h
gdb/config/z8k/tm-z8k.h
gdb/config/z8k/z8k.mt
gdb/configure
gdb/configure.host
gdb/configure.in
gdb/configure.tgt
gdb/cp-valprint.c
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/dbxread.c
gdb/defs.h
gdb/disasm.c
gdb/doc/ChangeLog
gdb/doc/Makefile.in
gdb/doc/gdb.texinfo
gdb/doc/gdbint.texinfo
gdb/doublest.c
gdb/dwarf2cfi.c
gdb/dwarf2expr.c
gdb/dwarf2expr.h
gdb/dwarf2loc.c
gdb/dwarf2loc.h
gdb/dwarf2read.c
gdb/dwarfread.c
gdb/elfread.c
gdb/event-top.c
gdb/event-top.h
gdb/expprint.c
gdb/f-exp.y
gdb/f-lang.c
gdb/f-valprint.c
gdb/findvar.c
gdb/frame.c
gdb/frame.h
gdb/frv-tdep.c
gdb/gdb.c
gdb/gdb_mbuild.sh
gdb/gdb_thread_db.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/gnu-v2-abi.c
gdb/h8300-tdep.c
gdb/h8500-tdep.c
gdb/hppa-tdep.c
gdb/hpread.c
gdb/hpux-thread.c
gdb/i386-interix-tdep.c
gdb/i386-linux-tdep.c
gdb/i386-tdep.c
gdb/i386bsd-tdep.c
gdb/ia64-linux-nat.c
gdb/ia64-tdep.c
gdb/infcmd.c
gdb/inflow.c
gdb/inflow.h
gdb/infptrace.c
gdb/infrun.c
gdb/inftarg.c
gdb/infttrace.c
gdb/interps.c
gdb/interps.h
gdb/jv-exp.y
gdb/jv-lang.c
gdb/jv-typeprint.c
gdb/jv-valprint.c
gdb/linespec.c
gdb/linux-proc.c
gdb/lynx-nat.c
gdb/m2-exp.y
gdb/m32r-rom.c
gdb/m32r-stub.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/main.c
gdb/main.h
gdb/maint.c
gdb/mcore-tdep.c
gdb/mdebugread.c
gdb/mi/ChangeLog
gdb/mi/gdbmi.texinfo
gdb/mi/mi-cmd-env.c
gdb/mi/mi-cmd-stack.c
gdb/mi/mi-cmds.c
gdb/mi/mi-cmds.h
gdb/mi/mi-console.c
gdb/mi/mi-console.h
gdb/mi/mi-interp.c
gdb/mi/mi-main.c
gdb/mi/mi-main.h
gdb/minsyms.c
gdb/mips-tdep.c
gdb/mipsread.c
gdb/mn10200-tdep.c
gdb/mn10300-tdep.c
gdb/monitor.c
gdb/nlmread.c
gdb/ns32k-tdep.c
gdb/objc-exp.y
gdb/objc-lang.c
gdb/objc-lang.h
gdb/objfiles.c
gdb/objfiles.h
gdb/observer.c
gdb/observer.h
gdb/osabi.c
gdb/p-exp.y
gdb/p-valprint.c
gdb/parse.c
gdb/parser-defs.h
gdb/ppc-linux-nat.c
gdb/ppc-linux-tdep.c
gdb/printcmd.c
gdb/proc-api.c
gdb/procfs.c
gdb/rdi-share/ardi.c
gdb/regcache.c
gdb/regcache.h
gdb/remote-e7000.c
gdb/remote-sim.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/sol-thread.c
gdb/solib-sunos.c
gdb/solib.c
gdb/solist.h
gdb/somread.c
gdb/somsolib.c
gdb/sparc-nat.c
gdb/sparc-tdep.c
gdb/stabsread.c
gdb/stack.c
gdb/symfile.c
gdb/symfile.h
gdb/symm-nat.c
gdb/symmisc.c
gdb/symtab.c
gdb/symtab.h
gdb/target.c
gdb/target.h
gdb/testsuite/ChangeLog
gdb/testsuite/Makefile.in
gdb/testsuite/configure.in
gdb/testsuite/gdb.base/advance.c
gdb/testsuite/gdb.base/advance.exp
gdb/testsuite/gdb.base/dump.exp
gdb/testsuite/gdb.base/exprs.exp
gdb/testsuite/gdb.base/funcargs.exp
gdb/testsuite/gdb.base/list.exp
gdb/testsuite/gdb.base/maint.exp
gdb/testsuite/gdb.base/ptype.exp
gdb/testsuite/gdb.base/restore.c
gdb/testsuite/gdb.base/until.exp
gdb/testsuite/gdb.base/watchpoint.exp
gdb/testsuite/gdb.c++/anon-union.exp
gdb/testsuite/gdb.c++/classes.exp
gdb/testsuite/gdb.c++/cplusfuncs.exp
gdb/testsuite/gdb.c++/inherit.exp
gdb/testsuite/gdb.c++/local.cc
gdb/testsuite/gdb.c++/local.exp
gdb/testsuite/gdb.c++/overload.cc
gdb/testsuite/gdb.c++/overload.exp
gdb/testsuite/gdb.c++/ovldbreak.exp
gdb/testsuite/gdb.c++/pr-1023.cc
gdb/testsuite/gdb.c++/pr-1023.exp
gdb/testsuite/gdb.c++/templates.exp
gdb/testsuite/gdb.c++/virtfunc.exp
gdb/testsuite/gdb.disasm/Makefile.in
gdb/testsuite/gdb.disasm/mn10200.exp
gdb/testsuite/gdb.mi/ChangeLog
gdb/testsuite/gdb.mi/mi-cli.exp
gdb/testsuite/gdb.mi/mi-syn-frame.c
gdb/testsuite/gdb.mi/mi-syn-frame.exp
gdb/testsuite/gdb.trace/Makefile.in
gdb/testsuite/lib/gdb.exp
gdb/thread.c
gdb/top.c
gdb/tracepoint.c
gdb/tui/ChangeLog
gdb/tui/tui-hooks.c
gdb/tui/tui-interp.c
gdb/tui/tui.c
gdb/tui/tuiData.h
gdb/tui/tuiIO.c
gdb/typeprint.c
gdb/ui-out.c
gdb/ui-out.h
gdb/utils.c
gdb/v850-tdep.c
gdb/valops.c
gdb/value.h
gdb/values.c
gdb/vax-tdep.c
gdb/version.in
gdb/win32-nat.c
gdb/wrapper.h
gdb/x86-64-linux-nat.c
gdb/x86-64-tdep.c
gdb/xcoffread.c
gdb/xstormy16-tdep.c
gdb/z8k-tdep.c
include/ChangeLog
include/elf/ChangeLog
include/elf/arm.h
include/elf/ia64.h
include/elf/ppc.h
include/elf/ppc64.h
include/gdb/ChangeLog
include/gdb/remote-sim.h
include/libiberty.h
include/opcode/ChangeLog
include/opcode/h8300.h
libiberty/ChangeLog
libiberty/Makefile.in
libiberty/acconfig.h
libiberty/aclocal.m4
libiberty/config.in
libiberty/configure
libiberty/configure.in
libiberty/cplus-dem.c
libiberty/functions.texi
libiberty/libiberty.texi
libiberty/lrealpath.c
libiberty/make-relative-prefix.c
libiberty/physmem.c
libtool.m4
ltcf-cxx.sh
ltcf-gcj.sh
ltconfig
opcodes/ChangeLog
opcodes/fr30-desc.c
opcodes/hppa-dis.c
opcodes/i386-dis.c
opcodes/mips-dis.c
readline/ChangeLog.gdb
readline/Makefile.in
readline/aclocal.m4
readline/config.h.in
readline/configure
readline/rlmbutil.h
readline/shlib/Makefile.in
sim/ChangeLog
sim/arm/ChangeLog
sim/arm/armos.c
sim/arm/wrapper.c
sim/common/ChangeLog
sim/common/Make-common.in
sim/common/nrun.c
sim/common/sim-base.h
sim/common/sim-engine.c
sim/common/sim-engine.h
sim/common/sim-hload.c
sim/common/sim-module.c
sim/common/sim-utils.h
sim/d10v/ChangeLog
sim/d10v/interp.c
sim/erc32/ChangeLog
sim/erc32/interf.c
sim/h8300/ChangeLog
sim/h8300/compile.c
sim/h8500/ChangeLog
sim/h8500/compile.c
sim/i960/ChangeLog
sim/i960/sim-if.c
sim/m32r/ChangeLog
sim/m32r/sim-if.c
sim/m68hc11/ChangeLog
sim/m68hc11/Makefile.in
sim/m68hc11/interp.c
sim/mcore/ChangeLog
sim/mcore/interp.c
sim/mips/ChangeLog
sim/mips/interp.c
sim/mn10200/ChangeLog
sim/mn10200/interp.c
sim/mn10300/ChangeLog
sim/mn10300/am33.igen
sim/mn10300/dv-mn103tim.c
sim/mn10300/interp.c
sim/ppc/ChangeLog
sim/ppc/sim_calls.c
sim/sh/ChangeLog
sim/sh/gencode.c
sim/sh/interp.c
sim/v850/ChangeLog
sim/v850/interp.c
sim/z8k/ChangeLog
sim/z8k/iface.c
Delete:
gdb/config/i386/gdbserve.mt
gdb/config/i386/i386sco5.mt
gdb/config/i386/i386v4.mt
gdb/config/i386/i386v42mp.mt
gdb/config/m68k/nm-apollo68b.h
gdb/config/m68k/nm-hp300bsd.h
gdb/config/m68k/tm-apollo68b.h
gdb/config/m68k/tm-es1800.h
gdb/config/m68k/tm-hp300bsd.h
gdb/config/m68k/tm-mac.h
gdb/config/m68k/xm-apollo68b.h
gdb/config/pa/hpux1020.mt
gdb/config/pa/hpux11.mt
gdb/config/pa/hpux11w.mt
gdb/config/powerpc/gdbserve.mt
gdb/config/powerpc/ppcle-eabi.mt
gdb/config/powerpc/ppcle-sim.mt
gdb/config/powerpc/tm-ppc-sim.h
gdb/config/sparc/sp64sim.mt
gdb/config/sparc/tm-sp64sim.h
sim/common/sim-break.c
sim/common/sim-break.h
Diffstat (limited to 'gdb/disasm.c')
-rw-r--r-- | gdb/disasm.c | 51 |
1 files changed, 35 insertions, 16 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c index 4ac22a27a6e..75d1783d13f 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -97,6 +97,7 @@ dump_insns (struct ui_out *uiout, disassemble_info * di, char *name = NULL; int offset; int line; + struct cleanup *ui_out_chain; for (pc = low; pc < high;) { @@ -108,7 +109,7 @@ dump_insns (struct ui_out *uiout, disassemble_info * di, else num_displayed++; } - ui_out_tuple_begin (uiout, NULL); + ui_out_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); ui_out_field_core_addr (uiout, "address", pc); if (!build_address_symbolic (pc, 0, &name, &offset, &filename, @@ -131,7 +132,7 @@ dump_insns (struct ui_out *uiout, disassemble_info * di, pc += TARGET_PRINT_INSN (pc, di); ui_out_field_stream (uiout, "inst", stb); ui_file_rewind (stb->stream); - ui_out_tuple_end (uiout); + do_cleanups (ui_out_chain); ui_out_text (uiout, "\n"); } return num_displayed; @@ -157,6 +158,7 @@ do_mixed_source_and_assembly (struct ui_out *uiout, int next_line = 0; CORE_ADDR pc; int num_displayed = 0; + struct cleanup *ui_out_chain; mle = (struct dis_line_entry *) alloca (nlines * sizeof (struct dis_line_entry)); @@ -210,11 +212,14 @@ do_mixed_source_and_assembly (struct ui_out *uiout, they have been emitted before), followed by the assembly code for that line. */ - ui_out_list_begin (uiout, "asm_insns"); + ui_out_chain = make_cleanup_ui_out_list_begin_end (uiout, "asm_insns"); for (i = 0; i < newlines; i++) { + struct cleanup *ui_out_tuple_chain = NULL; + struct cleanup *ui_out_list_chain = NULL; int close_list = 1; + /* Print out everything from next_line to the current line. */ if (mle[i].line >= next_line) { @@ -223,7 +228,9 @@ do_mixed_source_and_assembly (struct ui_out *uiout, /* Just one line to print. */ if (next_line == mle[i].line) { - ui_out_tuple_begin (uiout, "src_and_asm_line"); + ui_out_tuple_chain + = make_cleanup_ui_out_tuple_begin_end (uiout, + "src_and_asm_line"); print_source_lines (symtab, next_line, mle[i].line + 1, 0); } else @@ -231,27 +238,38 @@ do_mixed_source_and_assembly (struct ui_out *uiout, /* Several source lines w/o asm instructions associated. */ for (; next_line < mle[i].line; next_line++) { - ui_out_tuple_begin (uiout, "src_and_asm_line"); + struct cleanup *ui_out_list_chain_line; + struct cleanup *ui_out_tuple_chain_line; + + ui_out_tuple_chain_line + = make_cleanup_ui_out_tuple_begin_end (uiout, + "src_and_asm_line"); print_source_lines (symtab, next_line, next_line + 1, 0); - ui_out_list_begin (uiout, "line_asm_insn"); - ui_out_list_end (uiout); - ui_out_tuple_end (uiout); + ui_out_list_chain_line + = make_cleanup_ui_out_list_begin_end (uiout, + "line_asm_insn"); + do_cleanups (ui_out_list_chain_line); + do_cleanups (ui_out_tuple_chain_line); } /* Print the last line and leave list open for asm instructions to be added. */ - ui_out_tuple_begin (uiout, "src_and_asm_line"); + ui_out_tuple_chain + = make_cleanup_ui_out_tuple_begin_end (uiout, + "src_and_asm_line"); print_source_lines (symtab, next_line, mle[i].line + 1, 0); } } else { - ui_out_tuple_begin (uiout, "src_and_asm_line"); + ui_out_tuple_chain + = make_cleanup_ui_out_tuple_begin_end (uiout, "src_and_asm_line"); print_source_lines (symtab, mle[i].line, mle[i].line + 1, 0); } next_line = mle[i].line + 1; - ui_out_list_begin (uiout, "line_asm_insn"); + ui_out_list_chain + = make_cleanup_ui_out_list_begin_end (uiout, "line_asm_insn"); /* Don't close the list if the lines are not in order. */ if (i < (newlines - 1) && mle[i + 1].line <= mle[i].line) close_list = 0; @@ -261,8 +279,8 @@ do_mixed_source_and_assembly (struct ui_out *uiout, how_many, stb); if (close_list) { - ui_out_list_end (uiout); - ui_out_tuple_end (uiout); + do_cleanups (ui_out_list_chain); + do_cleanups (ui_out_tuple_chain); ui_out_text (uiout, "\n"); close_list = 0; } @@ -270,7 +288,7 @@ do_mixed_source_and_assembly (struct ui_out *uiout, if (num_displayed >= how_many) break; } - ui_out_list_end (uiout); + do_cleanups (ui_out_chain); } @@ -280,12 +298,13 @@ do_assembly_only (struct ui_out *uiout, disassemble_info * di, int how_many, struct ui_stream *stb) { int num_displayed = 0; + struct cleanup *ui_out_chain; - ui_out_list_begin (uiout, "asm_insns"); + ui_out_chain = make_cleanup_ui_out_list_begin_end (uiout, "asm_insns"); num_displayed = dump_insns (uiout, di, low, high, how_many, stb); - ui_out_list_end (uiout); + do_cleanups (ui_out_chain); } void |