aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authornobody <>2002-05-06 21:00:22 +0000
committernobody <>2002-05-06 21:00:22 +0000
commit275602c398b33b8475860af024b006bbbbd495ac (patch)
tree22412a7722268bd297101bcf3e788a3d585c020c /gdb/mi
parent694b26b8e881dd7336e3c0634731f2eee1c1cda6 (diff)
downloadgdb-jimb-macro-020506-branchpoint.zip
gdb-jimb-macro-020506-branchpoint.tar.gz
gdb-jimb-macro-020506-branchpoint.tar.bz2
This commit was manufactured by cvs2svn to create branch 'jimb-jimb-macro-020506-branchpoint
macro-020506-branch'. Sprout from gdb_5_2-branch 2002-03-27 05:12:36 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'gdb_5_2-branch'.' Cherrypick from gdb_5_2-branch 2002-03-02 23:00:05 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'gdb_5_2-branch'.': intl/ChangeLog intl/Makefile.in Cherrypick from master 2002-05-06 21:00:21 UTC Jim Blandy <jimb@codesourcery.com> 'Separate the job of reading the line number info statement program': ChangeLog MAINTAINERS Makefile.in bfd/ChangeLog bfd/ChangeLog-9495 bfd/Makefile.am bfd/Makefile.in bfd/aix5ppc-core.c bfd/aout-adobe.c bfd/aout-target.h bfd/aout-tic30.c bfd/aoutx.h bfd/archive.c bfd/archures.c bfd/bfd-in.h bfd/bfd-in2.h bfd/bfd.c bfd/binary.c bfd/bout.c bfd/coff-arm.c bfd/coff-h8300.c bfd/coff-mcore.c bfd/coff-ppc.c bfd/coff-rs6000.c bfd/coff-sh.c bfd/coff-z8k.c bfd/coff64-rs6000.c bfd/coffcode.h bfd/cofflink.c bfd/coffswap.h bfd/config.bfd bfd/configure bfd/configure.in bfd/cpu-h8300.c bfd/cpu-i370.c bfd/cpu-i386.c bfd/cpu-mips.c bfd/cpu-powerpc.c bfd/cpu-s390.c bfd/cpu-sh.c bfd/cpu-sparc.c bfd/dep-in.sed bfd/doc/ChangeLog bfd/doc/Makefile.in bfd/dwarf2.c bfd/ecoff.c bfd/elf-bfd.h bfd/elf-eh-frame.c bfd/elf-hppa.h bfd/elf-m10300.c bfd/elf.c bfd/elf32-arm.h bfd/elf32-cris.c bfd/elf32-hppa.c bfd/elf32-hppa.h bfd/elf32-i370.c bfd/elf32-i386.c bfd/elf32-m32r.c bfd/elf32-m68k.c bfd/elf32-mips.c bfd/elf32-ppc.c bfd/elf32-s390.c bfd/elf32-sh.c bfd/elf32-sh64.c bfd/elf32-sparc.c bfd/elf32-xstormy16.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-sh64.c bfd/elf64-sparc.c bfd/elf64-x86-64.c bfd/elfarm-nabi.c bfd/elflink.c bfd/elflink.h bfd/elfxx-ia64.c bfd/elfxx-mips.c bfd/elfxx-mips.h bfd/elfxx-target.h bfd/i386linux.c bfd/i386msdos.c bfd/i386os9k.c bfd/ieee.c bfd/ihex.c bfd/libbfd-in.h bfd/libbfd.c bfd/libbfd.h bfd/libcoff-in.h bfd/libcoff.h bfd/libecoff.h bfd/libxcoff.h bfd/linker.c bfd/m68klinux.c bfd/merge.c bfd/mmo.c bfd/nlm-target.h bfd/oasys.c bfd/opncls.c bfd/pdp11.c bfd/po/SRC-POTFILES.in bfd/po/fr.po bfd/ppcboot.c bfd/reloc.c bfd/rs6000-core.c bfd/som.c bfd/sparclinux.c bfd/srec.c bfd/sunos.c bfd/syms.c bfd/targets.c bfd/tekhex.c bfd/versados.c bfd/version.h bfd/vms.c bfd/xcofflink.c config.guess config.sub config/ChangeLog config/acinclude.m4 config/mh-a68bsd config/mh-apollo68 config/mh-cxux config/mh-decstation config/mh-dgux config/mh-dgux386 config/mh-djgpp config/mh-hp300 config/mh-hpux config/mh-hpux8 config/mh-interix config/mh-irix5 config/mh-irix6 config/mh-lynxrs6k config/mh-mingw32 config/mh-ncr3000 config/mh-ncrsvr43 config/mh-necv4 config/mh-openedition config/mh-riscos config/mh-sco config/mh-solaris config/mh-sysv config/mh-sysv4 config/mh-sysv5 config/mt-aix43 config/mt-alphaieee config/mt-linux configure configure.in gdb/ChangeLog gdb/MAINTAINERS gdb/Makefile.in gdb/NEWS gdb/PROBLEMS gdb/README gdb/acconfig.h gdb/acinclude.m4 gdb/aclocal.m4 gdb/alpha-linux-tdep.c gdb/alpha-nat.c gdb/alpha-osf1-tdep.c gdb/alpha-tdep.c gdb/alpha-tdep.h gdb/alphabsd-nat.c gdb/alphafbsd-tdep.c gdb/alphanbsd-nat.c gdb/alphanbsd-tdep.c gdb/arc-tdep.c gdb/arch-utils.c gdb/arch-utils.h gdb/arm-tdep.c gdb/arm-tdep.h gdb/avr-tdep.c gdb/bcache.c gdb/blockframe.c gdb/breakpoint.c gdb/builtin-regs.c gdb/builtin-regs.h gdb/c-exp.y gdb/c-lang.c gdb/cli-out.c gdb/cli/cli-cmds.c gdb/cli/cli-decode.c gdb/cli/cli-decode.h gdb/cli/cli-dump.c gdb/cli/cli-dump.h gdb/cli/cli-script.c gdb/coffread.c gdb/command.h gdb/completer.c gdb/config.in gdb/config/alpha/alpha-linux.mt gdb/config/alpha/alpha-osf1.mt gdb/config/alpha/nbsd.mh gdb/config/alpha/nbsd.mt gdb/config/alpha/nm-linux.h gdb/config/alpha/nm-nbsd.h gdb/config/alpha/nm-osf.h gdb/config/alpha/tm-alpha.h gdb/config/alpha/tm-alphalinux.h gdb/config/alpha/tm-fbsd.h gdb/config/alpha/tm-nbsd.h gdb/config/arc/tm-arc.h gdb/config/avr/avr.mt gdb/config/djgpp/README gdb/config/h8500/tm-h8500.h gdb/config/i386/fbsd.mh gdb/config/i386/i386gnu.mh gdb/config/i386/i386lynx.mh gdb/config/i386/i386v42mp.mh gdb/config/i386/nbsd.mt gdb/config/i386/nbsdelf.mt gdb/config/i386/nm-fbsd.h gdb/config/i386/nm-x86-64.h gdb/config/i386/tm-linux.h gdb/config/i386/x86-64linux.mt gdb/config/i960/tm-i960.h gdb/config/m32r/m32r.mt gdb/config/m68k/m68klynx.mh gdb/config/m68k/nbsd.mt gdb/config/m68k/sun3os4.mh gdb/config/m68k/tm-nbsd.h gdb/config/mcore/tm-mcore.h gdb/config/mips/vr5000.mt gdb/config/mn10200/tm-mn10200.h gdb/config/ns32k/nbsd.mt gdb/config/pa/hppabsd.mh gdb/config/pa/hppaosf.mh gdb/config/pa/hpux1020.mh gdb/config/pa/hpux11.mh gdb/config/pa/hpux11w.mh gdb/config/pa/tm-hppa.h gdb/config/powerpc/nbsd.mt gdb/config/powerpc/tm-ppc-eabi.h gdb/config/rs6000/rs6000lynx.mh gdb/config/rs6000/tm-rs6000.h gdb/config/s390/s390.mh gdb/config/s390/s390.mt gdb/config/s390/s390x.mt gdb/config/sparc/fbsd.mh gdb/config/sparc/fbsd.mt gdb/config/sparc/linux.mh gdb/config/sparc/sparclynx.mh gdb/config/sparc/sun4os4.mh gdb/config/sparc/tm-linux.h gdb/config/sparc/tm-sp64.h gdb/config/sparc/tm-sp64linux.h gdb/config/sparc/tm-sparc.h gdb/config/v850/tm-v850.h gdb/config/vax/tm-vax.h gdb/configure gdb/configure.host gdb/configure.in gdb/configure.tgt gdb/core-sol2.c gdb/corefile.c gdb/corelow.c gdb/cp-valprint.c gdb/cris-tdep.c gdb/d10v-tdep.c gdb/d30v-tdep.c gdb/dbxread.c gdb/defs.h gdb/doc/ChangeLog gdb/doc/gdb.texinfo gdb/doc/gdbint.texinfo gdb/dwarf2cfi.c gdb/dwarf2read.c gdb/elfread.c gdb/eval.c gdb/event-top.c gdb/exec.c gdb/f-exp.y gdb/f-lang.c gdb/fbsd-proc.c gdb/findvar.c gdb/frame.c gdb/frame.h gdb/gcore.c gdb/gdb-events.c gdb/gdb-events.h gdb/gdb-events.sh gdb/gdbarch.c gdb/gdbarch.h gdb/gdbarch.sh gdb/gdbserver/Makefile.in gdb/gdbserver/config.in gdb/gdbserver/configure gdb/gdbserver/configure.in gdb/gdbserver/gdbreplay.c gdb/gdbserver/inferiors.c gdb/gdbserver/linux-arm-low.c gdb/gdbserver/linux-i386-low.c gdb/gdbserver/linux-ia64-low.c gdb/gdbserver/linux-low.c gdb/gdbserver/linux-low.h gdb/gdbserver/linux-m68k-low.c gdb/gdbserver/linux-mips-low.c gdb/gdbserver/linux-ppc-low.c gdb/gdbserver/linux-s390-low.c gdb/gdbserver/linux-sh-low.c gdb/gdbserver/linux-x86-64-low.c gdb/gdbserver/mem-break.c gdb/gdbserver/mem-break.h gdb/gdbserver/regcache.c gdb/gdbserver/regcache.h gdb/gdbserver/remote-utils.c gdb/gdbserver/server.c gdb/gdbserver/server.h gdb/gdbserver/target.c gdb/gdbserver/target.h gdb/gdbserver/utils.c gdb/gdbtypes.c gdb/gdbtypes.h gdb/gnu-nat.c gdb/gnu-v3-abi.c gdb/go32-nat.c gdb/gregset.h gdb/h8300-tdep.c gdb/h8500-tdep.c gdb/hppa-tdep.c gdb/hpread.c gdb/i386-linux-tdep.c gdb/i386-tdep.c gdb/i386gnu-nat.c gdb/i387-nat.c gdb/i960-tdep.c gdb/ia64-tdep.c gdb/infcmd.c gdb/inferior.h gdb/inflow.c gdb/infrun.c gdb/jv-exp.y gdb/kod.c gdb/language.c gdb/lin-lwp.c gdb/linespec.c gdb/linux-proc.c gdb/m2-exp.y gdb/m3-nat.c gdb/m68hc11-tdep.c gdb/m68klinux-nat.c gdb/maint.c gdb/mcore-tdep.c gdb/mdebugread.c gdb/mem-break.c gdb/mi/ChangeLog gdb/mi/mi-cmd-break.c gdb/mi/mi-cmd-disas.c gdb/mi/mi-cmd-stack.c gdb/mi/mi-cmd-var.c gdb/mi/mi-console.c gdb/mi/mi-main.c gdb/mi/mi-out.c gdb/mi/mi-parse.c gdb/minsyms.c gdb/mips-tdep.c gdb/mipsread.c gdb/mn10300-tdep.c gdb/monitor.c gdb/ocd.c gdb/p-exp.y gdb/p-lang.c gdb/p-lang.h gdb/p-typeprint.c gdb/p-valprint.c gdb/parse.c gdb/parser-defs.h gdb/ppc-bdm.c gdb/ppc-linux-nat.c gdb/ppc-linux-tdep.c gdb/ppc-tdep.h gdb/printcmd.c gdb/proc-api.c gdb/regcache.c gdb/regformats/reg-ppc.dat gdb/regformats/reg-x86-64.dat gdb/remote-array.c gdb/remote-e7000.c gdb/remote-es.c gdb/remote-mips.c gdb/remote-os9k.c gdb/remote-rdi.c gdb/remote-rdp.c gdb/remote-st.c gdb/remote-utils.c gdb/remote-vxsparc.c gdb/remote.c gdb/rs6000-nat.c gdb/rs6000-tdep.c gdb/s390-tdep.c gdb/scm-lang.c gdb/ser-unix.h gdb/serial.c gdb/sh-tdep.c gdb/solib-legacy.c gdb/solib-svr4.c gdb/solib.c gdb/somread.c gdb/source.c gdb/sparc-nat.c gdb/sparc-tdep.c gdb/stabsread.c gdb/stack.c gdb/std-regs.c gdb/symfile.c gdb/symfile.h gdb/symmisc.c gdb/symtab.c gdb/symtab.h gdb/target.c gdb/target.h gdb/testsuite/ChangeLog gdb/testsuite/config/sid.exp gdb/testsuite/gdb.asm/Makefile.in gdb/testsuite/gdb.asm/asm-source.exp gdb/testsuite/gdb.asm/configure gdb/testsuite/gdb.asm/configure.in gdb/testsuite/gdb.asm/powerpc.inc gdb/testsuite/gdb.asm/sparc64.inc gdb/testsuite/gdb.base/annota1.exp gdb/testsuite/gdb.base/attach.exp gdb/testsuite/gdb.base/bar.c gdb/testsuite/gdb.base/baz.c gdb/testsuite/gdb.base/completion.exp gdb/testsuite/gdb.base/cvexpr.c gdb/testsuite/gdb.base/dbx.exp gdb/testsuite/gdb.base/default.exp gdb/testsuite/gdb.base/dump.c gdb/testsuite/gdb.base/dump.exp gdb/testsuite/gdb.base/ending-run.exp gdb/testsuite/gdb.base/foo.c gdb/testsuite/gdb.base/funcargs.c gdb/testsuite/gdb.base/funcargs.exp gdb/testsuite/gdb.base/gcore.exp gdb/testsuite/gdb.base/grbx.c gdb/testsuite/gdb.base/help.exp gdb/testsuite/gdb.base/list.exp gdb/testsuite/gdb.base/long_long.exp gdb/testsuite/gdb.base/maint.exp gdb/testsuite/gdb.base/opaque.exp gdb/testsuite/gdb.base/overlays.exp gdb/testsuite/gdb.base/ovlymgr.c gdb/testsuite/gdb.base/printcmds.exp gdb/testsuite/gdb.base/ptype.exp gdb/testsuite/gdb.base/relocate.c gdb/testsuite/gdb.base/relocate.exp gdb/testsuite/gdb.base/scope.exp gdb/testsuite/gdb.base/shlib-call.exp gdb/testsuite/gdb.base/step-test.exp gdb/testsuite/gdb.base/watchpoint.exp gdb/testsuite/gdb.base/whatis.exp gdb/testsuite/gdb.c++/classes.exp gdb/testsuite/gdb.c++/cplusfuncs.exp gdb/testsuite/gdb.c++/hang.H gdb/testsuite/gdb.c++/hang.exp gdb/testsuite/gdb.c++/hang1.C gdb/testsuite/gdb.c++/hang2.C gdb/testsuite/gdb.c++/hang3.C gdb/testsuite/gdb.c++/local.cc gdb/testsuite/gdb.c++/local.exp gdb/testsuite/gdb.c++/method.exp gdb/testsuite/gdb.c++/misc.exp gdb/testsuite/gdb.c++/ovldbreak.exp gdb/testsuite/gdb.gdb/xfullpath.exp gdb/testsuite/gdb.java/jmisc1.exp gdb/testsuite/gdb.java/jmisc2.exp gdb/testsuite/gdb.mi/ChangeLog gdb/testsuite/gdb.mi/mi-var-cmd.exp gdb/testsuite/gdb.mi/mi0-var-cmd.exp gdb/testsuite/gdb.threads/linux-dp.exp gdb/testsuite/gdb.trace/gdb_c_test.c gdb/testsuite/lib/gdb.exp gdb/thread-db.c gdb/thread.c gdb/top.c gdb/top.h gdb/tracepoint.c gdb/tui/ChangeLog gdb/tui/tui-out.c gdb/ui-file.c gdb/ui-out.c gdb/utils.c gdb/valarith.c gdb/valops.c gdb/valprint.c gdb/value.h gdb/varobj.c gdb/vax-tdep.c gdb/vax-tdep.h gdb/version.in gdb/win32-nat.c gdb/x86-64-linux-nat.c gdb/x86-64-tdep.c gdb/x86-64-tdep.h gdb/xcoffread.c gdb/xstormy16-tdep.c gdb/z8k-tdep.c include/ChangeLog include/coff/ChangeLog include/coff/rs6k64.h include/dyn-string.h include/elf/ChangeLog include/elf/dwarf2.h include/floatformat.h include/opcode/ChangeLog include/opcode/i386.h include/opcode/mips.h include/opcode/pdp11.h include/xregex2.h libiberty/ChangeLog libiberty/Makefile.in libiberty/config.table libiberty/configure libiberty/configure.in libiberty/cp-demangle.c libiberty/dyn-string.c libiberty/floatformat.c libiberty/functions.texi libiberty/hashtab.c libiberty/hex.c libiberty/splay-tree.c libiberty/strtod.c libiberty/xatexit.c libiberty/xmalloc.c ltmain.sh mmalloc/ChangeLog mmalloc/mmap-sup.c opcodes/ChangeLog opcodes/Makefile.am opcodes/Makefile.in opcodes/configure opcodes/configure.in opcodes/dep-in.sed opcodes/i386-dis.c opcodes/mips-dis.c opcodes/mips-opc.c opcodes/pdp11-dis.c opcodes/pdp11-opc.c opcodes/po/fr.po opcodes/po/id.po opcodes/ppc-opc.c opcodes/s390-dis.c opcodes/z8k-dis.c opcodes/z8k-opc.h opcodes/z8kgen.c sim/ChangeLog sim/MAINTAINERS sim/arm/ChangeLog sim/arm/wrapper.c sim/common/ChangeLog sim/common/callback.c sim/igen/ChangeLog sim/igen/gen.c sim/igen/igen.c sim/m68hc11/ChangeLog sim/m68hc11/dv-m68hc11.c sim/m68hc11/dv-m68hc11spi.c sim/m68hc11/dv-m68hc11tim.c sim/m68hc11/interp.c sim/m68hc11/interrupts.c sim/m68hc11/interrupts.h sim/m68hc11/m68hc11_sim.c sim/m68hc11/sim-main.h sim/mips/ChangeLog sim/mips/Makefile.in sim/mips/configure sim/mips/configure.in sim/mips/cp1.c sim/mips/interp.c sim/mips/mips.igen sim/mips/sim-main.h sim/ppc/ChangeLog sim/ppc/hw_disk.c sim/ppc/ppc-instructions sim/ppc/sim_calls.c sim/z8k/ChangeLog sim/z8k/writecode.c Delete: config/mh-irix4 config/mh-lynxos config/mh-sun3 config/mh-vaxult2 config/mt-armpic config/mt-elfalphapic config/mt-i370pic config/mt-ia64pic config/mt-m68kpic config/mt-papic config/mt-ppcpic config/mt-s390pic config/mt-sparcpic config/mt-x86pic gdb/a29k-tdep.c gdb/config/a29k/a29k-udi.mt gdb/config/a29k/a29k.mt gdb/config/a29k/tm-a29k.h gdb/config/a29k/tm-vx29k.h gdb/config/a29k/vx29k.mt gdb/remote-adapt.c gdb/remote-eb.c gdb/remote-mm.c gdb/remote-udi.c gdb/signals.c gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.c gdb/testsuite/gdb.hp/gdb.threads-hp/usrthbasic.exp gdb/testsuite/gdb.hp/gdb.threads-hp/usrthcore.c gdb/testsuite/gdb.hp/gdb.threads-hp/usrthcore.exp gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.c gdb/testsuite/gdb.hp/gdb.threads-hp/usrthfork.exp
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/ChangeLog51
-rw-r--r--gdb/mi/mi-cmd-break.c5
-rw-r--r--gdb/mi/mi-cmd-disas.c604
-rw-r--r--gdb/mi/mi-cmd-stack.c2
-rw-r--r--gdb/mi/mi-cmd-var.c9
-rw-r--r--gdb/mi/mi-console.c9
-rw-r--r--gdb/mi/mi-main.c13
-rw-r--r--gdb/mi/mi-out.c10
-rw-r--r--gdb/mi/mi-parse.c7
9 files changed, 370 insertions, 340 deletions
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 7b71e8a..f2cc44a 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,54 @@
+2002-04-14 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-main.c (mi_cmd_exec_return):
+
+2002-04-09 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-main.c (register_changed_p): Use frame_register_read instead
+ of read_relative_register_raw_bytes.
+ (get_register): Delete out-of-date comment.
+
+2002-04-07 Elena Zannoni <ezannoni@redhat.com>
+
+ * mi-cmd-disas.c: Run through indent.
+
+2002-04-07 Elena Zannoni <ezannoni@redhat.com>
+
+ * mi-cmd-disas.c (dump_insns): New function.
+ (do_mixed_source_and_assembly): New function.
+ (do_assembly_only): New function.
+ (do_disassembly): New function.
+ (mi_cmd_disassemble): Rewrite using smaller, more modular
+ functions.
+
+2002-04-05 Jim Blandy <jimb@redhat.com>
+
+ * mi-cmd-stack.c (list_args_or_locals): Pass new arg to
+ get_frame_block. (See entry in gdb/ChangeLog.)
+
+2002-04-05 Elena Zannoni <ezannoni@redhat.com>
+
+ * mi-cmd-disas.c (mi_cmd_disassemble): Use TARGET_PRINT_INSN
+ instead of tm_print_insn.
+ Update copyright year.
+
+2002-04-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * mi-cmd-disas.c (mi_cmd_disassemble): Skip end-of-function
+ markers in the line table.
+
+2002-03-15 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-main.c (XMALLOC): Delete macro.
+ * mi-out.c (XMALLOC): Ditto.
+ * mi-parse.c (XMALLOC): Ditto.
+ * mi-console.c (XMALLOC): Ditto.
+ * mi-cmd-var.c (XMALLOC): Ditto.
+ * mi-cmd-break.c (XMALLOC): Ditto.
+
+ * mi/mi-cmd-var.c, mi/mi-console.c, mi/mi-out.c: Update copyright
+ * mi/mi-parse.c: Ditto.
+
2002-02-24 Andrew Cagney <ac131313@redhat.com>
From wiz at danbala:
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 5061392..5d15aa9 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -29,11 +29,6 @@
#include "gdb-events.h"
#include "gdb.h"
-/* Convenience macro for allocting typesafe memory. */
-
-#undef XMALLOC
-#define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
-
enum
{
FROM_TTY = 0
diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c
index afaf31c..70054c6 100644
--- a/gdb/mi/mi-cmd-disas.c
+++ b/gdb/mi/mi-cmd-disas.c
@@ -1,5 +1,5 @@
/* MI Command Set - disassemble commands.
- Copyright 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
@@ -26,10 +26,6 @@
#include "mi-getopt.h"
#include "ui-out.h"
-static int gdb_dis_asm_read_memory (bfd_vma memaddr, bfd_byte * myaddr, unsigned int len,
- disassemble_info * info);
-static int compare_lines (const PTR mle1p, const PTR mle2p);
-
/* Disassemble functions. FIXME: these do not really belong here. We
should get rid of all the duplicate code in gdb that does the same
thing: disassemble_command() and the gdbtk variation. */
@@ -40,11 +36,11 @@ static int compare_lines (const PTR mle1p, const PTR mle2p);
reordering in this function. */
struct dis_line_entry
- {
- int line;
- CORE_ADDR start_pc;
- CORE_ADDR end_pc;
- };
+{
+ int line;
+ CORE_ADDR start_pc;
+ CORE_ADDR end_pc;
+};
/* This variable determines where memory used for disassembly is read from. */
int gdb_disassemble_from_exec = -1;
@@ -86,6 +82,290 @@ compare_lines (const PTR mle1p, const PTR mle2p)
return mle1->start_pc - mle2->start_pc;
}
+static int
+dump_insns (disassemble_info * di, CORE_ADDR low, CORE_ADDR high,
+ int how_many, struct ui_stream *stb)
+{
+ int num_displayed = 0;
+ CORE_ADDR pc;
+
+ /* parts of the symbolic representation of the address */
+ int unmapped;
+ char *filename = NULL;
+ char *name = NULL;
+ int offset;
+ int line;
+
+ for (pc = low; pc < high;)
+ {
+ QUIT;
+ if (how_many >= 0)
+ {
+ if (num_displayed >= how_many)
+ break;
+ else
+ num_displayed++;
+ }
+ ui_out_tuple_begin (uiout, NULL);
+ ui_out_field_core_addr (uiout, "address", pc);
+
+ if (!build_address_symbolic (pc, 0, &name, &offset, &filename,
+ &line, &unmapped))
+ {
+ /* We don't care now about line, filename and
+ unmapped. But we might in the future. */
+ ui_out_field_string (uiout, "func-name", name);
+ ui_out_field_int (uiout, "offset", offset);
+ }
+ if (filename != NULL)
+ xfree (filename);
+ if (name != NULL)
+ xfree (name);
+
+ ui_file_rewind (stb->stream);
+ pc += TARGET_PRINT_INSN (pc, di);
+ ui_out_field_stream (uiout, "inst", stb);
+ ui_file_rewind (stb->stream);
+ ui_out_tuple_end (uiout);
+ }
+ return num_displayed;
+}
+
+/* The idea here is to present a source-O-centric view of a
+ function to the user. This means that things are presented
+ in source order, with (possibly) out of order assembly
+ immediately following. */
+static void
+do_mixed_source_and_assembly (struct disassemble_info *di, int nlines,
+ struct linetable_entry *le,
+ CORE_ADDR low, CORE_ADDR high,
+ struct symtab *symtab,
+ int how_many, struct ui_stream *stb)
+{
+ int newlines = 0;
+ struct dis_line_entry *mle;
+ struct symtab_and_line sal;
+ int i;
+ int out_of_order = 0;
+ int next_line = 0;
+ CORE_ADDR pc;
+ int num_displayed = 0;
+
+ mle = (struct dis_line_entry *) alloca (nlines
+ * sizeof (struct dis_line_entry));
+
+ /* Copy linetable entries for this function into our data
+ structure, creating end_pc's and setting out_of_order as
+ appropriate. */
+
+ /* First, skip all the preceding functions. */
+
+ for (i = 0; i < nlines - 1 && le[i].pc < low; i++);
+
+ /* Now, copy all entries before the end of this function. */
+
+ for (; i < nlines - 1 && le[i].pc < high; i++)
+ {
+ if (le[i].line == le[i + 1].line && le[i].pc == le[i + 1].pc)
+ continue; /* Ignore duplicates */
+
+ /* Skip any end-of-function markers. */
+ if (le[i].line == 0)
+ continue;
+
+ mle[newlines].line = le[i].line;
+ if (le[i].line > le[i + 1].line)
+ out_of_order = 1;
+ mle[newlines].start_pc = le[i].pc;
+ mle[newlines].end_pc = le[i + 1].pc;
+ newlines++;
+ }
+
+ /* If we're on the last line, and it's part of the function,
+ then we need to get the end pc in a special way. */
+
+ if (i == nlines - 1 && le[i].pc < high)
+ {
+ mle[newlines].line = le[i].line;
+ mle[newlines].start_pc = le[i].pc;
+ sal = find_pc_line (le[i].pc, 0);
+ mle[newlines].end_pc = sal.end;
+ newlines++;
+ }
+
+ /* Now, sort mle by line #s (and, then by addresses within
+ lines). */
+
+ if (out_of_order)
+ qsort (mle, newlines, sizeof (struct dis_line_entry), compare_lines);
+
+ /* Now, for each line entry, emit the specified lines (unless
+ they have been emitted before), followed by the assembly code
+ for that line. */
+
+ ui_out_list_begin (uiout, "asm_insns");
+
+ for (i = 0; i < newlines; i++)
+ {
+ int close_list = 1;
+ /* Print out everything from next_line to the current line. */
+ if (mle[i].line >= next_line)
+ {
+ if (next_line != 0)
+ {
+ /* Just one line to print. */
+ if (next_line == mle[i].line)
+ {
+ ui_out_tuple_begin (uiout, "src_and_asm_line");
+ print_source_lines (symtab, next_line, mle[i].line + 1, 0);
+ }
+ else
+ {
+ /* 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");
+ 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);
+ }
+ /* Print the last line and leave list open for
+ asm instructions to be added. */
+ ui_out_tuple_begin (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");
+ 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");
+ /* 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;
+ }
+
+ num_displayed += dump_insns (di, mle[i].start_pc, mle[i].end_pc,
+ how_many, stb);
+ if (close_list)
+ {
+ ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
+ close_list = 0;
+ }
+ if (how_many >= 0)
+ if (num_displayed >= how_many)
+ break;
+ }
+ ui_out_list_end (uiout);
+}
+
+
+static void
+do_assembly_only (disassemble_info * di, CORE_ADDR low,
+ CORE_ADDR high, int how_many, struct ui_stream *stb)
+{
+ int num_displayed = 0;
+
+ ui_out_list_begin (uiout, "asm_insns");
+
+ num_displayed = dump_insns (di, low, high, how_many, stb);
+
+ ui_out_list_end (uiout);
+}
+
+enum mi_cmd_result
+do_disassembly (char *file_string,
+ int line_num,
+ int mixed_source_and_assembly,
+ int how_many, CORE_ADDR low, CORE_ADDR high)
+{
+ static disassemble_info di;
+ static int di_initialized;
+ /* To collect the instruction outputted from opcodes. */
+ static struct ui_stream *stb = NULL;
+ struct symtab *symtab = NULL;
+ struct linetable_entry *le = NULL;
+ int nlines = -1;
+
+ if (!di_initialized)
+ {
+ /* We don't add a cleanup for this, because the allocation of
+ the stream is done once only for each gdb run, and we need to
+ keep it around until the end. Hopefully there won't be any
+ errors in the init code below, that make this function bail
+ out. */
+ stb = ui_out_stream_new (uiout);
+ INIT_DISASSEMBLE_INFO_NO_ARCH (di, stb->stream,
+ (fprintf_ftype) fprintf_unfiltered);
+ di.flavour = bfd_target_unknown_flavour;
+ di.memory_error_func = dis_asm_memory_error;
+ di.print_address_func = dis_asm_print_address;
+ di_initialized = 1;
+ }
+
+ di.mach = TARGET_PRINT_INSN_INFO->mach;
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ di.endian = BFD_ENDIAN_BIG;
+ else
+ di.endian = BFD_ENDIAN_LITTLE;
+
+ /* If gdb_disassemble_from_exec == -1, then we use the following heuristic to
+ determine whether or not to do disassembly from target memory or from the
+ exec file:
+
+ If we're debugging a local process, read target memory, instead of the
+ exec file. This makes disassembly of functions in shared libs work
+ correctly. Also, read target memory if we are debugging native threads.
+
+ Else, we're debugging a remote process, and should disassemble from the
+ exec file for speed. However, this is no good if the target modifies its
+ code (for relocation, or whatever). */
+
+ if (gdb_disassemble_from_exec == -1)
+ {
+ if (strcmp (target_shortname, "child") == 0
+ || strcmp (target_shortname, "procfs") == 0
+ || strcmp (target_shortname, "vxprocess") == 0
+ || strstr (target_shortname, "-threads") != NULL)
+ gdb_disassemble_from_exec = 0; /* It's a child process, read inferior mem */
+ else
+ gdb_disassemble_from_exec = 1; /* It's remote, read the exec file */
+ }
+
+ if (gdb_disassemble_from_exec)
+ di.read_memory_func = gdb_dis_asm_read_memory;
+ else
+ di.read_memory_func = dis_asm_read_memory;
+
+ /* Assume symtab is valid for whole PC range */
+ symtab = find_pc_symtab (low);
+
+ if (symtab != NULL && symtab->linetable != NULL)
+ {
+ /* Convert the linetable to a bunch of my_line_entry's. */
+ le = symtab->linetable->item;
+ nlines = symtab->linetable->nitems;
+ }
+
+ if (!mixed_source_and_assembly || nlines <= 0
+ || symtab == NULL || symtab->linetable == NULL)
+ do_assembly_only (&di, low, high, how_many, stb);
+
+ else if (mixed_source_and_assembly)
+ do_mixed_source_and_assembly (&di, nlines, le, low,
+ high, symtab, how_many, stb);
+
+ gdb_flush (gdb_stdout);
+
+ return MI_CMD_DONE;
+}
+
/* The arguments to be passed on the command line and parsed here are:
either:
@@ -106,30 +386,15 @@ compare_lines (const PTR mle1p, const PTR mle2p)
MODE: 0 or 1 for disassembly only, or mixed source and disassembly,
respectively. */
-
enum mi_cmd_result
mi_cmd_disassemble (char *command, char **argv, int argc)
{
- CORE_ADDR pc;
+ enum mi_cmd_result retval;
CORE_ADDR start;
int mixed_source_and_assembly;
- int num_displayed;
- static disassemble_info di;
- static int di_initialized;
-
struct symtab *s;
- /* To collect the instruction outputted from opcodes. */
- static struct ui_stream *stb = NULL;
-
- /* parts of the symbolic representation of the address */
- int line;
- int offset;
- int unmapped;
- char *filename = NULL;
- char *name = NULL;
-
/* Which options have we processed ... */
int file_seen = 0;
int line_seen = 0;
@@ -148,11 +413,10 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
int optind = 0;
char *optarg;
enum opt
- {
- FILE_OPT, LINE_OPT, NUM_OPT, START_OPT, END_OPT
- };
- static struct mi_opt opts[] =
{
+ FILE_OPT, LINE_OPT, NUM_OPT, START_OPT, END_OPT
+ };
+ static struct mi_opt opts[] = {
{"f", FILE_OPT, 1},
{"l", LINE_OPT, 1},
{"n", NUM_OPT, 1},
@@ -201,16 +465,19 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
if (!((line_seen && file_seen && num_seen && !start_seen && !end_seen)
|| (line_seen && file_seen && !num_seen && !start_seen && !end_seen)
- || (!line_seen && !file_seen && !num_seen && start_seen && end_seen)))
- error ("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode.");
+ || (!line_seen && !file_seen && !num_seen && start_seen && end_seen)))
+ error
+ ("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode.");
if (argc != 1)
- error ("mi_cmd_disassemble: Usage: [-f filename -l linenum [-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode.");
+ error
+ ("mi_cmd_disassemble: Usage: [-f filename -l linenum [-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode.");
mixed_source_and_assembly = atoi (argv[0]);
if ((mixed_source_and_assembly != 0) && (mixed_source_and_assembly != 1))
error ("mi_cmd_disassemble: Mixed_mode argument must be 0 or 1.");
+
/* We must get the function beginning and end where line_num is
contained. */
@@ -225,271 +492,8 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
error ("mi_cmd_disassemble: No function contains specified address");
}
- if (!di_initialized)
- {
- /* We don't add a cleanup for this, because the allocation of
- the stream is done once only for each gdb run, and we need to
- keep it around until the end. Hopefully there won't be any
- errors in the init code below, that make this function bail
- out. */
- stb = ui_out_stream_new (uiout);
- INIT_DISASSEMBLE_INFO_NO_ARCH (di, stb->stream,
- (fprintf_ftype) fprintf_unfiltered);
- di.flavour = bfd_target_unknown_flavour;
- di.memory_error_func = dis_asm_memory_error;
- di.print_address_func = dis_asm_print_address;
- di_initialized = 1;
- }
-
- di.mach = TARGET_PRINT_INSN_INFO->mach;
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- di.endian = BFD_ENDIAN_BIG;
- else
- di.endian = BFD_ENDIAN_LITTLE;
-
- /* If gdb_disassemble_from_exec == -1, then we use the following heuristic to
- determine whether or not to do disassembly from target memory or from the
- exec file:
-
- If we're debugging a local process, read target memory, instead of the
- exec file. This makes disassembly of functions in shared libs work
- correctly. Also, read target memory if we are debugging native threads.
-
- Else, we're debugging a remote process, and should disassemble from the
- exec file for speed. However, this is no good if the target modifies its
- code (for relocation, or whatever).
- */
-
- if (gdb_disassemble_from_exec == -1)
- {
- if (strcmp (target_shortname, "child") == 0
- || strcmp (target_shortname, "procfs") == 0
- || strcmp (target_shortname, "vxprocess") == 0
- || strstr (target_shortname, "-threads") != NULL)
- gdb_disassemble_from_exec = 0; /* It's a child process, read inferior mem */
- else
- gdb_disassemble_from_exec = 1; /* It's remote, read the exec file */
- }
-
- if (gdb_disassemble_from_exec)
- di.read_memory_func = gdb_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 got a totally different path to follow. */
-
- if (mixed_source_and_assembly)
- {
- /* Come here for mixed source/assembly */
- /* The idea here is to present a source-O-centric view of a
- function to the user. This means that things are presented
- in source order, with (possibly) out of order assembly
- immediately following. */
- struct symtab *symtab;
- struct linetable_entry *le;
- int nlines;
- int newlines;
- struct dis_line_entry *mle;
- struct symtab_and_line sal;
- int i;
- int out_of_order;
- int next_line;
-
- /* Assume symtab is valid for whole PC range */
- symtab = find_pc_symtab (low);
-
- if (!symtab || !symtab->linetable)
- goto assembly_only;
-
- /* First, convert the linetable to a bunch of my_line_entry's. */
-
- le = symtab->linetable->item;
- nlines = symtab->linetable->nitems;
-
- if (nlines <= 0)
- goto assembly_only;
-
- mle = (struct dis_line_entry *) alloca (nlines * sizeof (struct dis_line_entry));
-
- out_of_order = 0;
-
- /* Copy linetable entries for this function into our data
- structure, creating end_pc's and setting out_of_order as
- appropriate. */
-
- /* First, skip all the preceding functions. */
-
- for (i = 0; i < nlines - 1 && le[i].pc < low; i++);
-
- /* Now, copy all entries before the end of this function. */
-
- newlines = 0;
- for (; i < nlines - 1 && le[i].pc < high; i++)
- {
- if (le[i].line == le[i + 1].line
- && le[i].pc == le[i + 1].pc)
- continue; /* Ignore duplicates */
-
- mle[newlines].line = le[i].line;
- if (le[i].line > le[i + 1].line)
- out_of_order = 1;
- mle[newlines].start_pc = le[i].pc;
- mle[newlines].end_pc = le[i + 1].pc;
- newlines++;
- }
-
- /* If we're on the last line, and it's part of the function,
- then we need to get the end pc in a special way. */
-
- if (i == nlines - 1
- && le[i].pc < high)
- {
- mle[newlines].line = le[i].line;
- mle[newlines].start_pc = le[i].pc;
- sal = find_pc_line (le[i].pc, 0);
- mle[newlines].end_pc = sal.end;
- newlines++;
- }
-
- /* Now, sort mle by line #s (and, then by addresses within
- lines). */
-
- if (out_of_order)
- qsort (mle, newlines, sizeof (struct dis_line_entry), compare_lines);
-
- /* Now, for each line entry, emit the specified lines (unless
- they have been emitted before), followed by the assembly code
- for that line. */
-
- next_line = 0; /* Force out first line */
- ui_out_list_begin (uiout, "asm_insns");
- num_displayed = 0;
- for (i = 0; i < newlines; i++)
- {
- int close_list = 1;
- /* Print out everything from next_line to the current line. */
- if (mle[i].line >= next_line)
- {
- if (next_line != 0)
- {
- /* Just one line to print. */
- if (next_line == mle[i].line)
- {
- ui_out_tuple_begin (uiout, "src_and_asm_line");
- print_source_lines (symtab, next_line, mle[i].line + 1, 0);
- }
- else
- {
- /* 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");
- print_source_lines (symtab, next_line, mle[i].line + 1, 0);
- ui_out_list_begin (uiout, "line_asm_insn");
- ui_out_list_end (uiout);
- ui_out_tuple_end (uiout);
- }
- /* Print the last line and leave list open for
- asm instructions to be added. */
- ui_out_tuple_begin (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");
- 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");
- if (i + 1 < newlines && mle[i + 1].line <= mle[i].line)
- close_list = 0;
- }
- for (pc = mle[i].start_pc; pc < mle[i].end_pc;)
- {
- QUIT;
- if (how_many >= 0)
- {
- if (num_displayed >= how_many)
- break;
- else
- num_displayed++;
- }
- ui_out_tuple_begin (uiout, NULL);
- ui_out_field_core_addr (uiout, "address", pc);
-
- if (!build_address_symbolic (pc, 0, &name, &offset, &filename, &line, &unmapped))
- {
- /* We don't care now about line, filename and
- unmapped, but we might in the future. */
- ui_out_field_string (uiout, "func-name", name);
- ui_out_field_int (uiout, "offset", offset);
- }
- if (filename != NULL)
- xfree (filename);
- if (name != NULL)
- xfree (name);
-
- ui_file_rewind (stb->stream);
- pc += (*tm_print_insn) (pc, &di);
- ui_out_field_stream (uiout, "inst", stb);
- ui_file_rewind (stb->stream);
- ui_out_tuple_end (uiout);
- }
- if (close_list)
- {
- ui_out_list_end (uiout);
- ui_out_tuple_end (uiout);
- close_list = 0;
- }
- if (how_many >= 0)
- if (num_displayed >= how_many)
- break;
- }
- ui_out_list_end (uiout);
- }
- else
- {
- assembly_only:
- ui_out_list_begin (uiout, "asm_insns");
- num_displayed = 0;
- for (pc = low; pc < high;)
- {
- QUIT;
- if (how_many >= 0)
- {
- if (num_displayed >= how_many)
- break;
- else
- num_displayed++;
- }
- ui_out_tuple_begin (uiout, NULL);
- ui_out_field_core_addr (uiout, "address", pc);
-
- if (!build_address_symbolic (pc, 0, &name, &offset, &filename, &line, &unmapped))
- {
- /* We don't care now about line, filename and
- unmapped. But we might in the future. */
- ui_out_field_string (uiout, "func-name", name);
- ui_out_field_int (uiout, "offset", offset);
- }
- if (filename != NULL)
- xfree (filename);
- if (name != NULL)
- xfree (name);
-
- ui_file_rewind (stb->stream);
- pc += (*tm_print_insn) (pc, &di);
- ui_out_field_stream (uiout, "inst", stb);
- ui_file_rewind (stb->stream);
- ui_out_tuple_end (uiout);
- }
- ui_out_list_end (uiout);
- }
- gdb_flush (gdb_stdout);
-
- return MI_CMD_DONE;
+ retval = do_disassembly (file_string,
+ line_num,
+ mixed_source_and_assembly, how_many, low, high);
+ return retval;
}
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 0e4bdf4..b4bae47 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -218,7 +218,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
stb = ui_out_stream_new (uiout);
- block = get_frame_block (fi);
+ block = get_frame_block (fi, 0);
ui_out_list_begin (uiout, locals ? "locals" : "args");
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 0c84064..4848a4e 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -1,5 +1,7 @@
/* MI Command Set - varobj commands.
- Copyright 2000 Free Software Foundation, Inc.
+
+ Copyright 2000, 2002 Free Software Foundation, Inc.
+
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
@@ -27,11 +29,6 @@
#include "value.h"
#include <ctype.h>
-/* Convenience macro for allocting typesafe memory. */
-
-#undef XMALLOC
-#define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
-
extern int varobjdebug; /* defined in varobj.c */
static int varobj_update_one (struct varobj *var);
diff --git a/gdb/mi/mi-console.c b/gdb/mi/mi-console.c
index 5824f83..c1b6e9f 100644
--- a/gdb/mi/mi-console.c
+++ b/gdb/mi/mi-console.c
@@ -1,5 +1,7 @@
/* MI Console code.
- Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
@@ -23,11 +25,6 @@
#include "mi-console.h"
#include "gdb_string.h"
-/* Convenience macro for allocting typesafe memory. */
-
-#undef XMALLOC
-#define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
-
/* MI-console: send output to std-out but correcty encapsulated */
static ui_file_fputs_ftype mi_console_file_fputs;
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 3a59fc8..ccb153f 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -42,11 +42,6 @@
#include <ctype.h>
#include <sys/time.h>
-/* Convenience macro for allocting typesafe memory. */
-
-#undef XMALLOC
-#define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
-
enum
{
FROM_TTY = 0
@@ -170,7 +165,7 @@ mi_cmd_exec_return (char *args, int from_tty)
/* Because we have called return_command with from_tty = 0, we need
to print the frame here. */
show_and_print_stack_frame (selected_frame,
- selected_frame_level,
+ frame_relative_level (selected_frame),
LOC_AND_ADDRESS);
return MI_CMD_DONE;
@@ -373,7 +368,7 @@ register_changed_p (int regnum)
{
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
- if (read_relative_register_raw_bytes (regnum, raw_buffer))
+ if (! frame_register_read (selected_frame, regnum, raw_buffer))
return -1;
if (memcmp (&old_regs[REGISTER_BYTE (regnum)], raw_buffer,
@@ -486,10 +481,6 @@ get_register (int regnum, int format)
if (format == 'N')
format = 0;
- /* read_relative_register_raw_bytes returns a virtual frame pointer
- (FRAME_FP (selected_frame)) if regnum == FP_REGNUM instead
- of the real contents of the register. To get around this,
- use get_saved_register instead. */
get_saved_register (raw_buffer, &optim, (CORE_ADDR *) NULL, selected_frame,
regnum, (enum lval_type *) NULL);
if (optim)
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index a92ccbe..947720b 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -1,5 +1,7 @@
/* MI Command Set - output generating routines.
- Copyright 2000 Free Software Foundation, Inc.
+
+ Copyright 2000, 2002 Free Software Foundation, Inc.
+
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
@@ -23,12 +25,6 @@
#include "ui-out.h"
#include "mi-out.h"
-/* Convenience macro for allocting typesafe memory. */
-
-#ifndef XMALLOC
-#define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
-#endif
-
struct ui_out_data
{
int suppress_field_separator;
diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c
index 2ed49b8..caefd59 100644
--- a/gdb/mi/mi-parse.c
+++ b/gdb/mi/mi-parse.c
@@ -1,5 +1,7 @@
/* MI Command Set - MI parser.
- Copyright 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
@@ -26,9 +28,6 @@
#include <ctype.h>
#include "gdb_string.h"
-#undef XMALLOC
-#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
-
static void
mi_parse_argv (char *args, struct mi_parse *parse)
{