summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <>2002-09-03 22:29:15 +0000
committernobody <>2002-09-03 22:29:15 +0000
commit2e3c0e2427295c9cc09a8a707dfba38d50e2ba30 (patch)
treeb870b2944410a7cd58805b1139cbbb6e68afdefc
parent98c56715d7b32c12647ab664e75c92b1616b54ca (diff)
downloadbinutils-gdb-2e3c0e2427295c9cc09a8a707dfba38d50e2ba30.tar.gz
This commit was manufactured by cvs2svn to create branch 'gdb_5_3-branch'.gdb_5_3-2002-09-04-branchpoint
Sprout from cagney_sysregs-20020825-branch 2002-08-25 19:39:46 UTC nobody 'This commit was manufactured by cvs2svn to create branch' Cherrypick from master 2002-09-03 22:29:14 UTC Keith Seitz <keiths@redhat.com> ' * lib/gdb.exp (gdb_compile_pthreads): Fix "build_bin" typo.': bfd/ChangeLog bfd/Makefile.am bfd/Makefile.in bfd/aoutx.h bfd/archures.c bfd/bfd-in.h bfd/bfd-in2.h bfd/coff-tic4x.c bfd/coff64-rs6000.c bfd/coffcode.h bfd/coffswap.h bfd/config.bfd bfd/configure bfd/configure.in bfd/cpu-avr.c bfd/cpu-pj.c bfd/cpu-powerpc.c bfd/cpu-rs6000.c bfd/cpu-tic4x.c bfd/cpu-v850.c bfd/cpu-z8k.c bfd/doc/ChangeLog bfd/doc/chew.c bfd/ecoff.c bfd/elf32-arm.h bfd/elf32-v850.c bfd/libbfd.h bfd/mipsbsd.c bfd/pdp11.c bfd/reloc.c bfd/targets.c bfd/ticoff.h bfd/version.h gdb/ChangeLog gdb/Makefile.in gdb/ada-exp.y gdb/alphanbsd-tdep.c gdb/avr-tdep.c gdb/ax-gdb.c gdb/breakpoint.c gdb/c-exp.y gdb/c-valprint.c gdb/cli/cli-script.c gdb/cli/cli-script.h gdb/config/i386/nbsd.mt gdb/config/i386/nbsdaout.mh gdb/config/i386/nbsdelf.mh gdb/config/i386/tm-nbsd.h gdb/config/mips/nbsd.mt gdb/configure.tgt gdb/cp-abi.c gdb/doc/ChangeLog gdb/doc/gdb.texinfo gdb/dwarf2read.c gdb/f-exp.y gdb/gdb-events.c gdb/gdb-events.h gdb/gdb-events.sh gdb/gdbserver/ChangeLog gdb/gdbserver/linux-low.c gdb/gdbserver/remote-utils.c gdb/gdbserver/server.c gdb/gdbserver/target.h gdb/gnu-nat.c gdb/hpux-thread.c gdb/i386-linux-nat.c gdb/i386-tdep.c gdb/i386-tdep.h gdb/i386bsd-tdep.c gdb/i386nbsd-tdep.c gdb/i387-tdep.c gdb/inferior.h gdb/inflow.c gdb/inftarg.c gdb/jv-exp.y gdb/jv-valprint.c gdb/lin-lwp.c gdb/m2-exp.y gdb/m3-nat.c gdb/mipsnbsd-tdep.c gdb/nbsd-tdep.c gdb/nbsd-tdep.h gdb/osabi.c gdb/p-exp.y gdb/p-lang.c gdb/ppcnbsd-tdep.c gdb/proc-api.c gdb/procfs.c gdb/regcache.c gdb/regcache.h gdb/rs6000-tdep.c gdb/shnbsd-tdep.c gdb/signals/signals.c gdb/sol-thread.c gdb/sparcnbsd-tdep.c gdb/stack.c gdb/symtab.c gdb/target.c gdb/target.h gdb/testsuite/ChangeLog gdb/testsuite/gdb.base/commands.exp gdb/testsuite/gdb.mi/ChangeLog gdb/testsuite/gdb.mi/gdb680.exp gdb/testsuite/gdb.threads/killed.c gdb/testsuite/gdb.threads/killed.exp gdb/testsuite/gdb.threads/pthreads.exp gdb/testsuite/lib/gdb.exp gdb/testsuite/lib/mi-support.exp gdb/tui/ChangeLog gdb/tui/tui-hooks.c gdb/tui/tui-out.c gdb/tui/tui.c gdb/tui/tui.h gdb/tui/tuiData.c gdb/tui/tuiData.h gdb/tui/tuiDisassem.c gdb/tui/tuiDisassem.h gdb/tui/tuiIO.c gdb/tui/tuiIO.h gdb/tui/tuiSource.c gdb/tui/tuiSourceWin.c gdb/tui/tuiSourceWin.h gdb/tui/tuiStack.c gdb/tui/tuiWin.c gdb/version.in gdb/win32-nat.c gdb/wince.c gdb/x86-64-linux-nat.c gdb/x86-64-linux-tdep.c include/ChangeLog include/coff/internal.h include/coff/ti.h include/coff/tic4x.h include/dis-asm.h include/elf/ChangeLog include/elf/v850.h include/opcode/tic4x.h opcodes/ChangeLog opcodes/Makefile.am opcodes/Makefile.in opcodes/arc-opc.c opcodes/configure opcodes/configure.in opcodes/disassemble.c opcodes/mips-dis.c opcodes/tic4x-dis.c opcodes/v850-dis.c opcodes/v850-opc.c sim/common/ChangeLog sim/common/Make-common.in sim/igen/ChangeLog sim/igen/gen-support.c sim/v850/ChangeLog sim/v850/Makefile.in sim/v850/sim-main.h sim/v850/simops.c Delete: gdb/config/i386/nbsdaout.mt gdb/config/i386/nbsdelf.mt gdb/config/i386/tm-nbsdaout.h
-rw-r--r--bfd/ChangeLog104
-rw-r--r--bfd/Makefile.am58
-rw-r--r--bfd/Makefile.in60
-rw-r--r--bfd/aoutx.h5
-rw-r--r--bfd/archures.c6
-rw-r--r--bfd/bfd-in.h5
-rw-r--r--bfd/bfd-in2.h16
-rw-r--r--bfd/coff-tic4x.c616
-rw-r--r--bfd/coff64-rs6000.c2
-rw-r--r--bfd/coffcode.h23
-rw-r--r--bfd/coffswap.h85
-rw-r--r--bfd/config.bfd7
-rwxr-xr-xbfd/configure34
-rw-r--r--bfd/configure.in6
-rw-r--r--bfd/cpu-avr.c4
-rw-r--r--bfd/cpu-pj.c50
-rw-r--r--bfd/cpu-powerpc.c2
-rw-r--r--bfd/cpu-rs6000.c2
-rw-r--r--bfd/cpu-tic4x.c81
-rw-r--r--bfd/cpu-v850.c90
-rw-r--r--bfd/cpu-z8k.c24
-rw-r--r--bfd/doc/ChangeLog5
-rw-r--r--bfd/doc/chew.c10
-rw-r--r--bfd/ecoff.c12
-rw-r--r--bfd/elf32-arm.h25
-rw-r--r--bfd/elf32-v850.c1060
-rw-r--r--bfd/libbfd.h4
-rw-r--r--bfd/mipsbsd.c10
-rw-r--r--bfd/pdp11.c5
-rw-r--r--bfd/reloc.c14
-rw-r--r--bfd/targets.c6
-rw-r--r--bfd/ticoff.h130
-rw-r--r--bfd/version.h2
-rw-r--r--gdb/ChangeLog265
-rw-r--r--gdb/Makefile.in1631
-rw-r--r--gdb/ada-exp.y2
-rw-r--r--gdb/alphanbsd-tdep.c29
-rw-r--r--gdb/avr-tdep.c3
-rw-r--r--gdb/ax-gdb.c1
-rw-r--r--gdb/breakpoint.c42
-rw-r--r--gdb/c-exp.y2
-rw-r--r--gdb/c-valprint.c1
-rw-r--r--gdb/cli/cli-script.c30
-rw-r--r--gdb/cli/cli-script.h2
-rw-r--r--gdb/config/i386/nbsd.mt (renamed from gdb/config/i386/nbsdelf.mt)3
-rw-r--r--gdb/config/i386/nbsdaout.mh3
-rw-r--r--gdb/config/i386/nbsdaout.mt3
-rw-r--r--gdb/config/i386/nbsdelf.mh3
-rw-r--r--gdb/config/i386/tm-nbsd.h13
-rw-r--r--gdb/config/i386/tm-nbsdaout.h26
-rw-r--r--gdb/config/mips/nbsd.mt3
-rw-r--r--gdb/configure.tgt5
-rw-r--r--gdb/cp-abi.c1
-rw-r--r--gdb/doc/ChangeLog17
-rw-r--r--gdb/doc/gdb.texinfo135
-rw-r--r--gdb/dwarf2read.c11
-rw-r--r--gdb/f-exp.y2
-rw-r--r--gdb/gdb-events.c31
-rw-r--r--gdb/gdb-events.h4
-rwxr-xr-xgdb/gdb-events.sh2
-rw-r--r--gdb/gdbserver/ChangeLog15
-rw-r--r--gdb/gdbserver/linux-low.c33
-rw-r--r--gdb/gdbserver/remote-utils.c6
-rw-r--r--gdb/gdbserver/server.c29
-rw-r--r--gdb/gdbserver/target.h7
-rw-r--r--gdb/gnu-nat.c1
-rw-r--r--gdb/hpux-thread.c1
-rw-r--r--gdb/i386-linux-nat.c7
-rw-r--r--gdb/i386-tdep.c26
-rw-r--r--gdb/i386-tdep.h1
-rw-r--r--gdb/i386bsd-tdep.c61
-rw-r--r--gdb/i386nbsd-tdep.c157
-rw-r--r--gdb/i387-tdep.c1
-rw-r--r--gdb/inferior.h2
-rw-r--r--gdb/inflow.c17
-rw-r--r--gdb/inftarg.c1
-rw-r--r--gdb/jv-exp.y2
-rw-r--r--gdb/jv-valprint.c1
-rw-r--r--gdb/lin-lwp.c1
-rw-r--r--gdb/m2-exp.y2
-rw-r--r--gdb/m3-nat.c1
-rw-r--r--gdb/mipsnbsd-tdep.c4
-rw-r--r--gdb/nbsd-tdep.c11
-rw-r--r--gdb/nbsd-tdep.h2
-rw-r--r--gdb/osabi.c1
-rw-r--r--gdb/p-exp.y2
-rw-r--r--gdb/p-lang.c1
-rw-r--r--gdb/ppcnbsd-tdep.c9
-rw-r--r--gdb/proc-api.c2
-rw-r--r--gdb/procfs.c1
-rw-r--r--gdb/regcache.c23
-rw-r--r--gdb/regcache.h4
-rw-r--r--gdb/rs6000-tdep.c11
-rw-r--r--gdb/shnbsd-tdep.c9
-rw-r--r--gdb/signals/signals.c1
-rw-r--r--gdb/sol-thread.c1
-rw-r--r--gdb/sparcnbsd-tdep.c2
-rw-r--r--gdb/stack.c27
-rw-r--r--gdb/symtab.c25
-rw-r--r--gdb/target.c15
-rw-r--r--gdb/target.h9
-rw-r--r--gdb/testsuite/ChangeLog21
-rw-r--r--gdb/testsuite/gdb.base/commands.exp115
-rw-r--r--gdb/testsuite/gdb.mi/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.mi/gdb680.exp56
-rw-r--r--gdb/testsuite/gdb.threads/killed.c24
-rw-r--r--gdb/testsuite/gdb.threads/killed.exp97
-rw-r--r--gdb/testsuite/gdb.threads/pthreads.exp32
-rw-r--r--gdb/testsuite/lib/gdb.exp36
-rw-r--r--gdb/testsuite/lib/mi-support.exp2
-rw-r--r--gdb/tui/ChangeLog179
-rw-r--r--gdb/tui/tui-hooks.c71
-rw-r--r--gdb/tui/tui-out.c2
-rw-r--r--gdb/tui/tui.c198
-rw-r--r--gdb/tui/tui.h28
-rw-r--r--gdb/tui/tuiData.c296
-rw-r--r--gdb/tui/tuiData.h41
-rw-r--r--gdb/tui/tuiDisassem.c400
-rw-r--r--gdb/tui/tuiDisassem.h2
-rw-r--r--gdb/tui/tuiIO.c246
-rw-r--r--gdb/tui/tuiIO.h7
-rw-r--r--gdb/tui/tuiSource.c116
-rw-r--r--gdb/tui/tuiSourceWin.c226
-rw-r--r--gdb/tui/tuiSourceWin.h17
-rw-r--r--gdb/tui/tuiStack.c181
-rw-r--r--gdb/tui/tuiWin.c6
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/win32-nat.c1
-rw-r--r--gdb/wince.c1
-rw-r--r--gdb/x86-64-linux-nat.c1
-rw-r--r--gdb/x86-64-linux-tdep.c1
-rw-r--r--include/ChangeLog8
-rw-r--r--include/coff/internal.h4
-rw-r--r--include/coff/ti.h1
-rw-r--r--include/coff/tic4x.h46
-rw-r--r--include/dis-asm.h1
-rw-r--r--include/elf/ChangeLog5
-rw-r--r--include/elf/v850.h47
-rw-r--r--include/opcode/tic4x.h1338
-rw-r--r--opcodes/ChangeLog28
-rw-r--r--opcodes/Makefile.am4
-rw-r--r--opcodes/Makefile.in6
-rw-r--r--opcodes/arc-opc.c3
-rwxr-xr-xopcodes/configure1
-rw-r--r--opcodes/configure.in1
-rw-r--r--opcodes/disassemble.c6
-rw-r--r--opcodes/mips-dis.c2
-rw-r--r--opcodes/tic4x-dis.c677
-rw-r--r--opcodes/v850-dis.c4
-rw-r--r--opcodes/v850-opc.c17
-rw-r--r--sim/common/ChangeLog4
-rw-r--r--sim/common/Make-common.in2
-rw-r--r--sim/igen/ChangeLog5
-rw-r--r--sim/igen/gen-support.c18
-rw-r--r--sim/v850/ChangeLog9
-rw-r--r--sim/v850/Makefile.in1
-rw-r--r--sim/v850/sim-main.h2
-rw-r--r--sim/v850/simops.c2
158 files changed, 7697 insertions, 2320 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5b6eee274d9..d597c4a8db8 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,107 @@
+2002-09-02 Nick Clifton <nickc@redhat.com>
+
+ * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
+ names instead of cryptically overloaded bfd_reloc error
+ codes.
+ (v850_elf_relocate_section): Likewise.
+ (v850_elf_relax_section): Replace caching of external symbols
+ with caching of internal symbols obtained from calling
+ bfd_elf_get_elf_syms().
+ Fixup problems with freeing cached allocated memory blocks.
+
+
+2002-09-02 Alan Modra <amodra@bigpond.net.au>
+
+ * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
+ (bfd_pj_arch): Use bfd_default_scan.
+ * cpu-v850.c (scan): Remove.
+ (N): Use bfd_default_scan.
+ * cpu-z8k.c (scan_mach): Remove.
+ (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
+ first. Use bfd_default_scan.
+
+ * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
+ bfd_mach constants.
+ (ecoff_get_magic): Likewise.
+ * elf32-v850.c (v850_elf_object_p): Likewise.
+ (v850_elf_final_write_processing): Likewise.
+ * mipsbsd.c (MY(set_arch_mach)): Likewise.
+ (MY(write_object_contents)): Likewise.
+ * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
+ * coffcode.h (coff_write_object_contents): Likewise.
+ (coff_set_arch_mach_hook): Add comment describing machine == 0.
+ Remove unnecessary "machine" assignments.
+ (coff_write_relocs): Test for the absolute section sym by testing
+ section and flags.
+
+ * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
+ and bfd_mach_i386_i386_intel_syntax.
+ * pdp11.c (NAME(aout,machine_type)): Likewise.
+
+2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * bfd-in.h (align_power): Cast constants to bfd_vma type.
+ * bfd-in2.h (align_power): Likewise.
+
+2002-08-30 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+ * cpu-avr.c (compatible): Don't use hard-coded mach constants.
+ * cpu-powerpc.c (powerpc_compatible): Likewise.
+ * cpu-rs6000.c (rs6000_compatible): Likewise.
+
+2002-08-28 Catherine Moore <clm@redhat.com>
+
+ * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
+ (v850-elf-reloc): Don't resolve pc relative relocs.
+ (v850_elf_ignore_reloc): New routine.
+ (v850_elf_final_link_relocate): Handle new relocs.
+ (v850_elf_relax_delete_bytes ): New routine.
+ (v850_elf_relax_section): New routine.
+ (bfd_elf32_bfd_relax_section): Define.
+ (HOWTO): New entries for new relocs.
+ * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
+ (BFD_RELOC_V850_LONGJUMP): New reloc.
+ (BFD_RELOC_V850_ALIGN): New reloc.
+ * archures.c: Remove redundant v850ea architecture.
+ * cpu-v850.c: Remove redundant v850ea support.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerated.
+
+2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
+ * configure.in: Add tic4x_coff vector files.
+ * configure: Regenerate.
+ * Makefile.am: Add tic4x target.
+ * Makefile.in: Regenerate.
+
+2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * archures.c: Add the BFD arch type tic4x.
+ * bfd-in.h: Add BFD_IN_MEMORY flag.
+ * coff-tic4x.c: New file.
+ * coffswap.h (coff_swap_sym_out): Add preadjuster.
+ * cpu-tic4x.c: New file.
+ * targets.c: Added tic4x- in list of xvecs.
+ * ticoff.h: New file.
+ * bfd-in2.h: Regenerate.
+
+2002-08-27 Adam Nemet <anemet@lnxw.com>
+
+ * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
+ bit of DT_INIT and DT_FINI for Thumb functions.
+
+2002-08-26 Alan Modra <amodra@bigpond.net.au>
+
+ * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
+
+2002-08-26 Alan Modra <amodra@bigpond.net.au>
+
+ * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
+
2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* elf32-sh.c (sh_elf_copy_indirect_symbol): New.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index d945dc3d35a..4b5551e01bd 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -89,6 +89,7 @@ ALL_MACHINES = \
cpu-sh.lo \
cpu-sparc.lo \
cpu-tic30.lo \
+ cpu-tic4x.lo \
cpu-tic54x.lo \
cpu-tic80.lo \
cpu-v850.lo \
@@ -140,6 +141,7 @@ ALL_MACHINES_CFILES = \
cpu-sh.c \
cpu-sparc.c \
cpu-tic30.c \
+ cpu-tic4x.c \
cpu-tic54x.c \
cpu-tic80.c \
cpu-v850.c \
@@ -185,6 +187,7 @@ BFD32_BACKENDS = \
coff-stgo32.lo \
coff-svm68k.lo \
coff-tic30.lo \
+ coff-tic4x.lo \
coff-tic54x.lo \
coff-tic80.lo \
coff-u68k.lo \
@@ -346,6 +349,7 @@ BFD32_BACKENDS_CFILES = \
coff-stgo32.c \
coff-svm68k.c \
coff-tic30.c \
+ coff-tic4x.c \
coff-tic54x.c \
coff-tic80.c \
coff-u68k.c \
@@ -935,6 +939,7 @@ cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h
cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
+cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h
cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h
cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h
cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
@@ -1053,6 +1058,9 @@ coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \
coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h coffcode.h coffswap.h
+coff-tic4x.lo: coff-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
@@ -1104,9 +1112,10 @@ elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-arm.h elf32-target.h
-elfarmqnx-nabi.lo: elfarmqnx-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/filenames.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+elfarmqnx-nabi.lo: elfarmqnx-nabi.c elfarm-nabi.c $(INCDIR)/elf/arm.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-qnx.h \
elf32-arm.h elf32-target.h
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
@@ -1149,15 +1158,16 @@ elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h elf-bfd.h \
libhppa.h elf32-hppa.h elf-hppa.h elf32-target.h
elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h elf32-target.h
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
+ $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
@@ -1179,13 +1189,14 @@ elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68hc11.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68hc11.h \
+ elf32-target.h
elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-target.h
@@ -1228,10 +1239,10 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-ppcqnx.lo: elf32-ppcqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+elf32-ppcqnx.lo: elf32-ppcqnx.c elf32-ppc.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
@@ -1262,10 +1273,10 @@ elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-shqnx.lo: elf32-shqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+elf32-shqnx.lo: elf32-shqnx.c elf32-sh.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
@@ -1522,12 +1533,13 @@ elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \
elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf64-target.h
-elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h elf-bfd.h elfxx-mips.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/mips.h ecoffswap.h elf32-target.h
+elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
+ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
+ ecoffswap.h elf32-target.h
elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 6a137cdbabb..2da51c8d92b 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -215,6 +215,7 @@ ALL_MACHINES = \
cpu-sh.lo \
cpu-sparc.lo \
cpu-tic30.lo \
+ cpu-tic4x.lo \
cpu-tic54x.lo \
cpu-tic80.lo \
cpu-v850.lo \
@@ -267,6 +268,7 @@ ALL_MACHINES_CFILES = \
cpu-sh.c \
cpu-sparc.c \
cpu-tic30.c \
+ cpu-tic4x.c \
cpu-tic54x.c \
cpu-tic80.c \
cpu-v850.c \
@@ -313,6 +315,7 @@ BFD32_BACKENDS = \
coff-stgo32.lo \
coff-svm68k.lo \
coff-tic30.lo \
+ coff-tic4x.lo \
coff-tic54x.lo \
coff-tic80.lo \
coff-u68k.lo \
@@ -475,6 +478,7 @@ BFD32_BACKENDS_CFILES = \
coff-stgo32.c \
coff-svm68k.c \
coff-tic30.c \
+ coff-tic4x.c \
coff-tic54x.c \
coff-tic80.c \
coff-u68k.c \
@@ -790,7 +794,7 @@ configure.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
@@ -1465,6 +1469,7 @@ cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h
cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
+cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h
cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h
cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h
cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
@@ -1583,6 +1588,9 @@ coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \
coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h coffcode.h coffswap.h
+coff-tic4x.lo: coff-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
@@ -1634,9 +1642,10 @@ elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-arm.h elf32-target.h
-elfarmqnx-nabi.lo: elfarmqnx-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/filenames.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+elfarmqnx-nabi.lo: elfarmqnx-nabi.c elfarm-nabi.c $(INCDIR)/elf/arm.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-qnx.h \
elf32-arm.h elf32-target.h
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
@@ -1679,15 +1688,16 @@ elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h elf-bfd.h \
libhppa.h elf32-hppa.h elf-hppa.h elf32-target.h
elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h elf32-target.h
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
+ $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
@@ -1709,13 +1719,14 @@ elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68hc11.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68hc11.h \
+ elf32-target.h
elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-target.h
@@ -1758,10 +1769,10 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-ppcqnx.lo: elf32-ppcqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+elf32-ppcqnx.lo: elf32-ppcqnx.c elf32-ppc.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
@@ -1792,10 +1803,10 @@ elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
-elf32-shqnx.lo: elf32-shqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+elf32-shqnx.lo: elf32-shqnx.c elf32-sh.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-qnx.h elf32-target.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
@@ -2052,12 +2063,13 @@ elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \
elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf64-target.h
-elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h elf-bfd.h elfxx-mips.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/mips.h ecoffswap.h elf32-target.h
+elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
+ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
+ ecoffswap.h elf32-target.h
elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 7eebb168fc7..7fa334ab48f 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -318,6 +318,7 @@ NAME(aout,reloc_type_lookup) (abfd,code)
/* std relocs. */
switch (code)
{
+ STD (BFD_RELOC_8, 0);
STD (BFD_RELOC_16, 1);
STD (BFD_RELOC_32, 2);
STD (BFD_RELOC_8_PCREL, 4);
@@ -756,7 +757,9 @@ NAME(aout,machine_type) (arch, machine, unknown)
break;
case bfd_arch_i386:
- if (machine == 0)
+ if (machine == 0
+ || machine == bfd_mach_i386_i386
+ || machine == bfd_mach_i386_i386_intel_syntax)
arch_flags = M_386;
break;
diff --git a/bfd/archures.c b/bfd/archures.c
index dd51ec75517..3f0ba7bb65e 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -228,12 +228,14 @@ DESCRIPTION
. bfd_arch_ns32k, {* National Semiconductors ns32000 *}
. bfd_arch_w65, {* WDC 65816 *}
. bfd_arch_tic30, {* Texas Instruments TMS320C30 *}
+. bfd_arch_tic4x, {* Texas Instruments TMS320C3X/4X *}
+.#define bfd_mach_c3x 30
+.#define bfd_mach_c4x 40
. bfd_arch_tic54x, {* Texas Instruments TMS320C54X *}
. bfd_arch_tic80, {* TI TMS320c80 (MVP) *}
. bfd_arch_v850, {* NEC V850 *}
.#define bfd_mach_v850 0
.#define bfd_mach_v850e 'E'
-.#define bfd_mach_v850ea 'A'
. bfd_arch_arc, {* ARC Cores *}
.#define bfd_mach_arc_5 0
.#define bfd_mach_arc_6 1
@@ -358,6 +360,7 @@ extern const bfd_arch_info_type bfd_s390_arch;
extern const bfd_arch_info_type bfd_sh_arch;
extern const bfd_arch_info_type bfd_sparc_arch;
extern const bfd_arch_info_type bfd_tic30_arch;
+extern const bfd_arch_info_type bfd_tic4x_arch;
extern const bfd_arch_info_type bfd_tic54x_arch;
extern const bfd_arch_info_type bfd_tic80_arch;
extern const bfd_arch_info_type bfd_v850_arch;
@@ -412,6 +415,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_sh_arch,
&bfd_sparc_arch,
&bfd_tic30_arch,
+ &bfd_tic4x_arch,
&bfd_tic54x_arch,
&bfd_tic80_arch,
&bfd_v850_arch,
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 19fd1072084..3941906979e 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -267,6 +267,9 @@ bfd_format;
/* This flag indicates that the BFD contents are actually cached in
memory. If this is set, iostream points to a bfd_in_memory struct. */
#define BFD_IN_MEMORY 0x800
+
+/* The sections in this BFD specify a memory page. */
+#define HAS_LOAD_PAGE 0x1000
/* Symbols and relocation. */
@@ -328,7 +331,7 @@ alent;
/* Object and core file sections. */
#define align_power(addr, align) \
- ( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
+ (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align)))
typedef struct sec *sec_ptr;
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 1a869f631b8..abb6405f579 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -273,6 +273,9 @@ bfd_format;
/* This flag indicates that the BFD contents are actually cached in
memory. If this is set, iostream points to a bfd_in_memory struct. */
#define BFD_IN_MEMORY 0x800
+
+/* The sections in this BFD specify a memory page. */
+#define HAS_LOAD_PAGE 0x1000
/* Symbols and relocation. */
@@ -334,7 +337,7 @@ alent;
/* Object and core file sections. */
#define align_power(addr, align) \
- ( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
+ (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align)))
typedef struct sec *sec_ptr;
@@ -1618,6 +1621,9 @@ enum bfd_architecture
bfd_arch_ns32k, /* National Semiconductors ns32000 */
bfd_arch_w65, /* WDC 65816 */
bfd_arch_tic30, /* Texas Instruments TMS320C30 */
+ bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */
+#define bfd_mach_c3x 30
+#define bfd_mach_c4x 40
bfd_arch_tic54x, /* Texas Instruments TMS320C54X */
bfd_arch_tic80, /* TI TMS320c80 (MVP) */
bfd_arch_v850, /* NEC V850 */
@@ -2662,6 +2668,14 @@ bits placed non-contigously in the instruction. */
/* This is a 16 bit offset from the call table base pointer. */
BFD_RELOC_V850_CALLT_16_16_OFFSET,
+/* Used for relaxing indirect function calls. */
+ BFD_RELOC_V850_LONGCALL,
+
+/* Used for relaxing indirect jumps. */
+ BFD_RELOC_V850_LONGJUMP,
+
+/* Used to maintain alignment whilst relaxing. */
+ BFD_RELOC_V850_ALIGN,
/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
instruction. */
diff --git a/bfd/coff-tic4x.c b/bfd/coff-tic4x.c
new file mode 100644
index 00000000000..1669f7cc012
--- /dev/null
+++ b/bfd/coff-tic4x.c
@@ -0,0 +1,616 @@
+/* BFD back-end for TMS320C4X coff binaries.
+ Copyright (C) 1996-99, 2000, 2002 Free Software Foundation, Inc.
+ Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "bfdlink.h"
+#include "coff/tic4x.h"
+#include "coff/internal.h"
+#include "libcoff.h"
+
+#undef F_LSYMS
+#define F_LSYMS F_LSYMS_TICOFF
+
+static boolean
+ticoff0_bad_format_hook (abfd, filehdr)
+ bfd *abfd;
+ PTR filehdr;
+{
+ struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
+
+ if (COFF0_BADMAG (*internal_f))
+ return false;
+
+ return true;
+}
+
+static boolean
+ticoff1_bad_format_hook (abfd, filehdr)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ PTR filehdr;
+{
+ struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
+
+ if (COFF1_BADMAG (*internal_f))
+ return false;
+
+ return true;
+}
+
+/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
+ labels. */
+static boolean
+ticoff_bfd_is_local_label_name (abfd, name)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ const char *name;
+{
+ if (TICOFF_LOCAL_LABEL_P(name))
+ return true;
+ return false;
+}
+
+#define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
+
+static void tic4x_reloc_processing
+ PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
+
+#define RELOC_PROCESSING(RELENT,RELOC,SYMS,ABFD,SECT)\
+ tic4x_reloc_processing (RELENT,RELOC,SYMS,ABFD,SECT)
+
+/* Customize coffcode.h; the default coff_ functions are set up to use
+ COFF2; coff_bad_format_hook uses BADMAG, so set that for COFF2.
+ The COFF1 and COFF0 vectors use custom _bad_format_hook procs
+ instead of setting BADMAG. */
+#define BADMAG(x) COFF2_BADMAG(x)
+#include "coffcode.h"
+
+static bfd_reloc_status_type
+tic4x_relocation (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *reloc_entry;
+ asymbol *symbol ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ if (output_bfd != (bfd *) NULL)
+ {
+ /* This is a partial relocation, and we want to apply the
+ relocation to the reloc entry rather than the raw data.
+ Modify the reloc inplace to reflect what we now know. */
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+ return bfd_reloc_continue;
+}
+
+reloc_howto_type tic4x_howto_table[] =
+{
+ HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "RELWORD", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_bitfield, tic4x_relocation, "REL24", true, 0x00ffffff, 0x00ffffff, false),
+ HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_dont, tic4x_relocation, "RELLONG", true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "PCRWORD", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "PCR24", true, 0x00ffffff, 0x00ffffff, false),
+ HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTLS16", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTMS8", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "ARELWORD", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_signed, tic4x_relocation, "AREL24", true, 0x00ffffff, 0x00ffffff, false),
+ HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_signed, tic4x_relocation, "ARELLONG", true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "APCRWORD", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "APCR24", true, 0x00ffffff, 0x00ffffff, false),
+ HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTLS16", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTMS8", true, 0x0000ffff, 0x0000ffff, false),
+};
+#define HOWTO_SIZE (sizeof(tic4x_howto_table) / sizeof(tic4x_howto_table[0]))
+
+#undef coff_bfd_reloc_type_lookup
+#define coff_bfd_reloc_type_lookup tic4x_coff_reloc_type_lookup
+
+/* For the case statement use the code values used tc_gen_reloc (defined in
+ bfd/reloc.c) to map to the howto table entries. */
+
+static reloc_howto_type *
+tic4x_coff_reloc_type_lookup (abfd, code)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ unsigned int type;
+ unsigned int i;
+
+ switch (code)
+ {
+ case BFD_RELOC_32: type = R_RELLONG; break;
+ case BFD_RELOC_24: type = R_REL24; break;
+ case BFD_RELOC_16: type = R_RELWORD; break;
+ case BFD_RELOC_24_PCREL: type = R_PCR24; break;
+ case BFD_RELOC_16_PCREL: type = R_PCRWORD; break;
+ case BFD_RELOC_HI16: type = R_PARTMS8; break;
+ case BFD_RELOC_LO16: type = R_PARTLS16; break;
+ default:
+ return NULL;
+ }
+
+ for (i = 0; i < HOWTO_SIZE; i++)
+ {
+ if (tic4x_howto_table[i].type == type)
+ return tic4x_howto_table + i;
+ }
+ return NULL;
+}
+
+
+/* Code to turn a r_type into a howto ptr, uses the above howto table.
+ Called after some initial checking by the tic4x_rtype_to_howto fn
+ below. */
+static void
+tic4x_lookup_howto (internal, dst)
+ arelent *internal;
+ struct internal_reloc *dst;
+{
+ unsigned int i;
+ int bank = (dst->r_symndx == -1) ? HOWTO_BANK : 0;
+
+ for (i = 0; i < HOWTO_SIZE; i++)
+ {
+ if (tic4x_howto_table[i].type == dst->r_type)
+ {
+ internal->howto = tic4x_howto_table + i + bank;
+ return;
+ }
+ }
+
+ (*_bfd_error_handler) (_("Unrecognized reloc type 0x%x"),
+ (unsigned int) dst->r_type);
+ abort();
+}
+
+#undef coff_rtype_to_howto
+#define coff_rtype_to_howto coff_tic4x_rtype_to_howto
+
+static reloc_howto_type *
+coff_tic4x_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ struct internal_reloc *rel;
+ struct coff_link_hash_entry *h ATTRIBUTE_UNUSED;
+ struct internal_syment *sym ATTRIBUTE_UNUSED;
+ bfd_vma *addendp;
+{
+ arelent genrel;
+
+ if (rel->r_symndx == -1 && addendp != NULL)
+ /* This is a TI "internal relocation", which means that the relocation
+ amount is the amount by which the current section is being relocated
+ in the output section. */
+ *addendp = (sec->output_section->vma + sec->output_offset) - sec->vma;
+
+ tic4x_lookup_howto (&genrel, rel);
+
+ return genrel.howto;
+}
+
+
+static void
+tic4x_reloc_processing (relent, reloc, symbols, abfd, section)
+ arelent *relent;
+ struct internal_reloc *reloc;
+ asymbol **symbols;
+ bfd *abfd;
+ asection *section;
+{
+ asymbol *ptr;
+
+ relent->address = reloc->r_vaddr;
+
+ if (reloc->r_symndx != -1)
+ {
+ if (reloc->r_symndx < 0 || reloc->r_symndx >= obj_conv_table_size (abfd))
+ {
+ (*_bfd_error_handler)
+ (_("%s: warning: illegal symbol index %ld in relocs"),
+ bfd_get_filename (abfd), reloc->r_symndx);
+ relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
+ ptr = NULL;
+ }
+ else
+ {
+ relent->sym_ptr_ptr = (symbols
+ + obj_convert (abfd)[reloc->r_symndx]);
+ ptr = *(relent->sym_ptr_ptr);
+ }
+ }
+ else
+ {
+ relent->sym_ptr_ptr = section->symbol_ptr_ptr;
+ ptr = *(relent->sym_ptr_ptr);
+ }
+
+ /* The symbols definitions that we have read in have been relocated
+ as if their sections started at 0. But the offsets refering to
+ the symbols in the raw data have not been modified, so we have to
+ have a negative addend to compensate.
+
+ Note that symbols which used to be common must be left alone. */
+
+ /* Calculate any reloc addend by looking at the symbol. */
+ CALC_ADDEND (abfd, ptr, *reloc, relent);
+
+ relent->address -= section->vma;
+ /* !! relent->section = (asection *) NULL; */
+
+ /* Fill in the relent->howto field from reloc->r_type. */
+ tic4x_lookup_howto (relent, reloc);
+}
+
+
+static const bfd_coff_backend_data ticoff0_swap_table =
+{
+ coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
+ coff_SWAP_aux_out, coff_SWAP_sym_out,
+ coff_SWAP_lineno_out, coff_SWAP_reloc_out,
+ coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
+ coff_SWAP_scnhdr_out,
+ FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
+#ifdef COFF_LONG_FILENAMES
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_LONG_SECTION_NAMES
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
+ 4,
+#else
+ 2,
+#endif
+ COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
+ coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
+ coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
+ coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
+ coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
+ coff_classify_symbol, coff_compute_section_file_positions,
+ coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
+ coff_adjust_symndx, coff_link_add_one_symbol,
+ coff_link_output_has_begun, coff_final_link_postscript
+};
+
+/* COFF1 differs in section header size. */
+static const bfd_coff_backend_data ticoff1_swap_table =
+{
+ coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
+ coff_SWAP_aux_out, coff_SWAP_sym_out,
+ coff_SWAP_lineno_out, coff_SWAP_reloc_out,
+ coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
+ coff_SWAP_scnhdr_out,
+ FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
+#ifdef COFF_LONG_FILENAMES
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_LONG_SECTION_NAMES
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
+ 4,
+#else
+ 2,
+#endif
+ COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
+ coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
+ coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
+ coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
+ coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
+ coff_classify_symbol, coff_compute_section_file_positions,
+ coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
+ coff_adjust_symndx, coff_link_add_one_symbol,
+ coff_link_output_has_begun, coff_final_link_postscript
+};
+
+
+/* TI COFF v0, DOS tools (little-endian headers). */
+const bfd_target tic4x_coff0_vec =
+{
+ "coff0-c4x", /* Name. */
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_LITTLE, /* Data byte order is little. */
+ BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
+
+ (HAS_RELOC | EXEC_P | /* Object flags. */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ '_', /* Leading symbol underscore. */
+ '/', /* ar_pad_char. */
+ 15, /* ar_max_namelen. */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+
+ {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
+ (PTR)&ticoff0_swap_table
+};
+
+/* TI COFF v0, SPARC tools (big-endian headers). */
+const bfd_target tic4x_coff0_beh_vec =
+{
+ "coff0-beh-c4x", /* Name. */
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_LITTLE, /* Data byte order is little. */
+ BFD_ENDIAN_BIG, /* Header byte order is big. */
+
+ (HAS_RELOC | EXEC_P | /* Object flags. */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ '_', /* Leading symbol underscore. */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+
+ {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &tic4x_coff0_vec,
+
+ (PTR)&ticoff0_swap_table
+};
+
+/* TI COFF v1, DOS tools (little-endian headers). */
+const bfd_target tic4x_coff1_vec =
+{
+ "coff1-c4x", /* Name. */
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_LITTLE, /* Data byte order is little. */
+ BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
+
+ (HAS_RELOC | EXEC_P | /* Object flags. */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ '_', /* Leading symbol underscore. */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+
+ {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &tic4x_coff0_beh_vec,
+
+ (PTR)&ticoff1_swap_table
+};
+
+/* TI COFF v1, SPARC tools (big-endian headers). */
+const bfd_target tic4x_coff1_beh_vec =
+{
+ "coff1-beh-c4x", /* Name. */
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_LITTLE, /* Data byte order is little. */
+ BFD_ENDIAN_BIG, /* Header byte order is big. */
+
+ (HAS_RELOC | EXEC_P | /* Object flags. */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ '_', /* Leading symbol underscore. */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+
+ {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &tic4x_coff1_vec,
+
+ (PTR)&ticoff1_swap_table
+};
+
+/* TI COFF v2, TI DOS tools output (little-endian headers). */
+const bfd_target tic4x_coff2_vec =
+{
+ "coff2-c4x", /* Name. */
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_LITTLE, /* Data byte order is little. */
+ BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
+
+ (HAS_RELOC | EXEC_P | /* Object flags. */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ '_', /* Leading symbol underscore. */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+
+ {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &tic4x_coff1_beh_vec,
+
+ COFF_SWAP_TABLE
+};
+
+/* TI COFF v2, TI SPARC tools output (big-endian headers). */
+const bfd_target tic4x_coff2_beh_vec =
+{
+ "coff2-beh-c4x", /* Name. */
+ bfd_target_coff_flavour,
+ BFD_ENDIAN_LITTLE, /* Data byte order is little. */
+ BFD_ENDIAN_BIG, /* Header byte order is big. */
+
+ (HAS_RELOC | EXEC_P | /* Object flags. */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
+ '_', /* Leading symbol underscore. */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+
+ {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &tic4x_coff2_vec,
+
+ COFF_SWAP_TABLE
+};
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index d5cce39b968..61553bea81a 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1014,7 +1014,7 @@ xcoff64_write_object_contents (abfd)
internal_a.o_cputype = 4;
break;
case bfd_arch_powerpc:
- if (bfd_get_mach (abfd) == 0)
+ if (bfd_get_mach (abfd) == bfd_mach_ppc)
internal_a.o_cputype = 3;
else
internal_a.o_cputype = 1;
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index bb777aaaf18..e47b4d0050f 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1824,6 +1824,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
enum bfd_architecture arch;
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
+ /* Zero selects the default machine for an arch. */
machine = 0;
switch (internal_f->f_magic)
{
@@ -1831,13 +1832,11 @@ coff_set_arch_mach_hook (abfd, filehdr)
case OR32_MAGIC_BIG:
case OR32_MAGIC_LITTLE:
arch = bfd_arch_or32;
- machine = 0;
break;
#endif
#ifdef PPCMAGIC
case PPCMAGIC:
arch = bfd_arch_powerpc;
- machine = 0; /* what does this mean? (krk) */
break;
#endif
#ifdef I386MAGIC
@@ -1846,20 +1845,17 @@ coff_set_arch_mach_hook (abfd, filehdr)
case I386AIXMAGIC: /* Danbury PS/2 AIX C Compiler */
case LYNXCOFFMAGIC: /* shadows the m68k Lynx number below, sigh */
arch = bfd_arch_i386;
- machine = 0;
break;
#endif
#ifdef IA64MAGIC
case IA64MAGIC:
arch = bfd_arch_ia64;
- machine = 0;
break;
#endif
#ifdef A29K_MAGIC_BIG
case A29K_MAGIC_BIG:
case A29K_MAGIC_LITTLE:
arch = bfd_arch_a29k;
- machine = 0;
break;
#endif
#ifdef ARMMAGIC
@@ -2044,7 +2040,6 @@ coff_set_arch_mach_hook (abfd, filehdr)
#ifdef WE32KMAGIC
case WE32KMAGIC:
arch = bfd_arch_we32k;
- machine = 0;
break;
#endif
@@ -2082,21 +2077,18 @@ coff_set_arch_mach_hook (abfd, filehdr)
case SH_ARCH_MAGIC_WINCE:
#endif
arch = bfd_arch_sh;
- machine = 0;
break;
#endif
#ifdef MIPS_ARCH_MAGIC_WINCE
case MIPS_ARCH_MAGIC_WINCE:
arch = bfd_arch_mips;
- machine = 0;
break;
#endif
#ifdef H8500MAGIC
case H8500MAGIC:
arch = bfd_arch_h8500;
- machine = 0;
break;
#endif
@@ -2106,7 +2098,6 @@ coff_set_arch_mach_hook (abfd, filehdr)
case LYNXCOFFMAGIC:
#endif
arch = bfd_arch_sparc;
- machine = 0;
break;
#endif
@@ -2158,6 +2149,13 @@ coff_set_arch_mach_hook (abfd, filehdr)
arch = bfd_arch_mcore;
break;
#endif
+
+#ifdef W65MAGIC
+ case W65MAGIC:
+ arch = bfd_arch_w65;
+ break;
+#endif
+
default: /* Unreadable input file type */
arch = bfd_arch_obscure;
break;
@@ -2455,7 +2453,8 @@ coff_write_relocs (abfd, first_undef)
#ifdef SECTION_RELATIVE_ABSOLUTE_SYMBOL_P
if (SECTION_RELATIVE_ABSOLUTE_SYMBOL_P (q,s))
#else
- if (q->sym_ptr_ptr == bfd_abs_section_ptr->symbol_ptr_ptr)
+ if ((*q->sym_ptr_ptr)->section == bfd_abs_section_ptr
+ && ((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0)
#endif
/* This is a relocation relative to the absolute symbol. */
n.r_symndx = -1;
@@ -4109,7 +4108,7 @@ coff_write_object_contents (abfd)
internal_a.o_cputype = 4;
break;
case bfd_arch_powerpc:
- if (bfd_get_mach (abfd) == 0)
+ if (bfd_get_mach (abfd) == bfd_mach_ppc)
internal_a.o_cputype = 3;
else
internal_a.o_cputype = 1;
diff --git a/bfd/coffswap.h b/bfd/coffswap.h
index cd147c5bd5f..5f23ecc07b3 100644
--- a/bfd/coffswap.h
+++ b/bfd/coffswap.h
@@ -1,24 +1,24 @@
/* Generic COFF swapping routines, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
- 2001
+ 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This file contains routines used to swap COFF data. It is a header
file because the details of swapping depend on the details of the
@@ -381,7 +381,12 @@ coff_swap_sym_out (abfd, inp, extp)
{
struct internal_syment *in = (struct internal_syment *) inp;
SYMENT *ext =(SYMENT *) extp;
- if(in->_n._n_name[0] == 0)
+
+#ifdef COFF_ADJUST_SYM_OUT_PRE
+ COFF_ADJUST_SYM_OUT_PRE (abfd, inp, extp);
+#endif
+
+ if (in->_n._n_name[0] == 0)
{
H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
@@ -391,11 +396,13 @@ coff_swap_sym_out (abfd, inp, extp)
#if SYMNMLEN != E_SYMNMLEN
-> Error, we need to cope with truncating or extending SYMNMLEN!;
#else
- memcpy(ext->e.e_name, in->_n._n_name, SYMNMLEN);
+ memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
#endif
}
+
H_PUT_32 (abfd, in->n_value, ext->e_value);
H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
+
if (sizeof (ext->e_type) == 2)
{
H_PUT_16 (abfd, in->n_type, ext->e_type);
@@ -404,11 +411,14 @@ coff_swap_sym_out (abfd, inp, extp)
{
H_PUT_32 (abfd, in->n_type, ext->e_type);
}
+
H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
+
#ifdef COFF_ADJUST_SYM_OUT_POST
COFF_ADJUST_SYM_OUT_POST (abfd, inp, extp);
#endif
+
return SYMESZ;
}
@@ -428,6 +438,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
#ifdef COFF_ADJUST_AUX_IN_PRE
COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, class, indx, numaux, in1);
#endif
+
switch (class)
{
case C_FILE:
@@ -448,9 +459,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
numaux * sizeof (AUXENT));
}
else
- {
- memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
- }
+ memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
#endif
}
goto end;
@@ -502,7 +511,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
}
- if (ISFCN(type))
+ if (ISFCN (type))
{
in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
}
@@ -535,7 +544,9 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
#ifdef COFF_ADJUST_AUX_OUT_PRE
COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, class, indx, numaux, extp);
#endif
- memset((PTR)ext, 0, AUXESZ);
+
+ memset ((PTR)ext, 0, AUXESZ);
+
switch (class)
{
case C_FILE:
@@ -681,29 +692,29 @@ coff_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
#else
aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
#endif
- aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry);
- aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext);
- aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata);
- aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
+ aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry);
+ aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext);
+ aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata);
+ aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
- aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss);
+ aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss);
aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
- aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype);
- aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype);
+ aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype);
+ aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype);
#ifdef XCOFF64
aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
- aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
+ aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
#else
aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
- aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
+ aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
#endif
#endif
#ifdef MIPSECOFF
- aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start);
- aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value);
- aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask);
+ aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start);
+ aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value);
+ aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask);
aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
@@ -712,9 +723,9 @@ coff_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
#ifdef ALPHAECOFF
aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
- aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value);
- aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask);
- aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask);
+ aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value);
+ aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask);
+ aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask);
#endif
}
@@ -807,7 +818,8 @@ coff_swap_scnhdr_in (abfd, ext, in)
#ifdef COFF_ADJUST_SCNHDR_IN_PRE
COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
#endif
- memcpy(scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
+ memcpy (scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
+
scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
@@ -866,6 +878,7 @@ coff_swap_scnhdr_out (abfd, in, out)
buf, scnhdr_int->s_nlnno);
PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
}
+
if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
else
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 0db37481442..55e2afcf86e 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -34,6 +34,7 @@ case "${targ_cpu}" in
alpha*) targ_archs=bfd_alpha_arch ;;
arm*) targ_archs=bfd_arm_arch ;;
c30*) targ_archs=bfd_tic30_arch ;;
+c4x*) targ_archs=bfd_tic4x_arch ;;
c54x*) targ_archs=bfd_tic54x_arch ;;
dlx*) targ_archs=bfd_dlx_arch ;;
hppa*) targ_archs=bfd_hppa_arch ;;
@@ -256,6 +257,12 @@ case "${targ}" in
targ_defvec=tic30_coff_vec
;;
+ c4x-*-*coff* | tic4x-*-*coff*)
+ targ_defvec=tic4x_coff1_vec
+ targ_selvecs="tic4x_coff1_beh_vec tic4x_coff2_vec tic4x_coff2_beh_vec tic4x_coff0_vec tic4x_coff0_beh_vec"
+ targ_underscore=yes
+ ;;
+
c54x*-*-*coff* | tic54x-*-*coff*)
targ_defvec=tic54x_coff1_vec
targ_selvecs="tic54x_coff1_beh_vec tic54x_coff2_vec tic54x_coff2_beh_vec tic54x_coff0_vec tic54x_coff0_beh_vec"
diff --git a/bfd/configure b/bfd/configure
index cd03dd3cae4..d30361eed25 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -6240,6 +6240,12 @@ do
sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
+ tic4x_coff0_vec) tb="$tb coff-tic4x.lo" ;;
+ tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo" ;;
+ tic4x_coff1_vec) tb="$tb coff-tic4x.lo" ;;
+ tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo" ;;
+ tic4x_coff2_vec) tb="$tb coff-tic4x.lo" ;;
+ tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo" ;;
tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;;
@@ -6332,10 +6338,10 @@ case ${host64}-${target64}-${want64} in
if test -n "$GCC" ; then
bad_64bit_gcc=no;
echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6336: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6342: checking for gcc version with buggy 64-bit support" >&5
# Add more tests for gcc versions with non-working 64-bit support here.
cat > conftest.$ac_ext <<EOF
-#line 6339 "configure"
+#line 6345 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
@@ -6380,17 +6386,17 @@ for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6384: checking for $ac_hdr" >&5
+echo "configure:6390: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6389 "configure"
+#line 6395 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6419,12 +6425,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6423: checking for $ac_func" >&5
+echo "configure:6429: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6428 "configure"
+#line 6434 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6447,7 +6453,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6472,7 +6478,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6476: checking for working mmap" >&5
+echo "configure:6482: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6480,7 +6486,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6484 "configure"
+#line 6490 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6633,7 +6639,7 @@ main()
}
EOF
-if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -6658,12 +6664,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6662: checking for $ac_func" >&5
+echo "configure:6668: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6667 "configure"
+#line 6673 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6686,7 +6692,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
diff --git a/bfd/configure.in b/bfd/configure.in
index 2f59095714d..1facc24856f 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -741,6 +741,12 @@ do
sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
+ tic4x_coff0_vec) tb="$tb coff-tic4x.lo" ;;
+ tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo" ;;
+ tic4x_coff1_vec) tb="$tb coff-tic4x.lo" ;;
+ tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo" ;;
+ tic4x_coff2_vec) tb="$tb coff-tic4x.lo" ;;
+ tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo" ;;
tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;;
diff --git a/bfd/cpu-avr.c b/bfd/cpu-avr.c
index 1ca48e744ee..b623790cac1 100644
--- a/bfd/cpu-avr.c
+++ b/bfd/cpu-avr.c
@@ -76,8 +76,8 @@ compatible (a,b)
return NULL;
/* Special case for ATmega[16]03 (avr:3) and ATmega83 (avr:4). */
- if ((a->mach == 3 && b->mach == 4)
- || (a->mach == 4 && b->mach == 3))
+ if ((a->mach == bfd_mach_avr3 && b->mach == bfd_mach_avr4)
+ || (a->mach == bfd_mach_avr4 && b->mach == bfd_mach_avr3))
return NULL;
/* So far all newer AVR architecture cores are supersets of previous
diff --git a/bfd/cpu-pj.c b/bfd/cpu-pj.c
index aeb7e589ccc..8e58c89fbd7 100644
--- a/bfd/cpu-pj.c
+++ b/bfd/cpu-pj.c
@@ -22,52 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
-static boolean scan_mach
- PARAMS ((const struct bfd_arch_info *, const char *));
-
-static boolean
-scan_mach (info, string)
- const struct bfd_arch_info *info;
- const char *string;
-{
- if (strcasecmp (info->printable_name, string) == 0)
- return true;
- return false;
-}
-
-#if 0
-/* This routine is provided two arch_infos and returns whether
- they'd be compatible */
-
-static const bfd_arch_info_type *
-compatible (a,b)
- const bfd_arch_info_type *a;
- const bfd_arch_info_type *b;
-{
- if (a->arch != b->arch || a->mach != b->mach)
- return NULL;
- return a;
-}
-#endif
-
-static const bfd_arch_info_type arch_info_struct[] =
-{
- {
- 32, /* 32 bits in a word */
- 32, /* 32 bits in an address */
- 8, /* 8 bits in a byte */
- bfd_arch_pj,
- 0,
- "pj", /* arch_name */
- "pj", /* printable name */
- 1,
- false, /* not the default */
- bfd_default_compatible,
- scan_mach,
- 0,
- },
-};
-
const bfd_arch_info_type bfd_pj_arch =
{
32, /* 32 bits in a word */
@@ -80,6 +34,6 @@ const bfd_arch_info_type bfd_pj_arch =
1,
true, /* the default machine */
bfd_default_compatible,
- scan_mach,
- &arch_info_struct [0]
+ bfd_default_scan,
+ 0
};
diff --git a/bfd/cpu-powerpc.c b/bfd/cpu-powerpc.c
index b282c6031b9..017442571c8 100644
--- a/bfd/cpu-powerpc.c
+++ b/bfd/cpu-powerpc.c
@@ -41,7 +41,7 @@ powerpc_compatible (a,b)
case bfd_arch_powerpc:
return bfd_default_compatible (a, b);
case bfd_arch_rs6000:
- if (a->mach == 0)
+ if (a->mach == bfd_mach_ppc)
return a;
return NULL;
}
diff --git a/bfd/cpu-rs6000.c b/bfd/cpu-rs6000.c
index 89b92308c89..777611e603a 100644
--- a/bfd/cpu-rs6000.c
+++ b/bfd/cpu-rs6000.c
@@ -46,7 +46,7 @@ rs6000_compatible (a,b)
case bfd_arch_rs6000:
return bfd_default_compatible (a, b);
case bfd_arch_powerpc:
- if (b->mach == 0)
+ if (b->mach == bfd_mach_rs6k)
return b;
return NULL;
}
diff --git a/bfd/cpu-tic4x.c b/bfd/cpu-tic4x.c
new file mode 100644
index 00000000000..9d90fc62bd7
--- /dev/null
+++ b/bfd/cpu-tic4x.c
@@ -0,0 +1,81 @@
+/* bfd back-end for TMS320C[34]x support
+ Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+
+ Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+static boolean
+c4x_scan (info, string)
+ const struct bfd_arch_info *info;
+ const char *string;
+{
+ /* Allow strings of form [ti][Cc][34][0-9], let's not be too picky
+ about strange numbered machines in C3x or C4x series. */
+ if (string[0] == 't' && string[1] == 'i')
+ string += 2;
+ if (*string == 'C' || *string == 'c')
+ string++;
+ if (string[1] < '0' && string[1] > '9')
+ return false;
+
+ if (*string == '3')
+ return (info->mach == bfd_mach_c3x);
+ else if (*string == '4')
+ return info->mach == bfd_mach_c4x;
+
+ return false;
+}
+
+
+const bfd_arch_info_type bfd_tic3x_arch =
+ {
+ 32, /* 32 bits in a word. */
+ 32, /* 32 bits in an address. */
+ 32, /* 32 bits in a byte. */
+ bfd_arch_tic4x,
+ bfd_mach_c3x, /* Machine number. */
+ "c3x", /* Architecture name. */
+ "tms320c3x", /* Printable name. */
+ 0, /* Alignment power. */
+ false, /* Not the default architecture. */
+ bfd_default_compatible,
+ c4x_scan,
+ 0
+ };
+
+const bfd_arch_info_type bfd_tic4x_arch =
+ {
+ 32, /* 32 bits in a word. */
+ 32, /* 32 bits in an address. */
+ 32, /* 32 bits in a byte. */
+ bfd_arch_tic4x,
+ bfd_mach_c4x, /* Machine number. */
+ "c4x", /* Architecture name. */
+ "tms320c4x", /* Printable name. */
+ 0, /* Alignment power. */
+ true, /* The default architecture. */
+ bfd_default_compatible,
+ c4x_scan,
+ &bfd_tic3x_arch,
+ };
+
+
diff --git a/bfd/cpu-v850.c b/bfd/cpu-v850.c
index 88363620266..38333c8c153 100644
--- a/bfd/cpu-v850.c
+++ b/bfd/cpu-v850.c
@@ -1,96 +1,36 @@
/* BFD support for the NEC V850 processor
- Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "safe-ctype.h"
-static boolean scan PARAMS ((const struct bfd_arch_info *, const char *));
-
-static boolean
-scan (info, string)
- const struct bfd_arch_info * info;
- const char * string;
-{
- const char *ptr_src;
- const char *ptr_tst;
- unsigned long number;
- enum bfd_architecture arch;
-
- /* First test for an exact match. */
- if (strcasecmp (string, info->printable_name) == 0)
- return true;
-
- /* See how much of the supplied string matches with the
- architecture, eg the string m68k:68020 would match the m68k entry
- up to the :, then we get left with the machine number. */
- for (ptr_src = string, ptr_tst = info->arch_name;
- *ptr_src && *ptr_tst;
- ptr_src++, ptr_tst++)
- if (*ptr_src != *ptr_tst)
- break;
-
- /* Chewed up as much of the architecture as will match;
- if there is a colon present skip it. */
- if (*ptr_src == ':')
- ptr_src ++;
-
- if (*ptr_src == 0)
- /* Nothing more, then only keep this one if it is
- the default machine for this architecture. */
- return info->the_default;
-
- number = 0;
- while (ISDIGIT (*ptr_src))
- {
- number = number * 10 + * ptr_src - '0';
- ptr_src ++;
- }
-
- switch (number)
- {
- case bfd_mach_v850e: arch = bfd_arch_v850; break;
- case bfd_mach_v850ea: arch = bfd_arch_v850; break;
- default:
- return false;
- }
-
- if (arch != info->arch)
- return false;
-
- if (number != info->mach)
- return false;
-
- return true;
-}
-
#define N(number, print, default, next) \
{ 32, 32, 8, bfd_arch_v850, number, "v850", print, 2, default, \
- bfd_default_compatible, scan, next }
+ bfd_default_compatible, bfd_default_scan, next }
#define NEXT NULL
static const bfd_arch_info_type arch_info_struct[] =
{
- N (bfd_mach_v850e, "v850e", false, & arch_info_struct[1]),
- N (bfd_mach_v850ea, "v850ea", false, NULL)
+ N (bfd_mach_v850e, "v850e", false, NULL)
};
#undef NEXT
diff --git a/bfd/cpu-z8k.c b/bfd/cpu-z8k.c
index 0afdfc7560a..b75eaeafd54 100644
--- a/bfd/cpu-z8k.c
+++ b/bfd/cpu-z8k.c
@@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
-static boolean scan_mach
- PARAMS ((const struct bfd_arch_info *, const char *));
static const bfd_arch_info_type *compatible
PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
@@ -153,22 +151,6 @@ local_bfd_reloc_type_lookup (arch, code)
}
#endif
-static boolean
-scan_mach (info, string)
- const struct bfd_arch_info *info;
- const char *string;
-{
- if (strcmp (string, "z8001") == 0 || strcmp (string, "z8k") == 0)
- {
- return bfd_mach_z8001 == info->mach;
- }
- if (strcmp (string, "z8002") == 0)
- {
- return bfd_mach_z8002 == info->mach;
- }
- return false;
-}
-
/* This routine is provided two arch_infos and returns whether
they'd be compatible */
@@ -184,10 +166,12 @@ compatible (a, b)
static const bfd_arch_info_type arch_info_struct[] =
{
- {32, 32, 8, bfd_arch_z8k, bfd_mach_z8001, "z8k", "z8001", 1, false, compatible, scan_mach, 0,},
+ { 32, 16, 8, bfd_arch_z8k, bfd_mach_z8002, "z8k", "z8002", 1, false,
+ compatible, bfd_default_scan, 0 }
};
const bfd_arch_info_type bfd_z8k_arch =
{
- 32, 16, 8, bfd_arch_z8k, bfd_mach_z8002, "z8k", "z8002", 1, true, compatible, scan_mach, &arch_info_struct[0],
+ 32, 32, 8, bfd_arch_z8k, bfd_mach_z8001, "z8k", "z8001", 1, true,
+ compatible, bfd_default_scan, &arch_info_struct[0]
};
diff --git a/bfd/doc/ChangeLog b/bfd/doc/ChangeLog
index 39c69c938b4..f20113c7f70 100644
--- a/bfd/doc/ChangeLog
+++ b/bfd/doc/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-29 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * chew.c (paramstuff, outputdots, perform, bang and usage): Remove
+ void from function definitions.
+
2002-08-13 Alan Modra <amodra@bigpond.net.au>
* header.sed: Strip tabs.
diff --git a/bfd/doc/chew.c b/bfd/doc/chew.c
index dc6f8110829..bdf76e46e19 100644
--- a/bfd/doc/chew.c
+++ b/bfd/doc/chew.c
@@ -485,7 +485,7 @@ print_stack_level ()
*/
static void
-paramstuff (void)
+paramstuff ()
{
unsigned int openp;
unsigned int fname;
@@ -626,7 +626,7 @@ manglecomments ()
/* Mod tos so that only lines with leading dots remain */
static void
-outputdots (void)
+outputdots ()
{
unsigned int idx = 0;
string_type out;
@@ -1261,7 +1261,7 @@ lookup_word (word)
}
static void
-perform (void)
+perform ()
{
tos = stack;
@@ -1412,7 +1412,7 @@ compile (string)
}
static void
-bang (void)
+bang ()
{
*(long *) ((isp[0])) = isp[-1];
isp -= 2;
@@ -1487,7 +1487,7 @@ read_in (str, file)
}
static void
-usage (void)
+usage ()
{
fprintf (stderr, "usage: -[d|i|g] <file >file\n");
exit (33);
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 82baeeb78c0..f37ea567841 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -205,21 +205,21 @@ _bfd_ecoff_set_arch_mach_hook (abfd, filehdr)
case MIPS_MAGIC_LITTLE:
case MIPS_MAGIC_BIG:
arch = bfd_arch_mips;
- mach = 3000;
+ mach = bfd_mach_mips3000;
break;
case MIPS_MAGIC_LITTLE2:
case MIPS_MAGIC_BIG2:
/* MIPS ISA level 2: the r6000. */
arch = bfd_arch_mips;
- mach = 6000;
+ mach = bfd_mach_mips6000;
break;
case MIPS_MAGIC_LITTLE3:
case MIPS_MAGIC_BIG3:
/* MIPS ISA level 3: the r4000. */
arch = bfd_arch_mips;
- mach = 4000;
+ mach = bfd_mach_mips4000;
break;
case ALPHA_MAGIC:
@@ -252,17 +252,17 @@ ecoff_get_magic (abfd)
{
default:
case 0:
- case 3000:
+ case bfd_mach_mips3000:
big = MIPS_MAGIC_BIG;
little = MIPS_MAGIC_LITTLE;
break;
- case 6000:
+ case bfd_mach_mips6000:
big = MIPS_MAGIC_BIG2;
little = MIPS_MAGIC_LITTLE2;
break;
- case 4000:
+ case bfd_mach_mips4000:
big = MIPS_MAGIC_BIG3;
little = MIPS_MAGIC_LITTLE3;
break;
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index bfc1aa66a6a..5cd94347c31 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -3546,6 +3546,31 @@ elf32_arm_finish_dynamic_sections (output_bfd, info)
}
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
+
+ /* Set the bottom bit of DT_INIT/FINI if the
+ corresponding function is Thumb. */
+ case DT_INIT:
+ name = info->init_function;
+ goto get_sym;
+ case DT_FINI:
+ name = info->fini_function;
+ get_sym:
+ /* If it wasn't set by elf_bfd_final_link
+ then there is nothing to ajdust. */
+ if (dyn.d_un.d_val != 0)
+ {
+ struct elf_link_hash_entry * eh;
+
+ eh = elf_link_hash_lookup (elf_hash_table (info), name,
+ false, false, true);
+ if (eh != (struct elf_link_hash_entry *) NULL
+ && ELF_ST_TYPE (eh->type) == STT_ARM_TFUNC)
+ {
+ dyn.d_un.d_val |= 1;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ }
+ }
+ break;
}
}
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 07890c6a7cf..57ed958b32f 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -2,24 +2,24 @@
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* XXX FIXME: This code is littered with 32bit int, 16bit short, 8bit char
- dependencies. As is the gas & simulator code or the v850. */
+ dependencies. As is the gas & simulator code for the v850. */
#include "bfd.h"
#include "sysdep.h"
@@ -87,6 +87,12 @@ static asection * v850_elf_gc_mark_hook
PARAMS ((asection *, struct bfd_link_info *,
Elf_Internal_Rela *, struct elf_link_hash_entry *,
Elf_Internal_Sym *));
+static bfd_reloc_status_type v850_elf_ignore_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static boolean v850_elf_relax_delete_bytes
+ PARAMS ((bfd *, asection *, bfd_vma, bfd_vma, int));
+static boolean v850_elf_relax_section
+ PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
/* Note: It is REQUIRED that the 'type' value of each entry
in this array match the index of the entry in the array. */
@@ -467,6 +473,51 @@ static reloc_howto_type v850_elf_howto_table[] =
0, /* dst_mask */
false), /* pcrel_offset */
+ /* Indicates a .longcall pseudo-op. The compiler will generate a .longcall
+ pseudo-op when it finds a function call which can be relaxed. */
+ HOWTO (R_V850_LONGCALL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ v850_elf_ignore_reloc, /* special_function */
+ "R_V850_LONGCALL", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* Indicates a .longjump pseudo-op. The compiler will generate a
+ .longjump pseudo-op when it finds a branch which can be relaxed. */
+ HOWTO (R_V850_LONGJUMP, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ v850_elf_ignore_reloc, /* special_function */
+ "R_V850_LONGJUMP", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ true), /* pcrel_offset */
+
+ HOWTO (R_V850_ALIGN, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ v850_elf_ignore_reloc, /* special_function */
+ "R_V850_ALIGN", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ true), /* pcrel_offset */
};
/* Map BFD reloc types to V850 ELF reloc types. */
@@ -481,31 +532,34 @@ struct v850_elf_reloc_map
static const struct v850_elf_reloc_map v850_elf_reloc_map[] =
{
- { BFD_RELOC_NONE, R_V850_NONE },
- { BFD_RELOC_V850_9_PCREL, R_V850_9_PCREL },
- { BFD_RELOC_V850_22_PCREL, R_V850_22_PCREL },
- { BFD_RELOC_HI16_S, R_V850_HI16_S },
- { BFD_RELOC_HI16, R_V850_HI16 },
- { BFD_RELOC_LO16, R_V850_LO16 },
- { BFD_RELOC_32, R_V850_32 },
- { BFD_RELOC_16, R_V850_16 },
- { BFD_RELOC_8, R_V850_8 },
- { BFD_RELOC_V850_SDA_16_16_OFFSET, R_V850_SDA_16_16_OFFSET },
- { BFD_RELOC_V850_SDA_15_16_OFFSET, R_V850_SDA_15_16_OFFSET },
- { BFD_RELOC_V850_ZDA_16_16_OFFSET, R_V850_ZDA_16_16_OFFSET },
- { BFD_RELOC_V850_ZDA_15_16_OFFSET, R_V850_ZDA_15_16_OFFSET },
- { BFD_RELOC_V850_TDA_6_8_OFFSET, R_V850_TDA_6_8_OFFSET },
- { BFD_RELOC_V850_TDA_7_8_OFFSET, R_V850_TDA_7_8_OFFSET },
- { BFD_RELOC_V850_TDA_7_7_OFFSET, R_V850_TDA_7_7_OFFSET },
- { BFD_RELOC_V850_TDA_16_16_OFFSET, R_V850_TDA_16_16_OFFSET },
+ { BFD_RELOC_NONE, R_V850_NONE },
+ { BFD_RELOC_V850_9_PCREL, R_V850_9_PCREL },
+ { BFD_RELOC_V850_22_PCREL, R_V850_22_PCREL },
+ { BFD_RELOC_HI16_S, R_V850_HI16_S },
+ { BFD_RELOC_HI16, R_V850_HI16 },
+ { BFD_RELOC_LO16, R_V850_LO16 },
+ { BFD_RELOC_32, R_V850_32 },
+ { BFD_RELOC_16, R_V850_16 },
+ { BFD_RELOC_8, R_V850_8 },
+ { BFD_RELOC_V850_SDA_16_16_OFFSET, R_V850_SDA_16_16_OFFSET },
+ { BFD_RELOC_V850_SDA_15_16_OFFSET, R_V850_SDA_15_16_OFFSET },
+ { BFD_RELOC_V850_ZDA_16_16_OFFSET, R_V850_ZDA_16_16_OFFSET },
+ { BFD_RELOC_V850_ZDA_15_16_OFFSET, R_V850_ZDA_15_16_OFFSET },
+ { BFD_RELOC_V850_TDA_6_8_OFFSET, R_V850_TDA_6_8_OFFSET },
+ { BFD_RELOC_V850_TDA_7_8_OFFSET, R_V850_TDA_7_8_OFFSET },
+ { BFD_RELOC_V850_TDA_7_7_OFFSET, R_V850_TDA_7_7_OFFSET },
+ { BFD_RELOC_V850_TDA_16_16_OFFSET, R_V850_TDA_16_16_OFFSET },
{ BFD_RELOC_V850_TDA_4_5_OFFSET, R_V850_TDA_4_5_OFFSET },
{ BFD_RELOC_V850_TDA_4_4_OFFSET, R_V850_TDA_4_4_OFFSET },
{ BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET, R_V850_SDA_16_16_SPLIT_OFFSET },
{ BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET, R_V850_ZDA_16_16_SPLIT_OFFSET },
{ BFD_RELOC_V850_CALLT_6_7_OFFSET, R_V850_CALLT_6_7_OFFSET },
{ BFD_RELOC_V850_CALLT_16_16_OFFSET, R_V850_CALLT_16_16_OFFSET },
- { BFD_RELOC_VTABLE_INHERIT, R_V850_GNU_VTINHERIT },
- { BFD_RELOC_VTABLE_ENTRY, R_V850_GNU_VTENTRY },
+ { BFD_RELOC_VTABLE_INHERIT, R_V850_GNU_VTINHERIT },
+ { BFD_RELOC_VTABLE_ENTRY, R_V850_GNU_VTENTRY },
+ { BFD_RELOC_V850_LONGCALL, R_V850_LONGCALL },
+ { BFD_RELOC_V850_LONGJUMP, R_V850_LONGJUMP },
+ { BFD_RELOC_V850_ALIGN, R_V850_ALIGN },
};
@@ -1277,10 +1331,6 @@ v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err)
reloc->address += isection->output_offset;
return bfd_reloc_ok;
}
-#if 0
- else if (obfd != NULL)
- return bfd_reloc_continue;
-#endif
/* Catch relocs involving undefined symbols. */
if (bfd_is_und_section (symbol->section)
@@ -1297,6 +1347,9 @@ v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err)
/* Work out which section the relocation is targetted at and the
initial relocation command value. */
+ if (reloc->howto->pc_relative == true)
+ return bfd_reloc_ok;
+
/* Get symbol value. (Common symbols are special.) */
if (bfd_is_com_section (symbol->section))
relocation = 0;
@@ -1335,6 +1388,26 @@ v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err)
reloc->addend = relocation;
return bfd_reloc_ok;
}
+
+/* This function is used for relocs which are only used
+ for relaxing, which the linker should otherwise ignore. */
+
+static bfd_reloc_status_type
+v850_elf_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd * abfd ATTRIBUTE_UNUSED;
+ arelent * reloc_entry;
+ asymbol * symbol ATTRIBUTE_UNUSED;
+ PTR data ATTRIBUTE_UNUSED;
+ asection * input_section;
+ bfd * output_bfd;
+ char ** error_message ATTRIBUTE_UNUSED;
+{
+ if (output_bfd != NULL)
+ reloc_entry->address += input_section->output_offset;
+
+ return bfd_reloc_ok;
+}
static boolean
v850_elf_is_local_label_name (abfd, name)
@@ -1345,12 +1418,17 @@ v850_elf_is_local_label_name (abfd, name)
|| (name[0] == '_' && name[1] == '.' && name[2] == 'L' && name[3] == '_'));
}
+/* We overload some of the bfd_reloc error codes for own purposes. */
+#define bfd_reloc_gp_not_found bfd_reloc_other
+#define bfd_reloc_ep_not_found bfd_reloc_continue
+#define bfd_reloc_ctbp_not_found (bfd_reloc_dangerous + 1)
+
/* Perform a relocation as part of a final link. */
static bfd_reloc_status_type
v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
- input_section, contents, offset, value,
- addend, info, sym_sec, is_local)
+ input_section, contents, offset, value,
+ addend, info, sym_sec, is_local)
reloc_howto_type * howto;
bfd * input_bfd;
bfd * output_bfd ATTRIBUTE_UNUSED;
@@ -1419,7 +1497,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
h = bfd_link_hash_lookup (info->hash, "__gp", false, false, true);
if (h == (struct bfd_link_hash_entry *) NULL
|| h->type != bfd_link_hash_defined)
- return bfd_reloc_other;
+ return bfd_reloc_gp_not_found;
gp = (h->u.def.value
+ h->u.def.section->output_section->vma
@@ -1444,8 +1522,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
h = bfd_link_hash_lookup (info->hash, "__ep", false, false, true);
if (h == (struct bfd_link_hash_entry *) NULL
|| h->type != bfd_link_hash_defined)
- /* Actually this indicates that __ep could not be found. */
- return bfd_reloc_continue;
+ return bfd_reloc_ep_not_found;
ep = (h->u.def.value
+ h->u.def.section->output_section->vma
@@ -1464,8 +1541,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
h = bfd_link_hash_lookup (info->hash, "__ctbp", false, false, true);
if (h == (struct bfd_link_hash_entry *) NULL
|| h->type != bfd_link_hash_defined)
- /* Actually this indicates that __ctbp could not be found. */
- return bfd_reloc_dangerous + 1;
+ return bfd_reloc_ctbp_not_found;
ctbp = (h->u.def.value
+ h->u.def.section->output_section->vma
@@ -1486,7 +1562,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
h = bfd_link_hash_lookup (info->hash, "__ctbp", false, false, true);
if (h == (struct bfd_link_hash_entry *) NULL
|| h->type != bfd_link_hash_defined)
- return (bfd_reloc_dangerous + 1);
+ return bfd_reloc_ctbp_not_found;
ctbp = (h->u.def.value
+ h->u.def.section->output_section->vma
@@ -1500,6 +1576,9 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
case R_V850_NONE:
case R_V850_GNU_VTINHERIT:
case R_V850_GNU_VTENTRY:
+ case R_V850_LONGCALL:
+ case R_V850_LONGJUMP:
+ case R_V850_ALIGN:
return bfd_reloc_ok;
default:
@@ -1682,15 +1761,15 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
msg = _("internal error: dangerous relocation");
goto common_error;
- case bfd_reloc_other:
+ case bfd_reloc_gp_not_found:
msg = _("could not locate special linker symbol __gp");
goto common_error;
- case bfd_reloc_continue:
+ case bfd_reloc_ep_not_found:
msg = _("could not locate special linker symbol __ep");
goto common_error;
- case (bfd_reloc_dangerous + 1):
+ case bfd_reloc_ctbp_not_found:
msg = _("could not locate special linker symbol __ctbp");
goto common_error;
@@ -1768,9 +1847,12 @@ v850_elf_object_p (abfd)
switch (elf_elfheader (abfd)->e_flags & EF_V850_ARCH)
{
default:
- case E_V850_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_v850, 0); break;
- case E_V850E_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_v850, bfd_mach_v850e); break;
- case E_V850EA_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_v850, bfd_mach_v850ea); break;
+ case E_V850_ARCH:
+ bfd_default_set_arch_mach (abfd, bfd_arch_v850, bfd_mach_v850);
+ break;
+ case E_V850E_ARCH:
+ bfd_default_set_arch_mach (abfd, bfd_arch_v850, bfd_mach_v850e);
+ break;
}
return true;
}
@@ -1786,10 +1868,9 @@ v850_elf_final_write_processing (abfd, linker)
switch (bfd_get_mach (abfd))
{
- default:
- case 0: val = E_V850_ARCH; break;
- case bfd_mach_v850e: val = E_V850E_ARCH; break;
- case bfd_mach_v850ea: val = E_V850EA_ARCH; break;
+ default:
+ case bfd_mach_v850: val = E_V850_ARCH; break;
+ case bfd_mach_v850e: val = E_V850E_ARCH; break;
}
elf_elfheader (abfd)->e_flags &=~ EF_V850_ARCH;
@@ -1882,7 +1963,6 @@ v850_elf_print_private_bfd_data (abfd, ptr)
default:
case E_V850_ARCH: fprintf (file, _("v850 architecture")); break;
case E_V850E_ARCH: fprintf (file, _("v850e architecture")); break;
- case E_V850EA_ARCH: fprintf (file, _("v850ea architecture")); break;
}
fputc ('\n', file);
@@ -2166,6 +2246,875 @@ v850_elf_fake_sections (abfd, hdr, sec)
return true;
}
+
+/* Delete some bytes from a section while relaxing. */
+
+static boolean
+v850_elf_relax_delete_bytes (abfd, sec, addr, toaddr, count)
+ bfd * abfd;
+ asection * sec;
+ bfd_vma addr;
+ bfd_vma toaddr;
+ int count;
+{
+ Elf_Internal_Shdr * symtab_hdr;
+ Elf32_External_Sym * extsyms;
+ Elf32_External_Sym * esym;
+ Elf32_External_Sym * esymend;
+ int index;
+ unsigned int sec_shndx;
+ bfd_byte * contents;
+ Elf_Internal_Rela * irel;
+ Elf_Internal_Rela * irelend;
+ struct elf_link_hash_entry * sym_hash;
+ Elf_Internal_Shdr * shndx_hdr;
+ Elf_External_Sym_Shndx * shndx;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
+
+ sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
+
+ contents = elf_section_data (sec)->this_hdr.contents;
+
+ /* The deletion must stop at the next ALIGN reloc for an alignment
+ power larger than the number of bytes we are deleting. */
+
+ /* Actually delete the bytes. */
+#if (DEBUG_RELAX & 2)
+ fprintf (stderr, "relax_delete: contents: sec: %s %p .. %p %x\n",
+ sec->name, addr, toaddr, count );
+#endif
+ memmove (contents + addr, contents + addr + count,
+ toaddr - addr - count);
+ memset (contents + toaddr-count, 0, count);
+
+ /* Adjust all the relocs. */
+ irel = elf_section_data (sec)->relocs;
+ irelend = irel + sec->reloc_count;
+ shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
+ shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
+
+ for (; irel < irelend; irel++)
+ {
+ bfd_vma raddr, paddr, symval;
+ Elf_Internal_Sym isym;
+
+ /* Get the new reloc address. */
+ raddr = irel->r_offset;
+ if ((raddr >= (addr + count) && raddr < toaddr))
+ irel->r_offset -= count;
+
+ if (raddr >= addr && raddr < addr + count)
+ {
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ (int) R_V850_NONE);
+ continue;
+ }
+
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_V850_ALIGN)
+ continue;
+
+ bfd_elf32_swap_symbol_in (abfd,
+ extsyms + ELF32_R_SYM (irel->r_info),
+ shndx ? shndx + ELF32_R_SYM (irel->r_info) : NULL,
+ & isym);
+
+ if (isym.st_shndx != sec_shndx)
+ continue;
+
+ /* Get the value of the symbol referred to by the reloc. */
+ if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+ {
+ symval = isym.st_value;
+#if (DEBUG_RELAX & 2)
+ {
+ char * name = bfd_elf_string_from_elf_section
+ (abfd, symtab_hdr->sh_link, isym.st_name);
+ fprintf (stderr,
+ "relax_delete: local: sec: %s, sym: %s (%d), value: %x + %x + %x addend %x\n",
+ sec->name, name, isym.st_name,
+ sec->output_section->vma, sec->output_offset,
+ isym.st_value, irel->r_addend);
+ }
+#endif
+ }
+ else
+ {
+ unsigned long indx;
+ struct elf_link_hash_entry * h;
+
+ /* An external symbol. */
+ indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+
+ h = elf_sym_hashes (abfd) [indx];
+ BFD_ASSERT (h != NULL);
+
+ symval = h->root.u.def.value;
+#if (DEBUG_RELAX & 2)
+ fprintf (stderr,
+ "relax_delete: defined: sec: %s, name: %s, value: %x + %x + %x addend %x\n",
+ sec->name, h->root.root.string, h->root.u.def.value,
+ sec->output_section->vma, sec->output_offset, irel->r_addend);
+#endif
+ }
+
+ paddr = symval + irel->r_addend;
+
+ if ( (symval >= addr + count && symval < toaddr)
+ && (paddr < addr + count || paddr >= toaddr))
+ irel->r_addend += count;
+ else if ( (symval < addr + count || symval >= toaddr)
+ && (paddr >= addr + count && paddr < toaddr))
+ irel->r_addend -= count;
+ }
+
+ /* Adjust the local symbols defined in this section. */
+ esym = extsyms;
+ esymend = esym + symtab_hdr->sh_info;
+
+ for (; esym < esymend; esym++, shndx = (shndx ? shndx + 1 : NULL))
+ {
+ Elf_Internal_Sym isym;
+
+ bfd_elf32_swap_symbol_in (abfd, esym, shndx, & isym);
+
+ if (isym.st_shndx == sec_shndx
+ && isym.st_value >= addr + count
+ && isym.st_value < toaddr)
+ {
+ isym.st_value -= count;
+
+ if (isym.st_value + isym.st_size >= toaddr)
+ isym.st_size += count;
+
+ bfd_elf32_swap_symbol_out (abfd, & isym, shndx, esym);
+ }
+ else if (isym.st_shndx == sec_shndx
+ && isym.st_value < addr + count)
+ {
+ if (isym.st_value+isym.st_size >= addr + count
+ && isym.st_value+isym.st_size < toaddr)
+ isym.st_size -= count;
+
+ if (isym.st_value >= addr
+ && isym.st_value < addr + count)
+ isym.st_value = addr;
+
+ bfd_elf32_swap_symbol_out (abfd, & isym, shndx, esym);
+ }
+ }
+
+ /* Now adjust the global symbols defined in this section. */
+ esym = extsyms + symtab_hdr->sh_info;
+ esymend = extsyms + (symtab_hdr->sh_size / sizeof (Elf32_External_Sym));
+
+ for (index = 0; esym < esymend; esym ++, index ++)
+ {
+ Elf_Internal_Sym isym;
+
+ bfd_elf32_swap_symbol_in (abfd, esym, shndx, & isym);
+ sym_hash = elf_sym_hashes (abfd) [index];
+
+ if (isym.st_shndx == sec_shndx
+ && ((sym_hash)->root.type == bfd_link_hash_defined
+ || (sym_hash)->root.type == bfd_link_hash_defweak)
+ && (sym_hash)->root.u.def.section == sec
+ && (sym_hash)->root.u.def.value >= addr + count
+ && (sym_hash)->root.u.def.value < toaddr)
+ {
+ if ((sym_hash)->root.u.def.value + isym.st_size >= toaddr)
+ {
+ isym.st_size += count;
+ bfd_elf32_swap_symbol_out (abfd, & isym, shndx, esym);
+ }
+
+ (sym_hash)->root.u.def.value -= count;
+ }
+ else if (isym.st_shndx == sec_shndx
+ && ((sym_hash)->root.type == bfd_link_hash_defined
+ || (sym_hash)->root.type == bfd_link_hash_defweak)
+ && (sym_hash)->root.u.def.section == sec
+ && (sym_hash)->root.u.def.value < addr + count)
+ {
+ if ((sym_hash)->root.u.def.value+isym.st_size >= addr + count
+ && (sym_hash)->root.u.def.value+isym.st_size < toaddr)
+ isym.st_size -= count;
+
+ if ((sym_hash)->root.u.def.value >= addr
+ && (sym_hash)->root.u.def.value < addr + count)
+ (sym_hash)->root.u.def.value = addr;
+
+ bfd_elf32_swap_symbol_out (abfd, & isym, shndx, esym);
+ }
+
+ if (shndx)
+ ++ shndx;
+ }
+
+ return true;
+}
+
+#define NOP_OPCODE (0x0000)
+#define MOVHI 0x0640 /* 4byte */
+#define MOVHI_MASK 0x07e0
+#define MOVHI_R1(insn) ((insn) & 0x1f) /* 4byte */
+#define MOVHI_R2(insn) ((insn) >> 11)
+#define MOVEA 0x0620 /* 2byte */
+#define MOVEA_MASK 0x07e0
+#define MOVEA_R1(insn) ((insn) & 0x1f)
+#define MOVEA_R2(insn) ((insn) >> 11)
+#define JARL_4 0x00040780 /* 4byte */
+#define JARL_4_MASK 0xFFFF07FF
+#define JARL_R2(insn) (int)(((insn) & (~JARL_4_MASK)) >> 11)
+#define ADD_I 0x0240 /* 2byte */
+#define ADD_I_MASK 0x07e0
+#define ADD_I5(insn) ((((insn) & 0x001f) << 11) >> 11) /* 2byte */
+#define ADD_R2(insn) ((insn) >> 11)
+#define JMP_R 0x0060 /* 2byte */
+#define JMP_R_MASK 0xFFE0
+#define JMP_R1(insn) ((insn) & 0x1f)
+
+static boolean
+v850_elf_relax_section (abfd, sec, link_info, again)
+ bfd * abfd;
+ asection * sec;
+ struct bfd_link_info * link_info;
+ boolean * again;
+{
+ Elf_Internal_Shdr * symtab_hdr;
+ Elf_Internal_Rela * internal_relocs;
+ Elf_Internal_Rela * irel;
+ Elf_Internal_Rela * irelend;
+ Elf_Internal_Rela * irelalign = NULL;
+ Elf_Internal_Sym * isymbuf = NULL;
+ bfd_byte * contents = NULL;
+ bfd_vma addr = 0;
+ bfd_vma toaddr;
+ int align_pad_size = 0;
+ boolean result = true;
+
+ * again = false;
+
+ if (link_info->relocateable
+ || (sec->flags & SEC_RELOC) == 0
+ || sec->reloc_count == 0)
+ return true;
+
+ /* If this is the first time we have been called
+ for this section, initialize the cooked size. */
+ if (sec->_cooked_size == 0)
+ sec->_cooked_size = sec->_raw_size;
+
+ symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
+
+ internal_relocs = (_bfd_elf32_link_read_relocs
+ (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+ link_info->keep_memory));
+ if (internal_relocs == NULL)
+ goto error_return;
+
+ irelend = internal_relocs + sec->reloc_count;
+
+ while (addr < sec->_cooked_size)
+ {
+ toaddr = sec->_cooked_size;
+
+ for (irel = internal_relocs; irel < irelend; irel ++)
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_V850_ALIGN
+ && irel->r_offset > addr
+ && irel->r_offset < toaddr)
+ toaddr = irel->r_offset;
+
+#ifdef DEBUG_RELAX
+ fprintf (stderr, "relax region 0x%x to 0x%x align pad %d\n",
+ addr, toaddr, align_pad_size);
+#endif
+ if (irelalign)
+ {
+ bfd_vma alignto;
+ bfd_vma alignmoveto;
+
+ alignmoveto = BFD_ALIGN (addr - align_pad_size, 1 << irelalign->r_addend);
+ alignto = BFD_ALIGN (addr, 1 << irelalign->r_addend);
+
+ if (alignmoveto < alignto)
+ {
+ unsigned int i;
+
+ align_pad_size = alignto - alignmoveto;
+#ifdef DEBUG_RELAX
+ fprintf (stderr, "relax move region 0x%x to 0x%x delete size 0x%x\n",
+ alignmoveto, toaddr, align_pad_size);
+#endif
+ if (!v850_elf_relax_delete_bytes (abfd, sec, alignmoveto,
+ toaddr, align_pad_size))
+ goto error_return;
+
+ for (i = BFD_ALIGN (toaddr - align_pad_size, 1);
+ (i + 1) < toaddr; i += 2)
+ bfd_put_16 (abfd, NOP_OPCODE, contents + i);
+
+ addr = alignmoveto;
+ }
+ else
+ align_pad_size = 0;
+ }
+
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ bfd_vma laddr;
+ bfd_vma addend;
+ bfd_vma symval;
+ int insn[5];
+ int no_match = -1;
+ Elf_Internal_Rela * hi_irelfn;
+ Elf_Internal_Rela * lo_irelfn;
+ Elf_Internal_Rela * irelcall;
+ bfd_signed_vma foff;
+
+ if (! (irel->r_offset >= addr && irel->r_offset < toaddr
+ && (ELF32_R_TYPE (irel->r_info) == (int) R_V850_LONGCALL
+ || ELF32_R_TYPE (irel->r_info) == (int) R_V850_LONGJUMP)))
+ continue;
+
+#ifdef DEBUG_RELAX
+ fprintf (stderr, "relax check r_info 0x%x r_offset 0x%x r_addend 0x%x\n",
+ irel->r_info,
+ irel->r_offset,
+ irel->r_addend );
+#endif
+
+ /* Get the section contents. */
+ if (contents == NULL)
+ {
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ contents = elf_section_data (sec)->this_hdr.contents;
+ else
+ {
+ contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
+ if (contents == NULL)
+ goto error_return;
+
+ if (! bfd_get_section_contents (abfd, sec, contents,
+ (file_ptr) 0, sec->_raw_size))
+ goto error_return;
+ }
+ }
+
+ /* Read this BFD's local symbols if we haven't done so already. */
+ if (isymbuf == NULL && symtab_hdr->sh_info != 0)
+ {
+ isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (isymbuf == NULL)
+ isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+ symtab_hdr->sh_info, 0,
+ NULL, NULL, NULL);
+ if (isymbuf == NULL)
+ goto error_return;
+ }
+
+ laddr = irel->r_offset;
+
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_V850_LONGCALL)
+ {
+ /* Check code for -mlong-calls output. */
+ if (laddr + 16 <= (bfd_vma) sec->_raw_size)
+ {
+ insn[0] = bfd_get_16 (abfd, contents + laddr);
+ insn[1] = bfd_get_16 (abfd, contents + laddr + 4);
+ insn[2] = bfd_get_32 (abfd, contents + laddr + 8);
+ insn[3] = bfd_get_16 (abfd, contents + laddr + 12);
+ insn[4] = bfd_get_16 (abfd, contents + laddr + 14);
+
+ if ((insn[0] & MOVHI_MASK) != MOVHI
+ || MOVHI_R1 (insn[0]) != 0)
+ no_match = 0;
+
+ if (no_match < 0
+ && ((insn[1] & MOVEA_MASK) != MOVEA
+ || MOVHI_R2 (insn[0]) != MOVEA_R1 (insn[1])))
+ no_match = 1;
+
+ if (no_match < 0
+ && (insn[2] & JARL_4_MASK) != JARL_4)
+ no_match = 2;
+
+ if (no_match < 0
+ && ((insn[3] & ADD_I_MASK) != ADD_I
+ || ADD_I5 (insn[3]) != 4
+ || JARL_R2 (insn[2]) != ADD_R2 (insn[3])))
+ no_match = 3;
+
+ if (no_match < 0
+ && ((insn[4] & JMP_R_MASK) != JMP_R
+ || MOVEA_R2 (insn[1]) != JMP_R1 (insn[4])))
+ no_match = 4;
+ }
+ else
+ {
+ ((*_bfd_error_handler)
+ ("%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized insns",
+ bfd_get_filename (abfd), (unsigned long) irel->r_offset));
+
+ continue;
+ }
+
+ if (no_match >= 0)
+ {
+ ((*_bfd_error_handler)
+ ("%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized insn 0x%x",
+ bfd_get_filename (abfd), (unsigned long) irel->r_offset+no_match, insn[no_match]));
+
+ continue;
+ }
+
+ /* Get the reloc for the address from which the register is
+ being loaded. This reloc will tell us which function is
+ actually being called. */
+ for (hi_irelfn = internal_relocs; hi_irelfn < irelend; hi_irelfn ++)
+ if (hi_irelfn->r_offset == laddr + 2
+ && ELF32_R_TYPE (hi_irelfn->r_info)
+ == (int) R_V850_HI16_S)
+ break;
+
+ for (lo_irelfn = internal_relocs; lo_irelfn < irelend; lo_irelfn ++)
+ if (lo_irelfn->r_offset == laddr + 6
+ && ELF32_R_TYPE (lo_irelfn->r_info)
+ == (int) R_V850_LO16)
+ break;
+
+ for (irelcall = internal_relocs; irelcall < irelend; irelcall ++)
+ if (irelcall->r_offset == laddr + 8
+ && ELF32_R_TYPE (irelcall->r_info)
+ == (int) R_V850_22_PCREL)
+ break;
+
+ if ( hi_irelfn == irelend
+ || lo_irelfn == irelend
+ || irelcall == irelend)
+ {
+ ((*_bfd_error_handler)
+ ("%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized reloc",
+ bfd_get_filename (abfd), (unsigned long) irel->r_offset ));
+
+ continue;
+ }
+
+ if (ELF32_R_SYM (irelcall->r_info) < symtab_hdr->sh_info)
+ {
+ Elf_Internal_Sym * isym;
+
+ /* A local symbol. */
+ isym = isymbuf + ELF32_R_SYM (irelcall->r_info);
+
+ symval = isym->st_value;
+ }
+ else
+ {
+ unsigned long indx;
+ struct elf_link_hash_entry * h;
+
+ /* An external symbol. */
+ indx = ELF32_R_SYM (irelcall->r_info) - symtab_hdr->sh_info;
+ h = elf_sym_hashes (abfd)[indx];
+ BFD_ASSERT (h != NULL);
+
+ if ( h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ /* This appears to be a reference to an undefined
+ symbol. Just ignore it--it will be caught by the
+ regular reloc processing. */
+ continue;
+
+ symval = h->root.u.def.value;
+ }
+
+ if (symval + irelcall->r_addend != irelcall->r_offset + 4)
+ {
+ ((*_bfd_error_handler)
+ ("%s: 0x%lx: warning: R_V850_LONGCALL points to unrecognized reloc 0x%lx",
+ bfd_get_filename (abfd), (unsigned long) irel->r_offset, irelcall->r_offset ));
+
+ continue;
+ }
+
+ /* Get the value of the symbol referred to by the reloc. */
+ if (ELF32_R_SYM (hi_irelfn->r_info) < symtab_hdr->sh_info)
+ {
+ Elf_Internal_Sym * isym;
+ asection * sym_sec;
+
+ /* A local symbol. */
+ isym = isymbuf + ELF32_R_SYM (hi_irelfn->r_info);
+
+ if (isym->st_shndx == SHN_UNDEF)
+ sym_sec = bfd_und_section_ptr;
+ else if (isym->st_shndx == SHN_ABS)
+ sym_sec = bfd_abs_section_ptr;
+ else if (isym->st_shndx == SHN_COMMON)
+ sym_sec = bfd_com_section_ptr;
+ else
+ sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ symval = (isym->st_value
+ + sym_sec->output_section->vma
+ + sym_sec->output_offset);
+ }
+ else
+ {
+ unsigned long indx;
+ struct elf_link_hash_entry * h;
+
+ /* An external symbol. */
+ indx = ELF32_R_SYM (hi_irelfn->r_info) - symtab_hdr->sh_info;
+ h = elf_sym_hashes (abfd)[indx];
+ BFD_ASSERT (h != NULL);
+
+ if ( h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ /* This appears to be a reference to an undefined
+ symbol. Just ignore it--it will be caught by the
+ regular reloc processing. */
+ continue;
+
+ symval = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ }
+
+ addend = irel->r_addend;
+
+ foff = (symval + addend
+ - (irel->r_offset
+ + sec->output_section->vma
+ + sec->output_offset
+ + 4));
+#ifdef DEBUG_RELAX
+ fprintf (stderr, "relax longcall r_offset 0x%x ptr 0x%x symbol 0x%x addend 0x%x distance 0x%x\n",
+ irel->r_offset,
+ (irel->r_offset
+ + sec->output_section->vma
+ + sec->output_offset),
+ symval, addend, foff);
+#endif
+
+ if (foff < -0x100000 || foff >= 0x100000)
+ /* After all that work, we can't shorten this function call. */
+ continue;
+
+ /* For simplicity of coding, we are going to modify the section
+ contents, the section relocs, and the BFD symbol table. We
+ must tell the rest of the code not to free up this
+ information. It would be possible to instead create a table
+ of changes which have to be made, as is done in coff-mips.c;
+ that would be more work, but would require less memory when
+ the linker is run. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (bfd_byte *) isymbuf;
+
+ /* Replace the long call with a jarl. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (hi_irelfn->r_info), R_V850_22_PCREL);
+
+ addend = 0;
+
+ if (ELF32_R_SYM (hi_irelfn->r_info) < symtab_hdr->sh_info)
+ /* If this needs to be changed because of future relaxing,
+ it will be handled here like other internal IND12W
+ relocs. */
+ bfd_put_32 (abfd,
+ 0x00000780 | (JARL_R2 (insn[2])<<11) | ((addend << 16) & 0xffff) | ((addend >> 16) & 0xf),
+ contents + irel->r_offset);
+ else
+ /* We can't fully resolve this yet, because the external
+ symbol value may be changed by future relaxing.
+ We let the final link phase handle it. */
+ bfd_put_32 (abfd, 0x00000780 | (JARL_R2 (insn[2])<<11),
+ contents + irel->r_offset);
+
+ hi_irelfn->r_info =
+ ELF32_R_INFO (ELF32_R_SYM (hi_irelfn->r_info), R_V850_NONE);
+ lo_irelfn->r_info =
+ ELF32_R_INFO (ELF32_R_SYM (lo_irelfn->r_info), R_V850_NONE);
+ irelcall->r_info =
+ ELF32_R_INFO (ELF32_R_SYM (irelcall->r_info), R_V850_NONE);
+
+ if (! v850_elf_relax_delete_bytes (abfd, sec,
+ irel->r_offset + 4, toaddr, 12))
+ goto error_return;
+
+ align_pad_size += 12;
+ }
+ else if (ELF32_R_TYPE (irel->r_info) == (int) R_V850_LONGJUMP)
+ {
+ /* Check code for -mlong-jumps output. */
+ if (laddr + 10 <= (bfd_vma) sec->_raw_size)
+ {
+ insn[0] = bfd_get_16 (abfd, contents + laddr);
+ insn[1] = bfd_get_16 (abfd, contents + laddr + 4);
+ insn[2] = bfd_get_16 (abfd, contents + laddr + 8);
+
+ if ((insn[0] & MOVHI_MASK) != MOVHI
+ || MOVHI_R1 (insn[0]) != 0)
+ no_match = 0;
+
+ if (no_match < 0
+ && ((insn[1] & MOVEA_MASK) != MOVEA
+ || MOVHI_R2 (insn[0]) != MOVEA_R1 (insn[1])))
+ no_match = 1;
+
+ if (no_match < 0
+ && ((insn[2] & JMP_R_MASK) != JMP_R
+ || MOVEA_R2 (insn[1]) != JMP_R1 (insn[2])))
+ no_match = 4;
+ }
+ else
+ {
+ ((*_bfd_error_handler)
+ ("%s: 0x%lx: warning: R_V850_LONGJUMP points to unrecognized insns",
+ bfd_get_filename (abfd), (unsigned long) irel->r_offset));
+
+ continue;
+ }
+
+ if (no_match >= 0)
+ {
+ ((*_bfd_error_handler)
+ ("%s: 0x%lx: warning: R_V850_LONGJUMP points to unrecognized insn 0x%x",
+ bfd_get_filename (abfd), (unsigned long) irel->r_offset+no_match, insn[no_match]));
+
+ continue;
+ }
+
+ /* Get the reloc for the address from which the register is
+ being loaded. This reloc will tell us which function is
+ actually being called. */
+ for (hi_irelfn = internal_relocs; hi_irelfn < irelend; hi_irelfn ++)
+ if (hi_irelfn->r_offset == laddr + 2
+ && ELF32_R_TYPE (hi_irelfn->r_info) == (int) R_V850_HI16_S)
+ break;
+
+ for (lo_irelfn = internal_relocs; lo_irelfn < irelend; lo_irelfn ++)
+ if (lo_irelfn->r_offset == laddr + 6
+ && ELF32_R_TYPE (lo_irelfn->r_info) == (int) R_V850_LO16)
+ break;
+
+ if ( hi_irelfn == irelend
+ || lo_irelfn == irelend)
+ {
+ ((*_bfd_error_handler)
+ ("%s: 0x%lx: warning: R_V850_LONGJUMP points to unrecognized reloc",
+ bfd_get_filename (abfd), (unsigned long) irel->r_offset ));
+
+ continue;
+ }
+
+ /* Get the value of the symbol referred to by the reloc. */
+ if (ELF32_R_SYM (hi_irelfn->r_info) < symtab_hdr->sh_info)
+ {
+ Elf_Internal_Sym * isym;
+ asection * sym_sec;
+
+ /* A local symbol. */
+ isym = isymbuf + ELF32_R_SYM (hi_irelfn->r_info);
+
+ if (isym->st_shndx == SHN_UNDEF)
+ sym_sec = bfd_und_section_ptr;
+ else if (isym->st_shndx == SHN_ABS)
+ sym_sec = bfd_abs_section_ptr;
+ else if (isym->st_shndx == SHN_COMMON)
+ sym_sec = bfd_com_section_ptr;
+ else
+ sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ symval = (isym->st_value
+ + sym_sec->output_section->vma
+ + sym_sec->output_offset);
+#ifdef DEBUG_RELAX
+ {
+ char * name = bfd_elf_string_from_elf_section
+ (abfd, symtab_hdr->sh_link, isym->st_name);
+
+ fprintf (stderr, "relax long jump local: sec: %s, sym: %s (%d), value: %x + %x + %x addend %x\n",
+ sym_sec->name, name, isym->st_name,
+ sym_sec->output_section->vma,
+ sym_sec->output_offset,
+ isym->st_value, irel->r_addend);
+ }
+#endif
+ }
+ else
+ {
+ unsigned long indx;
+ struct elf_link_hash_entry * h;
+
+ /* An external symbol. */
+ indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+ h = elf_sym_hashes (abfd)[indx];
+ BFD_ASSERT (h != NULL);
+
+ if ( h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ /* This appears to be a reference to an undefined
+ symbol. Just ignore it--it will be caught by the
+ regular reloc processing. */
+ continue;
+
+ symval = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+#ifdef DEBUG_RELAX
+ fprintf (stderr,
+ "relax longjump defined: sec: %s, name: %s, value: %x + %x + %x addend %x\n",
+ sec->name, h->root.root.string, h->root.u.def.value,
+ sec->output_section->vma, sec->output_offset, irel->r_addend);
+#endif
+ }
+
+ addend = irel->r_addend;
+
+ foff = (symval + addend
+ - (irel->r_offset
+ + sec->output_section->vma
+ + sec->output_offset
+ + 4));
+#ifdef DEBUG_RELAX
+ fprintf (stderr, "relax longjump r_offset 0x%x ptr 0x%x symbol 0x%x addend 0x%x distance 0x%x\n",
+ irel->r_offset,
+ (irel->r_offset
+ + sec->output_section->vma
+ + sec->output_offset),
+ symval, addend, foff);
+#endif
+ if (foff < -0x100000 || foff >= 0x100000)
+ /* After all that work, we can't shorten this function call. */
+ continue;
+
+ /* For simplicity of coding, we are going to modify the section
+ contents, the section relocs, and the BFD symbol table. We
+ must tell the rest of the code not to free up this
+ information. It would be possible to instead create a table
+ of changes which have to be made, as is done in coff-mips.c;
+ that would be more work, but would require less memory when
+ the linker is run. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (bfd_byte *) isymbuf;
+
+ if (foff < -0x100 || foff >= 0x100)
+ {
+ /* Replace the long jump with a jr. */
+
+ irel->r_info =
+ ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_V850_22_PCREL);
+
+ irel->r_addend = addend;
+ addend = 0;
+
+ if (ELF32_R_SYM (hi_irelfn->r_info) < symtab_hdr->sh_info)
+ /* If this needs to be changed because of future relaxing,
+ it will be handled here like other internal IND12W
+ relocs. */
+ bfd_put_32 (abfd,
+ 0x00000780 | ((addend << 15) & 0xffff0000) | ((addend >> 17) & 0xf),
+ contents + irel->r_offset);
+ else
+ /* We can't fully resolve this yet, because the external
+ symbol value may be changed by future relaxing.
+ We let the final link phase handle it. */
+ bfd_put_32 (abfd, 0x00000780, contents + irel->r_offset);
+
+ hi_irelfn->r_info =
+ ELF32_R_INFO (ELF32_R_SYM (hi_irelfn->r_info), R_V850_NONE);
+ lo_irelfn->r_info =
+ ELF32_R_INFO (ELF32_R_SYM (lo_irelfn->r_info), R_V850_NONE);
+ if (!v850_elf_relax_delete_bytes (abfd, sec,
+ irel->r_offset + 4, toaddr, 6))
+ goto error_return;
+
+ align_pad_size += 6;
+ }
+ else
+ {
+ /* Replace the long jump with a br. */
+
+ irel->r_info =
+ ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_V850_9_PCREL);
+
+ irel->r_addend = addend;
+ addend = 0;
+
+ if (ELF32_R_SYM (hi_irelfn->r_info) < symtab_hdr->sh_info)
+ /* If this needs to be changed because of future relaxing,
+ it will be handled here like other internal IND12W
+ relocs. */
+ bfd_put_16 (abfd,
+ 0x0585 | ((addend << 10) & 0xf800) | ((addend << 3) & 0x0070),
+ contents + irel->r_offset);
+ else
+ /* We can't fully resolve this yet, because the external
+ symbol value may be changed by future relaxing.
+ We let the final link phase handle it. */
+ bfd_put_16 (abfd, 0x0585, contents + irel->r_offset);
+
+ hi_irelfn->r_info =
+ ELF32_R_INFO (ELF32_R_SYM (hi_irelfn->r_info), R_V850_NONE);
+ lo_irelfn->r_info =
+ ELF32_R_INFO (ELF32_R_SYM (lo_irelfn->r_info), R_V850_NONE);
+ if (!v850_elf_relax_delete_bytes (abfd, sec,
+ irel->r_offset + 2, toaddr, 8))
+ goto error_return;
+
+ align_pad_size += 8;
+ }
+ }
+ }
+
+ irelalign = NULL;
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_V850_ALIGN
+ && irel->r_offset == toaddr)
+ {
+ irel->r_offset -= align_pad_size;
+
+ if (irelalign == NULL || irelalign->r_addend > irel->r_addend)
+ irelalign = irel;
+ }
+ }
+
+ addr = toaddr;
+ }
+
+ if (!irelalign)
+ {
+#ifdef DEBUG_RELAX
+ fprintf (stderr, "relax pad %d shorten %d -> %d\n",
+ align_pad_size,
+ sec->_cooked_size,
+ sec->_cooked_size - align_pad_size);
+#endif
+ sec->_cooked_size -= align_pad_size;
+ }
+
+ finish:
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
+
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != (unsigned char *) contents)
+ free (contents);
+
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (bfd_byte *) isymbuf)
+ free (isymbuf);
+
+ return result;
+
+ error_return:
+ result = false;
+ goto finish;
+}
#define TARGET_LITTLE_SYM bfd_elf32_v850_vec
#define TARGET_LITTLE_NAME "elf32-v850"
@@ -2198,6 +3147,7 @@ v850_elf_fake_sections (abfd, hdr, sec)
#define bfd_elf32_bfd_merge_private_bfd_data v850_elf_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags v850_elf_set_private_flags
#define bfd_elf32_bfd_print_private_bfd_data v850_elf_print_private_bfd_data
+#define bfd_elf32_bfd_relax_section v850_elf_relax_section
#define elf_symbol_leading_char '_'
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 88beae8a9fd..e855db196a1 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1041,7 +1041,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET",
"BFD_RELOC_V850_CALLT_6_7_OFFSET",
"BFD_RELOC_V850_CALLT_16_16_OFFSET",
-
+ "BFD_RELOC_V850_LONGCALL",
+ "BFD_RELOC_V850_LONGJUMP",
+ "BFD_RELOC_V850_ALIGN",
"BFD_RELOC_MN10300_32_PCREL",
"BFD_RELOC_MN10300_16_PCREL",
"BFD_RELOC_TIC30_LDP",
diff --git a/bfd/mipsbsd.c b/bfd/mipsbsd.c
index 85cf0ef21e9..f2802ab2a5b 100644
--- a/bfd/mipsbsd.c
+++ b/bfd/mipsbsd.c
@@ -1,5 +1,5 @@
/* BFD backend for MIPS BSD (a.out) binaries.
- Copyright 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001
+ Copyright 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Ralph Campbell.
@@ -91,12 +91,12 @@ MY(set_arch_mach) (abfd, machtype)
{
case M_MIPS1:
arch = bfd_arch_mips;
- machine = 3000;
+ machine = bfd_mach_mips3000;
break;
case M_MIPS2:
arch = bfd_arch_mips;
- machine = 4000;
+ machine = bfd_mach_mips4000;
break;
default:
@@ -164,8 +164,8 @@ MY (write_object_contents) (abfd)
case bfd_arch_mips:
switch (bfd_get_mach (abfd))
{
- case 4000:
- case 6000:
+ case bfd_mach_mips4000:
+ case bfd_mach_mips6000:
N_SET_MACHTYPE (*execp, M_MIPS2);
break;
default:
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index cb47f78bf25..f7514367f7d 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -955,7 +955,10 @@ NAME(aout,machine_type) (arch, machine, unknown)
break;
case bfd_arch_i386:
- if (machine == 0) arch_flags = M_386;
+ if (machine == 0
+ || machine == bfd_mach_i386_i386
+ || machine == bfd_mach_i386_i386_intel_syntax)
+ arch_flags = M_386;
break;
case bfd_arch_a29k:
diff --git a/bfd/reloc.c b/bfd/reloc.c
index deba952832d..e60c26e0512 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -2788,8 +2788,18 @@ ENUM
BFD_RELOC_V850_CALLT_16_16_OFFSET
ENUMDOC
This is a 16 bit offset from the call table base pointer.
-COMMENT
-
+ENUM
+ BFD_RELOC_V850_LONGCALL
+ENUMDOC
+ Used for relaxing indirect function calls.
+ENUM
+ BFD_RELOC_V850_LONGJUMP
+ENUMDOC
+ Used for relaxing indirect jumps.
+ENUM
+ BFD_RELOC_V850_ALIGN
+ENUMDOC
+ Used to maintain alignment whilst relaxing.
ENUM
BFD_RELOC_MN10300_32_PCREL
ENUMDOC
diff --git a/bfd/targets.c b/bfd/targets.c
index 093490cf687..8d893eb2575 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -683,6 +683,12 @@ extern const bfd_target sparcnetbsd_vec;
extern const bfd_target sunos_big_vec;
extern const bfd_target tic30_aout_vec;
extern const bfd_target tic30_coff_vec;
+extern const bfd_target tic4x_coff0_beh_vec;
+extern const bfd_target tic4x_coff0_vec;
+extern const bfd_target tic4x_coff1_beh_vec;
+extern const bfd_target tic4x_coff1_vec;
+extern const bfd_target tic4x_coff2_beh_vec;
+extern const bfd_target tic4x_coff2_vec;
extern const bfd_target tic54x_coff0_beh_vec;
extern const bfd_target tic54x_coff0_vec;
extern const bfd_target tic54x_coff1_beh_vec;
diff --git a/bfd/ticoff.h b/bfd/ticoff.h
new file mode 100644
index 00000000000..3b3fef02f1b
--- /dev/null
+++ b/bfd/ticoff.h
@@ -0,0 +1,130 @@
+/* Copyright 2002 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#undef F_LSYMS
+#define F_LSYMS F_LSYMS_TICOFF
+
+static boolean
+ticoff0_bad_format_hook (abfd, filehdr)
+ bfd *abfd;
+ PTR filehdr;
+{
+ struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
+
+ if (COFF0_BADMAG (*internal_f))
+ return false;
+
+ return true;
+}
+
+static boolean
+ticoff1_bad_format_hook (abfd, filehdr)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ PTR filehdr;
+{
+ struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
+
+ if (COFF1_BADMAG (*internal_f))
+ return false;
+
+ return true;
+}
+
+/* Replace the stock _bfd_coff_is_local_label_name
+ to recognize TI COFF local labels. */
+static boolean
+ticoff_bfd_is_local_label_name (abfd, name)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ const char *name;
+{
+ if (TICOFF_LOCAL_LABEL_P(name))
+ return true;
+ return false;
+}
+
+#define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name
+
+/* Customize coffcode.h; the default coff_ functions are set up to use COFF2;
+ coff_bad_format_hook uses BADMAG, so set that for COFF2. The COFF1
+ and COFF0 vectors use custom _bad_format_hook procs instead of setting
+ BADMAG. */
+#define BADMAG(x) COFF2_BADMAG(x)
+#include "coffcode.h"
+
+/* COFF0 differs in file/section header size and relocation entry size. */
+static const bfd_coff_backend_data ticoff0_swap_table =
+{
+ coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
+ coff_SWAP_aux_out, coff_SWAP_sym_out,
+ coff_SWAP_lineno_out, coff_SWAP_reloc_out,
+ coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
+ coff_SWAP_scnhdr_out,
+ FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
+#ifdef COFF_LONG_FILENAMES
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_LONG_SECTION_NAMES
+ true,
+#else
+ false,
+#endif
+ COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
+ coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
+ coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
+ coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
+ coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
+ coff_classify_symbol, coff_compute_section_file_positions,
+ coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
+ coff_adjust_symndx, coff_link_add_one_symbol,
+ coff_link_output_has_begun, coff_final_link_postscript
+};
+
+/* COFF1 differs in section header size. */
+static const bfd_coff_backend_data ticoff1_swap_table =
+{
+ coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
+ coff_SWAP_aux_out, coff_SWAP_sym_out,
+ coff_SWAP_lineno_out, coff_SWAP_reloc_out,
+ coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
+ coff_SWAP_scnhdr_out,
+ FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
+#ifdef COFF_LONG_FILENAMES
+ true,
+#else
+ false,
+#endif
+#ifdef COFF_LONG_SECTION_NAMES
+ true,
+#else
+ false,
+#endif
+ COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
+ coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
+ coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
+ coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
+ coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
+ coff_classify_symbol, coff_compute_section_file_positions,
+ coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
+ coff_adjust_symndx, coff_link_add_one_symbol,
+ coff_link_output_has_begun, coff_final_link_postscript
+};
+
diff --git a/bfd/version.h b/bfd/version.h
index 99eb582c919..8ea30835cd0 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1 +1 @@
-#define BFD_VERSION_DATE 20020825
+#define BFD_VERSION_DATE 20020903
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3d9bb66190f..f37986001f9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,258 @@
+2002-09-03 Theodore A. Roth <troth@verinet.com>
+
+ * gdb/avr-tdep.c (avr_gdbarch_init): Use
+ generic_unwind_get_saved_register.
+
+2002-09-03 David Carlton <carlton@math.stanford.edu>
+
+ * dwarf2read.c (dwarf2_add_member_fn): Add the 'type'
+ argument (PR gdb/653). Update call to smash_to_method_type.
+ (read_structure_scope): Update call to dwarf2_add_member_fn.
+
+2002-09-03 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-linux-tdep.c: Include gdb_string.h
+ * x86-64-linux-nat.c: Ditto.
+
+2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ada-exp.y (yyname, yyrule): Remap global variables that appear
+ when YYDEBUG is set to 1.
+ * c-exp.y: Likewise.
+ * f-exp.y: Likewise.
+ * jv-exp.y: Likewise.
+ * m2-exp.y: Likewise.
+ * p-exp.y: Likewise.
+
+2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (i386nbsd-tdep.o): Add $(solib_svr4_h) to
+ dependency list.
+ * i386nbsd-tdep.c (i386nbsdelf_init_abi): Set
+ solib_svr4_fetch_link_map_offsets to
+ nbsd_ilp32_solib_svr4_fetch_link_map_offsets.
+ * config/i386/nbsd.mt (TDEPFILES): Add solib.o and solib-svr4.o.
+ * config/i386/nbsdaout.mh (NATDEPFILES): Remove solib.o.
+ * config/i386/nbsdelf.mh (NATDEPFILES): Remove solib.o,
+ solib-svr4.o, and solib-legacy.o.
+ * config/i386/tm-nbsd.h: Include solib.h.
+
+2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.tgt (i[3456]86-*-netbsdelf*): Merge with...
+ (i[3456]86-*-netbsd*): ...this. Set gdb_target to nbsd.
+ (i[3456]86-*-openbsd*): Make this a separate entry. Add a
+ comment noting that this needs its own target configuration.
+ * config/i386/nbsd.mt: New file.
+ * config/i386/nbsdaout.mt: Remove.
+ * config/i386/nbsdelf.mt: Ditto.
+ * config/i386/tm-nbsdaout.h: Ditto.
+
+2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * i386nbsd-tdep.c (i386nbsd_sigtramp_offset): New function.
+ (i386nbsd_pc_in_sigtramp): Rewrite to use i386nbsd_sigtramp_offset.
+ (i386nbsd_init_abi): Don't initialize tdep->sigtramp_start or
+ tdep->sigtramp_end.
+ (i386nbsd_sigtramp_start, i386nbsd_sigtramp_end): Remove.
+ * config/i386/tm-nbsd.h (SIGTRAMP_START, SIGTRAMP_END)
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Remove.
+
+2002-09-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (i386nbsd-tdep.o): Add $(arch_utils_h),
+ $(i386_tdep_h), and $(nbsd_tdep_h) to dependency list.
+ * i386-tdep.h (i386bsd_init_abi): New prototype.
+ * i386bsd-tdep.c (i386bsd_init_abi): Remove "static" from
+ function declaration.
+ (_initialize_i386bsd_tdep): Don't register OS ABI handlers
+ for NetBSD-a.out or NetBSD-ELF.
+ (i386nbsd_sigtramp_start, i386nbsd_sigtramp_end)
+ (i386nbsd_sc_pc_offset, i386nbsd_sc_sp_offset)
+ (i386nbsd_init_abi, i386nbsdelf_init_abi): Move to...
+ * i386nbsd-tdep.c: ...here. Include arch-utils.h, i386-tdep.h,
+ and nbsd-tdep.h.
+ (i386nbsd_pc_in_sigtramp): New function.
+ (i386nbsd_init_abi): Set gdbarch_pc_in_sigtramp to
+ i386nbsd_pc_in_sigtramp.
+ (_initialize_i386nbsd_tdep): Register i386nbsd_init_abi
+ and i386nbsdelf_init_abi OS ABI handlers.
+ * config/i386/nbsdaout.mt (TDEPFILES): Add nbsd-tdep.o.
+ * config/i386/nbsdelf.mt (TDEPFILES): Likewise.
+
+2002-09-02 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (dummy_sse_values): Only try to fill in the SSE
+ registers if the target really has them.
+
+2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (mipsnbsd-tdep.o): Use $(nbsd_tdep_h) rather
+ than nbsd-tdep.h.
+
+2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (alphanbsd-tdep.o): Add $(frame_h) to dependency
+ list.
+ * alphanbsd-tdep.c (alphanbsd_sigcontext_addr)
+ (alphanbsd_skip_sigtramp_frame): New functions.
+ (alphanbsd_init_abi): Set tdep->skip_sigtramp_frame to
+ alphanbsd_skip_sigtramp_frame. Set tdep->sigcontext_addr
+ to alphanbsd_sigcontext_addr.
+
+2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (mipsnbsd-tdep.o): Add nbsd-tdep.h to dependency
+ list.
+ (nbsd-tdep.o): Add $(gdb_string_h) to dependency list.
+ * alphanbsd-tdep.c (alphanbsd_pc_in_sigtramp): Use
+ nbsd_pc_in_sigtramp.
+ * mipsnbsd-tdep.c: Include nbsd-tdep.h.
+ (mipsnbsd_pc_in_sigtramp): Use nbsd_pc_in_sigtramp.
+ * nbsd-tdep.c: Include gdb_string.h.
+ (nbsd_pc_in_sigtramp): New function.
+ * nbsd-tdep.h (nbsd_pc_in_sigtramp): New prototype.
+ * ppcnbsd-tdep.c (ppcnbsd_pc_in_sigtramp): New function.
+ (ppcnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
+ ppcnbsd_pc_in_sigtramp.
+ * shnbsd-tdep.c (shnbsd_pc_in_sigtramp): New function.
+ (shnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
+ shnbsd_pc_in_sigtramp.
+ * sparcnbsd-tdep.c (sparcnbsd_init_abi_elf): Set
+ gdbarch_pc_in_sigtramp to nbsd_pc_in_sigtramp.
+ * config/mips/nbsd.mt (TDEPFILES): Add nbsd-tdep.o.
+
+2002-08-30 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * breakpoint.c (breakpoint_init_inferior): Reset the val field of
+ watchpoints to NULL.
+ (insert_breakpoints): set val field of watchpoints if NULL.
+
+
+2002-08-29 Jim Blandy <jimb@redhat.com>
+
+ * symtab.c (lookup_symbol_aux): In the cases where we find a
+ minimal symbol of an appropriate name and use its address to
+ select a symtab to read and search, use `name' (as passed to us)
+ as the demangled name when searching the symtab's global and
+ static blocks, not the minsym's name.
+
+2002-08-29 Keith Seitz <keiths@redhat.com>
+
+ * stack.c (print_frame_info_base): Always set current_source_symtab
+ and current_source_line.
+
+2002-08-29 Donn Terry <donnte@microsoft.com>
+
+ * proc-api.c (rw_table): Fix typo in #ifdef PCSHOLD (missing S).
+
+2002-08-28 Keith Seitz <keiths@redhat.com>
+
+ * stack.c (select_frame): Add FIXME concerning selected-frame
+ events.
+ (select_frame_command): Send selected-frame-level-changed
+ event notification, but only if the level actually changed.
+ (up_silently_base): Add selected-frame-level-changed event
+ notification.
+ (down_silently_base): Likewise.
+
+2002-08-28 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in: Update dependencies for all gdb/*.c files.
+
+2002-08-27 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in (osabi.o, i387-tdep.o, i386-linux-nat.o, lin-lwp.o,
+ ax-gdb.o, signals.o, jv-valprint.o, c-valprint.o, cp-abi.o):
+ Update dependencies.
+ * i387-tdep.c: Include gdb_string.h.
+ * osabi.c: Likewise.
+ * i386-linux-nat.c: Likewise.
+ * lin-lwp.c: Likewise.
+ * ax-gdb.c: Likewise.
+ * signals/signals.c: Likewise.
+ * jv-valprint.c: Likewise.
+ * p-lang.c: Likewise.
+ * c-valprint.c: Likewise.
+ * cp-abi.c: Likewise.
+
+2002-08-27 Elena Zannoni <ezannoni@redhat.com>
+
+ * cli/cli-script.h (copy_command_lines): Export.
+ * breakpoint.c: Include cli/cli-script.h.
+ * Makefile.in (breakpoint.o): Update dependencies.
+
+2002-08-26 Joel Brobecker <brobecker@gnat.com>
+
+ * cli/cli-script.c (copy_command_lines): New function.
+ * defs.h (copy_command_lines): Export.
+ * testsuite/gdb.base/commands.exp: New tests for commands
+ attached to a temporary breakpoint, and for commands that
+ delete the breakpoint they are attached to.
+
+2002-08-26 Michael Snyder <msnyder@redhat.com>
+
+ * breakpoint.c (bpstat_stop_status): Instead of copying the
+ pointer to the breakpoint commands struct, make a new copy
+ of the struct and point to that.
+ (bpstat_clear): Free the commands struct.
+ (bpstat_clear_actions): Free the commands struct.
+ (bpstat_do_actions): Free the command actions. Also execute
+ the local cleanups, instead of deleting them.
+ (delete_breakpoint): Leave the commands field of the bpstat
+ chain alone -- it will be freed later.
+
+2002-08-26 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-tdep.c (altivec_register_p): Restore function inadvertently
+ deleted in 2002-08-20 commit. This function is still used by
+ ppc-linux-nat.c.
+
+2002-08-26 Keith Seitz <keiths@redhat.com>
+
+ * gdb-events.sh: Add selected-frame-level-changed event.
+ * gdb-events.c: Regenerated.
+ * gdb-events.h: Regenerated.
+
+2002-08-26 Stephane Carrez <stcarrez@nerim.fr>
+
+ Fix PR gdb/393:
+ * inflow.c (terminal_save_ours): New function to save terminal
+ settings.
+ * inferior.h (terminal_save_ours): Declare.
+ * target.c (debug_to_terminal_save_ours): New function.
+ (cleanup_target): Defaults to_terminal_save_ours.
+ (update_current_target): Inherit to_terminal_save_ours.
+ (setup_target_debug): Set to_terminal_save_ours.
+ * target.h (target_terminal_save_ours): New to save terminal settings.
+ (target_ops): New member to_terminal_save_ours.
+ * gnu-nat.c (init_gnu_ops): Set to_terminal_save_ours.
+ * hpux-thread.c (init_hpux_thread_ops): Likewise.
+ * inftarg.c (init_child_ops): Likewise.
+ * m3-nat.c (init_m3_ops): Likewise.
+ * procfs.c (init_procfs_ops): Likewise.
+ * wince.c (init_child_ops): Likewise.
+ * win32-nat.c (init_child_ops): Likewise.
+ * sol-thread.c (init_sol_thread_ops): Likewise.
+
+2002-08-26 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_store_return_value): Undeprecate. Convert to
+ use regcache_* functions.
+ (i386_gdbarch_init): Set store_return_value instead of
+ deprecated_store_return_value.
+
+ * regcache.c (regcache_raw_write_signed,
+ regcache_raw_write_unsigned): New functions.
+ * regcache.h (regcache_raw_write_signed,
+ regcache_raw_write_unsigned): New prototypes.
+
+2002-08-25 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (c-exp.tab.o, jv-exp.tab.o, f-exp.tab.o)
+ (m2-exp.tab.o, p-exp.tab.o, ada-exp.tab.o): Move to before the
+ source file dependencies. Cleanup corresponding generator rules.
+
2002-08-25 Andrew Cagney <ac131313@redhat.com>
* regcache.h (register_offset_hack): Declare.
@@ -149,7 +404,7 @@
(linux_make_note_section): Initialize thread_args.num_notes, and
use it to determine whether notes for any threads were created.
-2002-08-23 Donn Terry <dterry@microsoft.com>
+2002-08-23 Donn Terry <donnte@microsoft.com>
* proc-api.c (rw_table): Do not include a row for PCDSTOP if the
corresponding macro is not defined. Likewise for PCNICE, PCSHOLD
@@ -161,6 +416,14 @@
2002-08-22 Elena Zannoni <ezannoni@redhat.com>
+ * ppc-sysv-tdep.c (ppc_sysv_abi_push_arguments): use
+ write_register wherever possible instead of manipulating the
+ register bytes directly.
+ Assign VALUE_CONTENTS to a variable and use that.
+ The GPR numbers are now dependent on the architecture.
+
+2002-08-22 Elena Zannoni <ezannoni@redhat.com>
+
* rs6000-tdep.c (struct rs6000_framedata): Add saved_ev and
ev_offset fields.
(skip_prologue): Add support for BookE/e500 instructions.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 756ffdf4074..45739e3ab2c 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1198,15 +1198,20 @@ version.c: Makefile version.in
mv version.c-tmp version.c
version.o: version.c $(version_h)
-# c-exp.tab.c is generated in objdir from c-exp.y if it doesn't exist
-# in srcdir, then compiled in objdir to c-exp.tab.o.
-# If we said c-exp.tab.c rather than ./c-exp.tab.c some makes
-# would sometimes re-write it into $(srcdir)/c-exp.tab.c.
+# LANG-exp.tab.c is generated in objdir from LANG-exp.y if it doesn't
+# exist in srcdir, then compiled in objdir to LANG-exp.tab.o.
-# Remove bogus decls for malloc/realloc/free which conflict with everything
-# else. Strictly speaking c-exp.tab.c should therefore depend on
-# Makefile.in, but that was a pretty big annoyance.
+# If we said LANG-exp.tab.c rather than ./c-exp.tab.c some makes would
+# sometimes re-write it into $(srcdir)/c-exp.tab.c.
+
+# Remove bogus decls for malloc/realloc/free which conflict with
+# everything else. Strictly speaking c-exp.tab.c should therefore
+# depend on Makefile.in, but that was a pretty big annoyance.
+
+# See comments above ...
+.PRECIOUS: c-exp.tab.c
+c-exp.tab.o: c-exp.tab.c
c-exp.tab.c: c-exp.y
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/c-exp.y y.tab.c c-exp.tmp -- $(YFLAGS)
-sed -e '/extern.*malloc/d' \
@@ -1220,6 +1225,8 @@ c-exp.tab.c: c-exp.y
-rm c-exp.tmp
mv c-exp.new ./c-exp.tab.c
+# See comments above ...
+.PRECIOUS: jv-exp.tab.c
jv-exp.tab.o: jv-exp.tab.c
jv-exp.tab.c: jv-exp.y
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/jv-exp.y y.tab.c jv-exp.tmp -- $(YFLAGS)
@@ -1234,6 +1241,8 @@ jv-exp.tab.c: jv-exp.y
-rm jv-exp.tmp
mv jv-exp.new ./jv-exp.tab.c
+# See comments above ...
+.PRECIOUS: f-exp.tab.c
f-exp.tab.o: f-exp.tab.c
f-exp.tab.c: f-exp.y c-exp.tab.c
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/f-exp.y y.tab.c f-exp.tmp -- $(YFLAGS)
@@ -1248,10 +1257,8 @@ f-exp.tab.c: f-exp.y c-exp.tab.c
-rm f-exp.tmp
mv f-exp.new ./f-exp.tab.c
-# m2-exp.tab.c is generated in objdir from m2-exp.y if it doesn't exist
-# in srcdir, then compiled in objdir to m2-exp.tab.o.
-# Remove bogus decls for malloc/realloc/free which conflict with everything
-# else.
+# See comments above ...
+.PRECIOUS: m2-exp.tab.c
m2-exp.tab.o: m2-exp.tab.c
m2-exp.tab.c: m2-exp.y
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/m2-exp.y y.tab.c m2-exp.tmp -- $(YFLAGS)
@@ -1266,10 +1273,9 @@ m2-exp.tab.c: m2-exp.y
-rm m2-exp.tmp
mv m2-exp.new ./m2-exp.tab.c
-# ada-exp.tab.c is generated in objdir from ada-exp.y if it doesn't exist
-# in srcdir, then compiled in objdir to ada-exp.tab.o.
-# Remove bogus decls for malloc/realloc/free which conflict with everything
-# else.
+# See comments above ...
+.PRECIOUS: ada-exp.tab.c
+ada-exp.tab.o: ada-exp.tab.c
ada-exp.tab.c: ada-exp.y
$(YACC) $(YFLAGS) $(srcdir)/ada-exp.y
-sed -e '/extern.*malloc/d' \
@@ -1282,6 +1288,9 @@ ada-exp.tab.c: ada-exp.y
-rm y.tab.c
mv ada-exp.new ./ada-exp.tab.c
+# See comments above ...
+.PRECIOUS: ada-lex.c
+ada-lex.o: ada-lex.c
ada-lex.c: ada-lex.l
@if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
echo $(FLEX) -Isit $(srcdir)/ada-lex.l ">" ada-lex.c; \
@@ -1293,10 +1302,8 @@ ada-lex.c: ada-lex.l
echo "Warning: ada-lex.c older than ada-lex.l and flex not available."; \
fi
-# p-exp.tab.c is generated in objdir from p-exp.y if it doesn't exist
-# in srcdir, then compiled in objdir to p-exp.tab.o.
-# Remove bogus decls for malloc/realloc/free which conflict with everything
-# else.
+# See comments above ...
+.PRECIOUS: p-exp.tab.c
p-exp.tab.o: p-exp.tab.c
p-exp.tab.c: p-exp.y
$(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/p-exp.y y.tab.c p-exp.tmp -- $(YFLAGS)
@@ -1311,10 +1318,6 @@ p-exp.tab.c: p-exp.y
-rm p-exp.tmp
mv p-exp.new ./p-exp.tab.c
-# These files are updated atomically, so make never has to remove them
-.PRECIOUS: m2-exp.tab.c f-exp.tab.c c-exp.tab.c
-.PRECIOUS: jv-exp.tab.c p-exp.tab.c ada-exp.tab.c
-
lint: $(LINTFILES)
$(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
`echo $(DEPFILES) | sed 's/\.o /\.c /g'`
@@ -1429,991 +1432,867 @@ z8k-tdep.o: $(srcdir)/z8k-tdep.c
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \
$(srcdir)/z8k-tdep.c
-# The dependencies. In aphabetic order.
+#
+# Generated YACC/LEX dependencies
+#
-a68v-nat.o: a68v-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(regcache_h)
+c-exp.tab.o: c-exp.tab.c $(defs_h) $(gdb_string_h) $(expression_h) \
+ $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) \
+ $(symfile_h) $(objfiles_h)
-aix-thread.o: aix-thread.c $(defs_h) $(gdbcore_h) $(gdbthread_h) \
- $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) $(gdb_assert_h) \
- $(ppc_tdep_h) $(language_h)
+jv-exp.tab.o: jv-exp.tab.c jv-lang.h $(defs_h) $(expression_h) \
+ $(gdbtypes_h) $(language_h) $(parser_defs_h) $(symtab_h) $(value_h) \
+ $(bfd_h) $(objfiles_h) $(symfile_h)
-ada-lang.o: ada-lang.c ada-lang.h c-lang.h $(defs_h) $(expression_h) \
- $(gdbtypes_h) $(inferior_h) language.h parser-defs.h $(symtab_h) \
- $(gdbcmd_h) $(ui_out_h) symfile.h objfiles.h $(gdbcore_h)
+f-exp.tab.o: f-exp.tab.c f-lang.h $(defs_h) $(expression_h) \
+ $(language_h) $(parser_defs_h) $(value_h) $(bfd_h) $(objfiles_h) \
+ $(symfile_h)
-ada-tasks.o: ada-tasks.c ada-lang.h $(defs_h) language.h $(value_h) \
- $(command_h) $(value_h) $(gdbcore_h)
+m2-exp.tab.o: m2-exp.tab.c $(defs_h) $(expression_h) $(gdbtypes_h) \
+ $(language_h) m2-lang.h $(parser_defs_h) $(symtab_h) $(value_h) \
+ $(bfd_h) $(objfiles_h) $(symfile_h)
-ada-typeprint.o: ada-typeprint.c ada-lang.h $(defs_h) $(expression_h) \
- $(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) \
- target.h typeprint.h $(value_h) ada-lang.h
+p-exp.tab.o: p-exp.tab.c $(defs_h) $(expression_h) $(gdbtypes_h) \
+ $(language_h) p-lang.h $(parser_defs_h) $(symtab_h) $(value_h) \
+ $(bfd_h) $(objfiles_h) $(symfile_h)
-ada-valprint.o: ada-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
- language.h $(symtab_h) valprint.h $(value_h) c-lang.h ada-lang.h \
- annotate.h
+ada-exp.tab.o: ada-exp.tab.c ada-lex.c ada-lang.h \
+ $(defs_h) $(expression_h) \
+ $(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h) \
+ $(bfd_h) objfiles.h symfile.h
-alpha-nat.o: alpha-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
- $(regcache_h) $(alpha_tdep_h)
+#
+# The dependencies. In aphabetic order.
+#
+a68v-nat.o: a68v-nat.c $(defs_h) $(inferior_h) $(regcache_h)
+abug-rom.o: abug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(regcache_h)
+ada-lang.o: ada-lang.c $(gdb_string_h) $(demangle_h) $(defs_h) $(symtab_h) \
+ $(gdbtypes_h) $(gdbcmd_h) $(expression_h) $(parser_defs_h) \
+ $(language_h) $(c_lang_h) $(inferior_h) $(symfile_h) $(objfiles_h) \
+ $(breakpoint_h) $(gdbcore_h) $(ada_lang_h) $(ui_out_h)
+ada-tasks.o: ada-tasks.c $(defs_h) $(command_h) $(value_h) $(language_h) \
+ $(inferior_h) $(symtab_h) $(target_h) $(gdbcore_h) $(gregset_h) \
+ $(ada_lang_h)
+ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \
+ $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \
+ $(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \
+ $(c_lang_h) $(typeprint_h) $(ada_lang_h) $(gdb_string_h)
+ada-valprint.o: ada-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
+ $(expression_h) $(value_h) $(demangle_h) $(valprint_h) $(language_h) \
+ $(annotate_h) $(ada_lang_h) $(c_lang_h)
+aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \
+ $(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \
+ $(ppc_tdep_h)
+alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
+ $(value_h) $(alpha_tdep_h)
+alpha-nat.o: alpha-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
+ $(regcache_h) $(alpha_tdep_h) $(gregset_h)
+alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
+ $(value_h) $(alpha_tdep_h)
+alpha-tdep.o: alpha-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
+ $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) $(symfile_h) \
+ $(objfiles_h) $(gdb_string_h) $(linespec_h) $(regcache_h) \
+ $(doublest_h) $(arch_utils_h) $(elf_bfd_h) $(alpha_tdep_h)
alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(alpha_tdep_h) alphabsd-tdep.h
-
-alpha-tdep.o: alpha-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) $(symtab_h) $(dis_asm_h) $(gdb_string_h) $(linespec_h) \
- $(regcache_h) $(doublest_h) $(BFD_SRC)/elf-bfd.h $(alpha_tdep_h)
-
-alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(value_h) $(alpha_tdep_h)
-
-alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(value_h) $(alpha_tdep_h)
-
-alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(regcache_h) alphabsd-tdep.h
-
+ $(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h)
+alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(regcache_h) $(alpha_tdep_h) \
+ $(alphabsd_tdep_h)
alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(alpha_tdep_h)
-
-alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(value_h) $(alpha_tdep_h) solib-svr4.h alphabsd-tdep.h nbsd-tdep.h
-
-annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) $(gdbtypes_h)
-
+alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
+ $(regcache_h) $(value_h) $(solib_svr4_h) $(alpha_tdep_h) \
+ $(alphabsd_tdep_h) $(nbsd_tdep_h)
+annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \
+ $(gdbtypes_h) $(breakpoint_h)
+# OBSOLETE arc-tdep.o: arc-tdep.c
+arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) \
+ $(inferior_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
+ $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(annotate_h) \
+ $(gdb_string_h) $(regcache_h) $(gdb_assert_h) $(sim_regno_h) \
+ $(version_h) $(floatformat_h)
arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(gdb_string_h) $(regcache_h) $(arm_tdep_h)
-
+ $(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(gregset_h)
arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \
- $(gdbtypes_h) $(floatformat_h) $(regcache_h) $(doublest_h) $(arm_tdep_h)
-
+ $(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \
+ $(doublest_h) $(arm_tdep_h) $(symtab_h) $(symfile_h) $(objfiles_h)
arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
- $(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) $(doublest_h) \
- $(value_h) $(arch_utils_h) $(solib_svr4_h) $(arm_tdep_h) \
- $(BFD_SRC)/elf-bfd.h $(INCLUDE_DIR)/coff/internal.h \
- $(INCLUDE_DIR)/elf/arm.h $(sim_arm_h) $(gdb_assert_h)
-
+ $(gdbcore_h) $(symfile_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \
+ $(doublest_h) $(value_h) $(arch_utils_h) $(solib_svr4_h) \
+ $(arm_tdep_h) $(gdb_sim_arm_h) $(elf_bfd_h) $(coff_internal_h) \
+ $(elf_arm_h) $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h)
armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \
$(regcache_h) $(gdbcore_h)
-
-armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(arm_tdep_h) solib-svr4.h \
- nbsd-tdep.h
-
+armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(arm_tdep_h) $(nbsd_tdep_h) \
+ $(solib_svr4_h)
avr-tdep.o: avr-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
$(symfile_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h)
-
+ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
+ $(value_h) $(expression_h) $(command_h) $(gdbcmd_h) $(frame_h) \
+ $(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h)
+ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h) $(gdb_string_h)
bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h)
-
-blockframe.o: blockframe.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(objfiles_h) $(symfile_h) $(target_h) $(regcache_h)
-
-breakpoint.o: breakpoint.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) $(language_h) $(target_h) $(gdbthread_h) \
- $(gdb_string_h) $(gdb_events_h) $(linespec_h) $(ui_out_h) \
- $(completer_h) $(gdb_h)
-
+blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
+ $(objfiles_h) $(frame_h) $(gdbcore_h) $(value_h) $(target_h) \
+ $(inferior_h) $(annotate_h) $(regcache_h) $(gdb_assert_h)
+breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \
+ $(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \
+ $(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \
+ $(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \
+ $(objfiles_h) $(linespec_h) $(completer_h) $(gdb_h) $(ui_out_h) \
+ $(cli_script_h) $(gdb_events_h)
buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(gdbtypes_h) $(complaints_h) \
$(gdb_string_h) $(expression_h) $(language_h) $(bcache_h) \
- $(filenames_h) $(macrotab_h) $(demangle_h) $(buildsym_h) $(stabsread_h)
-
-builtin-regs.o: builtin-regs.c $(defs.h) $(builtin_regs_h) $(gdbtypes_h) \
- $(gdb_string_h) $(value_h) $(frame_h)
-
-c-lang.o: c-lang.c $(c_lang_h) $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) $(parser_defs_h) $(symtab_h) $(macroscope_h) \
- gdb_assert.h
-
+ $(filenames_h) $(macrotab_h) $(demangle_h) $(buildsym_h) \
+ $(stabsread_h)
+builtin-regs.o: builtin-regs.c $(defs_h) $(builtin_regs_h) $(gdbtypes_h) \
+ $(gdb_string_h) $(gdb_assert_h)
+c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
+ $(parser_defs_h) $(language_h) $(c_lang_h) $(valprint_h) \
+ $(macroscope_h) $(gdb_assert_h)
c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
$(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \
$(gdb_string_h)
-
-c-valprint.o: c-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) $(symtab_h) $(valprint_h) $(value_h) $(cp_abi_h)
-
-doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) $(gdbtypes_h) \
- $(gdb_assert_h) $(gdb_string_h)
-
-f-lang.o: f-lang.c f-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) $(parser_defs_h) $(symtab_h) $(gdb_string_h)
-
-f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
- $(f_lang_h) $(gdb_string_h)
-
-f-valprint.o: f-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) $(symtab_h) $(valprint_h) $(value_h) $(gdb_string_h)
-
-# OBSOLETE ch-exp.o: ch-exp.c ch-lang.h $(defs_h) $(language_h) $(parser_defs_h) \
-# OBSOLETE $(bfd_h) $(symfile_h) $(objfiles_h) $(value_h)
-
-# OBSOLETE ch-lang.o: ch-lang.c ch-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
-# OBSOLETE $(language_h) $(parser_defs_h) $(symtab_h)
-
-# OBSOLETE ch-typeprint.o: ch-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \
-# OBSOLETE $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \
-# OBSOLETE $(target_h) $(language_h) $(ch_lang_h) $(typeprint_h) $(gdb_string_h)
-
-# OBSOLETE ch-valprint.o: ch-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
-# OBSOLETE $(gdbtypes_h) $(valprint_h) $(expression_h) $(value_h) $(language_h) \
-# OBSOLETE $(demangle_h) $(c_lang_h) $(typeprint_h) $(ch_lang_h) $(annotate_h)
-
-coff-solib.o: coff-solib.c $(defs_h)
-
+c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
+ $(c_lang_h) $(cp_abi_h)
+# OBSOLETE ch-exp.o: ch-exp.c
+# OBSOLETE ch-lang.o: ch-lang.c
+# OBSOLETE ch-typeprint.o: ch-typeprint.c
+# OBSOLETE ch-valprint.o: ch-valprint.c
+cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \
+ $(gdb_assert_h)
+coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \
+ $(symtab_h) $(symfile_h) $(objfiles_h)
coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \
$(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \
$(coff_internal_h) $(libcoff_h) $(symfile_h) $(objfiles_h) \
$(buildsym_h) $(gdb_stabs_h) $(stabsread_h) $(complaints_h) \
$(target_h) $(gdb_assert_h)
-
-complaints.o: complaints.c $(complaints_h) $(defs_h) $(gdbcmd_h)
-
-# Provide explicit rule/dependency - works for more makes.
-copying.o: $(srcdir)/copying.c $(defs_h) $(gdbcmd_h)
-
-core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(inferior_h) \
- $(regcache_h)
-
-core-sol2.o: core-sol2.c $(command_h) $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(target_h) $(gdb_string_h) $(regcache_h)
-
-core-regset.o: core-regset.c $(command_h) $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(target_h) $(gdb_string_h)
-
-corefile.o: corefile.c $(dis_asm_h) $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) $(target_h) $(language_h) $(gdb_string_h) \
- $(completer_h) $(symfile_h)
-
-corelow.o: corelow.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(target_h) $(gdbthread_h) $(gdb_string_h) $(regcache_h)
-
-gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
- $(elf_bfd_h) $(symfile_h) $(objfiles_h)
-
-linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) $(gregset_h) \
- $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) $(cli_decode_h) \
- $(gdb_string_h)
-
-cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h)
-
+complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdbcmd_h)
+completer.o: completer.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
+ $(filenames_h) $(cli_decode_h) $(gdbcmd_h) $(completer_h)
+copying.o: copying.c $(defs_h) $(command_h) $(gdbcmd_h)
+core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(regcache_h) \
+ $(gdb_dirent_h) $(gdb_stat_h)
+core-regset.o: core-regset.c $(defs_h) $(gdb_string_h) $(inferior_h) \
+ $(target_h) $(command_h) $(gdbcore_h) $(gregset_h)
+core-sol2.o: core-sol2.c $(defs_h) $(gdb_string_h) $(regcache_h) \
+ $(inferior_h) $(target_h) $(command_h) $(gdbcore_h) $(gregset_h)
+corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \
+ $(command_h) $(gdbcmd_h) $(bfd_h) $(target_h) $(gdbcore_h) \
+ $(dis_asm_h) $(gdb_stat_h) $(completer_h)
+corelow.o: corelow.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
+ $(symtab_h) $(command_h) $(bfd_h) $(target_h) $(gdbcore_h) \
+ $(gdbthread_h) $(regcache_h) $(symfile_h)
+cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(gdb_string_h)
cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
$(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \
$(cp_abi_h)
-
-dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) $(gdb_string_h) \
- $(gdbcore_h) $(target_h)
-
+cpu32bug-rom.o: cpu32bug-rom.c $(defs_h) $(gdbcore_h) $(target_h) \
+ $(monitor_h) $(serial_h) $(regcache_h)
+cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(inferior_h) \
+ $(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(value_h) \
+ $(opcode_cris_h) $(arch_utils_h) $(regcache_h) $(symfile_h) \
+ $(solib_h) $(solib_svr4_h)
+# OBSOLETE cxux-nat.o: cxux-nat.c
d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
$(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) $(inferior_h) \
- $(dis_asm_h) $(symfile_h) $(objfiles_h) $(language_h) $(arch_utils_h) \
- $(regcache_h) $(floatformat_h) $(sim_d10v_h) $(sim_regno_h)
-
-dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) $(gdb_stat_h) \
- $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) $(libaout_h) \
- $(symfile_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
+ $(dis_asm_h) $(symfile_h) $(objfiles_h) $(language_h) \
+ $(arch_utils_h) $(regcache_h) $(floatformat_h) $(gdb_sim_d10v_h) \
+ $(sim_regno_h)
+# OBSOLETE d30v-tdep.o: d30v-tdep.c
+dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(regcache_h)
+dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \
+ $(gdb_stat_h) $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) \
+ $(libaout_h) $(symfile_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
$(gdb_stabs_h) $(demangle_h) $(language_h) $(complaints_h) \
$(cp_abi_h) $(aout_aout64_h) $(aout_stab_gnu_h)
-
+dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \
+ $(gdbcore_h) $(target_h)
delta68-nat.o: delta68-nat.c $(defs_h)
-
-demangle.o: demangle.c $(defs_h) $(gdbcmd_h) $(gdb_string_h)
-
-dink32-rom.o: dink32-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) \
- $(gdbcmd_h) $(inferior_h) $(target_h) $(serial_h) $(terminal_h) \
- $(symfile_h) $(regcache_h)
-
+demangle.o: demangle.c $(defs_h) $(command_h) $(gdbcmd_h) $(demangle_h) \
+ $(gdb_string_h)
+dink32-rom.o: dink32-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(symfile_h) $(inferior_h) $(regcache_h)
+doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \
+ $(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h)
dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h)
-
-# OBSOLETE dstread.o: dstread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(breakpoint_h) \
-# OBSOLETE $(bfd_h) $(symfile_h) $(objfiles_h) $(buildsym_h) $(gdb_obstack_h) \
-# OBSOLETE $(gdb_string_h) $(dst_h)
-
-dwarf2cfi.o: dwarf2cfi.c $(defs_h) $(symtab_h) $(symfile_h) $(objfiles_h) \
- $(target_h) $(inferior_h) $(regcache_h) $(dwarf2cfi_h)
-
-dwarfread.o: dwarfread.c $(bfd_h) $(buildsym_h) $(complaints_h) $(defs_h) \
- $(expression_h) $(gdbtypes_h) $(language_h) $(objfiles_h) \
- $(symfile_h) $(symtab_h) $(gdb_string_h)
-
-dwarf2read.o: dwarf2read.c $(bfd_h) $(buildsym_h) $(defs_h) \
- $(expression_h) $(gdbtypes_h) $(language_h) $(objfiles_h) \
- $(symfile_h) $(symtab_h) $(gdb_string_h) $(macrotab_h)
-
-elfread.o: elfread.c $(bfd_h) $(buildsym_h) $(complaints_h) $(defs_h) \
- $(gdb_stabs_h) $(objfiles_h) $(symfile_h) $(symtab_h) $(gdb_string_h) \
- $(BFD_SRC)/elf-bfd.h $(INCLUDE_DIR)/elf/mips.h
-
-environ.o: environ.c $(defs_h) environ.h $(gdbcore_h) $(gdb_string_h)
-
-eval.o: eval.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
- $(gdbtypes_h) $(language_h) $(symtab_h) $(target_h) $(value_h) \
- $(gdb_string_h) $(cp_abi_h)
-
-event-loop.o: event-loop.c $(defs_h) $(top_h) $(event_loop_h) $(event_top_h)
-
-event-top.o: event-top.c $(top_h) $(readline_headers) \
- $(defs_h) $(inferior_h) $(event_loop_h) $(event_top_h) $(terminal_h) \
- $(gdbcmd_h) $(target_h) $(cli_decode_h)
-
-inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(inf_loop_h) $(event_loop_h) \
- $(event_top_h)
-
-exec.o: exec.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
- $(target_h) $(language_h) $(gdb_string_h) $(completer_h) $(value_h)
-
-expprint.o: expprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) $(parser_defs_h) $(symtab_h) $(value_h)
-
-fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) $(gdb_string_h) \
- $(elf_bfd_h) $(gregset_h)
-
-findvar.o: findvar.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
- $(gdb_string_h) $(regcache_h) $(builtin_regs_h)
-
+dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h)
+# OBSOLETE dstread.o: dstread.c
+dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h)
+dwarf2cfi.o: dwarf2cfi.c $(defs_h) $(gdbcore_h) $(symtab_h) $(symfile_h) \
+ $(objfiles_h) $(target_h) $(elf_dwarf2_h) $(inferior_h) \
+ $(regcache_h) $(dwarf2cfi_h) $(gdb_assert_h)
+dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
+ $(symfile_h) $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) \
+ $(demangle_h) $(expression_h) $(filenames_h) $(macrotab_h) \
+ $(language_h) $(complaints_h) $(bcache_h) $(gdb_string_h) \
+ $(gdb_assert_h)
+dwarfread.o: dwarfread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \
+ $(objfiles_h) $(elf_dwarf_h) $(buildsym_h) $(demangle_h) \
+ $(expression_h) $(language_h) $(complaints_h) $(gdb_string_h)
+elfread.o: elfread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(elf_bfd_h) \
+ $(elf_mips_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \
+ $(stabsread_h) $(gdb_stabs_h) $(complaints_h) $(demangle_h)
+environ.o: environ.c $(defs_h) $(environ_h) $(gdb_string_h)
+eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+ $(value_h) $(expression_h) $(target_h) $(frame_h) $(language_h) \
+ $(f_lang_h) $(cp_abi_h)
+event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \
+ $(gdb_string_h)
+event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \
+ $(terminal_h) $(event_loop_h) $(event_top_h) $(gdbcmd_h)
+exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \
+ $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \
+ $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) $(xcoffsolib_h)
+expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
+ $(value_h) $(language_h) $(parser_defs_h)
+f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+ $(expression_h) $(parser_defs_h) $(language_h) $(f_lang_h) \
+ $(valprint_h)
+f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+ $(f_lang_h) $(gdb_string_h)
+f-valprint.o: f-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
+ $(f_lang_h) $(frame_h) $(gdbcore_h) $(command_h)
+fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) \
+ $(gdb_string_h) $(elf_bfd_h) $(gregset_h)
+findvar.o: findvar.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(frame_h) \
+ $(value_h) $(gdbcore_h) $(inferior_h) $(target_h) $(gdb_string_h) \
+ $(gdb_assert_h) $(floatformat_h) $(symfile_h) $(regcache_h) \
+ $(builtin_regs_h)
+fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \
+ $(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \
+ $(terminal_h) $(gdbthread_h) $(command_h)
+# OBSOLETE fr30-tdep.o: fr30-tdep.c
frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
- $(regcache_h)
-
+ $(regcache_h) $(gdb_assert_h)
frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
$(arch_utils_h) $(regcache_h)
-
-regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
- $(gdbcmd_h) $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(gdbcmd_h)
-
-fork-child.o: fork-child.c $(gdb_wait_h) $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(target_h) $(terminal_h) $(gdbthread_h) $(gdb_string_h)
-
-v850ice.o: v850ice.c $(defs_h) $(symtab_h) $(inferior_h) $(command_h) \
- $(frame_h) $(breakpoint_h) $(gdbcore_h) $(value_h) $(symfile_h) \
- $(gdb_string_h) $(target_h) $(objfiles_h) $(regcache_h)
-
-v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
- $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
- $(arch_utils_h) $(regcache_h) $(symtab_h)
-
-tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(tracepoint_h) \
- $(gdbtypes_h) $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) \
- $(language_h) $(gdb_string_h) $(readline_headers) $(remote_h) \
- $(linespec_h) $(regcache_h) $(completer_h)
-
+gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
+ $(elf_bfd_h) $(symfile_h) $(objfiles_h)
+gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h)
gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
$(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(gdbthread_h) \
$(annotate_h) $(symfile_h) $(value_h) $(symcat_h) $(floatformat_h) \
$(gdb_assert_h) $(gdb_string_h) $(gdb_events_h)
-
-arch-utils.o: arch-utils.c $(defs_h) $(bfd_h) $(gdbcmd_h) \
- $(arch_utils_h) $(gdb_assert_h) $(inferior_h) \
- $(gdb_string_h) $(symtab.h) $(frame_h) $(breakpoint_h) $(gdb_wait_h) \
- $(gdbcore_h) $(target_h) $(annotate_h) $(regcache_h) $(gdb_assert_h) \
- $(version_h) $(floatformat_h) $(sim_regno_h)
-
-gdbtypes.o: gdbtypes.c $(bfd_h) $(complaints_h) $(defs_h) $(expression_h) \
- $(gdbtypes_h) $(language_h) $(objfiles_h) $(symfile_h) $(symtab_h) \
- $(target_h) $(value_h) $(gdb_string_h) $(wrapper_h) $(cp_abi_h)
-
-osabi.o: osabi.c $(defs_h) $(BFD_SRC)/elf-bfd.h
-
-go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \
- $(command_h) $(floatformat_h) $(target_h) i387-tdep.h $(regcache_h)
-
-gnu-nat.o: process_reply_S.h exc_request_S.h notify_S.h msg_reply_S.h \
- exc_request_U.h msg_U.h gnu-nat.h
-
+gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
+ $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \
+ $(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \
+ $(gdbcmd_h) $(wrapper_h) $(cp_abi_h) $(gdb_assert_h)
+gnu-nat.o: gnu-nat.c $(gdb_string_h) $(defs_h) $(inferior_h) $(symtab_h) \
+ $(value_h) $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) \
+ $(gdbcore_h) $(gdbthread_h) $(gdb_assert_h) $(gnu_nat_h) \
+ $(exc_request_S_h) $(notify_S_h) $(process_reply_S_h) \
+ $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h)
gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \
- $(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h)
-
+ $(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h)
gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(demangle_h) \
$(gdb_assert_h) $(gdb_string_h)
-
+go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \
+ $(command_h) $(gdbcmd_h) $(floatformat_h) $(buildsym_h) \
+ $(i387_tdep_h) $(i386_tdep_h) $(value_h) $(regcache_h) \
+ $(gdb_string_h)
h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(dis_asm_h) \
$(gdbcmd_h) $(gdbtypes_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
$(regcache_h)
-
h8500-tdep.o: h8500-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
$(gdbcmd_h) $(value_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h)
-
-hp300ux-nat.o: hp300ux-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-
-hpacc-abi.o: hpacc-abi.c $(defs_h) $(cp_abi_h) $(gdb_string_h) $(gdbtypes_h) \
- $(value_h) $(gdbcore_h)
-
-hppa-tdep.o: hppa-tdep.c $(gdb_wait_h) $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) $(objfiles_h) $(symfile_h) $(target_h) $(regcache_h) \
- $(completer_h)
-
-hppab-nat.o: hppab-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(target_h) \
- $(regcache_h)
-
-hppah-nat.o: hppah-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(target_h) \
- $(regcache_h)
-
-i386gnu-tdep.o: $(defs_h) $(i386_tdep_h)
-
-i386gnu-nat.o: gnu-nat.h
-
-i386-tdep.o: i386-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) \
- $(inferior_h) $(gdbcore_h) $(target_h) $(floatformat_h) \
- $(symtab_h) $(gdbcmd_h) $(command_h) $(arch_utils_h) $(regcache_h) \
- $(doublest_h) $(value_h)
-
-i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h)
-
-# OBSOLETE i386aix-nat.o: i386aix-nat.c $(defs_h) $(frame_h) $(inferior_h) \
-# OBSOLETE $(language_h) $(gdbcore_h) $(floatformat_h) $(target_h) $(regcache_h)
-
-i386b-nat.o: i386b-nat.c $(defs_h) $(regcache_h)
-
-i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(frame_h) $(gdb_core_h) \
+hp300ux-nat.o: hp300ux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
$(regcache_h)
-
-i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h)
-
-i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h)
-
-i386ly-nat.o: i386ly-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h)
-
-i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
+hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
+ $(gdbtypes_h) $(gdbcore_h) $(cp_abi_h)
+hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \
+ $(value_h) $(regcache_h) $(completer_h) $(symtab_h) $(a_out_encap_h) \
+ $(gdb_stat_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \
+ $(symfile_h) $(objfiles_h)
+hppab-nat.o: hppab-nat.c $(defs_h) $(inferior_h) $(target_h) $(regcache_h)
+hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
+ $(gdb_wait_h) $(regcache_h)
+hppam3-nat.o: hppam3-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
$(regcache_h)
-
-# OBSOLETE i386m3-nat.o: i386m3-nat.c $(defs_h) $(inferior_h) $(floatformat_h) $(target_h) \
-# OBSOLETE $(regcache_h)
-
-# OBSOLETE i386mach-nat.o: i386mach-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
-# OBSOLETE $(regcache_h)
-
-i386v-nat.o: i386v-nat.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(language_h) $(target_h)
-
+hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \
+ $(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \
+ $(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \
+ $(gdb_string_h)
+hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
+ $(inferior_h) $(regcache_h) $(gdbcore_h)
i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(symtab_h) $(symfile_h) $(objfiles_h) $(regcache_h) \
- $(i386_linux_tdep_h) $(i386_tdep_h) $(i387_tdep_h)
-
+ $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(gregset_h) \
+ $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h)
i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
- $(value_h) $(regcache_h)
-
-i386v4-nat.o: i386v4-nat.c $(defs_h) $(regcache_h)
-
-i387-tdep.o: i387-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(language_h) $(regcache_h) $(doublest_h) i386-tdep.h
-
-# OBSOLETE i960-tdep.o: i960-tdep.c $(defs_h) $(symtab_h) $(value_h) $(frame_h) \
-# OBSOLETE $(floatformat_h) $(target_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-
-ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(inferior_h) $(target_h) \
- $(gdbcore_h) $(regcache_h)
-
+ $(value_h) $(regcache_h) $(inferior_h) $(symtab_h) $(symfile_h) \
+ $(objfiles_h) $(solib_svr4_h) $(i386_tdep_h) $(i386_linux_tdep_h)
+i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h)
+i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(i386_tdep_h)
+i386-stub.o: i386-stub.c
+i386-tdep.o: i386-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
+ $(gdbcore_h) $(objfiles_h) $(target_h) $(floatformat_h) $(symfile_h) \
+ $(symtab_h) $(gdbcmd_h) $(command_h) $(arch_utils_h) $(regcache_h) \
+ $(doublest_h) $(value_h) $(gdb_assert_h) $(i386_tdep_h) \
+ $(i387_tdep_h)
+# OBSOLETE i386aix-nat.o: i386aix-nat.c
+i386b-nat.o: i386b-nat.c $(defs_h)
+i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+ $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h)
+i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
+ $(gdbcore_h) $(regcache_h) $(gdb_string_h) $(i386_tdep_h)
+i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h)
+i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
+ $(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \
+ $(i387_tdep_h)
+i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(i386_tdep_h)
+i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
+ $(regcache_h) $(target_h) $(i386_tdep_h)
+# OBSOLETE i386m3-nat.o: i386m3-nat.c
+# OBSOLETE i386mach-nat.o: i386mach-nat.c
+i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(gdbtypes_h) $(gdbcore_h) \
+ $(regcache_h) $(arch_utils_h) $(i386_tdep_h) $(i387_tdep_h) \
+ $(nbsd_tdep_h) $(solib_svr4_h)
+i386obsd-nat.o: i386obsd-nat.c $(defs_h)
+i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
+ $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h)
+i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \
+ $(i386_tdep_h) $(i387_tdep_h) $(gregset_h)
+i387-tdep.o: i387-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
+ $(value_h) $(gdbcore_h) $(floatformat_h) $(regcache_h) \
+ $(gdb_assert_h) $(gdb_string_h) $(doublest_h) $(i386_tdep_h)
+# OBSOLETE i960-tdep.o: i960-tdep.c
+ia64-aix-nat.o: ia64-aix-nat.c $(defs_h) $(inferior_h) $(target_h) \
+ $(gdbcore_h) $(regcache_h) $(symtab_h) $(bfd_h) $(symfile_h) \
+ $(objfiles_h) $(gdb_stat_h)
+ia64-aix-tdep.o: ia64-aix-tdep.c $(defs_h)
+ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(inferior_h) $(target_h) \
+ $(gdbcore_h) $(regcache_h) $(gregset_h)
ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(arch_utils_h)
-
ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
- $(arch_utils_h) $(floatformat_h) $(objfiles_h) $(value_h) \
- $(INCLUDE_DIR)/elf/common.h $(regcache_h) $(doublest_h)
-
-infcmd.o: infcmd.c $(defs_h) environ.h $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) $(target_h) $(language_h) $(symfile_h) $(gdb_string_h) \
- $(ui_out_h) $(completer_h) $(regcache_h)
-
-inflow.o: inflow.c $(bfd_h) $(command_h) $(defs_h) $(inferior_h) \
- $(target_h) $(terminal_h) $(gdbthread_h) $(gdb_string_h)
-
-infptrace.o: infptrace.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
- $(gdb_string_h) $(gdb_wait_h) $(command_h) $(regcache_h)
-
-infrun.o: infrun.c $(gdb_wait_h) $(defs_h) $(gdbcmd_h) $(cli_script_h) \
- $(gdbcore_h) $(value_h) \
- $(inferior_h) $(target_h) $(gdbthread_h) $(gdb_string_h) $(event_loop_h) \
- $(event_top_h) $(regcache_h)
-
-inftarg.o: inftarg.c $(gdb_wait_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(target_h) $(terminal_h) $(command_h)
-
-irix4-nat.o: irix4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
+ $(arch_utils_h) $(floatformat_h) $(regcache_h) $(doublest_h) \
+ $(value_h) $(objfiles_h) $(elf_common_h) $(elf_bfd_h)
+inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \
+ $(event_top_h) $(inf_loop_h) $(remote_h)
+infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+ $(frame_h) $(inferior_h) $(environ_h) $(value_h) $(gdbcmd_h) \
+ $(symfile_h) $(gdbcore_h) $(target_h) $(language_h) $(symfile_h) \
+ $(objfiles_h) $(completer_h) $(ui_out_h) $(event_top_h) \
+ $(parser_defs_h) $(regcache_h)
+inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \
+ $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h)
+infptrace.o: infptrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(gdb_string_h) $(regcache_h) $(gdb_wait_h) $(command_h) \
+ $(gdb_dirent_h) $(gdbcore_h) $(gdb_stat_h)
+infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \
+ $(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \
+ $(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \
+ $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h)
+inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h)
+infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbcore_h)
+irix4-nat.o: irix4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) \
+ $(gregset_h)
irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
- $(symtab_h) $(symfile_h) $(objfiles_h) $(command_h) $(frame_h) \
- $(gdb_regex_h) $(language_h) $(gdb_string_h) $(regcache_h)
-
-jv-lang.o: jv-lang.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
- $(expression_h) $(parser_defs_h) $(language_h) $(symfile_h) \
- $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) jv-lang.h \
- $(gdbcore_h)
-
-jv-typeprint.o: jv-typeprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
- $(value_h) $(demangle_h) jv-lang.h $(gdb_string_h) \
- $(typeprint_h) $(c_lang_h) $(cp_abi_h)
-
-jv-valprint.o: jv-valprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
- $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \
- $(language_h) jv-lang.h $(c_lang_h) gdbcore.h $(annotate_h)
-
+ $(regcache_h) $(gdb_string_h) $(gregset_h)
+jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
+ $(parser_defs_h) $(language_h) $(gdbtypes_h) $(symtab_h) \
+ $(symfile_h) $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) \
+ $(jv_lang_h) $(gdbcore_h)
+jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
+ $(value_h) $(demangle_h) $(jv_lang_h) $(gdb_string_h) $(typeprint_h) \
+ $(c_lang_h) $(cp_abi_h)
+jv-valprint.o: jv-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
+ $(gdbcore_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \
+ $(language_h) $(jv_lang_h) $(c_lang_h) $(annotate_h) $(gdb_string_h)
+kod-cisco.o: kod-cisco.c $(defs_h) $(gdb_string_h) $(kod_h)
kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) $(target_h) $(gdb_string_h) \
- kod.h
-
-kod-cisco.o: kod-cisco.c $(defs_h) $(gdb_string_h) kod.h
-
-language.o: language.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
- $(gdbcmd_h) $(gdbtypes_h) $(language_h) $(parser_defs_h) $(symtab_h) \
- $(target_h) $(value_h) $(gdb_string_h)
-
-lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcore_h) \
- $(target_h) $(regcache_h)
-
-m2-lang.o: m2-lang.c $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) m2-lang.h $(parser_defs_h) $(symtab_h)
-
-m2-typeprint.o: m2-typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
- $(gdbcore_h) $(gdbtypes_h) $(language_h) m2-lang.h $(symtab_h) \
- $(target_h) $(value_h) $(gdb_string_h)
-
-m2-valprint.o: m2-valprint.c $(defs_h) $(gdbtypes_h) $(symtab_h) \
- $(valprint_h) m2-lang.h
-
-m3-nat.o: m3-nat.c $(defs_h) $(inferior_h) $(value_h) $(language_h) \
- $(target_h) $(gdb_wait_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h)
-
+ $(kod_h)
+language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+ $(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \
+ $(parser_defs_h) $(jv_lang_h)
+lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \
+ $(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h)
+linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
+ $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(completer_h) \
+ $(cp_abi_h)
+linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) \
+ $(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \
+ $(cli_decode_h) $(gdb_string_h)
+lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(gdbcore_h) $(regcache_h)
+m2-lang.o: m2-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
+ $(parser_defs_h) $(language_h) $(m2_lang_h) $(c_lang_h) \
+ $(valprint_h)
+m2-typeprint.o: m2-typeprint.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
+ $(expression_h) $(value_h) $(gdbcore_h) $(target_h) $(m2_lang_h)
+m2-valprint.o: m2-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
+ $(m2_lang_h)
+m3-nat.o: m3-nat.c $(defs_h) $(inferior_h) $(symtab_h) $(value_h) \
+ $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) $(gdbcore_h) \
+ $(regcache_h)
+m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) $(symfile_h) \
+ $(gdb_string_h) $(objfiles_h) $(inferior_h) $(regcache_h)
+m32r-stub.o: m32r-stub.c $(syscall_h)
m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
$(regcache_h)
-
-p-lang.o: p-lang.c p-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) $(parser_defs_h) $(symtab_h) $(gdb_string_h)
-
-p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
- $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h)
-
-p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
- $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) $(language_h) \
- $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h)
-
-m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
- $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) $(inferior_h) \
- $(dis_asm_h) $(symfile_h) $(objfiles_h) $(arch_utils_h) $(regcache_h) \
- $(target_h) $(opcode_m68hc11_h)
-
-m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
- $(gdbcore_h) $(gdb_string_h) $(regcache_h)
-
-m68kly-nat.o: m68kly-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h)
-
+m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(symtab_h) \
+ $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
+ $(inferior_h) $(dis_asm_h) $(symfile_h) $(objfiles_h) \
+ $(arch_utils_h) $(regcache_h) $(target_h) $(opcode_m68hc11_h) \
+ $(elf_m68hc11_h) $(elf_bfd_h)
+m68k-stub.o: m68k-stub.c
+m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcore_h) \
+ $(value_h) $(gdb_string_h) $(inferior_h) $(regcache_h) \
+ $(arch_utils_h) $(gregset_h)
m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
- $(language_h) $(gdbcore_h) $(floatformat_h) $(target_h) $(regcache_h)
-
-mac-nat.o: mac-nat.c $(defs_h) $(gdb_string_h) $(regcache_h)
-
-main.o: main.c $(top_h) $(defs_h) $(gdb_string_h) $(event_loop_h) \
- $(symfile_h) $(gdbcore_h) $(ui_out_h) $(inferior_h)
-
-maint.o: maint.c $(defs_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) \
- $(language_h) $(expression_h) $(objfiles_h) $(symfile_h) \
- $(cli_decode_h)
-
-mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(gdbcmd_h) $(value_h) \
- $(symtab_h) $(symfile_h) $(gdbcore_h) $(inferior_h)
-
+ $(language_h) $(gdbcore_h) $(regcache_h) $(gdb_stat_h) \
+ $(floatformat_h) $(target_h) $(gregset_h)
+m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
+ $(regcache_h)
+m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h)
+# OBSOLETE m88k-nat.o: m88k-nat.c
+# OBSOLETE m88k-tdep.o: m88k-tdep.c
+macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \
+ $(command_h) $(gdbcmd_h)
+macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \
+ $(macroexp_h) $(gdb_assert_h)
+macroscope.o: macroscope.c $(defs_h) $(macroscope_h) $(symtab_h) $(target_h) \
+ $(frame_h) $(inferior_h)
+macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \
+ $(symtab_h) $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) \
+ $(bcache_h) $(complaints_h)
+main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \
+ $(gdbcore_h) $(getopt_h) $(gdb_stat_h) $(gdb_string_h) \
+ $(event_loop_h) $(ui_out_h)
+maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \
+ $(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \
+ $(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h)
mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(gdb_string_h) $(regcache_h) $(serial_h)
-
+mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
+ $(gdbcmd_h) $(regcache_h) $(symfile_h) $(gdbcore_h) $(inferior_h) \
+ $(arch_utils_h)
mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(symfile_h) $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) \
$(stabsread_h) $(complaints_h) $(demangle_h) $(gdb_assert_h) \
$(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) $(gdb_string_h) \
$(bfd_h) $(coff_ecoff_h) $(libaout_h) $(aout_aout64_h) \
$(aout_stab_gnu_h) $(expression_h) $(language_h)
-
-mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
-
-# OBSOLETE # os9kread assumes that sizeof(char*) <= sizeof(int). This looses on
-# OBSOLETE # 64 bit targets where often, sizeof(int)=4 but sizeof(char*)=9.
-# OBSOLETE os9kread.o: os9kread.c $(buildsym_h) $(complaints_h) $(bfd_h) $(defs_h) \
-# OBSOLETE $(expression_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \
-# OBSOLETE $(language_h) $(objfiles_h) $(stabsread_h) $(symfile_h) \
-# OBSOLETE $(symtab_h) $(target_h) $(gdb_string_h)
-# OBSOLETE $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \
-# OBSOLETE $(srcdir)/os9kread.c
-
mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \
$(target_h)
-
memattr.o: memattr.c $(defs_h) $(command_h) $(gdbcmd_h) $(memattr_h) \
$(target_h) $(value_h) $(language_h) $(gdb_string_h)
-
-minsyms.o: minsyms.c $(bfd_h) $(defs_h) $(objfiles_h) $(symfile_h) \
- $(symtab_h) $(gdb_string_h) $(value_h) $(cp_abi_h)
-
+minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
+ $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(cp_abi_h)
+mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h)
mips-linux-nat.o: mips-linux-nat.c $(defs_h)
-
mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \
- solib-svr4.h
-
-mips-nat.o: mips-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-
-mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) osabi.h $(BFD_SRC)/elf-bfd.h
-
-mips-tdep.o: mips-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
- $(arch_utils_h) $(regcache_h) \
- $(inferior_h) $(language_h) $(objfiles_h) $(symfile_h) \
- $(gdb_string_h) osabi.h
-
-mipsread.o: mipsread.c $(buildsym_h) $(complaints_h) $(bfd_h) $(defs_h) \
- $(expression_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \
- $(language_h) $(objfiles_h) $(stabsread_h) $(symfile_h) $(symtab_h) \
- $(gdb_string_h)
-
-mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
- $(regcache_h)
-
+ $(solib_svr4_h)
+mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
+mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
+ $(symtab_h) $(value_h) $(gdbcmd_h) $(language_h) $(gdbcore_h) \
+ $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(target_h) $(arch_utils_h) \
+ $(regcache_h) $(osabi_h) $(opcode_mips_h) $(elf_mips_h) $(elf_bfd_h) \
+ $(symcat_h)
+mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- mipsnbsd-tdep.h
-
+ $(mipsnbsd_tdep_h)
mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(target_h) $(value_h) osabi.h solib-svr4.h mipsnbsd-tdep.h
-
-mn10200-tdep.o: mn10200-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
- $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
- $(regcache_h)
-
-mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
- $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
- $(regcache_h) $(arch_utils_h)
-
-monitor.o: monitor.c $(monitor_h) $(bfd_h) $(defs_h) $(gdbcmd_h) \
- $(inferior_h) $(target_h) $(serial_h) $(terminal_h) $(gdb_string_h) \
- $(regcache_h)
-
-nbsd-tdep.o: nbsd-tdep.c $(defs_h) solib-svr4.h
-
-nlmread.o: nlmread.c $(bfd_h) $(buildsym_h) $(complaints_h) $(defs_h) \
- $(gdb_stabs_h) $(objfiles_h) $(symfile_h) $(symtab_h) $(stabsread_h) \
- $(gdb_string_h)
-
-nindy-tdep.o: nindy-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcore_h)
-
-ns32k-tdep.o: ns32k-tdep.c $(bfd_h) $(dis_asm_h) $(defs_h)
-
+ $(target_h) $(value_h) $(osabi_h) $(mipsnbsd_tdep_h) $(solib_svr4_h) \
+ $(nbsd_tdep_h)
+mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
+ $(symfile_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
+ $(coff_sym_h) $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) \
+ $(libecoff_h) $(elf_common_h) $(elf_mips_h)
+mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
+ $(regcache_h) $(gregset_h)
+mn10200-tdep.o: mn10200-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
+ $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
+ $(symfile_h) $(regcache_h)
+mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
+ $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
+ $(symfile_h) $(regcache_h) $(arch_utils_h)
+mon960-rom.o: mon960-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(srec_h) $(xmodem_h) $(symtab_h) $(symfile_h) \
+ $(inferior_h) $(gdb_string_h)
+monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \
+ $(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \
+ $(gdb_regex_h) $(srec_h) $(regcache_h)
+nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h)
+nindy-tdep.o: nindy-tdep.c $(defs_h) $(symtab_h) $(frame_h) $(gdbcore_h)
+nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
+ $(objfiles_h) $(buildsym_h) $(stabsread_h)
+ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \
+ $(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) \
+ $(ns32k_tdep_h)
+ns32knbsd-nat.o: ns32knbsd-nat.c $(defs_h) $(inferior_h) $(target_h) \
+ $(gdbcore_h) $(regcache_h)
+ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(ns32k_tdep_h)
objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_stat_h) \
$(gdb_obstack_h) $(gdb_string_h) $(breakpoint_h) $(mmalloc_h)
-
-solib-osf.o: solib-osf.c $(defs_h) $(inferior_h) $(symtab_h) $(objfiles_h) \
- $(symfile_h) $(target_h) $(gdb_string_h) $(solist_h)
-
-somread.o: somread.c $(bfd_h) $(buildsym_h) $(complaints_h) $(defs_h) \
- $(gdb_stabs_h) $(objfiles_h) $(symfile_h) $(symtab_h) $(gdb_string_h)
-
-somsolib.o: somsolib.c $(defs_h) $(regcache_h)
-
-std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) $(gdbtypes_h) \
- $(value_h) $(gdb_string_h)
-
-pa64solib.o: pa64solib.c $(defs_h) $(regcache_h)
-
-hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) inferior.h \
+ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
+ $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \
+ $(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h)
+op50-rom.o: op50-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h)
+# OBSOLETE os9kread.o: os9kread.c
+osabi.o: osabi.c $(defs_h) $(gdb_string_h) $(osabi_h) $(elf_bfd_h)
+osfsolib.o: osfsolib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
+ $(symfile_h) $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) \
+ $(frame_h) $(gdb_regex_h) $(inferior_h) $(language_h) $(gdbcmd_h)
+p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+ $(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \
+ $(valprint_h)
+p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+ $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h)
+p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
+ $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) \
+ $(language_h) $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h)
+pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \
+ $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \
+ $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \
$(regcache_h)
-
-hpread.o: hpread.c $(bfd_h) $(buildsym_h) $(complaints_h) $(defs_h) \
- $(demangle_h) $(gdb_stabs_h) $(gdbtypes_h) $(objfiles_h) \
- $(symfile_h) $(syms_h) $(symtab_h) $(gdb_string_h) \
- $(INCLUDE_DIR)/hp-symtab.h
-
-parse.o: parse.c $(command_h) $(defs_h) $(expression_h) $(frame_h) \
- $(gdbtypes_h) $(language_h) $(parser_defs_h) $(symtab_h) $(value_h) \
- $(gdb_string_h) $(linespec_h) $(doublest_h)
-
+parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+ $(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \
+ $(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \
+ $(doublest_h) $(builtin_regs_h) $(gdb_assert_h)
ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) \
$(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \
- $(objfiles_h) $(gdb_stabs_h) $(serial_h) ocd.h $(regcache_h)
-
-ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdbcore_h) $(frame_h) \
- $(inferior_h) $(target_h) $(regcache_h) $(ppc_tdep_h)
-
-ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(target_h) $(ppc_tdep_h) $(regcache_h) $(value_h)
-
+ $(objfiles_h) $(gdb_stabs_h) $(serial_h) $(ocd_h) $(ppc_tdep_h) \
+ $(regcache_h)
+ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
+ $(gdbcore_h) $(regcache_h) $(gregset_h) $(ppc_tdep_h)
+ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
+ $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
+ $(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h)
ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(value_h) $(regcache_h) $(ppc_tdep_h)
-
+ $(regcache_h) $(value_h) $(ppc_tdep_h)
+ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(regcache_h)
ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \
- ppcnbsd-tdep.h
-
+ $(ppcnbsd_tdep_h)
ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(target_h) $(breakpoint_h) $(value_h) $(ppc_tdep_t) ppcnbsd-tdep.h \
- nbsd-tdep.h
-
-ppcbug-rom.o: ppcbug-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) \
- $(gdbcmd_h) $(inferior_h) $(target_h) $(serial_h) $(terminal_h) \
- $(regcache_h)
-
-printcmd.o: printcmd.c $(breakpoint_h) $(defs_h) $(expression_h) \
- $(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(objfiles_h) \
- $(symfile_h) $(symtab_h) $(target_h) $(gdb_string_h) $(ui_out_h) \
- $(completer_h)
-
-# FIXME: Procfs.o gets -Wformat errors because things like pid_t don't
-# match output format strings.
-procfs.o: procfs.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(target_h) $(gdb_string_h) $(gdbthread_h) proc-utils.h
-
-proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) proc-utils.h $(completer_h)
-
+ $(target_h) $(breakpoint_h) $(value_h) $(ppc_tdep_h) \
+ $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
+printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \
+ $(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \
+ $(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \
+ $(annotate_h) $(symfile_h) $(objfiles_h) $(completer_h) $(ui_out_h) \
+ $(gdb_assert_h)
+proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(proc_utils_h)
proc-events.o: proc-events.c $(defs_h)
-
proc-flags.o: proc-flags.c $(defs_h)
-
-proc-why.o: proc-why.c $(defs_h) proc-utils.h
-
-sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \
- $(gdbcmd_h) $(regcache_h)
-
-linux-proc.o: linux-proc.c $(defs_h)
-
-thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) gdb_proc_service.h \
- gdb_thread_db.h $(bfd_h) $(gdbthread_h) $(inferior_h) $(symfile_h) \
- $(objfiles_h) $(target_h) $(regcache_h)
-
-lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_wait_h) $(gdbthread_h) \
- $(inferior_h) $(target_h) $(gdbcmd_h) $(regcache_h)
-
-proc-service.o: proc-service.c $(defs_h) $(inferior_h) gdb_proc_service.h \
- $(symtab_h) $(target_h) gregset.h
-
+proc-service.o: proc-service.c $(defs_h) $(gdb_proc_service_h) $(inferior_h) \
+ $(symtab_h) $(target_h) $(gregset_h)
+proc-why.o: proc-why.c $(defs_h) $(proc_utils_h)
+procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
+ $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_dirent_h) $(X_OK) \
+ $(gdb_stat_h) $(proc_utils_h) $(gregset_h)
+ptx4-nat.o: ptx4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) \
+ $(gregset_h)
+regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
+ $(gdbcmd_h) $(regcache_h) $(gdb_assert_h) $(gdb_string_h) \
+ $(gdbcmd_h)
remote-array.o: remote-array.c $(defs_h) $(gdbcore_h) $(target_h) \
- $(gdb_string_h) $(command_h) $(serial_h) $(monitor_h) $(remote_utils_h) \
- $(version_h) $(regcache_h)
-
-remote-rdi.o: remote-rdi.c $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(gdb_string_h) $(completer_h) $(arm_tdep_h)
-
-remote-rdp.o: remote-rdp.c $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(gdb_string_h) $(arm_tdep_h) $(callback_h)
-
-remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(target_h) \
- $(serial_h) $(gdb_string_h) $(regcache_h)
-
-remote-es.o: remote-es.c $(bfd_h) $(command_h) $(defs_h) \
- $(inferior_h) $(remote_utils_h) $(terminal_h) $(gdb_string_h) \
- $(symfile_h) $(regcache_h) $(value_h)
-
-remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(serial_h) $(target_h) $(terminal_h) $(regcache_h)
-
-remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(serial_h) $(target_h) $(terminal_h) $(regcache_h)
-
-remote-mips.o: remote-mips.c $(defs_h) $(gdbcmd_h) \
- $(gdbcore_h) $(inferior_h) $(serial_h) $(symfile_h) $(target_h) \
+ $(gdb_string_h) $(command_h) $(serial_h) $(monitor_h) \
+ $(remote_utils_h) $(inferior_h) $(version_h) $(regcache_h)
+# OBSOLETE remote-bug.o: remote-bug.c
+remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \
+ $(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \
+ $(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h)
+remote-es.o: remote-es.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
+ $(target_h) $(command_h) $(symfile_h) $(remote_utils_h) $(gdbcore_h) \
+ $(serial_h) $(regcache_h) $(value_h)
+remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(regcache_h)
+remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(regcache_h)
+remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \
+ $(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(remote_utils_h) \
+ $(gdb_string_h) $(gdb_stat_h) $(regcache_h)
+# OBSOLETE remote-nindy.o: remote-nindy.c
+# OBSOLETE remote-nrom.o: remote-nrom.c
+# OBSOLETE remote-os9k.o: remote-os9k.c
+remote-rdi.o: remote-rdi.c $(defs_h) $(gdb_string_h) $(frame_h) \
+ $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \
+ $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \
+ $(breakpoint_h) $(completer_h) $(regcache_h) $(arm_tdep_h) \
+ $(rdi_share_ardi_h) $(rdi_share_adp_h) $(rdi_share_hsys_h)
+remote-rdp.o: remote-rdp.c $(defs_h) $(inferior_h) $(value_h) \
+ $(gdb_callback_h) $(command_h) $(symfile_h) $(remote_utils_h) \
+ $(gdb_string_h) $(gdbcore_h) $(regcache_h) $(serial_h) $(arm_tdep_h)
+remote-sds.o: remote-sds.c $(defs_h) $(gdb_string_h) $(frame_h) \
+ $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \
+ $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \
+ $(regcache_h) $(serial_h)
+remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) \
+ $(gdb_string_h) $(terminal_h) $(target_h) $(gdbcore_h) \
+ $(gdb_callback_h) $(gdb_remote_sim_h) $(remote_utils_h) $(command_h) \
+ $(regcache_h) $(gdb_assert_h) $(sim_regno_h)
+remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \
+ $(serial_h) $(regcache_h)
+remote-utils.o: remote-utils.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \
+ $(target_h) $(serial_h) $(gdbcore_h) $(inferior_h) $(remote_utils_h) \
$(regcache_h)
-
-# OBSOLETE remote-nindy.o: remote-nindy.c $(floatformat_h) $(command_h) \
-# OBSOLETE $(defs_h) $(gdbcore_h) $(inferior_h) \
-# OBSOLETE nindy-share/env.h nindy-share/stop.h $(remote_utils_h) \
-# OBSOLETE $(symfile_h) $(regcache_h)
-
-# OBSOLETE remote-os9k.o: remote-os9k.c $(defs_h) $(gdbcore_h) \
-# OBSOLETE $(command_h) $(monitor_h) $(remote_utils_h) $(symtab_h) $(symfile_h) \
-# OBSOLETE $(objfiles_h) $(gdb_stabs_h) $(gdb_string_h) $(regcache_h)
-
-remote-sds.o: remote-sds.c $(bfd_h) $(defs_h) $(gdbcmd_h) \
- $(inferior_h) $(remote_utils_h) $(symfile_h) $(terminal_h) \
- $(gdb_string_h) $(regcache_h)
-
-remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) $(gdb_string_h) \
- $(terminal_h) $(target_h) $(gdbcore_h) $(callback_h) \
- $(remote_sim_h) $(remote_utils_h) $(command_h) $(regcache_h) \
- $(sim_regno_h)
-
-remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) $(serial_h) \
- $(target_h) $(gdb_string_h) $(regcache_h)
-
-remote-vx.o: remote-vx.c $(complaints_h) $(defs_h) $(gdbcmd_h) \
- $(gdbcore_h) $(inferior_h) $(target_h) vx-share/dbgRpcLib.h \
- vx-share/ptrace.h vx-share/xdr_ld.h vx-share/xdr_ptrace.h \
- vx-share/xdr_rdb.h $(gdb_stabs_h) $(objfiles_h) $(symfile_h) $(bfd_h) \
- $(gdb_string_h) $(regcache_h)
-
-remote-vx29k.o: remote-vx29k.c $(complaints_h) $(defs_h) $(gdbcmd_h) \
- $(gdbcore_h) $(inferior_h) $(target_h) vx-share/dbgRpcLib.h \
- vx-share/ptrace.h vx-share/xdr_ld.h vx-share/xdr_ptrace.h \
- vx-share/xdr_rdb.h $(gdb_string_h) $(regcache_h)
-
-ocd.o: ocd.c ocd.h $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
- $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \
- $(gdb_stabs_h) $(dcache_h) $(serial_h) $(regcache_h)
-
-remote-utils.o: remote-utils.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) $(remote_utils_h) $(gdb_string_h) $(regcache_h)
-
-remote.o: remote.c $(bfd_h) $(gdb_wait_h) $(defs_h) $(gdbcmd_h) \
- $(inferior_h) $(remote_utils_h) $(symfile_h) $(terminal_h) \
- $(gdb_string_h) $(event_loop_h) $(event_top_h) $(remote_h) \
- $(inf_loop_h) $(value_h)
-
-# OBSOLETE remote-nrom.o: remote-nrom.c $(bfd_h) $(gdb_wait_h) $(defs_h) $(gdbcmd_h) \
-# OBSOLETE $(inferior_h) $(remote_utils_h) $(symfile_h) $(terminal_h)
-
-rom68k-rom.o: rom68k-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) \
- $(gdbcmd_h) $(inferior_h) $(target_h) $(serial_h) $(terminal_h) \
- $(regcache_h) $(value_h)
-
-rs6000-nat.o: rs6000-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(target_h) \
- $(gdbcore_h) $(xcoffsolib_h) $(symfile_h) $(objfiles_h) \
+remote-vx.o: remote-vx.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(gdbcore_h) $(command_h) $(symtab_h) $(complaints_h) $(gdbcmd_h) \
+ $(bfd_h) $(symfile_h) $(objfiles_h) $(gdb_stabs_h) $(regcache_h) \
+ $(gdb_string_h) $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) \
+ $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h)
+remote-vx68.o: remote-vx68.c $(defs_h) $(vx_share_regPacket_h) $(frame_h) \
+ $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) $(symtab_h) \
+ $(symfile_h) $(regcache_h) $(gdb_string_h) $(vx_share_ptrace_h) \
+ $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) \
+ $(vx_share_dbgRpcLib_h)
+# OBSOLETE remote-vx960.o: remote-vx960.c
+remote-vxmips.o: remote-vxmips.c $(defs_h) $(vx_share_regPacket_h) \
+ $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) \
+ $(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \
+ $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) \
+ $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h)
+remote-vxsparc.o: remote-vxsparc.c $(defs_h) $(vx_share_regPacket_h) \
+ $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) \
+ $(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \
+ $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) \
+ $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h)
+remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \
+ $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \
+ $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \
+ $(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \
+ $(gdbcore_h)
+rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(regcache_h) $(value_h)
+rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
+ $(xcoffsolib_h) $(symfile_h) $(objfiles_h) $(libbfd_h) $(bfd_h) \
$(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(language_h) \
+ $(ppc_tdep_h) $(gdb_stat_h)
+rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
+ $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) $(objfiles_h) \
+ $(arch_utils_h) $(regcache_h) $(doublest_h) $(value_h) \
+ $(parser_defs_h) $(libbfd_h) $(coff_internal_h) $(libcoff_h) \
+ $(coff_xcoff_h) $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) \
$(ppc_tdep_h)
-
-rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(target_h) $(ppc_tdep_h) $(regcache_h) $(value_h) $(parser_defs_h)
-
-s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
+s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h)
+s390-tdep.o: s390-tdep.c $(arch_utils_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
- $(objfiles_h) $(bfd_h) $(floatformat_h) $(regcache_h) $(value_h)
-
-s390-nat.o: s390-nat.c $(defs_h) $(regcache_h)
-
-scm-exp.o: $(defs_h) $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) \
- scm-lang.h scm-tags.h
-
-scm-lang.o: $(defs_h) $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) \
- scm-lang.h scm-tags.h $(gdb_string_h) $(gdbcore_h)
-
-scm-valprint.o: $(defs_h) $(value_h) $(parser_defs_h) $(language_h) \
- scm-lang.h $(valprint_h) $(gdbcore_h)
-
-ser-go32.o: ser-go32.c $(defs_h) $(serial_h)
-
-ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(gdb_string_h) $(ser_unix_h)
-
-ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(gdb_string_h) $(ser_unix_h)
-
-ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_unix_h)
-
-serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h)
-
+ $(objfiles_h) $(tm_h) $(__bfd_bfd_h) $(floatformat_h) $(regcache_h) \
+ $(value_h) $(gdb_assert_h)
+scm-exp.o: scm-exp.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
+ $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \
+ $(scm_tags_h)
+scm-lang.o: scm-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
+ $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \
+ $(scm_tags_h) $(gdb_string_h) $(gdbcore_h)
+scm-valprint.o: scm-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
+ $(expression_h) $(parser_defs_h) $(language_h) $(value_h) \
+ $(scm_lang_h) $(valprint_h) $(gdbcore_h)
+ser-e7kpc.o: ser-e7kpc.c $(defs_h) $(serial_h) $(gdb_string_h)
+ser-go32.o: ser-go32.c $(defs_h) $(gdbcmd_h) $(serial_h) $(gdb_string_h)
+ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_vfork_h) \
+ $(gdb_string_h)
+ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_string_h)
+ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_unix_h) $(terminal_h) \
+ $(gdb_string_h) $(event_loop_h)
+serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h) $(gdbcmd_h)
+sh-stub.o: sh-stub.c
sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \
$(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \
$(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \
- $(regcache_h) $(doublest_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \
- $(elf_sh_h) $(gdb_sim_sh_h)
-
-shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(value_h) $(sh_tdep_h) solib-svr4.h shnbsd-tdep.h nbsd-tdep.h
-
-shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) shnbsd-tdep.h
-
-sh3-rom.o: sh3-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) $(gdbcmd_h) \
- $(inferior_h) $(target_h) $(serial_h) $(terminal_h) $(arch_utils_h) \
- $(regcache_h) $(sh_tdep_h)
-
-mon960-rom.o: mon960-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
- $(serial_h) $(srec_h) $(xmodem_h) $(symtab_h) $(symfile_h) \
- $(inferior_h)
-
-solib.o: solib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(objfiles_h) $(gdb_regex_h) $(symfile_h) $(target_h) $(gdb_string_h) \
- $(solist_h) $(completer_h)
-
-solib-irix.o: solib-irix.c $(defs_h) $(gdbcore_h) $(inferior_h) $(objfiles_h) \
- $(symfile_h) $(target_h) $(solist_h) solib-svr4.h
-
-solib-sunos.o: solib-sunos.c $(defs_h) $(symfile_h) $(objfiles_h) \
- $(gdbcore_h) $(inferior_h) $(solist_h)
-
-solib-svr4.o: solib-svr4.c $(defs_h) $(gdbcore_h) $(inferior_h) $(objfiles_h) \
- $(symfile_h) $(target_h) $(solist_h) solib-svr4.h
-
-solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) solib-svr4.h
-
-source.o: source.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
- $(gdbcore_h) $(language_h) $(objfiles_h) $(gdb_regex_h) $(symfile_h) \
- $(symtab_h) $(gdb_string_h) $(source_h) $(completer_h) $(linespec_h) \
- $(ui_out_h) $(value_h)
-
-sparc-linux-nat.o: sparc-linux-nat.c $(defs_h) $(regcache_h)
-
-sparc-nat.o: sparc-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(target_h) $(regcache_h)
-
-sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
- $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(regcache_h) \
- $(osabi_h) $(gregset_h) $(gdbcore_h) $(symfile_h)
-
-sparcl-tdep.o: sparcl-tdep.c $(defs_h) $(gdbcore_h) $(target_h) $(regcache_h)
-
+ $(regcache_h) $(doublest_h) $(sh_tdep_h) $(elf_bfd_h) \
+ $(solib_svr4_h) $(elf_sh_h) $(gdb_sim_sh_h)
+sh3-rom.o: sh3-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(srec_h) $(arch_utils_h) $(regcache_h) $(sh_tdep_h)
+shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(shnbsd_tdep_h)
+shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \
+ $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) $(shnbsd_tdep_h)
+sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
+ $(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) $(symfile_h) \
+ $(gregset_h)
+solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \
+ $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(gdbcore_h) \
+ $(command_h) $(target_h) $(frame_h) $(gdb_regex_h) $(inferior_h) \
+ $(environ_h) $(language_h) $(gdbcmd_h) $(solist_h)
+solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
+ $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h)
+solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h)
+solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
+ $(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h)
+solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
+ $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h)
+solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \
+ $(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
+ $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h)
+solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \
+ $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \
+ $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \
+ $(completer_h) $(filenames_h) $(solist_h)
+somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
+ $(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \
+ $(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h)
+somsolib.o: somsolib.c $(defs_h) $(frame_h) $(bfd_h) $(som_h) $(libhppa_h) \
+ $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \
+ $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \
+ $(regcache_h)
+source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \
+ $(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \
+ $(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \
+ $(symfile_h) $(objfiles_h) $(annotate_h) $(gdbtypes_h) $(linespec_h) \
+ $(filenames_h) $(completer_h) $(ui_out_h)
+sparc-linux-nat.o: sparc-linux-nat.c $(defs_h) $(regcache_h) $(gregset_h)
+sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
+ $(regcache_h)
+sparc-stub.o: sparc-stub.c
+sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
+ $(inferior_h) $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) \
+ $(regcache_h) $(osabi_h) $(gregset_h) $(gdbcore_h) $(symfile_h)
sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- sparcnbsd-tdep.h
-
+ $(sparcnbsd_tdep_h)
+sparcl-stub.o: sparcl-stub.c
+sparcl-tdep.o: sparcl-tdep.c $(defs_h) $(gdbcore_h) $(breakpoint_h) \
+ $(target_h) $(serial_h) $(regcache_h)
+sparclet-rom.o: sparclet-rom.c $(defs_h) $(gdbcore_h) $(target_h) \
+ $(monitor_h) $(serial_h) $(srec_h) $(symtab_h) $(symfile_h) \
+ $(regcache_h)
+sparclet-stub.o: sparclet-stub.c
sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- sparcnbsd-tdep.h
-
+ $(sparcnbsd_tdep_h)
sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(target_h) $(value_h) osabi.h sparcnbsd-tdep.h nbsd-tdep.h \
- solib-svr4.h
-
-xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \
- $(symfile_h) $(arch_utils_h) $(regcache_h) $(gdbcore_h)
-
-dsrec.o: dsrec.c $(defs_h) srec.h
-
+ $(target_h) $(value_h) $(osabi_h) $(sparcnbsd_tdep_h) $(nbsd_tdep_h) \
+ $(solib_svr4_h)
stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \
$(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \
$(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \
$(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \
$(doublest_h) $(stabsread_h)
-
-stack.o: stack.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
- $(language_h) $(target_h) $(gdb_string_h) $(ui_out_h)
-
-ui-file.o: ui-file.c $(defs_h) ui-file.h
-tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(srcdir)/tui/tui-file.h \
- $(srcdir)/tui/tuiIO.h
-
-ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h)
-
-ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
- $(value_h) $(expression_h) $(command_h) $(ax_h) $(gdbcmd_h) ax-gdb.h
-
-sun3-nat.o: sun3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-
+stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \
+ $(gdbcore_h) $(target_h) $(breakpoint_h) $(demangle_h) $(inferior_h) \
+ $(annotate_h) $(ui_out_h)
+standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \
+ $(inferior_h) $(gdb_wait_h)
+std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) $(gdbtypes_h) \
+ $(value_h) $(gdb_string_h)
+stop-gdb.o: stop-gdb.c $(defs_h)
+sun3-nat.o: sun3-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
symfile.o: symfile.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
$(gdbcmd_h) $(breakpoint_h) $(language_h) $(complaints_h) \
$(demangle_h) $(inferior_h) $(gdb_stabs_h) $(gdb_obstack_h) \
$(completer_h) $(bcache_h) $(gdb_string_h) $(gdb_stat_h)
-
-symm-tdep.o: symm-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
-
-symm-nat.o: symm-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-
+symm-nat.o: symm-nat.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
+ $(target_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) $(gdbcore_h)
+symm-tdep.o: symm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
+ $(gdb_stat_h) $(gdbcore_h)
symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \
$(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \
$(gdb_obstack_h) $(language_h) $(bcache_h) $(gdb_string_h)
-
symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
$(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \
$(language_h) $(demangle_h) $(inferior_h) $(linespec_h) \
$(filenames_h) $(gdb_obstack_h) $(gdb_string_h) $(gdb_stat_h) \
$(cp_abi_h)
-
-linespec.o: linespec.c $(linespec_h) $(defs_h) $(frame_h) $(value_h) \
- $(objfiles_h) $(symfile_h) $(completer_h) $(symtab_h) \
- $(demangle_h) $(command_h) $(cp_abi_h)
-
-macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \
- $(macroexp_h) $(gdb_assert_h)
-
-macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) $(symtab_h) \
- $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) $(bcache_h) \
- $(complaints_h)
-
-macroscope.o: macroscope.c $(defs_h) $(macroscope_h)
-
-macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) \
- $(macroscope_h) $(command_h) $(gdbcmd_h)
-
-target.o: target.c $(bfd_h) $(defs_h) $(gdbcmd_h) $(inferior_h) \
- $(objfiles_h) $(symfile_h) $(target_h) $(gdb_string_h) $(regcache_h)
-
+target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \
+ $(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
+ $(gdb_wait_h) $(dcache_h) $(regcache_h)
+thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) $(gdb_proc_service_h) \
+ $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) $(inferior_h) \
+ $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h)
thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \
$(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \
- $(gdbcmd_h) $(regcache_h) $(gdb_h) $(ui_out_h)
-
-completer.o: completer.c $(completer_h) $(gdbtypes_h) $(symtab_h) \
- $(defs_h) $(gdbcmd_h) $(expression_h) $(readline_headers) \
- $(cli_decode_h)
-
-top.o: top.c $(top_h) $(bfd_h) $(getopt_h) $(readline_headers) $(call_cmds_h) \
- $(cli_cmds_h) $(cli_script_h) $(cli_setshow_h) \
- $(defs_h) $(gdbcmd_h) $(inferior_h) $(language_h) \
- $(remote_utils_h) $(gdb_string_h) $(event_loop_h) $(event_top_h) \
- $(completer_h) $(version_h) $(ui_out_h) $(doublest_h) \
- $(serial_h)
-
+ $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h)
+top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \
+ $(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \
+ $(inferior_h) $(target_h) $(breakpoint_h) $(gdbtypes_h) \
+ $(expression_h) $(value_h) $(language_h) $(terminal_h) $(annotate_h) \
+ $(completer_h) $(top_h) $(version_h) $(serial_h) $(doublest_h) \
+ $(gdb_assert_h) $(event_top_h) $(gdb_string_h) $(gdb_stat_h) \
+ $(ui_out_h) $(cli_out_h)
+tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \
+ $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \
+ $(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \
+ $(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) $(ax_h) \
+ $(ax_gdb_h)
typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \
$(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(gdb_string_h)
-
-utils.o: utils.c $(bfd_h) $(defs_h) $(expression_h) $(gdbcmd_h) \
- $(language_h) $(target_h) $(terminal_h) $(readline_headers) \
- $(gdb_string_h) $(event_loop_h) $(event_top_h) $(inferior_h)
-
-valarith.o: valarith.c $(bfd_h) $(defs_h) $(expression_h) \
- $(gdbtypes_h) $(language_h) $(symtab_h) $(target_h) $(value_h) \
- $(gdb_string_h) $(doublest_h)
-
-valops.o: valops.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
- $(gdb_string_h) $(regcache_h) $(cp_abi_h) $(gdb_assert_h)
-
-valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
- $(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(obstack_h) \
- $(language_h) $(annotate_h) $(valprint_h) $(floatformat_h) \
+ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h)
+ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \
+ $(ui_out_h) $(gdb_assert_h)
+utils.o: utils.c $(config_h) $(defs_h) $(gdb_assert_h) $(gdb_string_h) \
+ $(event_top_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) \
+ $(demangle_h) $(expression_h) $(language_h) $(annotate_h) \
+ $(filenames_h) $(inferior_h) $(mmalloc_h)
+uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \
+ $(regcache_h) $(gregset_h)
+v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+ $(arch_utils_h) $(regcache_h) $(symtab_h)
+v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \
+ $(inferior_h) $(breakpoint_h) $(symfile_h) $(target_h) $(objfiles_h) \
+ $(gdbcore_h) $(value_h) $(command_h) $(regcache_h)
+valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \
+ $(expression_h) $(target_h) $(language_h) $(gdb_string_h) \
$(doublest_h)
-
-values.o: values.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
- $(gdbcore_h) $(gdbtypes_h) $(symtab_h) $(target_h) $(value_h) \
- $(gdb_string_h) scm-lang.h $(doublest_h) $(regcache_h)
-
-vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax.h $(defs_h) $(symtab_h) \
- $(arch_utils_h) $(inferior_h) $(vax_tdep_h)
-
-x86-64-linux-tdep.o : x86-64-linux-tdep.c $(defs_h) $(inferior_h) \
- $(gdbcore_h) $(regcache_h) x86-64-tdep.h i386-tdep.h $(dwarf2cfi_h)
-
-x86-64-tdep.o : x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(gdbcmd_h) $(arch_utils_h) $(regcache_h) $(symfile_h) x86-64-tdep.h \
- i386-tdep.h $(dwarf2cfi_h) $(gdb_assert_h) $(objfiles_h)
-
-x86-64-linux-nat.o : x86-64-linux-nat.c $(defs_h) $(inferior_h) \
- $(gdbcore_h) $(regcache_h) $(gdb_assert_h) x86-64-tdep.h \
- i386-tdep.h
-
-win32-nat.o: win32-nat.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \
- $(gdb_string_h) $(regcache_h) $(completer_h)
-
-xcoffread.o: xcoffread.c $(bfd_h) $(INCLUDE_DIR)/aout/stab.def \
- $(INCLUDE_DIR)/aout/stab_gnu.h $(INCLUDE_DIR)/coff/internal.h \
- $(INCLUDE_DIR)/coff/rs6000.h $(BFD_SRC)/libcoff.h $(buildsym_h) \
- $(complaints_h) $(defs_h) $(gdbtypes_h) $(objfiles_h) $(stabsread_h) \
- $(symfile_h) $(symtab_h) $(gdb_string_h)
-
-xcoffsolib.o: xcoffsolib.c $(bfd_h) $(defs_h) $(xcoffsolib_h) $(inferior_h) \
- $(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h)
-
-# FIXME: z8k-tdep.c calls _initialize_gdbtypes(). Since that isn't
-# declared -Wimplicit fails. It should be using the GDBARCH framework.
-# cagney 1999-09-02.
-z8k-tdep.o: z8k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcmd_h) \
- $(gdbtypes_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h)
-
-c-exp.tab.o: c-exp.tab.c $(defs_h) $(gdb_string_h) $(expression_h) \
- $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) \
- $(symfile_h) $(objfiles_h)
-
-jv-exp.tab.o: jv-exp.tab.c jv-lang.h $(defs_h) $(expression_h) \
- $(gdbtypes_h) $(language_h) $(parser_defs_h) $(symtab_h) $(value_h) \
- $(bfd_h) $(objfiles_h) $(symfile_h)
-
-f-exp.tab.o: f-exp.tab.c f-lang.h $(defs_h) $(expression_h) \
- $(language_h) $(parser_defs_h) $(value_h) $(bfd_h) $(objfiles_h) \
- $(symfile_h)
-
-m2-exp.tab.o: m2-exp.tab.c $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) m2-lang.h $(parser_defs_h) $(symtab_h) $(value_h) \
- $(bfd_h) $(objfiles_h) $(symfile_h)
-
-p-exp.tab.o: p-exp.tab.c $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) p-lang.h $(parser_defs_h) $(symtab_h) $(value_h) \
- $(bfd_h) $(objfiles_h) $(symfile_h)
-
-ada-exp.tab.o: ada-exp.tab.c ada-lex.c ada-lang.h \
- $(defs_h) $(expression_h) \
- $(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h) \
- $(bfd_h) objfiles.h symfile.h
-
-gdb-events.o: gdb-events.c $(gdb_events_h) $(defs_h) $(gdbcmd_h)
-
-ui-out.o: ui-out.c $(defs_h) $(ui_out_h) $(expression_h) $(language_h)
-cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h)
-
+valops.o: valops.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) $(frame_h) \
+ $(inferior_h) $(gdbcore_h) $(target_h) $(demangle_h) $(language_h) \
+ $(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(gdb_string_h) \
+ $(gdb_assert_h)
+valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+ $(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(language_h) \
+ $(annotate_h) $(valprint_h) $(floatformat_h) $(doublest_h)
+values.o: values.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+ $(value_h) $(gdbcore_h) $(command_h) $(gdbcmd_h) $(target_h) \
+ $(language_h) $(scm_lang_h) $(demangle_h) $(doublest_h) \
+ $(gdb_assert_h) $(regcache_h)
varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \
$(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h)
-
-wrapper.o: wrapper.c $(defs_h) $(frame_h) $(value_h) $(wrapper_h)
+vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \
+ $(inferior_h) $(regcache_h) $(frame_h) $(value_h) $(arch_utils_h) \
+ $(vax_tdep_h)
+w89k-rom.o: w89k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(xmodem_h) $(regcache_h)
+win32-nat.o: win32-nat.c $(defs_h) $(tm_h) $(frame_h) $(inferior_h) \
+ $(target_h) $(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) \
+ $(top_h) $(i386_tdep_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
+ $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h)
+wince-stub.o: wince-stub.c $(wince_stub_h)
+wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \
+ $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
+ $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \
+ $(regcache_h)
+wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h)
+x86-64-linux-nat.o: x86-64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
+ $(regcache_h) $(gdb_assert_h) $(x86_64_tdep_h)
+x86-64-linux-tdep.o: x86-64-linux-tdep.c $(defs_h) $(inferior_h) \
+ $(gdbcore_h) $(regcache_h) $(x86_64_tdep_h) $(dwarf2cfi_h)
+x86-64-tdep.o: x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
+ $(gdbcmd_h) $(arch_utils_h) $(regcache_h) $(symfile_h) $(objfiles_h) \
+ $(x86_64_tdep_h) $(dwarf2cfi_h) $(gdb_assert_h)
+xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \
+ $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \
+ $(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \
+ $(objfiles_h) $(buildsym_h) $(stabsread_h) $(expression_h) \
+ $(complaints_h) $(gdb_stabs_h) $(aout_stab_gnu_h)
+xcoffsolib.o: xcoffsolib.c $(defs_h) $(bfd_h) $(xcoffsolib_h) $(inferior_h) \
+ $(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h)
+xmodem.o: xmodem.c $(defs_h) $(serial_h) $(target_h) $(xmodem_h)
+xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \
+ $(symfile_h) $(arch_utils_h) $(regcache_h) $(gdbcore_h) \
+ $(objfiles_h)
+z8k-tdep.o: z8k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcmd_h) \
+ $(gdbtypes_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h) $(value_h)
#
# gdb/cli/ dependencies
@@ -2605,7 +2484,7 @@ rdi-share/libangsd.a: force
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the mi directory.
-signals.o: $(srcdir)/signals/signals.c $(defs_h) $(target_h)
+signals.o: $(srcdir)/signals/signals.c $(defs_h) $(target_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c
#
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 67185a3e497..2e34e019cd6 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -90,6 +90,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define yylloc ada_lloc
#define yyreds ada_reds /* With YYDEBUG defined */
#define yytoks ada_toks /* With YYDEBUG defined */
+#define yyname ada_name /* With YYDEBUG defined */
+#define yyrule ada_rule /* With YYDEBUG defined */
#ifndef YYDEBUG
#define YYDEBUG 1 /* Default to yydebug support */
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index 519d8164ca3..bc7b1a410db 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -21,6 +21,7 @@
#include "defs.h"
#include "gdbcore.h"
+#include "frame.h"
#include "regcache.h"
#include "value.h"
@@ -178,7 +179,31 @@ alphanbsd_sigtramp_offset (CORE_ADDR pc)
static int
alphanbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
- return (alphanbsd_sigtramp_offset (pc) >= 0);
+ return (nbsd_pc_in_sigtramp (pc, func_name)
+ || alphanbsd_sigtramp_offset (pc) >= 0);
+}
+
+static CORE_ADDR
+alphanbsd_sigcontext_addr (struct frame_info *frame)
+{
+ /* FIXME: This is not correct for all versions of NetBSD/alpha.
+ We will probably need to disassemble the trampoline to figure
+ out which trampoline frame type we have. */
+ return frame->frame;
+}
+
+static CORE_ADDR
+alphanbsd_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
+{
+ char *name;
+
+ /* FIXME: This is not correct for all versions of NetBSD/alpha.
+ We will probably need to disassemble the trampoline to figure
+ out which trampoline frame type we have. */
+ find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
+ if (PC_IN_SIGTRAMP (pc, name))
+ return frame->frame;
+ return 0;
}
static void
@@ -196,7 +221,9 @@ alphanbsd_init_abi (struct gdbarch_info info,
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_lp64_solib_svr4_fetch_link_map_offsets);
+ tdep->skip_sigtramp_frame = alphanbsd_skip_sigtramp_frame;
tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;
+ tdep->sigcontext_addr = alphanbsd_sigcontext_addr;
tdep->jb_pc = 2;
tdep->jb_elt_size = 8;
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index b24533223c6..e38f13d2a62 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1216,8 +1216,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_max_register_virtual_size (gdbarch, 4);
set_gdbarch_register_virtual_type (gdbarch, avr_register_virtual_type);
- /* We might need to define our own here or define FRAME_INIT_SAVED_REGS */
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
set_gdbarch_print_insn (gdbarch, print_insn_avr);
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 368b9df12a1..8f23905a90d 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -30,6 +30,7 @@
#include "target.h"
#include "ax.h"
#include "ax-gdb.h"
+#include "gdb_string.h"
/* To make sense of this file, you should read doc/agentexpr.texi.
Then look at the types and enums in ax-gdb.h. For the code itself,
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 0f498af9957..b88f6749aec 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -45,6 +45,7 @@
#include "completer.h"
#include "gdb.h"
#include "ui-out.h"
+#include "cli/cli-script.h"
#include "gdb-events.h"
@@ -737,7 +738,19 @@ insert_breakpoints (void)
if (b->enable_state == bp_permanent)
/* Permanent breakpoints cannot be inserted or removed. */
continue;
- else if (b->type != bp_watchpoint
+ if ((b->type == bp_watchpoint
+ || b->type == bp_hardware_watchpoint
+ || b->type == bp_read_watchpoint
+ || b->type == bp_access_watchpoint) && (!b->val))
+ {
+ struct value *val;
+ val = evaluate_expression (b->exp);
+ release_value (val);
+ if (VALUE_LAZY (val))
+ value_fetch_lazy (val);
+ b->val = val;
+ }
+ if (b->type != bp_watchpoint
&& b->type != bp_hardware_watchpoint
&& b->type != bp_read_watchpoint
&& b->type != bp_access_watchpoint
@@ -1565,6 +1578,14 @@ breakpoint_init_inferior (enum inf_context context)
/* Likewise for watchpoints on local expressions. */
if (b->exp_valid_block != NULL)
delete_breakpoint (b);
+ if (context == inf_starting)
+ {
+ /* Reset val field to force reread of starting value
+ in insert_breakpoints. */
+ if (b->val)
+ value_free (b->val);
+ b->val = NULL;
+ }
break;
default:
/* Likewise for exception catchpoints in dynamic-linked
@@ -1763,6 +1784,7 @@ bpstat_clear (bpstat *bsp)
q = p->next;
if (p->old_val != NULL)
value_free (p->old_val);
+ free_command_lines (&p->commands);
xfree (p);
p = q;
}
@@ -1875,7 +1897,7 @@ bpstat_clear_actions (bpstat bs)
{
for (; bs != NULL; bs = bs->next)
{
- bs->commands = NULL;
+ free_command_lines (&bs->commands);
if (bs->old_val != NULL)
{
value_free (bs->old_val);
@@ -1944,11 +1966,9 @@ top:
to look at, so start over. */
goto top;
else
- bs->commands = NULL;
+ free_command_lines (&bs->commands);
}
-
- executing_breakpoint_commands = 0;
- discard_cleanups (old_chain);
+ do_cleanups (old_chain);
}
/* This is the normal print function for a bpstat. In the future,
@@ -2730,7 +2750,7 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
/* We will stop here */
if (b->disposition == disp_disable)
b->enable_state = bp_disabled;
- bs->commands = b->commands;
+ bs->commands = copy_command_lines (b->commands);
if (b->silent)
bs->print = 0;
if (bs->commands &&
@@ -6787,14 +6807,8 @@ delete_breakpoint (struct breakpoint *bpt)
if (bs->breakpoint_at == bpt)
{
bs->breakpoint_at = NULL;
-
- /* we'd call bpstat_clear_actions, but that free's stuff and due
- to the multiple pointers pointing to one item with no
- reference counts found anywhere through out the bpstat's (how
- do you spell fragile?), we don't want to free things twice --
- better a memory leak than a corrupt malloc pool! */
- bs->commands = NULL;
bs->old_val = NULL;
+ /* bs->commands will be freed later. */
}
/* On the chance that someone will soon try again to delete this same
bp, we mark it as deleted before freeing its storage. */
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index ea5083646e0..c6fc52c63a5 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -89,6 +89,8 @@ extern int hp_som_som_object_present;
#define yylloc c_lloc
#define yyreds c_reds /* With YYDEBUG defined */
#define yytoks c_toks /* With YYDEBUG defined */
+#define yyname c_name /* With YYDEBUG defined */
+#define yyrule c_rule /* With YYDEBUG defined */
#define yylhs c_yylhs
#define yylen c_yylen
#define yydefred c_yydefred
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 9361067ceaa..925d9c5469c 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -21,6 +21,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "gdb_string.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 9aac6e6aaae..2b23301c6b3 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1012,6 +1012,36 @@ make_cleanup_free_command_lines (struct command_line **arg)
{
return make_cleanup (do_free_command_lines_cleanup, arg);
}
+
+struct command_line *
+copy_command_lines (struct command_line *cmds)
+{
+ struct command_line *result = NULL;
+
+ if (cmds)
+ {
+ result = (struct command_line *) xmalloc (sizeof (struct command_line));
+
+ result->next = copy_command_lines (cmds->next);
+ result->line = xstrdup (cmds->line);
+ result->control_type = cmds->control_type;
+ result->body_count = cmds->body_count;
+ if (cmds->body_count > 0)
+ {
+ int i;
+
+ result->body_list = (struct command_line **)
+ xmalloc (sizeof (struct command_line *) * cmds->body_count);
+
+ for (i = 0; i < cmds->body_count; i++)
+ result->body_list[i] = copy_command_lines (cmds->body_list[i]);
+ }
+ else
+ result->body_list = NULL;
+ }
+
+ return result;
+}
static void
validate_comname (char *comname)
diff --git a/gdb/cli/cli-script.h b/gdb/cli/cli-script.h
index f8604c6cb71..898e3cc04f8 100644
--- a/gdb/cli/cli-script.h
+++ b/gdb/cli/cli-script.h
@@ -41,6 +41,8 @@ extern enum command_control_type
extern void print_command_lines (struct ui_out *,
struct command_line *, unsigned int);
+extern struct command_line * copy_command_lines (struct command_line *cmds);
+
/* Exported to gdb/infrun.c */
extern void execute_user_command (struct cmd_list_element *c, char *args);
diff --git a/gdb/config/i386/nbsdelf.mt b/gdb/config/i386/nbsd.mt
index fc80608e01e..f7f8cd6e70c 100644
--- a/gdb/config/i386/nbsdelf.mt
+++ b/gdb/config/i386/nbsd.mt
@@ -1,3 +1,4 @@
# Target: Intel 386 running NetBSD
-TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o corelow.o
+TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o corelow.o \
+ nbsd-tdep.o solib.o solib-svr4.o
TM_FILE= tm-nbsd.h
diff --git a/gdb/config/i386/nbsdaout.mh b/gdb/config/i386/nbsdaout.mh
index e52f38a5b21..226c56cc445 100644
--- a/gdb/config/i386/nbsdaout.mh
+++ b/gdb/config/i386/nbsdaout.mh
@@ -1,6 +1,5 @@
# Host: Intel 386 running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o \
- solib.o solib-sunos.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o solib-sunos.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsdaout.h
diff --git a/gdb/config/i386/nbsdaout.mt b/gdb/config/i386/nbsdaout.mt
deleted file mode 100644
index aa88957b9ea..00000000000
--- a/gdb/config/i386/nbsdaout.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 running NetBSD
-TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o corelow.o
-TM_FILE= tm-nbsdaout.h
diff --git a/gdb/config/i386/nbsdelf.mh b/gdb/config/i386/nbsdelf.mh
index 0d1c4d1badc..7c27b02f3ac 100644
--- a/gdb/config/i386/nbsdelf.mh
+++ b/gdb/config/i386/nbsdelf.mh
@@ -1,5 +1,4 @@
# Host: Intel 386 running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o \
- solib.o solib-svr4.o solib-legacy.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h
diff --git a/gdb/config/i386/tm-nbsd.h b/gdb/config/i386/tm-nbsd.h
index 0d73d3a0d96..8e589281325 100644
--- a/gdb/config/i386/tm-nbsd.h
+++ b/gdb/config/i386/tm-nbsd.h
@@ -22,17 +22,6 @@
#define TM_NBSD_H
#include "i386/tm-i386.h"
-
-/* These defines allow the recognition of sigtramps as a function name
- <sigtramp>.
-
- FIXME: kettenis/2002-05-12: Of course these defines will have to go
- if we go truly "multi-arch", but I don't know yet how to get rid of
- them. */
-
-#define SIGTRAMP_START(pc) i386bsd_sigtramp_start (pc)
-#define SIGTRAMP_END(pc) i386bsd_sigtramp_end (pc)
-extern CORE_ADDR i386bsd_sigtramp_start (CORE_ADDR pc);
-extern CORE_ADDR i386bsd_sigtramp_end (CORE_ADDR pc);
+#include "solib.h"
#endif /* TM_NBSD_H */
diff --git a/gdb/config/i386/tm-nbsdaout.h b/gdb/config/i386/tm-nbsdaout.h
deleted file mode 100644
index 25325e1fe10..00000000000
--- a/gdb/config/i386/tm-nbsdaout.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Macro definitions for i386 running under NetBSD.
- Copyright 2000, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_NBSDAOUT_H
-#define TM_NBSDAOUT_H
-
-#include "i386/tm-nbsd.h"
-
-#endif /* TM_NBSDAOUT_H */
diff --git a/gdb/config/mips/nbsd.mt b/gdb/config/mips/nbsd.mt
index de529166c56..eb5d8871d79 100644
--- a/gdb/config/mips/nbsd.mt
+++ b/gdb/config/mips/nbsd.mt
@@ -1,5 +1,6 @@
# Target: MIPS running NetBSD
-TDEPFILES= mips-tdep.o mipsnbsd-tdep.o corelow.o solib.o solib-svr4.o
+TDEPFILES= mips-tdep.o mipsnbsd-tdep.o corelow.o solib.o solib-svr4.o \
+ nbsd-tdep.o
TM_FILE= tm-nbsd.h
SIM_OBS = remote-sim.o
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 385dbd02b3d..896fbb18cb3 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -92,9 +92,8 @@ i[3456]86-ncr-*) gdb_target=ncr3000 ;;
# OBSOLETE i[3456]86-*-aix*) gdb_target=i386aix ;;
i[3456]86-*-bsd*) gdb_target=i386bsd ;;
i[3456]86-*-freebsd*) gdb_target=fbsd ;;
-i[3456]86-*-netbsdelf*) gdb_target=nbsdelf ;;
-i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
- gdb_target=nbsdaout ;;
+i[3456]86-*-netbsd*) gdb_target=nbsd ;;
+i[3456]86-*-openbsd*) gdb_target=nbsd ;; # FIXME: needs its own target
# OBSOLETE i[3456]86-*-os9k) gdb_target=i386os9k ;;
i[3456]86-*-go32*) gdb_target=i386aout ;;
i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c
index d4eb0a00d08..36d299217bd 100644
--- a/gdb/cp-abi.c
+++ b/gdb/cp-abi.c
@@ -21,6 +21,7 @@
#include "defs.h"
#include "value.h"
#include "cp-abi.h"
+#include "gdb_string.h"
struct cp_abi_ops current_cp_abi;
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 37a5e3abd3a..5bfecf01071 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,20 @@
+2002-09-02 Stephane Carrez <stcarrez@nerim.fr>
+
+ * gdb.texinfo (TUI Overview): Document status line fields.
+
+2002-09-02 Stephane Carrez <stcarrez@nerim.fr>
+
+ * gdb.texinfo (TUI Commands): Document info win command.
+
+2002-09-01 Stephane Carrez <stcarrez@nerim.fr>
+
+ * gdb.texinfo (TUI Overview): Document breakpoint markers.
+
+2002-09-01 Stephane Carrez <stcarrez@nerim.fr>
+
+ * gdb.texinfo (TUI Single Key Mode): Document new SingleKey mode.
+ (TUI Keys): Likewise.
+
2002-08-25 Andrew Cagney <ac131313@redhat.com>
* gdb.texinfo (Examples): Use ``->'' for a packet send and ``<-''
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index c88c17d8d80..4b8e4ca0d53 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -13101,6 +13101,7 @@ letter.
@menu
* TUI Overview:: TUI overview
* TUI Keys:: TUI key bindings
+* TUI Single Key Mode:: TUI single key mode
* TUI Commands:: TUI specific commands
* TUI Configuration:: TUI configuration variables
@end menu
@@ -13141,8 +13142,6 @@ window is always visible.
@item source
The source window shows the source file of the program. The current
line as well as active breakpoints are displayed in this window.
-The current program position is shown with the @samp{>} marker and
-active breakpoints are shown with @samp{*} markers.
@item assembly
The assembly window shows the disassembly output of the program.
@@ -13154,6 +13153,37 @@ changed are highlighted.
@end table
+The source and assembly windows show the current program position
+by highlighting the current line and marking them with the @samp{>} marker.
+Breakpoints are also indicated with two markers. A first one
+indicates the breakpoint type:
+
+@table @code
+@item B
+Breakpoint which was hit at least once.
+
+@item b
+Breakpoint which was never hit.
+
+@item H
+Hardware breakpoint which was hit at least once.
+
+@item h
+Hardware breakpoint which was never hit.
+
+@end table
+
+The second marker indicates whether the breakpoint is enabled or not:
+
+@table @code
+@item +
+Breakpoint is enabled.
+
+@item -
+Breakpoint is disabled.
+
+@end table
+
The source, assembly and register windows are attached to the thread
and the frame position. They are updated when the current thread
changes, when the frame changes or when the program counter changes.
@@ -13179,6 +13209,35 @@ assembly and registers
@end itemize
+On top of the command window a status line gives various information
+concerning the current process begin debugged. The status line is
+updated when the information it shows changes. The following fields
+are displayed:
+
+@table @emph
+@item target
+Indicates the current gdb target
+(@pxref{Targets, ,Specifying a Debugging Target}).
+
+@item process
+Gives information about the current process or thread number.
+When no process is being debugged, this field is set to @code{No process}.
+
+@item function
+Gives the current function name for the selected frame.
+The name is demangled if demangling is turned on (@pxref{Print Settings}).
+When there is no symbol corresponding to the current program counter
+the string @code{??} is displayed.
+
+@item line
+Indicates the current line number for the selected frame.
+When the current line number is not known the string @code{??} is displayed.
+
+@item pc
+Indicates the current program counter address.
+
+@end table
+
@node TUI Keys
@section TUI Key Bindings
@cindex TUI key bindings
@@ -13186,7 +13245,9 @@ assembly and registers
The TUI installs several key bindings in the readline keymaps
(@pxref{Command Line Editing}).
They allow to leave or enter in the TUI mode or they operate
-directly on the TUI layout and windows. The following key bindings
+directly on the TUI layout and windows. The TUI also provides
+a @emph{SingleKey} keymap which binds several keys directly to
+@value{GDBN} commands. The following key bindings
are installed for both TUI mode and the @value{GDBN} standard mode.
@table @kbd
@@ -13219,6 +13280,11 @@ previous layout and the new one.
Think of it as the Emacs @kbd{C-x 2} binding.
+@kindex C-x s
+@item C-x s
+Use the TUI @emph{SingleKey} keymap that binds single key to gdb commands
+(@pxref{TUI Single Key Mode}).
+
@end table
The following key bindings are handled only by the TUI mode:
@@ -13259,6 +13325,65 @@ for scrolling. This means they are not available for readline. It is
necessary to use other readline key bindings such as @key{C-p}, @key{C-n},
@key{C-b} and @key{C-f}.
+@node TUI Single Key Mode
+@section TUI Single Key Mode
+@cindex TUI single key mode
+
+The TUI provides a @emph{SingleKey} mode in which it installs a particular
+key binding in the readline keymaps to connect single keys to
+some gdb commands.
+
+@table @kbd
+@kindex c @r{(SingleKey TUI key)}
+@item c
+continue
+
+@kindex d @r{(SingleKey TUI key)}
+@item d
+down
+
+@kindex f @r{(SingleKey TUI key)}
+@item f
+finish
+
+@kindex n @r{(SingleKey TUI key)}
+@item n
+next
+
+@kindex q @r{(SingleKey TUI key)}
+@item q
+exit the @emph{SingleKey} mode.
+
+@kindex r @r{(SingleKey TUI key)}
+@item r
+run
+
+@kindex s @r{(SingleKey TUI key)}
+@item s
+step
+
+@kindex u @r{(SingleKey TUI key)}
+@item u
+up
+
+@kindex v @r{(SingleKey TUI key)}
+@item v
+info locals
+
+@kindex w @r{(SingleKey TUI key)}
+@item w
+where
+
+@end table
+
+Other keys temporarily switch to the @value{GDBN} command prompt.
+The key that was pressed is inserted in the editing buffer so that
+it is possible to type most @value{GDBN} commands without interaction
+with the TUI @emph{SingleKey} mode. Once the command is entered the TUI
+@emph{SingleKey} mode is restored. The only way to permanently leave
+this mode is by hitting @key{q} or @samp{@key{C-x} @key{s}}.
+
+
@node TUI Commands
@section TUI specific commands
@cindex TUI commands
@@ -13270,6 +13395,10 @@ is in the standard mode, using these commands will automatically switch
in the TUI mode.
@table @code
+@item info win
+@kindex info win
+List and give the size of all displayed windows.
+
@item layout next
@kindex layout next
Display the next layout.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 0d96e1ff74d..4ef683c13dc 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -803,7 +803,8 @@ static void dwarf2_attach_fields_to_type (struct field_info *,
struct type *, struct objfile *);
static void dwarf2_add_member_fn (struct field_info *,
- struct die_info *, struct objfile *objfile,
+ struct die_info *, struct type *,
+ struct objfile *objfile,
const struct comp_unit_head *);
static void dwarf2_attach_fn_fields_to_type (struct field_info *,
@@ -2259,7 +2260,7 @@ dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type,
static void
dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
- struct objfile *objfile,
+ struct type *type, struct objfile *objfile,
const struct comp_unit_head *cu_header)
{
struct attribute *attr;
@@ -2327,7 +2328,9 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
struct type *return_type = TYPE_TARGET_TYPE (die->type);
int nparams = TYPE_NFIELDS (die->type);
- smash_to_method_type (fnp->type, die->type,
+ /* TYPE is the domain of this method, and DIE->TYPE is the type
+ of the method itself (TYPE_CODE_METHOD). */
+ smash_to_method_type (fnp->type, type,
TYPE_TARGET_TYPE (die->type),
TYPE_FIELDS (die->type),
TYPE_NFIELDS (die->type),
@@ -2516,7 +2519,7 @@ read_structure_scope (struct die_info *die, struct objfile *objfile,
{
/* C++ member function. */
process_die (child_die, objfile, cu_header);
- dwarf2_add_member_fn (&fi, child_die, objfile, cu_header);
+ dwarf2_add_member_fn (&fi, child_die, type, objfile, cu_header);
}
else if (child_die->tag == DW_TAG_inheritance)
{
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index a26f019fe96..b9004264eec 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -91,6 +91,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define yylloc f_lloc
#define yyreds f_reds /* With YYDEBUG defined */
#define yytoks f_toks /* With YYDEBUG defined */
+#define yyname f_name /* With YYDEBUG defined */
+#define yyrule f_rule /* With YYDEBUG defined */
#define yylhs f_yylhs
#define yylen f_yylen
#define yydefred f_yydefred
diff --git a/gdb/gdb-events.c b/gdb/gdb-events.c
index 3acccf11dc7..e32d0e49d63 100644
--- a/gdb/gdb-events.c
+++ b/gdb/gdb-events.c
@@ -129,6 +129,16 @@ target_changed_event (void)
current_event_hooks->target_changed ();
}
+void
+selected_frame_level_changed_event (int level)
+{
+ if (gdb_events_debug)
+ fprintf_unfiltered (gdb_stdlog, "selected_frame_level_changed_event\n");
+ if (!current_event_hooks->selected_frame_level_changed)
+ return;
+ current_event_hooks->selected_frame_level_changed (level);
+}
+
#endif
#if WITH_GDB_EVENTS
@@ -162,6 +172,7 @@ enum gdb_event
tracepoint_modify,
architecture_changed,
target_changed,
+ selected_frame_level_changed,
nr_gdb_events
};
@@ -195,6 +206,11 @@ struct tracepoint_modify
int number;
};
+struct selected_frame_level_changed
+ {
+ int level;
+ };
+
struct event
{
enum gdb_event type;
@@ -207,6 +223,7 @@ struct event
struct tracepoint_create tracepoint_create;
struct tracepoint_delete tracepoint_delete;
struct tracepoint_modify tracepoint_modify;
+ struct selected_frame_level_changed selected_frame_level_changed;
}
data;
};
@@ -293,6 +310,15 @@ queue_target_changed (void)
append (event);
}
+static void
+queue_selected_frame_level_changed (int level)
+{
+ struct event *event = XMALLOC (struct event);
+ event->type = selected_frame_level_changed;
+ event->data.selected_frame_level_changed.level = level;
+ append (event);
+}
+
void
gdb_events_deliver (struct gdb_events *vector)
{
@@ -344,6 +370,10 @@ gdb_events_deliver (struct gdb_events *vector)
case target_changed:
vector->target_changed ();
break;
+ case selected_frame_level_changed:
+ vector->selected_frame_level_changed
+ (event->data.selected_frame_level_changed.level);
+ break;
}
delivering_events = event->next;
xfree (event);
@@ -364,6 +394,7 @@ _initialize_gdb_events (void)
queue_event_hooks.tracepoint_modify = queue_tracepoint_modify;
queue_event_hooks.architecture_changed = queue_architecture_changed;
queue_event_hooks.target_changed = queue_target_changed;
+ queue_event_hooks.selected_frame_level_changed = queue_selected_frame_level_changed;
#endif
c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,
diff --git a/gdb/gdb-events.h b/gdb/gdb-events.h
index daba6a4463a..c3332d7a808 100644
--- a/gdb/gdb-events.h
+++ b/gdb/gdb-events.h
@@ -60,6 +60,7 @@ typedef void (gdb_events_tracepoint_delete_ftype) (int number);
typedef void (gdb_events_tracepoint_modify_ftype) (int number);
typedef void (gdb_events_architecture_changed_ftype) (void);
typedef void (gdb_events_target_changed_ftype) (void);
+typedef void (gdb_events_selected_frame_level_changed_ftype) (int level);
/* gdb-events: object. */
@@ -74,6 +75,7 @@ struct gdb_events
gdb_events_tracepoint_modify_ftype *tracepoint_modify;
gdb_events_architecture_changed_ftype *architecture_changed;
gdb_events_target_changed_ftype *target_changed;
+ gdb_events_selected_frame_level_changed_ftype *selected_frame_level_changed;
};
@@ -88,6 +90,7 @@ extern void tracepoint_delete_event (int number);
extern void tracepoint_modify_event (int number);
extern void architecture_changed_event (void);
extern void target_changed_event (void);
+extern void selected_frame_level_changed_event (int level);
/* When GDB_EVENTS are not being used, completly disable them. */
@@ -101,6 +104,7 @@ extern void target_changed_event (void);
#define tracepoint_modify_event(number) 0
#define architecture_changed_event() 0
#define target_changed_event() 0
+#define selected_frame_level_changed_event(level) 0
#endif
/* Install custom gdb-events hooks. */
diff --git a/gdb/gdb-events.sh b/gdb/gdb-events.sh
index e92a71460ec..ed3340b0e4e 100755
--- a/gdb/gdb-events.sh
+++ b/gdb/gdb-events.sh
@@ -66,6 +66,7 @@ f:void:tracepoint_delete:int number:number
f:void:tracepoint_modify:int number:number
f:void:architecture_changed:void
f:void:target_changed:void
+f:void:selected_frame_level_changed:int level:level
#*:void:annotate_starting_hook:void
#*:void:annotate_stopped_hook:void
#*:void:annotate_signalled_hook:void
@@ -88,7 +89,6 @@ f:void:target_changed:void
#*:void:readline_begin_hook:char *format, ...:format
#*:char *:readline_hook:char *prompt:prompt
#*:void:readline_end_hook:void
-#*:void:context_hook:int num:num
#*:int:target_wait_hook:int pid, struct target_waitstatus *status:pid, status
#*:void:call_command_hook:struct cmd_list_element *c, char *cmd, int from_tty:c, cmd, from_tty
#*:NORETURN void:error_hook:void:: ATTR_NORETURN
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index c5365cf4e00..e7ab6093235 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,18 @@
+2002-08-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * linux-low.c (linux_create_inferior): Call setpgid. Return
+ the new PID.
+ (unstopped_p, linux_signal_pid): Remove.
+ (linux_target_ops): Remove linux_signal_pid.
+ * remote-utils.c (putpkt, input_interrupt): Use signal_pid
+ global instead of target method.
+ * target.h (struct target_ops): Remove signal_pid. Update comment
+ for create_inferior.
+ * server.c (signal_pid): New variable.
+ (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
+ gdbserver. Set the child to be the foreground process group.
+ (attach_inferior): Set signal_pid.
+
2002-08-23 Daniel Jacobowitz <drow@mvista.com>
* ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 7048daf221e..7644f9e990f 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -149,6 +149,8 @@ linux_create_inferior (char *program, char **allargs)
signal (SIGRTMIN + 1, SIG_DFL);
+ setpgid (0, 0);
+
execv (program, allargs);
fprintf (stderr, "Cannot exec %s: %s.\n", program,
@@ -160,7 +162,7 @@ linux_create_inferior (char *program, char **allargs)
new_process = add_process (pid);
add_thread (pid, new_process);
- return 0;
+ return pid;
}
/* Attach to an inferior process. */
@@ -1228,34 +1230,6 @@ linux_look_up_symbols (void)
#endif
}
-/* Return 1 if this process is not stopped. */
-static int
-unstopped_p (struct inferior_list_entry *entry, void *dummy)
-{
- struct process_info *process = (struct process_info *) entry;
-
- if (process->stopped)
- return 0;
-
- return 1;
-}
-
-static int
-linux_signal_pid ()
-{
- struct inferior_list_entry *process;
-
- process = find_inferior (&all_processes, unstopped_p, NULL);
-
- if (process == NULL)
- {
- warning ("no unstopped process");
- return inferior_pid;
- }
-
- return pid_of ((struct process_info *) process);
-}
-
static struct target_ops linux_target_ops = {
linux_create_inferior,
@@ -1269,7 +1243,6 @@ static struct target_ops linux_target_ops = {
linux_read_memory,
linux_write_memory,
linux_look_up_symbols,
- linux_signal_pid,
};
static void
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index c610c4c0e7c..d5699379bd5 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -46,6 +46,8 @@ static int remote_desc;
extern int using_threads;
extern int debug_threads;
+extern int signal_pid;
+
/* Open a connection to a remote debugger.
NAME is the filename used for communication. */
@@ -324,7 +326,7 @@ putpkt (char *buf)
/* Check for an input interrupt while we're here. */
if (buf3[0] == '\003')
- kill ((*the_target->signal_pid) (), SIGINT);
+ kill (signal_pid, SIGINT);
}
while (buf3[0] != '+');
@@ -361,7 +363,7 @@ input_interrupt (int unused)
return;
}
- kill ((*the_target->signal_pid) (), SIGINT);
+ kill (signal_pid, SIGINT);
}
}
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index b674ed0070f..d0963ba9de9 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -21,6 +21,10 @@
#include "server.h"
+#include <unistd.h>
+#include <signal.h>
+#include <sys/wait.h>
+
int cont_thread;
int general_thread;
int step_thread;
@@ -31,14 +35,27 @@ int server_waiting;
jmp_buf toplevel;
+/* The PID of the originally created or attached inferior. Used to
+ send signals to the process when GDB sends us an asynchronous interrupt
+ (user hitting Control-C in the client), and to wait for the child to exit
+ when no longer debugging it. */
+
+int signal_pid;
+
static unsigned char
start_inferior (char *argv[], char *statusptr)
{
- /* FIXME Check error? Or turn to void. */
- create_inferior (argv[0], argv);
+ signal (SIGTTOU, SIG_DFL);
+ signal (SIGTTIN, SIG_DFL);
+
+ signal_pid = create_inferior (argv[0], argv);
fprintf (stderr, "Process %s created; pid = %d\n", argv[0],
- all_threads.head->id);
+ signal_pid);
+
+ signal (SIGTTOU, SIG_IGN);
+ signal (SIGTTIN, SIG_IGN);
+ tcsetpgrp (fileno (stderr), signal_pid);
/* Wait till we are at 1st instruction in program, return signal number. */
return mywait (statusptr, 0);
@@ -49,9 +66,15 @@ attach_inferior (int pid, char *statusptr, unsigned char *sigptr)
{
/* myattach should return -1 if attaching is unsupported,
0 if it succeeded, and call error() otherwise. */
+
if (myattach (pid) != 0)
return -1;
+ /* FIXME - It may be that we should get the SIGNAL_PID from the
+ attach function, so that it can be the main thread instead of
+ whichever we were told to attach to. */
+ signal_pid = pid;
+
*sigptr = mywait (statusptr, 0);
return 0;
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index c6aeee6f562..e554c0ac7e1 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -32,7 +32,7 @@ struct target_ops
ARGS is a standard NULL-terminated array of arguments,
to be passed to the inferior as ``argv''.
- Returns 0 on success, -1 on failure. Registers the new
+ Returns the new PID on success, -1 on failure. Registers the new
process with the process list. */
int (*create_inferior) (char *program, char **args);
@@ -104,11 +104,6 @@ struct target_ops
symbols. */
void (*look_up_symbols) (void);
-
- /* Return the PID we should send a signal to. Used for asynchronous
- interrupts (user hitting Control-C). */
-
- int (*signal_pid) (void);
};
extern struct target_ops *the_target;
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index a4b8020a04c..59aad5dd7f3 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -2612,6 +2612,7 @@ init_gnu_ops (void)
gnu_ops.to_terminal_init = gnu_terminal_init_inferior;
gnu_ops.to_terminal_inferior = terminal_inferior;
gnu_ops.to_terminal_ours_for_output = terminal_ours_for_output;
+ gnu_ops.to_terminal_save_ours = terminal_save_ours;
gnu_ops.to_terminal_ours = terminal_ours;
gnu_ops.to_terminal_info = child_terminal_info;
gnu_ops.to_kill = gnu_kill_inferior; /* to_kill */
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index eec18ffffa5..981bb9d5feb 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -554,6 +554,7 @@ init_hpux_thread_ops (void)
hpux_thread_ops.to_terminal_init = terminal_init_inferior;
hpux_thread_ops.to_terminal_inferior = terminal_inferior;
hpux_thread_ops.to_terminal_ours_for_output = terminal_ours_for_output;
+ hpux_thread_ops.to_terminal_save_ours = terminal_save_ours;
hpux_thread_ops.to_terminal_ours = terminal_ours;
hpux_thread_ops.to_terminal_info = child_terminal_info;
hpux_thread_ops.to_kill = hpux_thread_kill_inferior;
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index fe610211f8e..84588795699 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -25,6 +25,7 @@
#include "regcache.h"
#include "gdb_assert.h"
+#include "gdb_string.h"
#include <sys/ptrace.h>
#include <sys/user.h>
#include <sys/procfs.h>
@@ -540,15 +541,17 @@ store_fpxregs (int tid, int regno)
static void
dummy_sse_values (void)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* C doesn't have a syntax for NaN's, so write it out as an array of
longs. */
static long dummy[4] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff };
static long mxcsr = 0x1f80;
int reg;
- for (reg = 0; reg < 8; reg++)
+ for (reg = 0; reg < tdep->num_xmm_regs; reg++)
supply_register (XMM0_REGNUM + reg, (char *) dummy);
- supply_register (MXCSR_REGNUM, (char *) &mxcsr);
+ if (tdep->num_xmm_regs > 0)
+ supply_register (MXCSR_REGNUM, (char *) &mxcsr);
}
#else
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 8684fce684d..4a2eab6ae1a 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -973,20 +973,21 @@ i386_extract_return_value (struct type *type, struct regcache *regcache,
in VALBUF of type TYPE, given in virtual format. */
static void
-i386_store_return_value (struct type *type, char *valbuf)
+i386_store_return_value (struct type *type, struct regcache *regcache,
+ const void *valbuf)
{
int len = TYPE_LENGTH (type);
if (TYPE_CODE (type) == TYPE_CODE_STRUCT
&& TYPE_NFIELDS (type) == 1)
{
- i386_store_return_value (TYPE_FIELD_TYPE (type, 0), valbuf);
+ i386_store_return_value (TYPE_FIELD_TYPE (type, 0), regcache, valbuf);
return;
}
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- unsigned int fstat;
+ ULONGEST fstat;
char buf[FPU_REG_RAW_SIZE];
if (FP0_REGNUM == 0)
@@ -1004,20 +1005,20 @@ i386_store_return_value (struct type *type, char *valbuf)
not exactly how it would happen on the target itself, but
it is the best we can do. */
convert_typed_floating (valbuf, type, buf, builtin_type_i387_ext);
- write_register_gen (FP0_REGNUM, buf);
+ regcache_raw_write (regcache, FP0_REGNUM, buf);
/* Set the top of the floating-point register stack to 7. The
actual value doesn't really matter, but 7 is what a normal
function return would end up with if the program started out
with a freshly initialized FPU. */
- fstat = read_register (FSTAT_REGNUM);
+ regcache_raw_read_unsigned (regcache, FSTAT_REGNUM, &fstat);
fstat |= (7 << 11);
- write_register (FSTAT_REGNUM, fstat);
+ regcache_raw_write_unsigned (regcache, FSTAT_REGNUM, fstat);
/* Mark %st(1) through %st(7) as empty. Since we set the top of
the floating-point register stack to 7, the appropriate value
for the tag word is 0x3fff. */
- write_register (FTAG_REGNUM, 0x3fff);
+ regcache_raw_write_unsigned (regcache, FTAG_REGNUM, 0x3fff);
}
else
{
@@ -1025,13 +1026,12 @@ i386_store_return_value (struct type *type, char *valbuf)
int high_size = REGISTER_RAW_SIZE (HIGH_RETURN_REGNUM);
if (len <= low_size)
- write_register_bytes (REGISTER_BYTE (LOW_RETURN_REGNUM), valbuf, len);
+ regcache_raw_write_part (regcache, LOW_RETURN_REGNUM, 0, len, valbuf);
else if (len <= (low_size + high_size))
{
- write_register_bytes (REGISTER_BYTE (LOW_RETURN_REGNUM),
- valbuf, low_size);
- write_register_bytes (REGISTER_BYTE (HIGH_RETURN_REGNUM),
- valbuf + low_size, len - low_size);
+ regcache_raw_write (regcache, LOW_RETURN_REGNUM, valbuf);
+ regcache_raw_write_part (regcache, HIGH_RETURN_REGNUM, 0,
+ len - low_size, (char *) valbuf + low_size);
}
else
internal_error (__FILE__, __LINE__,
@@ -1533,7 +1533,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_return_address (gdbarch, i386_push_return_address);
set_gdbarch_pop_frame (gdbarch, i386_pop_frame);
set_gdbarch_store_struct_return (gdbarch, i386_store_struct_return);
- set_gdbarch_deprecated_store_return_value (gdbarch, i386_store_return_value);
+ set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
set_gdbarch_extract_struct_value_address (gdbarch,
i386_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, i386_use_struct_convention);
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 30128d9341a..646001baa34 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -175,5 +175,6 @@ extern void i386_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
/* Functions exported from i386bsd-tdep.c. */
extern CORE_ADDR i386bsd_sigcontext_addr (struct frame_info *frame);
+extern void i386bsd_init_abi (struct gdbarch_info, struct gdbarch *);
#endif /* i386-tdep.h */
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index 2edf3eaf107..368fa5631ae 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -93,7 +93,7 @@ i386bsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
int i386bsd_sc_pc_offset = 20;
int i386bsd_sc_sp_offset = 8;
-static void
+void
i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
@@ -113,61 +113,6 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sc_sp_offset = i386bsd_sc_sp_offset;
}
-/* NetBSD 1.0 or later. */
-
-CORE_ADDR i386nbsd_sigtramp_start = 0xbfbfdf20;
-CORE_ADDR i386nbsd_sigtramp_end = 0xbfbfdff0;
-
-/* From <machine/signal.h>. */
-int i386nbsd_sc_pc_offset = 44;
-int i386nbsd_sc_sp_offset = 56;
-
-static void
-i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
- /* Obviously NetBSD is BSD-based. */
- i386bsd_init_abi (info, gdbarch);
-
- /* NetBSD uses -freg-struct-return by default. */
- tdep->struct_return = reg_struct_return;
-
- /* NetBSD uses a different memory layout. */
- tdep->sigtramp_start = i386nbsd_sigtramp_start;
- tdep->sigtramp_end = i386nbsd_sigtramp_end;
-
- /* NetBSD has a `struct sigcontext' that's different from the
- origional 4.3 BSD. */
- tdep->sc_pc_offset = i386nbsd_sc_pc_offset;
- tdep->sc_sp_offset = i386nbsd_sc_sp_offset;
-}
-
-/* NetBSD ELF. */
-static void
-i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
- /* It's still NetBSD. */
- i386nbsd_init_abi (info, gdbarch);
-
- /* But ELF-based. */
- i386_elf_init_abi (info, gdbarch);
-
- /* NetBSD ELF uses SVR4-style shared libraries. */
- set_gdbarch_in_solib_call_trampoline (gdbarch,
- generic_in_solib_call_trampoline);
-
- /* NetBSD ELF uses -fpcc-struct-return by default. */
- tdep->struct_return = pcc_struct_return;
-
- /* We support the SSE registers on NetBSD ELF. */
- tdep->num_xmm_regs = I386_NUM_XREGS - 1;
- set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS
- + I386_NUM_XREGS);
-}
-
/* FreeBSD 3.0-RELEASE or later. */
CORE_ADDR i386fbsd_sigtramp_start = 0xbfbfdf20;
@@ -246,10 +191,6 @@ _initialize_i386bsd_tdep (void)
gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_aout_flavour,
i386bsd_aout_osabi_sniffer);
- gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETBSD_AOUT,
- i386nbsd_init_abi);
- gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETBSD_ELF,
- i386nbsdelf_init_abi);
gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_FREEBSD_AOUT,
i386fbsdaout_init_abi);
gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_FREEBSD_ELF,
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index 634101ad35f..8d32a03974d 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -23,8 +23,13 @@
#include "gdbtypes.h"
#include "gdbcore.h"
#include "regcache.h"
+#include "arch-utils.h"
+#include "i386-tdep.h"
#include "i387-tdep.h"
+#include "nbsd-tdep.h"
+
+#include "solib-svr4.h"
/* Map a GDB register number to an offset in the reg structure. */
static int regmap[] =
@@ -137,9 +142,161 @@ static struct core_fns i386nbsd_elfcore_fns =
NULL /* next */
};
+/* Under NetBSD/i386, signal handler invocations can be identified by the
+ designated code sequence that is used to return from a signal handler.
+ In particular, the return address of a signal handler points to the
+ following code sequence:
+
+ leal 0x10(%esp), %eax
+ pushl %eax
+ pushl %eax
+ movl $0x127, %eax # __sigreturn14
+ int $0x80
+
+ Each instruction has a unique encoding, so we simply attempt to match
+ the instruction the PC is pointing to with any of the above instructions.
+ If there is a hit, we know the offset to the start of the designated
+ sequence and can then check whether we really are executing in the
+ signal trampoline. If not, -1 is returned, otherwise the offset from the
+ start of the return sequence is returned. */
+#define RETCODE_INSN1 0x8d
+#define RETCODE_INSN2 0x50
+#define RETCODE_INSN3 0x50
+#define RETCODE_INSN4 0xb8
+#define RETCODE_INSN5 0xcd
+
+#define RETCODE_INSN2_OFF 4
+#define RETCODE_INSN3_OFF 5
+#define RETCODE_INSN4_OFF 6
+#define RETCODE_INSN5_OFF 11
+
+static const unsigned char sigtramp_retcode[] =
+{
+ RETCODE_INSN1, 0x44, 0x24, 0x10,
+ RETCODE_INSN2,
+ RETCODE_INSN3,
+ RETCODE_INSN4, 0x27, 0x01, 0x00, 0x00,
+ RETCODE_INSN5, 0x80,
+};
+
+static LONGEST
+i386nbsd_sigtramp_offset (CORE_ADDR pc)
+{
+ unsigned char ret[sizeof(sigtramp_retcode)], insn;
+ LONGEST off;
+ int i;
+
+ if (read_memory_nobpt (pc, &insn, 1) != 0)
+ return -1;
+
+ switch (insn)
+ {
+ case RETCODE_INSN1:
+ off = 0;
+ break;
+
+ case RETCODE_INSN2:
+ /* INSN2 and INSN3 are the same. Read at the location of PC+1
+ to determine if we're actually looking at INSN2 or INSN3. */
+ if (read_memory_nobpt (pc + 1, &insn, 1) != 0)
+ return -1;
+
+ if (insn == RETCODE_INSN3)
+ off = RETCODE_INSN2_OFF;
+ else
+ off = RETCODE_INSN3_OFF;
+ break;
+
+ case RETCODE_INSN4:
+ off = RETCODE_INSN4_OFF;
+ break;
+
+ case RETCODE_INSN5:
+ off = RETCODE_INSN5_OFF;
+ break;
+
+ default:
+ return -1;
+ }
+
+ pc -= off;
+
+ if (read_memory_nobpt (pc, (char *) ret, sizeof (ret)) != 0)
+ return -1;
+
+ if (memcmp (ret, sigtramp_retcode, sizeof (ret)) == 0)
+ return off;
+
+ return -1;
+}
+
+static int
+i386nbsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
+{
+
+ return (nbsd_pc_in_sigtramp (pc, name)
+ || i386nbsd_sigtramp_offset (pc) >= 0);
+}
+
+/* From <machine/signal.h>. */
+int i386nbsd_sc_pc_offset = 44;
+int i386nbsd_sc_sp_offset = 56;
+
+static void
+i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* Obviously NetBSD is BSD-based. */
+ i386bsd_init_abi (info, gdbarch);
+
+ /* NetBSD has different signal trampoline conventions. */
+ set_gdbarch_pc_in_sigtramp (gdbarch, i386nbsd_pc_in_sigtramp);
+
+ /* NetBSD uses -freg-struct-return by default. */
+ tdep->struct_return = reg_struct_return;
+
+ /* NetBSD has a `struct sigcontext' that's different from the
+ origional 4.3 BSD. */
+ tdep->sc_pc_offset = i386nbsd_sc_pc_offset;
+ tdep->sc_sp_offset = i386nbsd_sc_sp_offset;
+}
+
+/* NetBSD ELF. */
+static void
+i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* It's still NetBSD. */
+ i386nbsd_init_abi (info, gdbarch);
+
+ /* But ELF-based. */
+ i386_elf_init_abi (info, gdbarch);
+
+ /* NetBSD ELF uses SVR4-style shared libraries. */
+ set_gdbarch_in_solib_call_trampoline (gdbarch,
+ generic_in_solib_call_trampoline);
+ set_solib_svr4_fetch_link_map_offsets (gdbarch,
+ nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
+
+ /* NetBSD ELF uses -fpcc-struct-return by default. */
+ tdep->struct_return = pcc_struct_return;
+
+ /* We support the SSE registers on NetBSD ELF. */
+ tdep->num_xmm_regs = I386_NUM_XREGS - 1;
+ set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS
+ + I386_NUM_XREGS);
+}
+
void
_initialize_i386nbsd_tdep (void)
{
add_core_fns (&i386nbsd_core_fns);
add_core_fns (&i386nbsd_elfcore_fns);
+
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETBSD_AOUT,
+ i386nbsd_init_abi);
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETBSD_ELF,
+ i386nbsdelf_init_abi);
}
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index daf1c6ff6ce..3d4b39775fb 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -28,6 +28,7 @@
#include "floatformat.h"
#include "regcache.h"
#include "gdb_assert.h"
+#include "gdb_string.h"
#include "doublest.h"
#include "i386-tdep.h"
diff --git a/gdb/inferior.h b/gdb/inferior.h
index e875e9cc186..8035ccd9825 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -152,6 +152,8 @@ extern void kill_inferior (void);
extern void generic_mourn_inferior (void);
+extern void terminal_save_ours (void);
+
extern void terminal_ours (void);
extern int run_stack_dummy (CORE_ADDR , struct regcache *);
diff --git a/gdb/inflow.c b/gdb/inflow.c
index 526acdfdc7e..b37fc541c91 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -200,6 +200,23 @@ terminal_init_inferior_with_pgrp (int pgrp)
}
}
+/* Save the terminal settings again. This is necessary for the TUI
+ when it switches to TUI or non-TUI mode; curses changes the terminal
+ and gdb must be able to restore it correctly. */
+
+void
+terminal_save_ours ()
+{
+ if (gdb_has_a_terminal ())
+ {
+ /* We could just as well copy our_ttystate (if we felt like adding
+ a new function serial_copy_tty_state). */
+ if (our_ttystate)
+ xfree (our_ttystate);
+ our_ttystate = serial_get_tty_state (stdin_serial);
+ }
+}
+
void
terminal_init_inferior (void)
{
diff --git a/gdb/inftarg.c b/gdb/inftarg.c
index 9035310c494..e49681192fe 100644
--- a/gdb/inftarg.c
+++ b/gdb/inftarg.c
@@ -774,6 +774,7 @@ init_child_ops (void)
child_ops.to_terminal_init = terminal_init_inferior;
child_ops.to_terminal_inferior = terminal_inferior;
child_ops.to_terminal_ours_for_output = terminal_ours_for_output;
+ child_ops.to_terminal_save_ours = terminal_save_ours;
child_ops.to_terminal_ours = terminal_ours;
child_ops.to_terminal_info = child_terminal_info;
child_ops.to_kill = kill_inferior;
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index c2e5d16c68e..70c228b9575 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -85,6 +85,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define yylloc java_lloc
#define yyreds java_reds /* With YYDEBUG defined */
#define yytoks java_toks /* With YYDEBUG defined */
+#define yyname java_name /* With YYDEBUG defined */
+#define yyrule java_rule /* With YYDEBUG defined */
#define yylhs java_yylhs
#define yylen java_yylen
#define yydefred java_yydefred
diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c
index f0fd0f5ea25..1ddfcb576c6 100644
--- a/gdb/jv-valprint.c
+++ b/gdb/jv-valprint.c
@@ -30,6 +30,7 @@
#include "jv-lang.h"
#include "c-lang.h"
#include "annotate.h"
+#include "gdb_string.h"
/* Local functions */
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index cb5b19f3148..cd577fbe3a0 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -21,6 +21,7 @@
#include "defs.h"
#include "gdb_assert.h"
+#include "gdb_string.h"
#include <errno.h>
#include <signal.h>
#include <sys/ptrace.h>
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index 707c9e21091..e291d62b1cb 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -87,6 +87,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define yylloc m2_lloc
#define yyreds m2_reds /* With YYDEBUG defined */
#define yytoks m2_toks /* With YYDEBUG defined */
+#define yyname m2_name /* With YYDEBUG defined */
+#define yyrule m2_rule /* With YYDEBUG defined */
#define yylhs m2_yylhs
#define yylen m2_yylen
#define yydefred m2_yydefred
diff --git a/gdb/m3-nat.c b/gdb/m3-nat.c
index c29101b9c36..28e62a87f76 100644
--- a/gdb/m3-nat.c
+++ b/gdb/m3-nat.c
@@ -4474,6 +4474,7 @@ init_m3_ops (void)
m3_ops.to_terminal_init = terminal_init_inferior;
m3_ops.to_terminal_inferior = terminal_inferior;
m3_ops.to_terminal_ours_for_output = terminal_ours_for_output;
+ m3_ops.to_terminal_save_ours = terminal_save_ours;
m3_ops.to_terminal_ours = terminal_ours;
m3_ops.to_terminal_info = child_terminal_info;
m3_ops.to_kill = m3_kill_inferior;
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index 029ae6f28bc..3367e361bc6 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -26,6 +26,7 @@
#include "value.h"
#include "osabi.h"
+#include "nbsd-tdep.h"
#include "mipsnbsd-tdep.h"
#include "solib-svr4.h"
@@ -219,7 +220,8 @@ mipsnbsd_sigtramp_offset (CORE_ADDR pc)
static int
mipsnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
- return (mipsnbsd_sigtramp_offset (pc) >= 0);
+ return (nbsd_pc_in_sigtramp (pc, func_name)
+ || mipsnbsd_sigtramp_offset (pc) >= 0);
}
/* Figure out where the longjmp will land. We expect that we have
diff --git a/gdb/nbsd-tdep.c b/gdb/nbsd-tdep.c
index 71e229d57b0..a2d8f7d1533 100644
--- a/gdb/nbsd-tdep.c
+++ b/gdb/nbsd-tdep.c
@@ -20,6 +20,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "gdb_string.h"
#include "solib-svr4.h"
/* Fetch (and possibly build) an appropriate link_map_offsets
@@ -96,3 +97,13 @@ nbsd_lp64_solib_svr4_fetch_link_map_offsets (void)
return lmp;
}
+
+int
+nbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
+{
+ /* Check for libc-provided signal trampoline. All such trampolines
+ have function names which begin with "__sigtramp". */
+
+ return (func_name != NULL
+ && strncmp (func_name, "__sigtramp", 10) == 0);
+}
diff --git a/gdb/nbsd-tdep.h b/gdb/nbsd-tdep.h
index ca40965184f..9d26ae9f859 100644
--- a/gdb/nbsd-tdep.h
+++ b/gdb/nbsd-tdep.h
@@ -25,4 +25,6 @@
struct link_map_offsets *nbsd_ilp32_solib_svr4_fetch_link_map_offsets (void);
struct link_map_offsets *nbsd_lp64_solib_svr4_fetch_link_map_offsets (void);
+int nbsd_pc_in_sigtramp (CORE_ADDR, char *);
+
#endif /* NBSD_TDEP_H */
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 83eb767c0b7..682dbba9c6f 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "gdb_string.h"
#include "osabi.h"
#include "elf-bfd.h"
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index fbdd3f69e18..f0939e7bbbf 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -93,6 +93,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define yylloc pascal_lloc
#define yyreds pascal_reds /* With YYDEBUG defined */
#define yytoks pascal_toks /* With YYDEBUG defined */
+#define yyname pascal_name /* With YYDEBUG defined */
+#define yyrule pascal_rule /* With YYDEBUG defined */
#define yylhs pascal_yylhs
#define yylen pascal_yylen
#define yydefred pascal_yydefred
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index 8e13b6e860a..88c8cc09a90 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -20,6 +20,7 @@
/* This file is derived from c-lang.c */
#include "defs.h"
+#include "gdb_string.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index 6fabab7c5b4..3d052a83ff2 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -196,6 +196,13 @@ static struct core_fns ppcnbsd_elfcore_fns =
NULL /* next */
};
+static int
+ppcnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
+{
+ /* FIXME: Need to add support for kernel-provided signal trampolines. */
+ return (nbsd_pc_in_sigtramp (pc, func_name));
+}
+
static void
ppcnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
@@ -203,6 +210,8 @@ ppcnbsd_init_abi (struct gdbarch_info info,
/* Stop at main. */
set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
+ set_gdbarch_pc_in_sigtramp (gdbarch, ppcnbsd_pc_in_sigtramp);
+
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
}
diff --git a/gdb/proc-api.c b/gdb/proc-api.c
index a74882db7e2..3e8b19841ac 100644
--- a/gdb/proc-api.c
+++ b/gdb/proc-api.c
@@ -423,7 +423,7 @@ static struct trans rw_table[] = {
{ PCSEXIT, "PCSEXIT", "set traced syscall exit set" },
{ PCSFAULT, "PCSFAULT", "set traced fault set" },
{ PCSFPREG, "PCSFPREG", "set floating point registers" },
-#ifdef PCHOLD /* solaris */
+#ifdef PCSHOLD /* solaris */
{ PCSHOLD, "PCSHOLD", "set signal mask" },
#endif
{ PCSREG, "PCSREG", "set general registers" },
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 79f55758dfe..ff8a7d3fb25 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -170,6 +170,7 @@ init_procfs_ops (void)
procfs_ops.to_terminal_inferior = terminal_inferior;
procfs_ops.to_terminal_ours_for_output = terminal_ours_for_output;
procfs_ops.to_terminal_ours = terminal_ours;
+ procfs_ops.to_terminal_save_ours = terminal_save_ours;
procfs_ops.to_terminal_info = child_terminal_info;
procfs_ops.to_find_new_threads = procfs_find_new_threads;
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 6c86ba98c98..ab65c67a47b 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -725,6 +725,29 @@ regcache_raw_read_unsigned (struct regcache *regcache, int regnum,
}
void
+regcache_raw_write_signed (struct regcache *regcache, int regnum, LONGEST val)
+{
+ void *buf;
+ gdb_assert (regcache != NULL);
+ gdb_assert (regnum >=0 && regnum < regcache->descr->nr_raw_registers);
+ buf = alloca (regcache->descr->sizeof_register[regnum]);
+ store_signed_integer (buf, regcache->descr->sizeof_register[regnum], val);
+ regcache_raw_write (regcache, regnum, buf);
+}
+
+void
+regcache_raw_write_unsigned (struct regcache *regcache, int regnum,
+ ULONGEST val)
+{
+ void *buf;
+ gdb_assert (regcache != NULL);
+ gdb_assert (regnum >=0 && regnum < regcache->descr->nr_raw_registers);
+ buf = alloca (regcache->descr->sizeof_register[regnum]);
+ store_unsigned_integer (buf, regcache->descr->sizeof_register[regnum], val);
+ regcache_raw_write (regcache, regnum, buf);
+}
+
+void
read_register_gen (int regnum, char *buf)
{
gdb_assert (current_regcache != NULL);
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 1db42e3d7de..4ddcda38104 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -42,6 +42,10 @@ extern void regcache_raw_read_signed (struct regcache *regcache,
int regnum, LONGEST *val);
extern void regcache_raw_read_unsigned (struct regcache *regcache,
int regnum, ULONGEST *val);
+extern void regcache_raw_write_signed (struct regcache *regcache,
+ int regnum, LONGEST val);
+extern void regcache_raw_write_unsigned (struct regcache *regcache,
+ int regnum, ULONGEST val);
/* Partial transfer of a raw registers. These perform read, modify,
write style operations. */
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 398b0e083c8..f6618618272 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -123,6 +123,17 @@ static void frame_get_saved_regs (struct frame_info * fi,
struct rs6000_framedata * fdatap);
static CORE_ADDR frame_initial_stack_address (struct frame_info *);
+/* Is REGNO an AltiVec register? Return 1 if so, 0 otherwise. */
+int
+altivec_register_p (int regno)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ if (tdep->ppc_vr0_regnum < 0 || tdep->ppc_vrsave_regnum < 0)
+ return 0;
+ else
+ return (regno >= tdep->ppc_vr0_regnum && regno <= tdep->ppc_vrsave_regnum);
+}
+
/* Read a LEN-byte address from debugged memory address MEMADDR. */
static CORE_ADDR
diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c
index 02982267ba2..b67884d2cea 100644
--- a/gdb/shnbsd-tdep.c
+++ b/gdb/shnbsd-tdep.c
@@ -165,10 +165,19 @@ static struct core_fns shnbsd_elfcore_fns =
NULL /* next */
};
+static int
+shnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
+{
+ /* FIXME: Need to add support for kernel-provided signal trampolines. */
+ return (nbsd_pc_in_sigtramp (pc, func_name));
+}
+
static void
shnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
+ set_gdbarch_pc_in_sigtramp (gdbarch, shnbsd_pc_in_sigtramp);
+
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
}
diff --git a/gdb/signals/signals.c b/gdb/signals/signals.c
index 0057e60e377..82c63d89978 100644
--- a/gdb/signals/signals.c
+++ b/gdb/signals/signals.c
@@ -25,6 +25,7 @@
#else
#include "defs.h"
#include "target.h"
+#include "gdb_string.h"
#endif
#include <signal.h>
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 50caed39d99..35cb5786561 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -1556,6 +1556,7 @@ init_sol_thread_ops (void)
sol_thread_ops.to_terminal_inferior = terminal_inferior;
sol_thread_ops.to_terminal_ours_for_output = terminal_ours_for_output;
sol_thread_ops.to_terminal_ours = terminal_ours;
+ sol_thread_ops.to_terminal_save_ours = terminal_save_ours;
sol_thread_ops.to_terminal_info = child_terminal_info;
sol_thread_ops.to_kill = sol_thread_kill_inferior;
sol_thread_ops.to_load = 0;
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index ea70e517b6d..1103eaa62c1 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -500,6 +500,8 @@ sparcnbsd_init_abi_elf (struct gdbarch_info info,
{
sparcnbsd_init_abi_common (info, gdbarch);
+ set_gdbarch_pc_in_sigtramp (gdbarch, nbsd_pc_in_sigtramp);
+
set_solib_svr4_fetch_link_map_offsets (gdbarch,
gdbarch_ptr_bit (gdbarch) == 32 ?
nbsd_ilp32_solib_svr4_fetch_link_map_offsets :
diff --git a/gdb/stack.c b/gdb/stack.c
index fa5896395d6..30ebc09dee7 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -398,6 +398,11 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
print_frame (fi, level, source, args, sal);
source_print = (source == SRC_LINE || source == SRC_AND_LOC);
+ if (sal.symtab)
+ {
+ current_source_symtab = sal.symtab;
+ current_source_line = sal.line;
+ }
if (source_print && sal.symtab)
{
@@ -410,10 +415,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
if (!done)
{
if (print_frame_info_listing_hook)
- {
- print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
- current_source_symtab = sal.symtab;
- }
+ print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
else
{
/* We used to do this earlier, but that is clearly
@@ -1517,6 +1519,15 @@ select_frame (struct frame_info *fi)
if (selected_frame_level_changed_hook)
selected_frame_level_changed_hook (frame_relative_level (fi));
+ /* FIXME: kseitz/2002-08-28: It would be nice to call
+ selected_frame_level_changed_event right here, but due to limitations
+ in the current interfaces, we would end up flooding UIs with events
+ because select_frame is used extensively internally.
+
+ Once we have frame-parameterized frame (and frame-related) commands,
+ the event notification can be moved here, since this function will only
+ be called when the users selected frame is being changed. */
+
/* Ensure that symbols for this frame are read in. Also, determine the
source language of this frame, and switch to it if desired. */
if (fi)
@@ -1620,8 +1631,8 @@ select_frame_command_wrapper (char *level_exp, int from_tty)
static void
select_frame_command (char *level_exp, int from_tty)
{
- register struct frame_info *frame, *frame1;
- unsigned int level = 0;
+ struct frame_info *frame;
+ int level = frame_relative_level (selected_frame);
if (!target_has_stack)
error ("No stack.");
@@ -1629,6 +1640,8 @@ select_frame_command (char *level_exp, int from_tty)
frame = parse_frame_specification (level_exp);
select_frame (frame);
+ if (level != frame_relative_level (selected_frame))
+ selected_frame_level_changed_event (frame_relative_level (selected_frame));
}
/* The "frame" command. With no arg, print selected frame briefly.
@@ -1674,6 +1687,7 @@ up_silently_base (char *count_exp)
if (count1 != 0 && count_exp == 0)
error ("Initial frame selected; you cannot go up.");
select_frame (fi);
+ selected_frame_level_changed_event (frame_relative_level (selected_frame));
}
static void
@@ -1719,6 +1733,7 @@ down_silently_base (char *count_exp)
}
select_frame (frame);
+ selected_frame_level_changed_event (frame_relative_level (selected_frame));
}
/* ARGSUSED */
diff --git a/gdb/symtab.c b/gdb/symtab.c
index d39962ec033..c18625a57c3 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -860,15 +860,20 @@ lookup_symbol_aux (const char *name, const char *mangled_name,
/* This is a function which has a symtab for its address. */
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol),
- mangled_name, namespace);
+
+ /* This call used to pass `SYMBOL_NAME (msymbol)' as the
+ `name' argument to lookup_block_symbol. But the name
+ of a minimal symbol is always mangled, so that seems
+ to be clearly the wrong thing to pass as the
+ unmangled name. */
+ sym = lookup_block_symbol (block, name, mangled_name, namespace);
/* We kept static functions in minimal symbol table as well as
in static scope. We want to find them in the symbol table. */
if (!sym)
{
block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
- sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol),
- mangled_name, namespace);
+ sym = lookup_block_symbol (block, name,
+ mangled_name, namespace);
}
/* sym == 0 if symbol was found in the minimal symbol table
@@ -1027,15 +1032,19 @@ lookup_symbol_aux (const char *name, const char *mangled_name,
{
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol),
- mangled_name, namespace);
+ /* This call used to pass `SYMBOL_NAME (msymbol)' as the
+ `name' argument to lookup_block_symbol. But the name
+ of a minimal symbol is always mangled, so that seems
+ to be clearly the wrong thing to pass as the
+ unmangled name. */
+ sym = lookup_block_symbol (block, name, mangled_name, namespace);
/* We kept static functions in minimal symbol table as well as
in static scope. We want to find them in the symbol table. */
if (!sym)
{
block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
- sym = lookup_block_symbol (block, SYMBOL_NAME (msymbol),
- mangled_name, namespace);
+ sym = lookup_block_symbol (block, name,
+ mangled_name, namespace);
}
/* If we found one, return it */
if (sym)
diff --git a/gdb/target.c b/gdb/target.c
index ec1979b4f90..75d022ff200 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -138,6 +138,8 @@ static void debug_to_terminal_inferior (void);
static void debug_to_terminal_ours_for_output (void);
+static void debug_to_terminal_save_ours (void);
+
static void debug_to_terminal_ours (void);
static void debug_to_terminal_info (char *, int);
@@ -445,6 +447,9 @@ cleanup_target (struct target_ops *t)
de_fault (to_terminal_ours,
(void (*) (void))
target_ignore);
+ de_fault (to_terminal_save_ours,
+ (void (*) (void))
+ target_ignore);
de_fault (to_terminal_info,
default_terminal_info);
de_fault (to_kill,
@@ -608,6 +613,7 @@ update_current_target (void)
INHERIT (to_terminal_inferior, t);
INHERIT (to_terminal_ours_for_output, t);
INHERIT (to_terminal_ours, t);
+ INHERIT (to_terminal_save_ours, t);
INHERIT (to_terminal_info, t);
INHERIT (to_kill, t);
INHERIT (to_load, t);
@@ -1980,6 +1986,14 @@ debug_to_terminal_ours (void)
}
static void
+debug_to_terminal_save_ours (void)
+{
+ debug_target.to_terminal_save_ours ();
+
+ fprintf_unfiltered (gdb_stdlog, "target_terminal_save_ours ()\n");
+}
+
+static void
debug_to_terminal_info (char *arg, int from_tty)
{
debug_target.to_terminal_info (arg, from_tty);
@@ -2405,6 +2419,7 @@ setup_target_debug (void)
current_target.to_terminal_inferior = debug_to_terminal_inferior;
current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output;
current_target.to_terminal_ours = debug_to_terminal_ours;
+ current_target.to_terminal_save_ours = debug_to_terminal_save_ours;
current_target.to_terminal_info = debug_to_terminal_info;
current_target.to_kill = debug_to_kill;
current_target.to_load = debug_to_load;
diff --git a/gdb/target.h b/gdb/target.h
index c165801bfcc..18b95b0cea9 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -264,6 +264,7 @@ struct target_ops
void (*to_terminal_inferior) (void);
void (*to_terminal_ours_for_output) (void);
void (*to_terminal_ours) (void);
+ void (*to_terminal_save_ours) (void);
void (*to_terminal_info) (char *, int);
void (*to_kill) (void);
void (*to_load) (char *, int);
@@ -626,6 +627,14 @@ extern void print_section_info (struct target_ops *, bfd *);
#define target_terminal_ours() \
(*current_target.to_terminal_ours) ()
+/* Save our terminal settings.
+ This is called from TUI after entering or leaving the curses
+ mode. Since curses modifies our terminal this call is here
+ to take this change into account. */
+
+#define target_terminal_save_ours() \
+ (*current_target.to_terminal_save_ours) ()
+
/* Print useful information about our terminal status, if such a thing
exists. */
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e47afec868b..d0f9ef281c3 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,24 @@
+2002-09-03 Keith Seitz <keiths@redhat.com>
+
+ * lib/gdb.exp (gdb_compile_pthreads): Fix "build_bin" typo.
+ Use integer comparison instead of string comparison for testing
+ whether binary was built.
+
+2002-09-03 Jim Blandy <jimb@redhat.com>
+
+ * gdb.threads/killed.exp, gdb.threads/killed.c: New test.
+
+2002-08-29 Jim Blandy <jimb@redhat.com>
+
+ * gdb.threads/pthreads.exp: Move the portable thread compilation
+ code into a function in lib/gdb.exp, and call that from here.
+ * lib/gdb.exp (gdb_compile_pthreads): New function.
+
+2002-08-29 Keith Seitz <keiths@redhat.com>
+
+ * lib/mi-support.exp (mi_gdb_test): Add global declaration for
+ expect_out so that callers can get at it.
+
2002-08-23 Daniel Jacobowitz <drow@mvista.com>
* gdb.threads/print-threads.c: New file.
diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp
index dfaf965ca99..3db28b187b6 100644
--- a/gdb/testsuite/gdb.base/commands.exp
+++ b/gdb/testsuite/gdb.base/commands.exp
@@ -440,7 +440,120 @@ proc deprecated_command_test {} {
"deprecate with no arguments"
}
+proc bp_deleted_in_command_test {} {
+ global gdb_prompt
+
+ gdb_test "set args 1" "" "set args in bp_deleted_in_command_test"
+ delete_breakpoints
+
+ # Create a breakpoint, and associate a command-list to it, with
+ # one command that deletes this breakpoint.
+ gdb_test "break factorial" \
+ "Breakpoint \[0-9\]+ at .*: file .*/run.c, line \[0-9\]+\." \
+ "breakpoint in bp_deleted_in_command_test"
+
+ send_gdb "commands\n"
+ gdb_expect {
+ -re "Type commands for when breakpoint .* is hit, one per line.*>" {
+ pass "begin commands in bp_deleted_in_command_test"
+ }
+ -re "$gdb_prompt $" {fail "begin commands in bp_deleted_in_command_test"}
+ timeout {fail "(timeout) begin commands bp_deleted_in_command_test"}
+ }
+ send_gdb "silent\n"
+ gdb_expect {
+ -re ">" {pass "add silent command"}
+ -re "$gdb_prompt $" {fail "add silent command"}
+ timeout {fail "(timeout) add silent command"}
+ }
+ send_gdb "clear factorial\n"
+ gdb_expect {
+ -re ">" {pass "add clear command"}
+ -re "$gdb_prompt $" {fail "add clear command"}
+ timeout {fail "(timeout) add clear command"} }
+ send_gdb "printf \"factorial command-list executed\\n\"\n"
+ gdb_expect {
+ -re ">" {pass "add printf command"}
+ -re "$gdb_prompt $" {fail "add printf command"}
+ timeout {fail "(timeout) add printf command"}
+ }
+ send_gdb "cont\n"
+ gdb_expect {
+ -re ">" {pass "add cont command"}
+ -re "$gdb_prompt $" {fail "add cont command"}
+ timeout {fail "(timeout) add cont command"} }
+ send_gdb "end\n"
+ gdb_expect {
+ -re "$gdb_prompt $" {pass "end commands"}
+ timeout {fail "(timeout) end commands"}
+ }
+ gdb_run_cmd
+ gdb_expect {
+ -re ".*factorial command-list executed.*1.*Program exited normally.*$gdb_prompt $" {
+ pass "run factorial until breakpoint"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "run factorial until breakpoint"
+ }
+ default { fail "(timeout) run factorial until breakpoint" }
+ timeout { fail "(timeout) run factorial until breakpoint" }
+ }
+}
+
+proc temporary_breakpoint_commands {} {
+ global gdb_prompt
+
+ gdb_test "set args 1" "" "set args in temporary_breakpoint_commands"
+ delete_breakpoints
+
+ # Create a temporary breakpoint, and associate a commands list to it.
+ # This test will verify that this commands list is executed when the
+ # breakpoint is hit.
+ gdb_test "tbreak factorial" \
+ "Breakpoint \[0-9\]+ at .*: file .*/run.c, line \[0-9\]+\." \
+ "breakpoint in temporary_breakpoint_commands"
+
+ send_gdb "commands\n"
+ gdb_expect {
+ -re "Type commands for when breakpoint .* is hit, one per line.*>" {
+ pass "begin commands in bp_deleted_in_command_test"
+ }
+ -re "$gdb_prompt $" {fail "begin commands in bp_deleted_in_command_test"}
+ timeout {fail "(timeout) begin commands bp_deleted_in_command_test"}
+ }
+ send_gdb "silent\n"
+ gdb_expect {
+ -re ">" {pass "add silent tbreak command"}
+ -re "$gdb_prompt $" {fail "add silent tbreak command"}
+ timeout {fail "(timeout) add silent tbreak command"}
+ }
+ send_gdb "printf \"factorial tbreak commands executed\\n\"\n"
+ gdb_expect {
+ -re ">" {pass "add printf tbreak command"}
+ -re "$gdb_prompt $" {fail "add printf tbreak command"}
+ timeout {fail "(timeout) add printf tbreak command"}
+ }
+ send_gdb "cont\n"
+ gdb_expect {
+ -re ">" {pass "add cont tbreak command"}
+ -re "$gdb_prompt $" {fail "add cont tbreak command"}
+ timeout {fail "(timeout) add cont tbreak command"} }
+ send_gdb "end\n"
+ gdb_expect {
+ -re "$gdb_prompt $" {pass "end tbreak commands"}
+ timeout {fail "(timeout) end tbreak commands"}
+ }
+
+ gdb_run_cmd
+ gdb_expect {
+ -re ".*factorial tbreak commands executed.*1.*Program exited normally.*" {
+ pass "run factorial until temporary breakpoint"
+ }
+ timeout { fail "(timeout) run factorial until temporary breakpoint" }
+ }
+}
+
gdbvar_simple_if_test
gdbvar_simple_while_test
gdbvar_complex_if_while_test
@@ -454,3 +567,5 @@ user_defined_command_test
watchpoint_command_test
test_command_prompt_position
deprecated_command_test
+bp_deleted_in_command_test
+temporary_breakpoint_commands
diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog
index 26d662c1ee6..ac00d9f402c 100644
--- a/gdb/testsuite/gdb.mi/ChangeLog
+++ b/gdb/testsuite/gdb.mi/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-03 Keith Seitz <keiths@redhat.com>
+
+ * gdb680.exp: New file to test to check for uiout list/tuple
+ nesting bug.
+
2002-03-04 Michael Chastain <mec@shout.net>
* mi-var-cmd.exp: In test "create local variable func",
diff --git a/gdb/testsuite/gdb.mi/gdb680.exp b/gdb/testsuite/gdb.mi/gdb680.exp
new file mode 100644
index 00000000000..eee96a69ac1
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/gdb680.exp
@@ -0,0 +1,56 @@
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+#
+# test gdb/680
+#
+
+load_lib mi-support.exp
+set MIFLAGS "-i=mi"
+
+gdb_exit
+if [mi_gdb_start] {
+ continue
+}
+
+proc do_test {count} {
+ mi_gdb_test "-data-list-register-names -1" \
+ {\^error,msg=\"bad register number\"} \
+ "-data-list-register-names -1, try $count"
+}
+
+# Tests a bug with ui-out and nested uiout types. When
+# an error is encountered building a nest typed, like
+# lists or tuples, the uiout is not reset to some sane
+# state. As a result, uiout still thinks it is building
+# this nested type. Execute enough of these errors and
+# an assertion failure occurs. This is most obvious
+# with invalid register number and the register commands.
+
+# MAX_UIOUT_LEVELS is set to 5.
+set counter 0
+for {set i 0} {$i < 4} {incr i} {
+ do_test $i
+}
+
+#setup_kfail "gdb/680"
+do_test $i
+
+mi_gdb_exit
+return 0
diff --git a/gdb/testsuite/gdb.threads/killed.c b/gdb/testsuite/gdb.threads/killed.c
new file mode 100644
index 00000000000..6cb3928a346
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/killed.c
@@ -0,0 +1,24 @@
+#include <sys/types.h>
+#include <signal.h>
+#include <pthread.h>
+#include <stdio.h>
+
+int pid;
+
+void *
+child_func (void *dummy)
+{
+ kill (pid, SIGKILL);
+ exit (1);
+}
+
+int
+main ()
+{
+ pthread_t child;
+
+ pid = getpid ();
+ pthread_create (&child, 0, child_func, 0);
+ for (;;)
+ sleep (10000);
+}
diff --git a/gdb/testsuite/gdb.threads/killed.exp b/gdb/testsuite/gdb.threads/killed.exp
new file mode 100644
index 00000000000..3712508bb6c
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/killed.exp
@@ -0,0 +1,97 @@
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@gnu.org
+
+# This is a regression test for gdb/568 in the sources.redhat.com
+# GNATS database. As of early June 2002, GDB could get sort of wedged
+# debugging the program `killed.c':
+#
+# $ $D6/gdb/gdb -nw killed
+# GNU gdb 2002-06-11-cvs
+# Copyright 2002 Free Software Foundation, Inc.
+# GDB is free software, covered by the GNU General Public License, and you are
+# welcome to change it and/or distribute copies of it under certain conditions.
+# Type "show copying" to see the conditions.
+# There is absolutely no warranty for GDB. Type "show warranty" for details.
+# This GDB was configured as "i686-pc-linux-gnu"...
+# (gdb) run
+# Starting program: /home/jimb/foo/play/killed
+# [New Thread 1024 (LWP 6487)]
+# [New Thread 2049 (LWP 6488)]
+# [New Thread 1026 (LWP 6489)]
+# Cannot find user-level thread for LWP 6487: generic error
+# (gdb) quit
+# The program is running. Exit anyway? (y or n) y
+# Cannot find thread 2049: generic error
+# (gdb) kill
+# Kill the program being debugged? (y or n) y
+# Cannot find thread 2049: generic error
+# (gdb) The program is running. Exit anyway? (y or n) y
+# Cannot find thread 2049: generic error
+# (gdb)
+# [7]+ Stopped $D6/gdb/gdb -nw killed
+# $ kill %7
+#
+# [7]+ Stopped $D6/gdb/gdb -nw killed
+# $ kill -9 %7
+#
+# [7]+ Stopped $D6/gdb/gdb -nw killed
+# $
+# [7]+ Killed $D6/gdb/gdb -nw killed
+# $
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "killed"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}/${subdir}"]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "run" "" "run program to completion"
+
+# Try to quit.
+send_gdb "quit\n"
+gdb_expect {
+ -re "The program is running. Exit anyway\\? \\(y or n\\) $" {
+ send_gdb "y\n"
+ exp_continue
+ }
+ eof {
+ pass "GDB exits after multi-threaded program exits messily"
+ }
+ -re "Cannot find thread ${decimal}: generic error\[\r\n\]*$gdb_prompt $" {
+ # setup_kfail "gdb/568"
+ fail "GDB exits after multi-threaded program exits messily (gdb/568)"
+ }
+ timeout {
+ fail "GDB exits after multi-threaded program exits messily (timeout)"
+ }
+}
diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp
index 0703395d78b..dc9b7a838f0 100644
--- a/gdb/testsuite/gdb.threads/pthreads.exp
+++ b/gdb/testsuite/gdb.threads/pthreads.exp
@@ -39,42 +39,16 @@ set binfile ${objdir}/${subdir}/${testfile}
# carriage return)
set horiz "\[^\n\r\]*"
-set built_binfile 0
if [istarget "*-*-linux"] then {
set target_cflags "-D_MIT_POSIX_THREADS"
} else {
set target_cflags ""
}
-set why_msg "unrecognized error"
-foreach lib {-lpthreads -lpthread -lthread} {
- set options "debug"
- lappend options "incdir=${objdir}/${subdir}"
- lappend options "libs=$lib"
- set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
- switch -regexp -- $ccout {
- ".*no posix threads support.*" {
- set why_msg "missing threads include file"
- break
- }
- ".*cannot open -lpthread.*" {
- set why_msg "missing runtime threads library"
- }
- ".*Can't find library for -lpthread.*" {
- set why_msg "missing runtime threads library"
- }
- {^$} {
- pass "successfully compiled posix threads test case"
- set built_binfile 1
- break
- }
- }
-}
-if {$built_binfile == "0"} {
- unsupported "Couldn't compile ${srcfile}, ${why_msg}"
- return -1
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}/${subdir}"]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Now we can proceed with the real testing.
# Start with a fresh gdb.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b4a0b8a0bd0..f4ddc63214d 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1171,6 +1171,42 @@ proc gdb_compile {source dest type options} {
return $result;
}
+
+# This is just like gdb_compile, above, except that it tries compiling
+# against several different thread libraries, to see which one this
+# system has.
+proc gdb_compile_pthreads {source dest type options} {
+ set built_binfile 0
+ set why_msg "unrecognized error"
+ foreach lib {-lpthreads -lpthread -lthread} {
+ # This kind of wipes out whatever libs the caller may have
+ # set. Or maybe theirs will override ours. How infelicitous.
+ set options_with_lib [concat $options [list libs=$lib]]
+ set ccout [gdb_compile $source $dest $type $options_with_lib]
+ switch -regexp -- $ccout {
+ ".*no posix threads support.*" {
+ set why_msg "missing threads include file"
+ break
+ }
+ ".*cannot open -lpthread.*" {
+ set why_msg "missing runtime threads library"
+ }
+ ".*Can't find library for -lpthread.*" {
+ set why_msg "missing runtime threads library"
+ }
+ {^$} {
+ pass "successfully compiled posix threads test case"
+ set built_binfile 1
+ break
+ }
+ }
+ }
+ if {!$built_binfile} {
+ unsupported "Couldn't compile $source: ${why_msg}"
+ return -1
+ }
+}
+
proc send_gdb { string } {
global suppress_flag;
if { $suppress_flag } {
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 44679f0a004..d3861e14618 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -382,7 +382,7 @@ proc mi_gdb_load { arg } {
proc mi_gdb_test { args } {
global verbose
global mi_gdb_prompt
- global GDB
+ global GDB expect_out
upvar timeout timeout
if [llength $args]>2 then {
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index ac71eee6ab3..dbb9f54e26f 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,3 +1,182 @@
+2002-09-04 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiIO.c (tui_putc): New function to print one character.
+ (printable_part): New function from readline/complete.c.
+ (PUTX): New macro, likewise.
+ (print_filename): New function, likewise.
+ (get_y_or_n): New function, likewise and adapted for TUI.
+ (tui_rl_display_match_list): New function from readline/complete.c
+ and writes on TUI command window.
+ (tui_setup_io): Install or remove the readline hook
+ rl_completion_display_matches_hook so that completion is written
+ directly in TUI command window instead of in the TUI pipe.
+ (tui_initialize_io): Use #ifdef TUI_USE_PIPE_FOR_READLINE for the
+ TUI redirection pipe.
+ (tui_getc): Likewise for call to tui_readline_output.
+ (tui_readline_output): Likewise for function.
+ * tui.c (tui_rl_startup_hook): Always take care of gdb prompt.
+
+2002-09-02 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiWin.c (_newHeightOk): Fix compilation warnings.
+
+2002-09-01 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiWin.c (_tuiAllWindowsInfo): Don't crash if the window
+ is not displayed.
+
+2002-09-01 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tui-out.c (tui_out_new): Clear start_of_line.
+ * tuiSource.c (tuiVerticalSourceScroll): Use print_source_lines
+ to update the current source line.
+
+2002-09-01 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tui-hooks.c (tui_detach_hook): New hook to know when a process dies.
+ (tui_install_hooks): Install it.
+ (tui_remove_hooks): Remove it.
+
+2002-09-01 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiData.h (FILE_PREFIX): Don't define.
+ (blankStr, locationStr, breakStr): Don't declare.
+ (breakLocationStr, nullStr, historyLimit, setHistoryLimitTo): Likewise.
+ (displayableWinContentOf, displayableWinContentAt): Likewise.
+ (winElementHeight, winByName, freeAllWindows): Likewise.
+
+ * tuiData.c (blankStr, locationStr, breakStr): Remove.
+ (breakLocationStr, nullStr, historyLimit, setHistoryLimitTo): Remove.
+ (displayableWinContentOf, displayableWinContentAt): Remove.
+ (winElementHeight, winByName, freeAllWindows): Remove.
+
+2002-09-01 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiStack.c (tui_make_status_line): New function to create the
+ status line.
+ (tuiShowLocatorContent): Use it instead of displayableWinContentAt.
+ * tuiData.h (PROC_PREFIX): Use "In:" to reduce length of prefix.
+ (PC_PREFIX): Use upper case.
+ (SINGLE_KEY, MIN_LINE_WIDTH, MIN_PROC_WIDTH): Define.
+ (MAX_TARGET_WIDTH, MAX_PID_WIDTH): Define.
+
+2002-08-31 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiSourceWin.h (tuiUpdateAllExecInfos): Don't declare.
+ (tuiClearAllExecInfosContent): Likewise.
+ (tuiEraseAllExecInfosContent): Ditto.
+ (tuiUpdateSourceWindowsFromLocator): Ditto.
+ * tuiSourceWin.c (tuiUpdateAllExecInfos): Remove.
+ * tui.h (tui_vCheckDataValues): Don't declare.
+ (tui_vStartNewLines, tui_vAllSetHasBreakAt): Likewise.
+ (tui_vUpdateLocatorFilename, tui_vUpdateSourceWindowsWithAddr): Ditto.
+ (tui_vShowFrameInfo): Ditto.
+
+2002-08-31 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tui.c (tui_commands): Table of single key commands.
+ (tui_rl_command_key): New function to execute gdb command.
+ (tui_rl_command_mode): New function to temporarily leave SingleKey.
+ (tui_rl_next_keymap): New function to enter/leave the SingleKey mode.
+ (tui_rl_startup_hook): New function to avoid prompt display by
+ readline functions.
+ (tui_set_key_mode): New function to set the key mode and install
+ the readline keymap.
+ (tui_initialize_readline): Create TUI SingleKey readline map.
+ (tui_enable): Install rl_startup_hook.
+ (tui_disable): Remove it.
+ * tui.h (enum tui_key_mode): Declare.
+ (tui_set_key_mode, tui_current_key_mode): Declare.
+ * tuiIO.c (tui_redisplay_readline): Don't display the prompt in
+ SingleKey mode.
+ * tuiIO.h (tui_redisplay_readline): Declare.
+
+2002-08-31 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiSourceWin.c (tuiSetIsExecPointAt): Redraw the previous and
+ current line.
+
+2002-08-31 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiSource.c (tuiSetSourceContent): Remove old breakpoint code.
+ (_hasBreak): Remove.
+ (tuiShowSource): Fix comment indentation.
+ (tuiSourceIsDisplayed): Likewise.
+ (tuiVerticalSourceScroll): Likewise.
+
+2002-08-30 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiSourceWin.h (tui_update_all_breakpoint_info): Declare.
+ (tui_update_breakpoint_info): Declare.
+ (tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove.
+
+ * tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Update breakpoint
+ information using tui_update_breakpoint_info.
+ (tui_update_all_breakpoint_info): New function to refresh all
+ execution windows.
+ (tui_update_breakpoint_info): New function to recompute the status
+ of exec info window from breakpoints.
+ (tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove.
+ (tuiSetExecInfoContent): Use the exec info flags computed by
+ tui_update_breakpoint_info to display a short status about breakpoints.
+
+ * tuiData.h (TuiExecInfoContent): New for exec info string.
+ (TuiWhichElement): Use it.
+ (TUI_BP_ENABLED, TUI_BP_DISABLED, TUI_BP_HIT): New defines.
+ (TUI_BP_CONDITIONAL, TUI_BP_HARDWARE): New defines.
+ (TUI_BP_HIT_POS, TUI_BP_BREAK_POS, TUI_EXEC_POS): Likewise.
+ (TUI_EXECINFO_SIZE): Likewise.
+ * tuiData.c (initContentElement): Clear exec info string.
+
+ * tui-hooks.c (get_breakpoint): Remove.
+ (tui_event_create_breakpoint): Call tui_update_all_breakpoint_info.
+ (tui_event_delete_breakpoint): Likewise.
+ (tui_event_modify_breakpoint): Likewise.
+
+2002-08-29 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tui.c (tuiGetLowDisassemblyAddress): Moved from here.
+ * tuiDisassem.c (tuiGetLowDisassemblyAddress): To here, and use
+ tui_find_disassembly_address to find the starting address of
+ disassemble window.
+
+2002-08-28 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiDisassem.c (tui_disassemble): New function to disassemble
+ several lines in a buffer.
+ (tui_find_disassembly_address): New function to search backward
+ or forward a disassembly line.
+ (tuiSetDisassemContent): Use tui_disassemble to obtain the real
+ content and format it in the window.
+ (tuiShowDisassemAndUpdateSource): Remove unused locals.
+ (tuiVerticalDisassemScroll): Use tui_find_disassembly_address to
+ obtain the address to disassemble for the scrolling.
+ * tuiDisassem.h (tuiGetBeginAsmAddress): Update.
+ * tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Don't pass symtab.
+
+2002-08-28 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiIO.c (CTRL_CHAR): Redefine and use readline 4.3 definition.
+
+2002-08-26 Stephane Carrez <stcarrez@nerim.fr>
+
+ Fix PR gdb/393:
+ * tui.c (tui_disable): Update gdb's knowledge of its terminal
+ using target_terminal_save_ours.
+ (tui_enable): Likewise.
+
+2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tui.c (tui_rl_switch_mode): Renames tui_switch_mode.
+ (tui_rl_change_windows): Renames tui_change_windows.
+ (tui_rl_delete_other_windows): Renames tui_delete_other_windows.
+ (tui_initialize_readline): Update.
+
+2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiDisassem.c (tuiSetDisassemContent): Use breakpoint_here_p.
+ (_hasBreak): Remove.
+
2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
* tuiDisassem.c (tuiGetBeginAsmAddress): Use lookup_minimal_symbol
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index d6051942a23..35d7ce8c3fa 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -167,44 +167,12 @@ tui_register_changed_hook (int regno)
}
}
-extern struct breakpoint *breakpoint_chain;
-
-/* Find a breakpoint given its number. Returns null if not found. */
-static struct breakpoint *
-get_breakpoint (int number)
-{
- struct breakpoint *bp;
-
- for (bp = breakpoint_chain; bp; bp = bp->next)
- {
- if (bp->number == number)
- return bp;
- }
- return 0;
-}
-
/* Breakpoint creation hook.
Update the screen to show the new breakpoint. */
static void
tui_event_create_breakpoint (int number)
{
- struct breakpoint *bp;
-
- bp = get_breakpoint (number);
- if (bp)
- {
- switch (bp->type)
- {
- case bp_breakpoint:
- case bp_hardware_breakpoint:
- tuiAllSetHasBreakAt (bp, 1);
- tuiUpdateAllExecInfos ();
- break;
-
- default:
- break;
- }
- }
+ tui_update_all_breakpoint_info ();
}
/* Breakpoint deletion hook.
@@ -212,35 +180,13 @@ tui_event_create_breakpoint (int number)
static void
tui_event_delete_breakpoint (int number)
{
- struct breakpoint *bp;
- struct breakpoint *b;
- int clearIt;
-
- bp = get_breakpoint (number);
- if (bp == 0)
- return;
-
- /* Before turning off the visuals for the bp, check to see that
- there are no other bps at the same address. */
- clearIt = 0;
- for (b = breakpoint_chain; b; b = b->next)
- {
- clearIt = (b == bp || b->address != bp->address);
- if (!clearIt)
- break;
- }
-
- if (clearIt)
- {
- tuiAllSetHasBreakAt (bp, 0);
- tuiUpdateAllExecInfos ();
- }
+ tui_update_all_breakpoint_info ();
}
static void
tui_event_modify_breakpoint (int number)
{
- ;
+ tui_update_all_breakpoint_info ();
}
static void
@@ -331,6 +277,15 @@ tui_print_frame_info_listing_hook (struct symtab *s, int line,
tuiShowFrameInfo (selected_frame);
}
+/* Called when the target process died or is detached.
+ Update the status line. */
+static void
+tui_detach_hook (void)
+{
+ tuiShowFrameInfo (0);
+ tui_display_main ();
+}
+
/* Install the TUI specific hooks. */
void
tui_install_hooks (void)
@@ -346,6 +301,7 @@ tui_install_hooks (void)
registers_changed_hook = tui_registers_changed_hook;
register_changed_hook = tui_register_changed_hook;
+ detach_hook = tui_detach_hook;
}
/* Remove the TUI specific hooks. */
@@ -358,6 +314,7 @@ tui_remove_hooks (void)
query_hook = 0;
registers_changed_hook = 0;
register_changed_hook = 0;
+ detach_hook = 0;
/* Restore the previous event hooks. */
set_gdb_event_hooks (tui_old_event_hooks);
diff --git a/gdb/tui/tui-out.c b/gdb/tui/tui-out.c
index a8cc58ba5ca..71ce5e00aa4 100644
--- a/gdb/tui/tui-out.c
+++ b/gdb/tui/tui-out.c
@@ -398,7 +398,7 @@ tui_out_new (struct ui_file *stream)
data->stream = stream;
data->suppress_output = 0;
data->line = -1;
- data->start_of_line = 1;
+ data->start_of_line = 0;
return ui_out_new (&tui_ui_out_impl, data, flags);
}
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 8bf477673d3..8bf467da289 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -72,9 +72,35 @@
int tui_active = 0;
static int tui_finish_init = 1;
-/* Switch the output mode between TUI/standard gdb. */
+enum tui_key_mode tui_current_key_mode = tui_command_mode;
+
+struct tui_char_command
+{
+ unsigned char key;
+ const char* cmd;
+};
+
+/* Key mapping to gdb commands when the TUI is using the single key mode. */
+static const struct tui_char_command tui_commands[] = {
+ { 'c', "continue" },
+ { 'd', "down" },
+ { 'f', "finish" },
+ { 'n', "next" },
+ { 'r', "run" },
+ { 's', "step" },
+ { 'u', "up" },
+ { 'v', "info locals" },
+ { 'w', "where" },
+ { 0, 0 },
+};
+
+static Keymap tui_keymap;
+static Keymap tui_readline_standard_keymap;
+
+/* TUI readline command.
+ Switch the output mode between TUI/standard gdb. */
static int
-tui_switch_mode (void)
+tui_rl_switch_mode (void)
{
if (tui_active)
{
@@ -107,15 +133,16 @@ tui_switch_mode (void)
return 0;
}
-/* Change the TUI layout to show a next layout.
+/* TUI readline command.
+ Change the TUI layout to show a next layout.
This function is bound to CTRL-X 2. It is intended to provide
a functionality close to the Emacs split-window command. We always
show two windows (src+asm), (src+regs) or (asm+regs). */
static int
-tui_change_windows (void)
+tui_rl_change_windows (void)
{
if (!tui_active)
- tui_switch_mode ();
+ tui_rl_switch_mode ();
if (tui_active)
{
@@ -157,13 +184,13 @@ tui_change_windows (void)
return 0;
}
-
-/* Delete the second TUI window to only show one. */
+/* TUI readline command.
+ Delete the second TUI window to only show one. */
static int
-tui_delete_other_windows (void)
+tui_rl_delete_other_windows (void)
{
if (!tui_active)
- tui_switch_mode ();
+ tui_rl_switch_mode ();
if (tui_active)
{
@@ -192,19 +219,126 @@ tui_delete_other_windows (void)
return 0;
}
+/* TUI readline command.
+ Execute the gdb command bound to the specified key. */
+static int
+tui_rl_command_key (int count, int key)
+{
+ int i;
+
+ reinitialize_more_filter ();
+ for (i = 0; tui_commands[i].cmd; i++)
+ {
+ if (tui_commands[i].key == key)
+ {
+ /* Must save the command because it can be modified
+ by execute_command. */
+ char* cmd = alloca (strlen (tui_commands[i].cmd) + 1);
+ strcpy (cmd, tui_commands[i].cmd);
+ execute_command (cmd, TRUE);
+ return 0;
+ }
+ }
+ return 0;
+}
+
+/* TUI readline command.
+ Temporarily leave the TUI SingleKey mode to allow editing
+ a gdb command with the normal readline. Once the command
+ is executed, the TUI SingleKey mode is installed back. */
+static int
+tui_rl_command_mode (int count, int key)
+{
+ tui_set_key_mode (tui_one_command_mode);
+ return rl_insert (count, key);
+}
+
+/* TUI readline command.
+ Switch between TUI SingleKey mode and gdb readline editing. */
+static int
+tui_rl_next_keymap (void)
+{
+ tui_set_key_mode (tui_current_key_mode == tui_command_mode
+ ? tui_single_key_mode : tui_command_mode);
+ return 0;
+}
+
+/* Readline hook to redisplay ourself the gdb prompt.
+ In the SingleKey mode, the prompt is not printed so that
+ the command window is cleaner. It will be displayed if
+ we temporarily leave the SingleKey mode. */
+static int
+tui_rl_startup_hook ()
+{
+ rl_already_prompted = 1;
+ if (tui_current_key_mode != tui_command_mode)
+ tui_set_key_mode (tui_single_key_mode);
+ tui_redisplay_readline ();
+ return 0;
+}
+
+/* Change the TUI key mode by installing the appropriate readline keymap. */
+void
+tui_set_key_mode (enum tui_key_mode mode)
+{
+ tui_current_key_mode = mode;
+ rl_set_keymap (mode == tui_single_key_mode
+ ? tui_keymap : tui_readline_standard_keymap);
+ tuiShowLocatorContent ();
+}
+
/* Initialize readline and configure the keymap for the switching
key shortcut. */
void
tui_initialize_readline ()
{
+ int i;
+ Keymap tui_ctlx_keymap;
+
rl_initialize ();
- rl_add_defun ("tui-switch-mode", tui_switch_mode, -1);
- rl_bind_key_in_map ('a', tui_switch_mode, emacs_ctlx_keymap);
- rl_bind_key_in_map ('A', tui_switch_mode, emacs_ctlx_keymap);
- rl_bind_key_in_map (CTRL ('A'), tui_switch_mode, emacs_ctlx_keymap);
- rl_bind_key_in_map ('1', tui_delete_other_windows, emacs_ctlx_keymap);
- rl_bind_key_in_map ('2', tui_change_windows, emacs_ctlx_keymap);
+ rl_add_defun ("tui-switch-mode", tui_rl_switch_mode, -1);
+ rl_add_defun ("gdb-command", tui_rl_command_key, -1);
+ rl_add_defun ("next-keymap", tui_rl_next_keymap, -1);
+
+ tui_keymap = rl_make_bare_keymap ();
+ tui_ctlx_keymap = rl_make_bare_keymap ();
+ tui_readline_standard_keymap = rl_get_keymap ();
+
+ for (i = 0; tui_commands[i].cmd; i++)
+ rl_bind_key_in_map (tui_commands[i].key, tui_rl_command_key, tui_keymap);
+
+ rl_generic_bind (ISKMAP, "\\C-x", (char*) tui_ctlx_keymap, tui_keymap);
+
+ /* Bind all other keys to tui_rl_command_mode so that we switch
+ temporarily from SingleKey mode and can enter a gdb command. */
+ for (i = ' ' + 1; i < 0x7f; i++)
+ {
+ int j;
+
+ for (j = 0; tui_commands[j].cmd; j++)
+ if (tui_commands[j].key == i)
+ break;
+
+ if (tui_commands[j].cmd)
+ continue;
+
+ rl_bind_key_in_map (i, tui_rl_command_mode, tui_keymap);
+ }
+
+ rl_bind_key_in_map ('a', tui_rl_switch_mode, emacs_ctlx_keymap);
+ rl_bind_key_in_map ('a', tui_rl_switch_mode, tui_ctlx_keymap);
+ rl_bind_key_in_map ('A', tui_rl_switch_mode, emacs_ctlx_keymap);
+ rl_bind_key_in_map ('A', tui_rl_switch_mode, tui_ctlx_keymap);
+ rl_bind_key_in_map (CTRL ('A'), tui_rl_switch_mode, emacs_ctlx_keymap);
+ rl_bind_key_in_map (CTRL ('A'), tui_rl_switch_mode, tui_ctlx_keymap);
+ rl_bind_key_in_map ('1', tui_rl_delete_other_windows, emacs_ctlx_keymap);
+ rl_bind_key_in_map ('1', tui_rl_delete_other_windows, tui_ctlx_keymap);
+ rl_bind_key_in_map ('2', tui_rl_change_windows, emacs_ctlx_keymap);
+ rl_bind_key_in_map ('2', tui_rl_change_windows, tui_ctlx_keymap);
+ rl_bind_key_in_map ('q', tui_rl_next_keymap, tui_keymap);
+ rl_bind_key_in_map ('s', tui_rl_next_keymap, emacs_ctlx_keymap);
+ rl_bind_key_in_map ('s', tui_rl_next_keymap, tui_ctlx_keymap);
}
/* Enter in the tui mode (curses).
@@ -254,6 +388,7 @@ tui_enable (void)
/* Install the TUI specific hooks. */
tui_install_hooks ();
+ rl_startup_hook = tui_rl_startup_hook;
tui_update_variables ();
@@ -265,6 +400,9 @@ tui_enable (void)
tuiShowFrameInfo (selected_frame);
refresh ();
+
+ /* Update gdb's knowledge of its terminal. */
+ target_terminal_save_ours ();
tui_update_gdb_sizes ();
}
@@ -280,6 +418,8 @@ tui_disable (void)
/* Remove TUI hooks. */
tui_remove_hooks ();
+ rl_startup_hook = 0;
+ rl_already_prompted = 0;
/* Leave curses and restore previous gdb terminal setting. */
endwin ();
@@ -288,6 +428,9 @@ tui_disable (void)
so that terminal management with the inferior works. */
tui_setup_io (0);
+ /* Update gdb's knowledge of its terminal. */
+ target_terminal_save_ours ();
+
tui_version = 0;
tui_active = 0;
tui_update_gdb_sizes ();
@@ -304,31 +447,6 @@ tuiFree (char *ptr)
}
}
-/* Determine what the low address will be to display in the TUI's
- disassembly window. This may or may not be the same as the
- low address input. */
-CORE_ADDR
-tuiGetLowDisassemblyAddress (CORE_ADDR low, CORE_ADDR pc)
-{
- int line;
- CORE_ADDR newLow;
-
- /* Determine where to start the disassembly so that the pc is about in the
- middle of the viewport. */
- for (line = 0, newLow = pc;
- (newLow > low &&
- line < (tuiDefaultWinViewportHeight (DISASSEM_WIN,
- DISASSEM_COMMAND) / 2));)
- {
- bfd_byte buffer[4];
-
- newLow -= sizeof (bfd_getb32 (buffer));
- line++;
- }
-
- return newLow;
-}
-
void
strcat_to_buf (char *buf, int buflen, const char *itemToAdd)
{
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h
index 9cc538d1568..ed66a4ff052 100644
--- a/gdb/tui/tui.h
+++ b/gdb/tui/tui.h
@@ -102,6 +102,23 @@ extern void tui_enable (void);
/* Leave the tui mode. */
extern void tui_disable (void);
+enum tui_key_mode
+{
+ /* Plain command mode to enter gdb commands. */
+ tui_command_mode,
+
+ /* SingleKey mode with some keys bound to gdb commands. */
+ tui_single_key_mode,
+
+ /* Read/edit one command and return to SingleKey after it's processed. */
+ tui_one_command_mode
+};
+
+extern enum tui_key_mode tui_current_key_mode;
+
+/* Change the TUI key mode by installing the appropriate readline keymap. */
+extern void tui_set_key_mode (enum tui_key_mode mode);
+
extern void tui_initialize_io (void);
extern void tui_initialize_readline (void);
@@ -115,21 +132,10 @@ extern void tui_show_source (const char *file, int line);
extern struct ui_out *tui_out_new (struct ui_file *stream);
-/* tuiDataWin.c */
-extern void tui_vCheckDataValues (va_list);
-
-/* tuiIO.c */
-extern void tui_vStartNewLines (va_list);
-
/* tuiLayout.c */
extern TuiStatus tui_set_layout (const char *);
/* tuiSourceWin.c */
extern void tuiUpdateAllExecInfos (void);
-extern void tui_vAllSetHasBreakAt (va_list);
-extern void tui_vUpdateSourceWindowsWithAddr (va_list);
-/* tuiStack.c */
-extern void tui_vShowFrameInfo (va_list);
-extern void tui_vUpdateLocatorFilename (va_list);
#endif /* TUI_H */
diff --git a/gdb/tui/tuiData.c b/gdb/tui/tuiData.c
index 45508e061b8..225583ea70c 100644
--- a/gdb/tui/tuiData.c
+++ b/gdb/tui/tuiData.c
@@ -40,6 +40,7 @@
#endif
#include "defs.h"
+#include "symtab.h"
#include "tui.h"
#include "tuiData.h"
#include "tuiGeneralWin.h"
@@ -50,24 +51,10 @@
TuiWinInfoPtr winList[MAX_MAJOR_WINDOWS];
/***************************
-** Private Definitions
-****************************/
-#define FILE_WIDTH 30
-#define PROC_WIDTH 40
-#define LINE_WIDTH 4
-#define PC_WIDTH 8
-
-/***************************
** Private data
****************************/
-static char *_tuiNullStr = TUI_NULL_STR;
-static char *_tuiBlankStr = " ";
-static char *_tuiLocationStr = " >";
-static char *_tuiBreakStr = " * ";
-static char *_tuiBreakLocationStr = " *>";
static TuiLayoutType _currentLayout = UNDEFINED_LAYOUT;
static int _termHeight, _termWidth;
-static int _historyLimit = DEFAULT_HISTORY_COUNT;
static TuiGenWinInfo _locator;
static TuiGenWinInfo _execInfo[2];
static TuiWinInfoPtr _srcWinList[2];
@@ -286,61 +273,6 @@ clearWinDetail (TuiWinInfoPtr winInfo)
/*
- ** blankStr()
- ** Accessor for the blank string.
- */
-char *
-blankStr (void)
-{
- return _tuiBlankStr;
-} /* blankStr */
-
-
-/*
- ** locationStr()
- ** Accessor for the location string.
- */
-char *
-locationStr (void)
-{
- return _tuiLocationStr;
-} /* locationStr */
-
-
-/*
- ** breakStr()
- ** Accessor for the break string.
- */
-char *
-breakStr (void)
-{
- return _tuiBreakStr;
-} /* breakStr */
-
-
-/*
- ** breakLocationStr()
- ** Accessor for the breakLocation string.
- */
-char *
-breakLocationStr (void)
-{
- return _tuiBreakLocationStr;
-} /* breakLocationStr */
-
-
-/*
- ** nullStr()
- ** Accessor for the null string.
- */
-char *
-nullStr (void)
-{
- return _tuiNullStr;
-} /* nullStr */
-
-
-/*
** sourceExecInfoPtr().
** Accessor for the source execution info ptr.
*/
@@ -375,29 +307,6 @@ locatorWinInfoPtr (void)
/*
- ** historyLimit().
- ** Accessor for the history limit
- */
-int
-historyLimit (void)
-{
- return _historyLimit;
-} /* historyLimit */
-
-
-/*
- ** setHistoryLimitTo().
- ** Mutator for the history limit
- */
-void
-setHistoryLimitTo (int h)
-{
- _historyLimit = h;
-
- return;
-} /* setHistoryLimitTo */
-
-/*
** termHeight().
** Accessor for the termHeight
*/
@@ -549,189 +458,7 @@ tuiPrevWin (TuiWinInfoPtr curWin)
}
return prev;
-} /* tuiPrevWin */
-
-
-/*
- ** displayableWinContentOf().
- ** Answer a the content at the location indicated by index. Note
- ** that if this is a locator window, the string returned should be
- ** freed after use.
- */
-char *
-displayableWinContentOf (TuiGenWinInfoPtr winInfo, TuiWinElementPtr elementPtr)
-{
-
- char *string = nullStr ();
-
- if (elementPtr != (TuiWinElementPtr) NULL || winInfo->type == LOCATOR_WIN)
- {
- /*
- ** Now convert the line to a displayable string
- */
- switch (winInfo->type)
- {
- case SRC_WIN:
- case DISASSEM_WIN:
- string = elementPtr->whichElement.source.line;
- break;
- case CMD_WIN:
- string = elementPtr->whichElement.command.line;
- break;
- case LOCATOR_WIN:
- if ((string = (char *) xmalloc (
- (termWidth () + 1) * sizeof (char))) == (char *) NULL)
- string = nullStr ();
- else
- {
- char lineNo[50], pc[50], buf[50], *fname, *pname;
- register int strSize = termWidth (), i, procWidth, fileWidth;
-
- /*
- ** First determine the amount of file/proc name width
- ** we have available
- */
- i = strSize - (PC_WIDTH + LINE_WIDTH
- + 25 /* pc and line labels */
- + strlen (FILE_PREFIX) + 1 /* file label */
- + 15 /* procedure label */ );
- if (i >= FILE_WIDTH + PROC_WIDTH)
- {
- fileWidth = FILE_WIDTH;
- procWidth = PROC_WIDTH;
- }
- else
- {
- fileWidth = i / 2;
- procWidth = i - fileWidth;
- }
-
- /* Now convert elements to string form */
- if (elementPtr != (TuiWinElementPtr) NULL &&
- *elementPtr->whichElement.locator.fileName != (char) 0 &&
- srcWin->generic.isVisible)
- fname = elementPtr->whichElement.locator.fileName;
- else
- fname = "??";
- if (elementPtr != (TuiWinElementPtr) NULL &&
- *elementPtr->whichElement.locator.procName != (char) 0)
- pname = elementPtr->whichElement.locator.procName;
- else
- pname = "??";
- if (elementPtr != (TuiWinElementPtr) NULL &&
- elementPtr->whichElement.locator.lineNo > 0)
- sprintf (lineNo, "%d",
- elementPtr->whichElement.locator.lineNo);
- else
- strcpy (lineNo, "??");
- if (elementPtr != (TuiWinElementPtr) NULL &&
- elementPtr->whichElement.locator.addr != 0)
- sprintf (pc, "0x%lx",
- (long) elementPtr->whichElement.locator.addr);
- else
- strcpy (pc, "??");
- /*
- ** Now create the locator line from the string version
- ** of the elements. We could use sprintf() here but
- ** that wouldn't ensure that we don't overrun the size
- ** of the allocated buffer. strcat_to_buf() will.
- */
- *string = (char) 0;
- /* Filename */
- strcat_to_buf (string, strSize, " ");
- strcat_to_buf (string, strSize, FILE_PREFIX);
- if (strlen (fname) > fileWidth)
- {
- strncpy (buf, fname, fileWidth - 1);
- buf[fileWidth - 1] = '*';
- buf[fileWidth] = (char) 0;
- }
- else
- strcpy (buf, fname);
- strcat_to_buf (string, strSize, buf);
- /* procedure/class name */
- sprintf (buf, "%15s", PROC_PREFIX);
- strcat_to_buf (string, strSize, buf);
- if (strlen (pname) > procWidth)
- {
- strncpy (buf, pname, procWidth - 1);
- buf[procWidth - 1] = '*';
- buf[procWidth] = (char) 0;
- }
- else
- strcpy (buf, pname);
- strcat_to_buf (string, strSize, buf);
- sprintf (buf, "%10s", LINE_PREFIX);
- strcat_to_buf (string, strSize, buf);
- strcat_to_buf (string, strSize, lineNo);
- sprintf (buf, "%10s", PC_PREFIX);
- strcat_to_buf (string, strSize, buf);
- strcat_to_buf (string, strSize, pc);
- for (i = strlen (string); i < strSize; i++)
- string[i] = ' ';
- string[strSize] = (char) 0;
- }
- break;
- case EXEC_INFO_WIN:
- string = elementPtr->whichElement.simpleString;
- break;
- default:
- break;
- }
- }
- return string;
-} /* displayableWinContentOf */
-
-
-/*
- ** winContentAt().
- ** Answer a the content at the location indicated by index
- */
-char *
-displayableWinContentAt (TuiGenWinInfoPtr winInfo, int index)
-{
- return (displayableWinContentOf (winInfo, (TuiWinElementPtr) winInfo->content[index]));
-} /* winContentAt */
-
-
-/*
- ** winElementHeight().
- ** Answer the height of the element in lines
- */
-int
-winElementHeight (TuiGenWinInfoPtr winInfo, TuiWinElementPtr element)
-{
- int h;
-
- if (winInfo->type == DATA_WIN)
-/* FOR NOW SAY IT IS ONLY ONE LINE HIGH */
- h = 1;
- else
- h = 1;
-
- return h;
-} /* winElementHeight */
-
-
-/*
- ** winByName().
- ** Answer the window represented by name
- */
-TuiWinInfoPtr
-winByName (char *name)
-{
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
- int i = 0;
-
- while (i < MAX_MAJOR_WINDOWS && m_winPtrIsNull (winInfo))
- {
- if (strcmp (name, winName (&(winList[i]->generic))) == 0)
- winInfo = winList[i];
- i++;
- }
-
- return winInfo;
-} /* winByName */
+}
/*
@@ -888,7 +615,8 @@ initContentElement (TuiWinElementPtr element, TuiWinType type)
element->whichElement.locator.addr = 0;
break;
case EXEC_INFO_WIN:
- element->whichElement.simpleString = blankStr ();
+ memset(element->whichElement.simpleString, ' ',
+ sizeof(element->whichElement.simpleString));
break;
default:
break;
@@ -1204,22 +932,6 @@ freeWinContent (TuiGenWinInfoPtr winInfo)
} /* freeWinContent */
-/*
- ** freeAllWindows().
- */
-void
-freeAllWindows (void)
-{
- TuiWinType type = SRC_WIN;
-
- for (; type < MAX_MAJOR_WINDOWS; type++)
- if (m_winPtrNotNull (winList[type]) &&
- winList[type]->generic.type != UNDEFINED_WIN)
- freeWindow (winList[type]);
- return;
-} /* freeAllWindows */
-
-
void
tuiDelDataWindows (TuiWinContent content, int contentSize)
{
diff --git a/gdb/tui/tuiData.h b/gdb/tui/tuiData.h
index 36d7853f736..8a4eb9f8908 100644
--- a/gdb/tui/tuiData.h
+++ b/gdb/tui/tuiData.h
@@ -71,10 +71,17 @@ TuiGenWinInfo, *TuiGenWinInfoPtr;
#define MIN_WIN_HEIGHT 3
#define MIN_CMD_WIN_HEIGHT 3
-#define FILE_PREFIX "File: "
-#define PROC_PREFIX "Procedure: "
+/* Strings to display in the TUI status line. */
+#define PROC_PREFIX "In: "
#define LINE_PREFIX "Line: "
-#define PC_PREFIX "pc: "
+#define PC_PREFIX "PC: "
+#define SINGLE_KEY "(SingleKey)"
+
+/* Minimum/Maximum length of some fields displayed in the TUI status line. */
+#define MIN_LINE_WIDTH 4 /* Use at least 4 digits for line numbers. */
+#define MIN_PROC_WIDTH 12
+#define MAX_TARGET_WIDTH 10
+#define MAX_PID_WIDTH 14
#define TUI_FLOAT_REGS_NAME "$FREGS"
#define TUI_FLOAT_REGS_NAME_LOWER "$fregs"
@@ -200,6 +207,20 @@ typedef struct _TuiLocatorElement
}
TuiLocatorElement, *TuiLocatorElementPtr;
+/* Flags to tell what kind of breakpoint is at current line. */
+#define TUI_BP_ENABLED 0x01
+#define TUI_BP_DISABLED 0x02
+#define TUI_BP_HIT 0x04
+#define TUI_BP_CONDITIONAL 0x08
+#define TUI_BP_HARDWARE 0x10
+
+/* Position of breakpoint markers in the exec info string. */
+#define TUI_BP_HIT_POS 0
+#define TUI_BP_BREAK_POS 1
+#define TUI_EXEC_POS 2
+#define TUI_EXECINFO_SIZE 4
+
+typedef char TuiExecInfoContent[TUI_EXECINFO_SIZE];
/* An content element in a window */
typedef union
@@ -209,7 +230,7 @@ typedef union
TuiDataElement data; /* elements of dataWindow */
TuiCommandElement command; /* command elements */
TuiLocatorElement locator; /* locator elements */
- char *simpleString; /* simple char based elements */
+ TuiExecInfoContent simpleString; /* simple char based elements */
}
TuiWhichElement, *TuiWhichElementPtr;
@@ -325,35 +346,23 @@ extern TuiWinContent allocContent (int, TuiWinType);
extern int addContentElements (TuiGenWinInfoPtr, int);
extern void initContentElement (TuiWinElementPtr, TuiWinType);
extern void freeWindow (TuiWinInfoPtr);
-extern void freeAllWindows (void);
extern void freeWinContent (TuiGenWinInfoPtr);
extern void freeDataContent (TuiWinContent, int);
extern void freeAllSourceWinsContent (void);
extern void tuiDelWindow (TuiWinInfoPtr);
extern void tuiDelDataWindows (TuiWinContent, int);
-extern TuiWinInfoPtr winByName (char *);
extern TuiWinInfoPtr partialWinByName (char *);
extern char *winName (TuiGenWinInfoPtr);
-extern char *displayableWinContentOf (TuiGenWinInfoPtr, TuiWinElementPtr);
-extern char *displayableWinContentAt (TuiGenWinInfoPtr, int);
-extern int winElementHeight (TuiGenWinInfoPtr, TuiWinElementPtr);
extern TuiLayoutType currentLayout (void);
extern void setCurrentLayoutTo (TuiLayoutType);
extern int termHeight (void);
extern void setTermHeightTo (int);
extern int termWidth (void);
extern void setTermWidthTo (int);
-extern int historyLimit (void);
-extern void setHistoryLimit (int);
extern void setGenWinOrigin (TuiGenWinInfoPtr, int, int);
extern TuiGenWinInfoPtr locatorWinInfoPtr (void);
extern TuiGenWinInfoPtr sourceExecInfoWinPtr (void);
extern TuiGenWinInfoPtr disassemExecInfoWinPtr (void);
-extern char *nullStr (void);
-extern char *blankStr (void);
-extern char *locationStr (void);
-extern char *breakStr (void);
-extern char *breakLocationStr (void);
extern TuiListPtr sourceWindows (void);
extern void clearSourceWindows (void);
extern void clearSourceWindowsDetail (void);
diff --git a/gdb/tui/tuiDisassem.c b/gdb/tui/tuiDisassem.c
index e3a19b3ebaa..50a6d0ef9f7 100644
--- a/gdb/tui/tuiDisassem.c
+++ b/gdb/tui/tuiDisassem.c
@@ -53,109 +53,240 @@
#include "tuiStack.h"
#include "tui-file.h"
+struct tui_asm_line
+{
+ CORE_ADDR addr;
+ char* addr_string;
+ char* insn;
+};
+
+/* Function to set the disassembly window's content.
+ Disassemble count lines starting at pc.
+ Return address of the count'th instruction after pc. */
+static CORE_ADDR
+tui_disassemble (struct tui_asm_line* lines, CORE_ADDR pc, int count)
+{
+ struct ui_file *gdb_dis_out;
+ disassemble_info asm_info;
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
+ /* now init the ui_file structure */
+ gdb_dis_out = tui_sfileopen (256);
-static struct breakpoint *_hasBreak (CORE_ADDR);
+ memcpy (&asm_info, TARGET_PRINT_INSN_INFO, sizeof (asm_info));
+ asm_info.stream = gdb_dis_out;
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ asm_info.endian = BFD_ENDIAN_BIG;
+ else
+ asm_info.endian = BFD_ENDIAN_LITTLE;
-/*****************************************
-** PUBLIC FUNCTIONS **
-******************************************/
+ if (TARGET_ARCHITECTURE != NULL)
+ asm_info.mach = TARGET_ARCHITECTURE->mach;
-/*
- ** tuiSetDisassemContent().
- ** Function to set the disassembly window's content.
- */
+ /* Now construct each line */
+ for (; count > 0; count--, lines++)
+ {
+ if (lines->addr_string)
+ xfree (lines->addr_string);
+ if (lines->insn)
+ xfree (lines->insn);
+
+ print_address (pc, gdb_dis_out);
+ lines->addr = pc;
+ lines->addr_string = xstrdup (tui_file_get_strbuf (gdb_dis_out));
+
+ ui_file_rewind (gdb_dis_out);
+
+ pc = pc + TARGET_PRINT_INSN (pc, &asm_info);
+
+ lines->insn = xstrdup (tui_file_get_strbuf (gdb_dis_out));
+
+ /* reset the buffer to empty */
+ ui_file_rewind (gdb_dis_out);
+ }
+ ui_file_delete (gdb_dis_out);
+ return pc;
+}
+
+/* Find the disassembly address that corresponds to FROM lines
+ above or below the PC. Variable sized instructions are taken
+ into account by the algorithm. */
+static CORE_ADDR
+tui_find_disassembly_address (CORE_ADDR pc, int from)
+{
+ register CORE_ADDR newLow;
+ int maxLines;
+ int i;
+ struct tui_asm_line* lines;
+
+ maxLines = (from > 0) ? from : - from;
+ if (maxLines <= 1)
+ return pc;
+
+ lines = (struct tui_asm_line*) alloca (sizeof (struct tui_asm_line)
+ * maxLines);
+ memset (lines, 0, sizeof (struct tui_asm_line) * maxLines);
+
+ newLow = pc;
+ if (from > 0)
+ {
+ tui_disassemble (lines, pc, maxLines);
+ newLow = lines[maxLines - 1].addr;
+ }
+ else
+ {
+ CORE_ADDR last_addr;
+ int pos;
+ struct minimal_symbol* msymbol;
+
+ /* Find backward an address which is a symbol
+ and for which disassembling from that address will fill
+ completely the window. */
+ pos = maxLines - 1;
+ do {
+ newLow -= 1 * maxLines;
+ msymbol = lookup_minimal_symbol_by_pc_section (newLow, 0);
+
+ if (msymbol)
+ newLow = SYMBOL_VALUE_ADDRESS (msymbol);
+ else
+ newLow += 1 * maxLines;
+
+ tui_disassemble (lines, newLow, maxLines);
+ last_addr = lines[pos].addr;
+ } while (last_addr > pc && msymbol);
+
+ /* Scan forward disassembling one instruction at a time
+ until the last visible instruction of the window
+ matches the pc. We keep the disassembled instructions
+ in the 'lines' window and shift it downward (increasing
+ its addresses). */
+ if (last_addr < pc)
+ do
+ {
+ CORE_ADDR next_addr;
+
+ pos++;
+ if (pos >= maxLines)
+ pos = 0;
+
+ next_addr = tui_disassemble (&lines[pos], last_addr, 1);
+
+ /* If there are some problems while disassembling exit. */
+ if (next_addr <= last_addr)
+ break;
+ last_addr = next_addr;
+ } while (last_addr <= pc);
+ pos++;
+ if (pos >= maxLines)
+ pos = 0;
+ newLow = lines[pos].addr;
+ }
+ for (i = 0; i < maxLines; i++)
+ {
+ xfree (lines[i].addr_string);
+ xfree (lines[i].insn);
+ }
+ return newLow;
+}
+
+/* Function to set the disassembly window's content. */
TuiStatus
-tuiSetDisassemContent (struct symtab *s, CORE_ADDR startAddr)
+tuiSetDisassemContent (CORE_ADDR pc)
{
TuiStatus ret = TUI_FAILURE;
- struct ui_file *gdb_dis_out;
-
- if (startAddr != 0)
+ register int i;
+ register int offset = disassemWin->detail.sourceInfo.horizontalOffset;
+ register int lineWidth, maxLines;
+ CORE_ADDR cur_pc;
+ TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ int tab_len = tuiDefaultTabLen ();
+ struct tui_asm_line* lines;
+ int insn_pos;
+ int addr_size, max_size;
+ char* line;
+
+ if (pc == 0)
+ return TUI_FAILURE;
+
+ ret = tuiAllocSourceBuffer (disassemWin);
+ if (ret != TUI_SUCCESS)
+ return ret;
+
+ disassemWin->detail.sourceInfo.startLineOrAddr.addr = pc;
+ cur_pc = (CORE_ADDR)
+ (((TuiWinElementPtr) locator->content[0])->whichElement.locator.addr);
+
+ maxLines = disassemWin->generic.height - 2; /* account for hilite */
+
+ /* Get temporary table that will hold all strings (addr & insn). */
+ lines = (struct tui_asm_line*) alloca (sizeof (struct tui_asm_line)
+ * maxLines);
+ memset (lines, 0, sizeof (struct tui_asm_line) * maxLines);
+
+ lineWidth = disassemWin->generic.width - 1;
+
+ tui_disassemble (lines, pc, maxLines);
+
+ /* See what is the maximum length of an address and of a line. */
+ addr_size = 0;
+ max_size = 0;
+ for (i = 0; i < maxLines; i++)
{
- register int i, desc;
+ size_t len = strlen (lines[i].addr_string);
+ if (len > addr_size)
+ addr_size = len;
- if ((ret = tuiAllocSourceBuffer (disassemWin)) == TUI_SUCCESS)
- {
- register int offset = disassemWin->detail.sourceInfo.horizontalOffset;
- register int threshold, curLine = 0, lineWidth, maxLines;
- CORE_ADDR newpc, pc;
- disassemble_info asmInfo;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-extern void strcat_address (CORE_ADDR, char *, int);
-extern void strcat_address_numeric (CORE_ADDR, int, char *, int);
- int curLen = 0;
- int tab_len = tuiDefaultTabLen ();
-
- maxLines = disassemWin->generic.height - 2; /* account for hilite */
- lineWidth = disassemWin->generic.width - 1;
- threshold = (lineWidth - 1) + offset;
-
- /* now init the ui_file structure */
- gdb_dis_out = tui_sfileopen (threshold);
-
- asmInfo = tm_print_insn_info;
- asmInfo.stream = gdb_dis_out;
-
- disassemWin->detail.sourceInfo.startLineOrAddr.addr = startAddr;
-
- /* Now construct each line */
- for (curLine = 0, pc = startAddr; (curLine < maxLines);)
- {
- TuiWinElementPtr element = (TuiWinElementPtr) disassemWin->generic.content[curLine];
- struct breakpoint *bp;
-
- print_address (pc, gdb_dis_out);
-
- curLen = strlen (tui_file_get_strbuf (gdb_dis_out));
- i = curLen - ((curLen / tab_len) * tab_len);
-
- /* adjust buffer length if necessary */
- 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)
- {
- tui_file_get_strbuf (gdb_dis_out)[curLen] = ' ';
- i++;
- curLen++;
- }
- 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 (tui_file_get_strbuf (gdb_dis_out)) > offset)
- strcpy (element->whichElement.source.line,
- &(tui_file_get_strbuf (gdb_dis_out)[offset]));
- else
- element->whichElement.source.line[0] = '\0';
- element->whichElement.source.lineOrAddr.addr = pc;
- element->whichElement.source.isExecPoint =
- (pc == (CORE_ADDR) ((TuiWinElementPtr) locator->content[0])->whichElement.locator.addr);
- bp = _hasBreak (pc);
- element->whichElement.source.hasBreak =
- (bp != (struct breakpoint *) NULL &&
- (!element->whichElement.source.isExecPoint ||
- (bp->disposition != disp_del || bp->hit_count <= 0)));
- curLine++;
- pc = newpc;
- /* reset the buffer to empty */
- tui_file_get_strbuf (gdb_dis_out)[0] = '\0';
- }
- ui_file_delete (gdb_dis_out);
- gdb_dis_out = NULL;
- disassemWin->generic.contentSize = curLine;
- ret = TUI_SUCCESS;
- }
+ len = strlen (lines[i].insn) + tab_len;
+ if (len > max_size)
+ max_size = len;
}
+ max_size += addr_size + tab_len;
+
+ /* Allocate memory to create each line. */
+ line = (char*) alloca (max_size);
+ insn_pos = (1 + (addr_size / tab_len)) * tab_len;
- return ret;
-} /* tuiSetDisassemContent */
+ /* Now construct each line */
+ for (i = 0; i < maxLines; i++)
+ {
+ TuiWinElementPtr element;
+ TuiSourceElement* src;
+ int curLen;
+
+ element = (TuiWinElementPtr) disassemWin->generic.content[i];
+ src = &element->whichElement.source;
+ strcpy (line, lines[i].addr_string);
+ curLen = strlen (line);
+
+ /* Add spaces to make the instructions start on the same column */
+ while (curLen < insn_pos)
+ {
+ strcat (line, " ");
+ curLen++;
+ }
+
+ strcat (line, lines[i].insn);
+
+ /* Now copy the line taking the offset into account */
+ if (strlen (line) > offset)
+ strcpy (src->line, &line[offset]);
+ else
+ src->line[0] = '\0';
+
+ src->lineOrAddr.addr = lines[i].addr;
+ src->isExecPoint = lines[i].addr == cur_pc;
+
+ /* See whether there is a breakpoint installed. */
+ src->hasBreak = (!src->isExecPoint
+ && breakpoint_here_p (pc) != no_breakpoint_here);
+
+ xfree (lines[i].addr_string);
+ xfree (lines[i].insn);
+ }
+ disassemWin->generic.contentSize = i;
+ return TUI_SUCCESS;
+}
/*
@@ -196,7 +327,7 @@ tuiShowDisassemAndUpdateSource (CORE_ADDR startAddr)
if (currentLayout () == SRC_DISASSEM_COMMAND)
{
TuiLineOrAddress val;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+
/*
** Update what is in the source window if it is displayed too,
** note that it follows what is in the disassembly window and visa-versa
@@ -249,8 +380,25 @@ tuiGetBeginAsmAddress (void)
addr = element->addr;
return addr;
-}
+} /* tuiGetBeginAsmAddress */
+
+/* Determine what the low address will be to display in the TUI's
+ disassembly window. This may or may not be the same as the
+ low address input. */
+CORE_ADDR
+tuiGetLowDisassemblyAddress (CORE_ADDR low, CORE_ADDR pc)
+{
+ int pos;
+ /* Determine where to start the disassembly so that the pc is about in the
+ middle of the viewport. */
+ pos = tuiDefaultWinViewportHeight (DISASSEM_WIN, DISASSEM_COMMAND) / 2;
+ pc = tui_find_disassembly_address (pc, -pos);
+
+ if (pc < low)
+ pc = low;
+ return pc;
+}
/*
** tuiVerticalDisassemScroll().
@@ -262,9 +410,11 @@ tuiVerticalDisassemScroll (TuiScrollDirection scrollDirection,
{
if (disassemWin->generic.content != (OpaquePtr) NULL)
{
- CORE_ADDR pc, lowAddr;
+ CORE_ADDR pc;
TuiWinContent content;
struct symtab *s;
+ TuiLineOrAddress val;
+ int maxLines, dir;
content = (TuiWinContent) disassemWin->generic.content;
if (current_source_symtab == (struct symtab *) NULL)
@@ -272,60 +422,12 @@ tuiVerticalDisassemScroll (TuiScrollDirection scrollDirection,
else
s = current_source_symtab;
+ /* account for hilite */
+ maxLines = disassemWin->generic.height - 2;
pc = content[0]->whichElement.source.lineOrAddr.addr;
- if (find_pc_partial_function (pc, (char **) NULL, &lowAddr,
- (CORE_ADDR) 0) == 0)
- error ("No function contains program counter for selected frame.\n");
- else
- {
- register int line = 0;
- register CORE_ADDR newLow;
- bfd_byte buffer[4];
- TuiLineOrAddress val;
-
- newLow = pc;
- if (scrollDirection == FORWARD_SCROLL)
- {
- for (; line < numToScroll; line++)
- newLow += sizeof (bfd_getb32 (buffer));
- }
- else
- {
- for (; newLow != 0 && line < numToScroll; line++)
- newLow -= sizeof (bfd_getb32 (buffer));
- }
- val.addr = newLow;
- tuiUpdateSourceWindowAsIs (disassemWin, s, val, FALSE);
- }
- }
-
- return;
-} /* tuiVerticalDisassemScroll */
-
+ dir = (scrollDirection == FORWARD_SCROLL) ? maxLines : - maxLines;
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS **
-******************************************/
-/*
- ** _hasBreak().
- ** Answer whether there is a break point at the input line in the
- ** source file indicated
- */
-static struct breakpoint *
-_hasBreak (CORE_ADDR addr)
-{
- struct breakpoint *bpWithBreak = (struct breakpoint *) NULL;
- struct breakpoint *bp;
- extern struct breakpoint *breakpoint_chain;
-
-
- for (bp = breakpoint_chain;
- (bp != (struct breakpoint *) NULL &&
- bpWithBreak == (struct breakpoint *) NULL);
- bp = bp->next)
- if (addr == bp->address)
- bpWithBreak = bp;
-
- return bpWithBreak;
-} /* _hasBreak */
+ val.addr = tui_find_disassembly_address (pc, dir);
+ tuiUpdateSourceWindowAsIs (disassemWin, s, val, FALSE);
+ }
+}
diff --git a/gdb/tui/tuiDisassem.h b/gdb/tui/tuiDisassem.h
index f0aabdfb4c2..67284259bf0 100644
--- a/gdb/tui/tuiDisassem.h
+++ b/gdb/tui/tuiDisassem.h
@@ -31,7 +31,7 @@
/*****************************************
** PUBLIC FUNCTION EXTERNAL DECLS **
******************************************/
-extern TuiStatus tuiSetDisassemContent (struct symtab *, CORE_ADDR);
+extern TuiStatus tuiSetDisassemContent (CORE_ADDR);
extern void tuiShowDisassem (CORE_ADDR);
extern void tuiShowDisassemAndUpdateSource (CORE_ADDR);
extern void tuiVerticalDisassemScroll (TuiScrollDirection, int);
diff --git a/gdb/tui/tuiIO.c b/gdb/tui/tuiIO.c
index d664128ebd6..01ebbe6d17c 100644
--- a/gdb/tui/tuiIO.c
+++ b/gdb/tui/tuiIO.c
@@ -44,6 +44,7 @@
#include "terminal.h"
#include "target.h"
#include "event-loop.h"
+#include "event-top.h"
#include "command.h"
#include "top.h"
#include "readline/readline.h"
@@ -59,6 +60,10 @@
#include <fcntl.h>
#include <signal.h>
+/* Use definition from readline 4.3. */
+#undef CTRL_CHAR
+#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
+
/* This file controls the IO interactions between gdb and curses.
When the TUI is enabled, gdb has two modes a curses and a standard
mode.
@@ -75,14 +80,24 @@
is as if TUI is not used. Readline also uses its original getc()
function with stdin.
- Note: the current readline is not clean in its management of the output.
- Even if we install a redisplay handler, it sometimes writes on a stdout
- file. It is important to redirect every output produced by readline,
- otherwise the curses window will be garbled. This is implemented with
- a pipe that TUI reads and readline writes to. A gdb input handler
+ Note SCz/2001-07-21: the current readline is not clean in its management of
+ the output. Even if we install a redisplay handler, it sometimes writes on
+ a stdout file. It is important to redirect every output produced by
+ readline, otherwise the curses window will be garbled. This is implemented
+ with a pipe that TUI reads and readline writes to. A gdb input handler
is created so that reading the pipe is handled automatically.
This will probably not work on non-Unix platforms. The best fix is
- to make readline clean enougth so that is never write on stdout. */
+ to make readline clean enougth so that is never write on stdout.
+
+ Note SCz/2002-09-01: we now use more readline hooks and it seems that
+ with them we don't need the pipe anymore (verified by creating the pipe
+ and closing its end so that write causes a SIGPIPE). The old pipe code
+ is still there and can be conditionally removed by
+ #undef TUI_USE_PIPE_FOR_READLINE. */
+
+/* For gdb 5.3, prefer to continue the pipe hack as a backup wheel. */
+#define TUI_USE_PIPE_FOR_READLINE
+/*#undef TUI_USE_PIPE_FOR_READLINE*/
/* TUI output files. */
static struct ui_file *tui_stdout;
@@ -105,10 +120,21 @@ static int tui_old_readline_echoing_p;
Should be removed when readline is clean. */
static FILE *tui_rl_outstream;
static FILE *tui_old_rl_outstream;
+#ifdef TUI_USE_PIPE_FOR_READLINE
static int tui_readline_pipe[2];
+#endif
static unsigned int _tuiHandleResizeDuringIO (unsigned int);
+static void
+tui_putc (char c)
+{
+ char buf[2];
+
+ buf[0] = c;
+ buf[1] = 0;
+ tui_puts (buf);
+}
/* Print the string in the curses command window. */
void
@@ -147,7 +173,7 @@ tui_puts (const char *string)
/* Readline callback.
Redisplay the command line with its prompt after readline has
changed the edited text. */
-static void
+void
tui_redisplay_readline (void)
{
int prev_col;
@@ -160,7 +186,10 @@ tui_redisplay_readline (void)
char *prompt;
int start_line;
- prompt = get_prompt ();
+ if (tui_current_key_mode == tui_single_key_mode)
+ prompt = "";
+ else
+ prompt = get_prompt ();
c_pos = -1;
c_line = -1;
@@ -235,6 +264,7 @@ tui_deprep_terminal (void)
{
}
+#ifdef TUI_USE_PIPE_FOR_READLINE
/* Read readline output pipe and feed the command window with it.
Should be removed when readline is clean. */
static void
@@ -250,6 +280,193 @@ tui_readline_output (int code, gdb_client_data data)
tui_puts (buf);
}
}
+#endif
+
+/* Return the portion of PATHNAME that should be output when listing
+ possible completions. If we are hacking filename completion, we
+ are only interested in the basename, the portion following the
+ final slash. Otherwise, we return what we were passed.
+
+ Comes from readline/complete.c */
+static char *
+printable_part (pathname)
+ char *pathname;
+{
+ char *temp;
+
+ temp = rl_filename_completion_desired ? strrchr (pathname, '/') : (char *)NULL;
+#if defined (__MSDOS__)
+ if (rl_filename_completion_desired && temp == 0 && isalpha (pathname[0]) && pathname[1] == ':')
+ temp = pathname + 1;
+#endif
+ return (temp ? ++temp : pathname);
+}
+
+/* Output TO_PRINT to rl_outstream. If VISIBLE_STATS is defined and we
+ are using it, check for and output a single character for `special'
+ filenames. Return the number of characters we output. */
+
+#define PUTX(c) \
+ do { \
+ if (CTRL_CHAR (c)) \
+ { \
+ tui_puts ("^"); \
+ tui_putc (UNCTRL (c)); \
+ printed_len += 2; \
+ } \
+ else if (c == RUBOUT) \
+ { \
+ tui_puts ("^?"); \
+ printed_len += 2; \
+ } \
+ else \
+ { \
+ tui_putc (c); \
+ printed_len++; \
+ } \
+ } while (0)
+
+static int
+print_filename (to_print, full_pathname)
+ char *to_print, *full_pathname;
+{
+ int printed_len = 0;
+ char *s;
+
+ for (s = to_print; *s; s++)
+ {
+ PUTX (*s);
+ }
+ return printed_len;
+}
+
+/* The user must press "y" or "n". Non-zero return means "y" pressed.
+ Comes from readline/complete.c */
+static int
+get_y_or_n ()
+{
+ extern int _rl_abort_internal ();
+ int c;
+
+ for (;;)
+ {
+ c = rl_read_key ();
+ if (c == 'y' || c == 'Y' || c == ' ')
+ return (1);
+ if (c == 'n' || c == 'N' || c == RUBOUT)
+ return (0);
+ if (c == ABORT_CHAR)
+ _rl_abort_internal ();
+ beep ();
+ }
+}
+
+/* A convenience function for displaying a list of strings in
+ columnar format on readline's output stream. MATCHES is the list
+ of strings, in argv format, LEN is the number of strings in MATCHES,
+ and MAX is the length of the longest string in MATCHES.
+
+ Comes from readline/complete.c and modified to write in
+ the TUI command window using tui_putc/tui_puts. */
+static void
+tui_rl_display_match_list (matches, len, max)
+ char **matches;
+ int len, max;
+{
+ typedef int QSFUNC (const void *, const void *);
+ extern int _rl_qsort_string_compare (const void*, const void*);
+ extern int _rl_print_completions_horizontally;
+
+ int count, limit, printed_len;
+ int i, j, k, l;
+ char *temp;
+
+ /* Screen dimension correspond to the TUI command window. */
+ int screenwidth = cmdWin->generic.width;
+
+ /* If there are many items, then ask the user if she really wants to
+ see them all. */
+ if (len >= rl_completion_query_items)
+ {
+ char msg[256];
+
+ sprintf (msg, "\nDisplay all %d possibilities? (y or n)", len);
+ tui_puts (msg);
+ if (get_y_or_n () == 0)
+ {
+ tui_puts ("\n");
+ return;
+ }
+ }
+
+ /* How many items of MAX length can we fit in the screen window? */
+ max += 2;
+ limit = screenwidth / max;
+ if (limit != 1 && (limit * max == screenwidth))
+ limit--;
+
+ /* Avoid a possible floating exception. If max > screenwidth,
+ limit will be 0 and a divide-by-zero fault will result. */
+ if (limit == 0)
+ limit = 1;
+
+ /* How many iterations of the printing loop? */
+ count = (len + (limit - 1)) / limit;
+
+ /* Watch out for special case. If LEN is less than LIMIT, then
+ just do the inner printing loop.
+ 0 < len <= limit implies count = 1. */
+
+ /* Sort the items if they are not already sorted. */
+ if (rl_ignore_completion_duplicates == 0)
+ qsort (matches + 1, len, sizeof (char *),
+ (QSFUNC *)_rl_qsort_string_compare);
+
+ tui_putc ('\n');
+
+ if (_rl_print_completions_horizontally == 0)
+ {
+ /* Print the sorted items, up-and-down alphabetically, like ls. */
+ for (i = 1; i <= count; i++)
+ {
+ for (j = 0, l = i; j < limit; j++)
+ {
+ if (l > len || matches[l] == 0)
+ break;
+ else
+ {
+ temp = printable_part (matches[l]);
+ printed_len = print_filename (temp, matches[l]);
+
+ if (j + 1 < limit)
+ for (k = 0; k < max - printed_len; k++)
+ tui_putc (' ');
+ }
+ l += count;
+ }
+ tui_putc ('\n');
+ }
+ }
+ else
+ {
+ /* Print the sorted items, across alphabetically, like ls -x. */
+ for (i = 1; matches[i]; i++)
+ {
+ temp = printable_part (matches[i]);
+ printed_len = print_filename (temp, matches[i]);
+ /* Have we reached the end of this line? */
+ if (matches[i+1])
+ {
+ if (i && (limit > 1) && (i % limit) == 0)
+ tui_putc ('\n');
+ else
+ for (k = 0; k < max - printed_len; k++)
+ tui_putc (' ');
+ }
+ }
+ tui_putc ('\n');
+ }
+}
/* Setup the IO for curses or non-curses mode.
- In non-curses mode, readline and gdb use the standard input and
@@ -280,6 +497,8 @@ tui_setup_io (int mode)
readline_echoing_p = 0;
rl_outstream = tui_rl_outstream;
rl_prompt = 0;
+ rl_completion_display_matches_hook = tui_rl_display_match_list;
+ rl_already_prompted = 0;
/* Keep track of previous gdb output. */
tui_old_stdout = gdb_stdout;
@@ -311,7 +530,9 @@ tui_setup_io (int mode)
rl_prep_term_function = tui_old_rl_prep_terminal;
rl_getc_function = tui_old_rl_getc_function;
rl_outstream = tui_old_rl_outstream;
+ rl_completion_display_matches_hook = 0;
readline_echoing_p = tui_old_readline_echoing_p;
+ rl_already_prompted = 1;
/* Save tty for SIGCONT. */
savetty ();
@@ -359,6 +580,7 @@ tui_initialize_io ()
a init_ui_hook. */
uiout = cli_out_new (gdb_stdout);
+#ifdef TUI_USE_PIPE_FOR_READLINE
/* Temporary solution for readline writing to stdout:
redirect readline output in a pipe, read that pipe and
output the content in the curses command window. */
@@ -382,8 +604,10 @@ tui_initialize_io ()
(void) fcntl (tui_readline_pipe[0], F_SETFL, O_NDELAY);
#endif
#endif
-
add_file_handler (tui_readline_pipe[0], tui_readline_output, 0);
+#else
+ tui_rl_outstream = stdout;
+#endif
}
/* Get a character from the command window. This is called from the readline
@@ -396,9 +620,11 @@ tui_getc (FILE *fp)
w = cmdWin->generic.handle;
+#ifdef TUI_USE_PIPE_FOR_READLINE
/* Flush readline output. */
tui_readline_output (GDB_READABLE, 0);
-
+#endif
+
ch = wgetch (w);
ch = _tuiHandleResizeDuringIO (ch);
diff --git a/gdb/tui/tuiIO.h b/gdb/tui/tuiIO.h
index 2ad92ce81f1..49c26fd79c0 100644
--- a/gdb/tui/tuiIO.h
+++ b/gdb/tui/tuiIO.h
@@ -1,5 +1,5 @@
/* TUI support I/O functions.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Hewlett-Packard Company.
This file is part of GDB.
@@ -36,6 +36,11 @@ extern void tui_initialize_io (void);
/* Get a character from the command window. */
extern int tui_getc (FILE*);
+/* Readline callback.
+ Redisplay the command line with its prompt after readline has
+ changed the edited text. */
+extern void tui_redisplay_readline (void);
+
#define m_tuiStartNewLine tuiStartNewLines(1)
#define m_isStartSequence(ch) (ch == 27)
diff --git a/gdb/tui/tuiSource.c b/gdb/tui/tuiSource.c
index f844b3639d2..0d59bf06b05 100644
--- a/gdb/tui/tuiSource.c
+++ b/gdb/tui/tuiSource.c
@@ -54,17 +54,7 @@
#include "tuiSource.h"
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
-
-static struct breakpoint *_hasBreak (char *, int);
-
-
-/*
- ** tuiSetSourceContent().
- ** Function to display source in the source window.
- */
+/* Function to display source in the source window. */
TuiStatus
tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
{
@@ -79,10 +69,8 @@ tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
if ((ret = tuiAllocSourceBuffer (srcWin)) == TUI_SUCCESS)
{
lineWidth = srcWin->generic.width - 1;
- /*
- ** Take hilite (window border) into account, when calculating
- ** the number of lines
- */
+ /* Take hilite (window border) into account, when calculating
+ the number of lines */
nlines = (lineNo + (srcWin->generic.height - 2)) - lineNo;
desc = open_source_file (s);
if (desc < 0)
@@ -141,7 +129,6 @@ tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
{
TuiWinElementPtr element = (TuiWinElementPtr)
srcWin->generic.content[curLine];
- struct breakpoint *bp;
/* get the first character in the line */
c = fgetc (stream);
@@ -163,10 +150,8 @@ tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
}
srcLine[curLen] = (char) 0;
- /*
- ** Set whether element is the execution point and
- ** whether there is a break point on it.
- */
+ /* Set whether element is the execution point and
+ whether there is a break point on it. */
element->whichElement.source.lineOrAddr.lineNo =
curLineNo;
element->whichElement.source.isExecPoint =
@@ -175,11 +160,6 @@ tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
s->filename) == 0
&& curLineNo == ((TuiWinElementPtr)
locator->content[0])->whichElement.locator.lineNo);
- bp = _hasBreak (s->filename, curLineNo);
- element->whichElement.source.hasBreak =
- (bp != (struct breakpoint *) NULL &&
- (!element->whichElement.source.isExecPoint ||
- (bp->disposition != disp_del || bp->hit_count <= 0)));
if (c != EOF)
{
i = strlen (srcLine) - 1;
@@ -199,13 +179,11 @@ tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
srcLine[i] = '?';
}
else
- { /*
- ** Store the charcter in the line
- ** buffer. If it is a tab, then
- ** translate to the correct number of
- ** chars so we don't overwrite our
- ** buffer.
- */
+ { /* Store the charcter in the line
+ buffer. If it is a tab, then
+ translate to the correct number of
+ chars so we don't overwrite our
+ buffer. */
if (c == '\t')
{
int j, maxTabLen = tuiDefaultTabLen ();
@@ -224,10 +202,8 @@ tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
srcLine[i + 1] = 0;
}
else
- { /*
- ** if we have not reached EOL, then eat
- ** chars until we do
- */
+ { /* If we have not reached EOL, then eat
+ chars until we do */
while (c != EOF && c != '\n' && c != '\r')
c = fgetc (stream);
}
@@ -257,7 +233,7 @@ tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
}
}
return ret;
-} /* tuiSetSourceContent */
+}
/* elz: this function sets the contents of the source window to empty
@@ -328,44 +304,30 @@ tuiSetSourceContentNil (TuiWinInfoPtr winInfo, char *warning_string)
curr_line++;
} /* end while */
-
-} /*tuiSetSourceContentNil */
+}
-
-
-/*
- ** tuiShowSource().
- ** Function to display source in the source window. This function
- ** initializes the horizontal scroll to 0.
- */
+/* Function to display source in the source window. This function
+ initializes the horizontal scroll to 0. */
void
tuiShowSource (struct symtab *s, TuiLineOrAddress line, int noerror)
{
srcWin->detail.sourceInfo.horizontalOffset = 0;
tuiUpdateSourceWindowAsIs(srcWin, s, line, noerror);
-
- return;
-} /* tuiShowSource */
+}
-/*
- ** tuiSourceIsDisplayed().
- ** Answer whether the source is currently displayed in the source window.
- */
+/* Answer whether the source is currently displayed in the source window. */
int
tuiSourceIsDisplayed (char *fname)
{
return (srcWin->generic.contentInUse &&
(strcmp (((TuiWinElementPtr) (locatorWinInfoPtr ())->
content[0])->whichElement.locator.fileName, fname) == 0));
-} /* tuiSourceIsDisplayed */
+}
-/*
- ** tuiVerticalSourceScroll().
- ** Scroll the source forward or backward vertically
- */
+/* Scroll the source forward or backward vertically. */
void
tuiVerticalSourceScroll (TuiScrollDirection scrollDirection,
int numToScroll)
@@ -397,39 +359,7 @@ tuiVerticalSourceScroll (TuiScrollDirection scrollDirection,
if (l.lineNo <= 0)
l.lineNo = 1;
}
- if (identify_source_line (s, l.lineNo, 0, -1) == 1)
- tuiUpdateSourceWindowAsIs (srcWin, s, l, FALSE);
- }
-
- return;
-} /* tuiVerticalSourceScroll */
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS **
-******************************************/
-
-/*
- ** _hasBreak().
- ** Answer whether there is a break point at the input line in
- ** the source file indicated
- */
-static struct breakpoint *
-_hasBreak (char *sourceFileName, int lineNo)
-{
- struct breakpoint *bpWithBreak = (struct breakpoint *) NULL;
- struct breakpoint *bp;
- extern struct breakpoint *breakpoint_chain;
-
-
- for (bp = breakpoint_chain;
- (bp != (struct breakpoint *) NULL &&
- bpWithBreak == (struct breakpoint *) NULL);
- bp = bp->next)
- if (bp->source_file
- && (strcmp (sourceFileName, bp->source_file) == 0)
- && (lineNo == bp->line_number))
- bpWithBreak = bp;
-
- return bpWithBreak;
-} /* _hasBreak */
+ print_source_lines (s, l.lineNo, l.lineNo + 1, 0);
+ }
+}
diff --git a/gdb/tui/tuiSourceWin.c b/gdb/tui/tuiSourceWin.c
index 95b6cdf615d..696b8b24719 100644
--- a/gdb/tui/tuiSourceWin.c
+++ b/gdb/tui/tuiSourceWin.c
@@ -111,7 +111,7 @@ tuiUpdateSourceWindowAsIs (TuiWinInfoPtr winInfo, struct symtab *s,
if (winInfo->generic.type == SRC_WIN)
ret = tuiSetSourceContent (s, lineOrAddr.lineNo, noerror);
else
- ret = tuiSetDisassemContent (s, lineOrAddr.addr);
+ ret = tuiSetDisassemContent (lineOrAddr.addr);
if (ret == TUI_FAILURE)
{
@@ -120,7 +120,7 @@ tuiUpdateSourceWindowAsIs (TuiWinInfoPtr winInfo, struct symtab *s,
}
else
{
- tuiEraseSourceContent (winInfo, NO_EMPTY_SOURCE_PROMPT);
+ tui_update_breakpoint_info (winInfo, 0);
tuiShowSourceContent (winInfo);
tuiUpdateExecInfo (winInfo);
if (winInfo->generic.type == SRC_WIN)
@@ -375,90 +375,114 @@ tuiHorizontalSourceScroll (TuiWinInfoPtr winInfo,
} /* tuiHorizontalSourceScroll */
-/*
- ** tuiSetHasExecPointAt().
- ** Set or clear the hasBreak flag in the line whose line is lineNo.
- */
+/* Set or clear the hasBreak flag in the line whose line is lineNo. */
void
tuiSetIsExecPointAt (TuiLineOrAddress l, TuiWinInfoPtr winInfo)
{
+ int changed = 0;
int i;
TuiWinContent content = (TuiWinContent) winInfo->generic.content;
i = 0;
while (i < winInfo->generic.contentSize)
{
+ int newState;
+
if (content[i]->whichElement.source.lineOrAddr.addr == l.addr)
- content[i]->whichElement.source.isExecPoint = TRUE;
+ newState = TRUE;
else
- content[i]->whichElement.source.isExecPoint = FALSE;
+ newState = FALSE;
+ if (newState != content[i]->whichElement.source.isExecPoint)
+ {
+ changed++;
+ content[i]->whichElement.source.isExecPoint = newState;
+ tui_show_source_line (winInfo, i + 1);
+ }
i++;
}
+ if (changed)
+ tuiRefreshWin (&winInfo->generic);
+}
- return;
-} /* tuiSetIsExecPointAt */
-
-/*
- ** tuiSetHasBreakAt().
- ** Set or clear the hasBreak flag in the line whose line is lineNo.
- */
+/* Update the execution windows to show the active breakpoints.
+ This is called whenever a breakpoint is inserted, removed or
+ has its state changed. */
void
-tuiSetHasBreakAt (struct breakpoint *bp, TuiWinInfoPtr winInfo, int hasBreak)
+tui_update_all_breakpoint_info ()
{
+ TuiList* list = sourceWindows ();
int i;
- TuiWinContent content = (TuiWinContent) winInfo->generic.content;
- i = 0;
- while (i < winInfo->generic.contentSize)
+ for (i = 0; i < list->count; i++)
{
- int gotIt;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ TuiWinInfoPtr win = (TuiWinInfoPtr) list->list[i];
- if (winInfo == srcWin)
- {
- TuiSourceInfoPtr src = &winInfo->detail.sourceInfo;
-
- gotIt = (src->filename != (char *) NULL &&
- bp->source_file != NULL &&
- (strcmp (bp->source_file, src->filename) == 0) &&
- content[i]->whichElement.source.lineOrAddr.lineNo ==
- bp->line_number);
- }
- else
- gotIt = (content[i]->whichElement.source.lineOrAddr.addr
- == bp->address);
- if (gotIt)
- {
- content[i]->whichElement.source.hasBreak = hasBreak;
- break;
- }
- i++;
+ if (tui_update_breakpoint_info (win, FALSE))
+ {
+ tuiUpdateExecInfo (win);
+ }
}
-
- return;
-} /* tuiSetHasBreakAt */
+}
-/*
- ** tuiAllSetHasBreakAt().
- ** Set or clear the hasBreak flag in all displayed source windows.
- */
-void
-tuiAllSetHasBreakAt (struct breakpoint *bp, int hasBreak)
+/* Scan the source window and the breakpoints to update the
+ hasBreak information for each line.
+ Returns 1 if something changed and the execution window
+ must be refreshed. */
+int
+tui_update_breakpoint_info (TuiWinInfoPtr win, int current_only)
{
int i;
+ int need_refresh = 0;
+ TuiSourceInfoPtr src = &win->detail.sourceInfo;
- for (i = 0; i < (sourceWindows ())->count; i++)
- tuiSetHasBreakAt (bp,
- (TuiWinInfoPtr) (sourceWindows ())->list[i], hasBreak);
-
- return;
-} /* tuiAllSetHasBreakAt */
-
+ for (i = 0; i < win->generic.contentSize; i++)
+ {
+ struct breakpoint *bp;
+ extern struct breakpoint *breakpoint_chain;
+ int mode;
+ TuiSourceElement* line;
+
+ line = &((TuiWinElementPtr) win->generic.content[i])->whichElement.source;
+ if (current_only && !line->isExecPoint)
+ continue;
+
+ /* Scan each breakpoint to see if the current line has something to
+ do with it. Identify enable/disabled breakpoints as well as
+ those that we already hit. */
+ mode = 0;
+ for (bp = breakpoint_chain;
+ bp != (struct breakpoint *) NULL;
+ bp = bp->next)
+ {
+ if ((win == srcWin
+ && bp->source_file
+ && (strcmp (src->filename, bp->source_file) == 0)
+ && bp->line_number == line->lineOrAddr.lineNo)
+ || (win == disassemWin
+ && bp->address == line->lineOrAddr.addr))
+ {
+ if (bp->enable_state == bp_disabled)
+ mode |= TUI_BP_DISABLED;
+ else
+ mode |= TUI_BP_ENABLED;
+ if (bp->hit_count)
+ mode |= TUI_BP_HIT;
+ if (bp->cond)
+ mode |= TUI_BP_CONDITIONAL;
+ if (bp->type == bp_hardware_breakpoint)
+ mode |= TUI_BP_HARDWARE;
+ }
+ }
+ if (line->hasBreak != mode)
+ {
+ line->hasBreak = mode;
+ need_refresh = 1;
+ }
+ }
+ return need_refresh;
+}
-/*********************************
-** EXECUTION INFO FUNCTIONS **
-*********************************/
/*
** tuiSetExecInfoContent().
@@ -483,56 +507,37 @@ tuiSetExecInfoContent (TuiWinInfoPtr winInfo)
{
int i;
+ tui_update_breakpoint_info (winInfo, 1);
for (i = 0; i < winInfo->generic.contentSize; i++)
{
TuiWinElementPtr element;
TuiWinElementPtr srcElement;
+ int mode;
element = (TuiWinElementPtr) execInfoPtr->content[i];
srcElement = (TuiWinElementPtr) winInfo->generic.content[i];
- /*
- ** First check to see if we have a breakpoint that is
- ** temporary. If so, and this is our current execution point,
- ** then clear the break indicator.
- */
- if (srcElement->whichElement.source.hasBreak &&
- srcElement->whichElement.source.isExecPoint)
- {
- struct breakpoint *bp;
- int found = FALSE;
- extern struct breakpoint *breakpoint_chain;
-
- for (bp = breakpoint_chain;
- (bp != (struct breakpoint *) NULL && !found);
- bp = bp->next)
- {
- found =
- (winInfo == srcWin &&
- bp->line_number ==
- srcElement->whichElement.source.lineOrAddr.lineNo) ||
- (winInfo == disassemWin &&
- bp->address == (CORE_ADDR)
- srcElement->whichElement.source.lineOrAddr.addr);
- if (found)
- srcElement->whichElement.source.hasBreak =
- (bp->disposition != disp_del || bp->hit_count <= 0);
- }
- if (!found)
- srcElement->whichElement.source.hasBreak = FALSE;
- }
- /*
- ** Now update the exec info content based upon the state
- ** of each line as indicated by the source content.
- */
- if (srcElement->whichElement.source.hasBreak &&
- srcElement->whichElement.source.isExecPoint)
- element->whichElement.simpleString = breakLocationStr ();
- else if (srcElement->whichElement.source.hasBreak)
- element->whichElement.simpleString = breakStr ();
- else if (srcElement->whichElement.source.isExecPoint)
- element->whichElement.simpleString = locationStr ();
- else
- element->whichElement.simpleString = blankStr ();
+
+ memset(element->whichElement.simpleString, ' ',
+ sizeof(element->whichElement.simpleString));
+ element->whichElement.simpleString[TUI_EXECINFO_SIZE - 1] = 0;
+
+ /* Now update the exec info content based upon the state
+ of each line as indicated by the source content. */
+ mode = srcElement->whichElement.source.hasBreak;
+ if (mode & TUI_BP_HIT)
+ element->whichElement.simpleString[TUI_BP_HIT_POS] =
+ (mode & TUI_BP_HARDWARE) ? 'H' : 'B';
+ else if (mode & (TUI_BP_ENABLED | TUI_BP_DISABLED))
+ element->whichElement.simpleString[TUI_BP_HIT_POS] =
+ (mode & TUI_BP_HARDWARE) ? 'h' : 'b';
+
+ if (mode & TUI_BP_ENABLED)
+ element->whichElement.simpleString[TUI_BP_BREAK_POS] = '+';
+ else if (mode & TUI_BP_DISABLED)
+ element->whichElement.simpleString[TUI_BP_BREAK_POS] = '-';
+
+ if (srcElement->whichElement.source.isExecPoint)
+ element->whichElement.simpleString[TUI_EXEC_POS] = '>';
}
execInfoPtr->contentSize = winInfo->generic.contentSize;
}
@@ -541,7 +546,7 @@ tuiSetExecInfoContent (TuiWinInfoPtr winInfo)
}
return ret;
-} /* tuiSetExecInfoContent */
+}
/*
@@ -605,21 +610,6 @@ tuiUpdateExecInfo (TuiWinInfoPtr winInfo)
tuiShowExecInfoContent (winInfo);
} /* tuiUpdateExecInfo */
-
- /*
- ** tuiUpdateAllExecInfos()
- */
-void
-tuiUpdateAllExecInfos (void)
-{
- int i;
-
- for (i = 0; i < (sourceWindows ())->count; i++)
- tuiUpdateExecInfo ((TuiWinInfoPtr) (sourceWindows ())->list[i]);
-
- return;
-} /* tuiUpdateAllExecInfos */
-
TuiStatus
tuiAllocSourceBuffer (TuiWinInfoPtr winInfo)
{
diff --git a/gdb/tui/tuiSourceWin.h b/gdb/tui/tuiSourceWin.h
index 803cb900f96..cb00449ed2d 100644
--- a/gdb/tui/tuiSourceWin.h
+++ b/gdb/tui/tuiSourceWin.h
@@ -22,6 +22,17 @@
#ifndef _TUI_SOURCEWIN_H
#define _TUI_SOURCEWIN_H
+/* Update the execution windows to show the active breakpoints.
+ This is called whenever a breakpoint is inserted, removed or
+ has its state changed. */
+extern void tui_update_all_breakpoint_info (void);
+
+/* Scan the source window and the breakpoints to update the
+ hasBreak information for each line.
+ Returns 1 if something changed and the execution window
+ must be refreshed. */
+extern int tui_update_breakpoint_info (TuiWinInfoPtr win, int current_only);
+
/* Function to display the "main" routine. */
extern void tui_display_main (void);
extern void tuiUpdateSourceWindow (TuiWinInfoPtr, struct symtab *, TuiLineOrAddress,
@@ -30,7 +41,6 @@ extern void tuiUpdateSourceWindowAsIs (TuiWinInfoPtr, struct symtab *, TuiLineOr
int);
extern void tuiUpdateSourceWindowsWithAddr (CORE_ADDR);
extern void tuiUpdateSourceWindowsWithLine (struct symtab *, int);
-extern void tuiUpdateSourceWindowsFromLocator (void);
extern void tuiClearSourceContent (TuiWinInfoPtr, int);
extern void tuiEraseSourceContent (TuiWinInfoPtr, int);
extern void tuiSetSourceContentNil (TuiWinInfoPtr, char *);
@@ -40,15 +50,10 @@ extern void tuiHorizontalSourceScroll (TuiWinInfoPtr, TuiScrollDirection,
extern TuiStatus tuiSetExecInfoContent (TuiWinInfoPtr);
extern void tuiShowExecInfoContent (TuiWinInfoPtr);
extern void tuiEraseExecInfoContent (TuiWinInfoPtr);
-extern void tuiEraseAllExecInfosContent (void);
extern void tuiClearExecInfoContent (TuiWinInfoPtr);
-extern void tuiClearAllExecInfosContent (void);
extern void tuiUpdateExecInfo (TuiWinInfoPtr);
-extern void tuiUpdateAllExecInfos (void);
extern void tuiSetIsExecPointAt (TuiLineOrAddress, TuiWinInfoPtr);
-extern void tuiSetHasBreakAt (struct breakpoint *, TuiWinInfoPtr, int);
-extern void tuiAllSetHasBreakAt (struct breakpoint *, int);
extern TuiStatus tuiAllocSourceBuffer (TuiWinInfoPtr);
extern int tuiLineIsDisplayed (int, TuiWinInfoPtr, int);
extern int tuiAddrIsDisplayed (CORE_ADDR, TuiWinInfoPtr, int);
diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c
index d3f040484c0..10bd259bfdc 100644
--- a/gdb/tui/tuiStack.c
+++ b/gdb/tui/tuiStack.c
@@ -44,6 +44,8 @@
#include "breakpoint.h"
#include "frame.h"
#include "command.h"
+#include "inferior.h"
+#include "target.h"
#include "top.h"
#include "tui.h"
@@ -70,6 +72,154 @@ static void tui_set_locator_info (const char *filename, const char *procname,
static void tui_update_command (char *, int);
+/* Create the status line to display as much information as we
+ can on this single line: target name, process number, current
+ function, current line, current PC, SingleKey mode. */
+static char*
+tui_make_status_line (TuiLocatorElement* loc)
+{
+ char* string;
+ char line_buf[50], buf[50], *pname;
+ int status_size = termWidth ();
+ int i, proc_width;
+ const char* pid_name;
+ const char* pc_buf;
+ int target_width;
+ int pid_width;
+ int line_width;
+ int pc_width;
+ struct ui_file *pc_out;
+
+ if (ptid_equal (inferior_ptid, null_ptid))
+ pid_name = "No process";
+ else
+ pid_name = target_pid_to_str (inferior_ptid);
+
+ target_width = strlen (target_shortname);
+ if (target_width > MAX_TARGET_WIDTH)
+ target_width = MAX_TARGET_WIDTH;
+
+ pid_width = strlen (pid_name);
+ if (pid_width > MAX_PID_WIDTH)
+ pid_width = MAX_PID_WIDTH;
+
+ string = (char *) xmalloc (status_size + 1);
+
+ /* Translate line number and obtain its size. */
+ if (loc->lineNo > 0)
+ sprintf (line_buf, "%d", loc->lineNo);
+ else
+ strcpy (line_buf, "??");
+ line_width = strlen (line_buf);
+ if (line_width < MIN_LINE_WIDTH)
+ line_width = MIN_LINE_WIDTH;
+
+ /* Translate PC address. */
+ pc_out = tui_sfileopen (128);
+ print_address_numeric (loc->addr, 1, pc_out);
+ pc_buf = tui_file_get_strbuf (pc_out);
+ pc_width = strlen (pc_buf);
+
+ /* First determine the amount of proc name width we have available.
+ The +1 are for a space separator between fields.
+ The -1 are to take into account the \0 counted by sizeof. */
+ proc_width = (status_size
+ - (target_width + 1)
+ - (pid_width + 1)
+ - (sizeof (PROC_PREFIX) - 1 + 1)
+ - (sizeof (LINE_PREFIX) - 1 + line_width + 1)
+ - (sizeof (PC_PREFIX) - 1 + pc_width + 1)
+ - (tui_current_key_mode == tui_single_key_mode
+ ? (sizeof (SINGLE_KEY) - 1 + 1)
+ : 0));
+
+ /* If there is no room to print the function name, try by removing
+ some fields. */
+ if (proc_width < MIN_PROC_WIDTH)
+ {
+ proc_width += target_width + 1;
+ target_width = 0;
+ if (proc_width < MIN_PROC_WIDTH)
+ {
+ proc_width += pid_width + 1;
+ pid_width = 0;
+ if (proc_width <= MIN_PROC_WIDTH)
+ {
+ proc_width += pc_width + sizeof (PC_PREFIX) - 1 + 1;
+ pc_width = 0;
+ if (proc_width < 0)
+ {
+ proc_width += line_width + sizeof (LINE_PREFIX) - 1 + 1;
+ line_width = 0;
+ if (proc_width < 0)
+ proc_width = 0;
+ }
+ }
+ }
+ }
+
+ /* Now convert elements to string form */
+ pname = loc->procName;
+
+ /* Now create the locator line from the string version
+ of the elements. We could use sprintf() here but
+ that wouldn't ensure that we don't overrun the size
+ of the allocated buffer. strcat_to_buf() will. */
+ *string = (char) 0;
+
+ if (target_width > 0)
+ {
+ sprintf (buf, "%*.*s ",
+ -target_width, target_width, target_shortname);
+ strcat_to_buf (string, status_size, buf);
+ }
+ if (pid_width > 0)
+ {
+ sprintf (buf, "%*.*s ",
+ -pid_width, pid_width, pid_name);
+ strcat_to_buf (string, status_size, buf);
+ }
+
+ /* Show whether we are in SingleKey mode. */
+ if (tui_current_key_mode == tui_single_key_mode)
+ {
+ strcat_to_buf (string, status_size, SINGLE_KEY);
+ strcat_to_buf (string, status_size, " ");
+ }
+
+ /* procedure/class name */
+ if (proc_width > 0)
+ {
+ if (strlen (pname) > proc_width)
+ sprintf (buf, "%s%*.*s* ", PROC_PREFIX,
+ 1 - proc_width, proc_width - 1, pname);
+ else
+ sprintf (buf, "%s%*.*s ", PROC_PREFIX,
+ -proc_width, proc_width, pname);
+ strcat_to_buf (string, status_size, buf);
+ }
+
+ if (line_width > 0)
+ {
+ sprintf (buf, "%s%*.*s ", LINE_PREFIX,
+ -line_width, line_width, line_buf);
+ strcat_to_buf (string, status_size, buf);
+ }
+ if (pc_width > 0)
+ {
+ strcat_to_buf (string, status_size, PC_PREFIX);
+ strcat_to_buf (string, status_size, pc_buf);
+ }
+
+
+ for (i = strlen (string); i < status_size; i++)
+ string[i] = ' ';
+ string[status_size] = (char) 0;
+
+ ui_file_delete (pc_out);
+ return string;
+}
+
/* Get a printable name for the function at the address.
The symbol name is demangled if demangling is turned on.
Returns a pointer to a static area holding the result. */
@@ -114,24 +264,23 @@ tuiShowLocatorContent (void)
if (m_genWinPtrNotNull (locator) && locator->handle != (WINDOW *) NULL)
{
- string = displayableWinContentAt (locator, 0);
- if (string != (char *) NULL)
- {
- wmove (locator->handle, 0, 0);
- wstandout (locator->handle);
- waddstr (locator->handle, string);
- wclrtoeol (locator->handle);
- wstandend (locator->handle);
- tuiRefreshWin (locator);
- wmove (locator->handle, 0, 0);
- if (string != nullStr ())
- tuiFree (string);
- locator->contentInUse = TRUE;
- }
+ TuiWinElementPtr element;
+
+ element = (TuiWinElementPtr) locator->content[0];
+
+ string = tui_make_status_line (&element->whichElement.locator);
+ wmove (locator->handle, 0, 0);
+ wstandout (locator->handle);
+ waddstr (locator->handle, string);
+ wclrtoeol (locator->handle);
+ wstandend (locator->handle);
+ tuiRefreshWin (locator);
+ wmove (locator->handle, 0, 0);
+ xfree (string);
+ locator->contentInUse = TRUE;
}
+}
- return;
-} /* tuiShowLocatorContent */
/* Set the filename portion of the locator. */
static void
diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c
index 82c3d4951f4..fe3b8e054be 100644
--- a/gdb/tui/tuiWin.c
+++ b/gdb/tui/tuiWin.c
@@ -928,7 +928,7 @@ _tuiAllWindowsInfo (char *arg, int fromTTY)
TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
- if (winList[type]->generic.isVisible)
+ if (winList[type] && winList[type]->generic.isVisible)
{
if (winWithFocus == winList[type])
printf_filtered (" %s\t(%d lines) <has focus>\n",
@@ -1446,7 +1446,7 @@ _newHeightOk (TuiWinInfoPtr primaryWinInfo, int newHeight)
}
else
{
- int curTotalHeight, totalHeight, minHeight;
+ int curTotalHeight, totalHeight, minHeight = 0;
TuiWinInfoPtr firstWin, secondWin;
if (curLayout == SRC_DISASSEM_COMMAND)
@@ -1465,7 +1465,7 @@ _newHeightOk (TuiWinInfoPtr primaryWinInfo, int newHeight)
** line that the first and second windows share, and add one
** for the locator.
*/
- curTotalHeight =
+ totalHeight = curTotalHeight =
(firstWin->generic.height + secondWin->generic.height - 1)
+ cmdWin->generic.height + 1 /*locator */ ;
if (primaryWinInfo == cmdWin)
diff --git a/gdb/version.in b/gdb/version.in
index 8ea94ca47bd..39cb08d1183 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2002-08-25-cvs
+2002-09-03-cvs
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index e0377c5afe4..781a84126cb 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -1791,6 +1791,7 @@ init_child_ops (void)
child_ops.to_terminal_inferior = terminal_inferior;
child_ops.to_terminal_ours_for_output = terminal_ours_for_output;
child_ops.to_terminal_ours = terminal_ours;
+ child_ops.to_terminal_save_ours = terminal_save_ours;
child_ops.to_terminal_info = child_terminal_info;
child_ops.to_kill = child_kill_inferior;
child_ops.to_load = 0;
diff --git a/gdb/wince.c b/gdb/wince.c
index a640bea74b2..92c115820b4 100644
--- a/gdb/wince.c
+++ b/gdb/wince.c
@@ -1910,6 +1910,7 @@ init_child_ops (void)
child_ops.to_terminal_inferior = terminal_inferior;
child_ops.to_terminal_ours_for_output = terminal_ours_for_output;
child_ops.to_terminal_ours = terminal_ours;
+ child_ops.to_terminal_save_ours = terminal_save_ours;
child_ops.to_terminal_info = child_terminal_info;
child_ops.to_kill = child_kill_inferior;
child_ops.to_load = child_load;
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c
index 7749b415114..13724107ca7 100644
--- a/gdb/x86-64-linux-nat.c
+++ b/gdb/x86-64-linux-nat.c
@@ -26,6 +26,7 @@
#include "gdbcore.h"
#include "regcache.h"
#include "gdb_assert.h"
+#include "gdb_string.h"
#include "x86-64-tdep.h"
#include <sys/ptrace.h>
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index 171ec9c4975..ac41daa8849 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -24,6 +24,7 @@
#include "defs.h"
#include "inferior.h"
#include "gdbcore.h"
+#include "gdb_string.h"
#include "regcache.h"
#include "x86-64-tdep.h"
#include "dwarf2cfi.h"
diff --git a/include/ChangeLog b/include/ChangeLog
index 39f18740bd0..e018f1ec506 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,11 @@
+2002-08-28 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * coff/internal.h: Add new relocation types.
+ * coff/ti.h: Add file-header flags for tic4x code.
+ * dis-asm.h: Add standard disassembler for tic4x.
+ * opcode/tic4x.h: New file.
+ * coff/tic4x.h: New file
+
2002-08-07 H.J. Lu <hjl@gnu.org>
* bfdlink.h (bfd_link_info): Add allow_undefined_version.
diff --git a/include/coff/internal.h b/include/coff/internal.h
index 4babbd4de5f..b9b6368f039 100644
--- a/include/coff/internal.h
+++ b/include/coff/internal.h
@@ -600,6 +600,7 @@ struct internal_reloc
};
#define R_DIR16 1
+#define R_REL24 5
#define R_DIR32 6
#define R_IMAGEBASE 7
#define R_RELBYTE 15
@@ -608,12 +609,15 @@ struct internal_reloc
#define R_PCRBYTE 18
#define R_PCRWORD 19
#define R_PCRLONG 20
+#define R_PCR24 21
#define R_IPRSHORT 24
#define R_IPRLONG 26
#define R_GETSEG 29
#define R_GETPA 30
#define R_TAGWORD 31
#define R_JUMPTARG 32 /* strange 29k 00xx00xx reloc */
+#define R_PARTLS16 32
+#define R_PARTMS8 33
#define R_PCR16L 128
#define R_PCR26L 129
diff --git a/include/coff/ti.h b/include/coff/ti.h
index d98fc89bd1f..0a59b226a32 100644
--- a/include/coff/ti.h
+++ b/include/coff/ti.h
@@ -118,6 +118,7 @@ struct external_filehdr
#define F_RELFLG (0x0001)
#define F_EXEC (0x0002)
#define F_LNNO (0x0004)
+#define F_VERS (0x0010) /* TMS320C4x code */
/* F_LSYMS needs to be redefined in your source file */
#define F_LSYMS_TICOFF (0x0010) /* normal COFF is 0x8 */
diff --git a/include/coff/tic4x.h b/include/coff/tic4x.h
new file mode 100644
index 00000000000..03215fb5314
--- /dev/null
+++ b/include/coff/tic4x.h
@@ -0,0 +1,46 @@
+/* TI COFF information for Texas Instruments TMS320C4X/C3X.
+ This file customizes the settings in coff/ti.h.
+
+ Copyright 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef COFF_TIC4X_H
+#define COFF_TIC4X_H
+
+#define TIC4X_TARGET_ID 0x0093
+/* Octets per byte, as a power of two. */
+#define TI_TARGET_ID TIC4X_TARGET_ID
+#define OCTETS_PER_BYTE_POWER 2
+/* Add to howto to get absolute/sect-relative version. */
+#define HOWTO_BANK 6
+#define TICOFF_TARGET_ARCH bfd_arch_tic4x
+/* We use COFF2. */
+#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
+
+#define TICOFF_TARGET_MACHINE_GET (FLAGS) \
+ (((FLAGS) & F_VERS) ? bfd_mach_c4x : bfd_mach_c3x)
+
+#define TICOFF_TARGET_MACHINE_SET (FLAGSP, MACHINE) \
+ do \
+ { \
+ if ((MACHINE) == bfd_mach_c4x) \
+ *(FLAGSP) = F_VERS; \
+ } \
+ while (0)
+
+#include "coff/ti.h"
+
+#endif /* COFF_TIC4X_H */
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 84c436d4f18..0109068f3f8 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -229,6 +229,7 @@ extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_tic4x PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic54x PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index a7dfa25965b..0ffa6ab9d31 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-28 Catherine Moore <clm@redhat.com>
+
+ * elf/v850.h (R_V850_LONGCALL, R_V850_ALIGN,
+ R_V850_LONGJUMP): New relocations.
+
2002-08-15 Alan Modra <amodra@bigpond.net.au>
* i370.h: Define relocs using reloc-macros.h.
diff --git a/include/elf/v850.h b/include/elf/v850.h
index 62b9541e8e9..a15c9ee0864 100644
--- a/include/elf/v850.h
+++ b/include/elf/v850.h
@@ -1,22 +1,22 @@
/* V850 ELF support for BFD.
- Copyright 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
Created by Michael Meissner, Cygnus Support <meissner@cygnus.com>
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This file holds definitions specific to the MIPS ELF ABI. Note
that most of this is not actually implemented by BFD. */
@@ -35,18 +35,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* v850e code. */
#define E_V850E_ARCH 0x10000000
-/* v850ea code. */
-#define E_V850EA_ARCH 0x20000000
+/* Flags for the st_other field. */
+#define V850_OTHER_SDA 0x01 /* Symbol had SDA relocations. */
+#define V850_OTHER_ZDA 0x02 /* Symbol had ZDA relocations. */
+#define V850_OTHER_TDA 0x04 /* Symbol had TDA relocations. */
+#define V850_OTHER_TDA_BYTE 0x08 /* Symbol had TDA byte relocations. */
+#define V850_OTHER_ERROR 0x80 /* Symbol had an error reported. */
-/* Flags for the st_other field */
-#define V850_OTHER_SDA 0x01 /* symbol had SDA relocations */
-#define V850_OTHER_ZDA 0x02 /* symbol had ZDA relocations */
-#define V850_OTHER_TDA 0x04 /* symbol had TDA relocations */
-#define V850_OTHER_TDA_BYTE 0x08 /* symbol had TDA byte relocations */
-#define V850_OTHER_ERROR 0x80 /* symbol had an error reported */
-
-/* V850 relocations */
+/* V850 relocations. */
#include "elf/reloc-macros.h"
START_RELOC_NUMBERS (v850_reloc_type)
@@ -75,6 +72,9 @@ START_RELOC_NUMBERS (v850_reloc_type)
RELOC_NUMBER( R_V850_CALLT_16_16_OFFSET, 22) /* For callt */
RELOC_NUMBER (R_V850_GNU_VTINHERIT, 23)
RELOC_NUMBER (R_V850_GNU_VTENTRY, 24)
+ RELOC_NUMBER (R_V850_LONGCALL, 25)
+ RELOC_NUMBER (R_V850_LONGJUMP, 26)
+ RELOC_NUMBER (R_V850_ALIGN, 27)
END_RELOC_NUMBERS (R_V850_max)
@@ -103,5 +103,4 @@ END_RELOC_NUMBERS (R_V850_max)
/* Section contains the .scommon data. */
#define SHT_V850_ZCOMMON 0x70000002
-
#endif /* _ELF_V850_H */
diff --git a/include/opcode/tic4x.h b/include/opcode/tic4x.h
new file mode 100644
index 00000000000..68d186d1d0e
--- /dev/null
+++ b/include/opcode/tic4x.h
@@ -0,0 +1,1338 @@
+/* Table of opcodes for the Texas Instruments TMS320C[34]X family.
+
+ Copyright (c) 2002 Free Software Foundation.
+
+ Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+/* FIXME: Only allow floating point registers for floating point
+ instructions. Use another field in the instruction table?
+ This field could also flag which instructions are valid for
+ which architectures...
+ e.g., OP_FP | OP_C40 or OP_C40_FP */
+
+#define IS_CPU_C3X(v) ((v) == 30 || (v) == 31 || (v) == 32)
+#define IS_CPU_C4X(v) ((v) == 0 || (v) == 40 || (v) == 44)
+
+/* Define some bitfield extraction/insertion macros. */
+#define EXTR(inst, m, l) ((inst) << (31 - (m)) >> (31 - ((m) - (l))))
+#define EXTRU(inst, m, l) EXTR ((unsigned long)(inst), (m), (l))
+#define EXTRS(inst, m, l) EXTR ((long)(inst), (m), (l))
+#define INSERTU(inst, val, m, l) (inst |= ((val) << (l)))
+#define INSERTS(inst, val, m, l) INSERTU (inst, ((val) & ((1 << ((m) - (l) + 1)) - 1)), m, l)
+
+/* Define register numbers. */
+typedef enum
+ {
+ REG_R0, REG_R1, REG_R2, REG_R3,
+ REG_R4, REG_R5, REG_R6, REG_R7,
+ REG_AR0, REG_AR1, REG_AR2, REG_AR3,
+ REG_AR4, REG_AR5, REG_AR6, REG_AR7,
+ REG_DP, REG_IR0, REG_IR1, REG_BK,
+ REG_SP, REG_ST, REG_DIE, REG_IIE,
+ REG_IIF, REG_RS, REG_RE, REG_RC,
+ REG_R8, REG_R9, REG_R10, REG_R11,
+ REG_IVTP, REG_TVTP
+ }
+c4x_reg_t;
+
+/* Note that the actual register numbers for IVTP is 0 and TVTP is 1. */
+
+#define REG_IE REG_DIE /* C3x only */
+#define REG_IF REG_IIE /* C3x only */
+#define REG_IOF REG_IIF /* C3x only */
+
+#define C3X_REG_MAX REG_RC
+#define C4X_REG_MAX REG_TVTP
+
+/* Register table size including C4x expansion regs. */
+#define REG_TABLE_SIZE (C4X_REG_MAX + 1)
+
+struct c4x_register
+{
+ char * name;
+ unsigned long regno;
+};
+
+typedef struct c4x_register c4x_register_t;
+
+/* We could store register synonyms here. */
+static const c4x_register_t c3x_registers[] =
+{
+ {"f0", REG_R0},
+ {"r0", REG_R0},
+ {"f1", REG_R1},
+ {"r1", REG_R1},
+ {"f2", REG_R2},
+ {"r2", REG_R2},
+ {"f3", REG_R3},
+ {"r3", REG_R3},
+ {"f4", REG_R4},
+ {"r4", REG_R4},
+ {"f5", REG_R5},
+ {"r5", REG_R5},
+ {"f6", REG_R6},
+ {"r6", REG_R6},
+ {"f7", REG_R7},
+ {"r7", REG_R7},
+ {"ar0", REG_AR0},
+ {"ar1", REG_AR1},
+ {"ar2", REG_AR2},
+ {"ar3", REG_AR3},
+ {"ar4", REG_AR4},
+ {"ar5", REG_AR5},
+ {"ar6", REG_AR6},
+ {"ar7", REG_AR7},
+ {"dp", REG_DP},
+ {"ir0", REG_IR0},
+ {"ir1", REG_IR1},
+ {"bk", REG_BK},
+ {"sp", REG_SP},
+ {"st", REG_ST},
+ {"ie", REG_IE},
+ {"if", REG_IF},
+ {"iof", REG_IOF},
+ {"rs", REG_RS},
+ {"re", REG_RE},
+ {"rc", REG_RC},
+ {"", 0}
+};
+
+const unsigned int c3x_num_registers = (((sizeof c3x_registers) / (sizeof c3x_registers[0])) - 1);
+
+/* Define C4x registers in addition to C3x registers. */
+static const c4x_register_t c4x_registers[] =
+{
+ {"die", REG_DIE}, /* Clobbers C3x REG_IE */
+ {"iie", REG_IIE}, /* Clobbers C3x REG_IF */
+ {"iif", REG_IIF}, /* Clobbers C3x REG_IOF */
+ {"f8", REG_R8},
+ {"r8", REG_R8},
+ {"f9", REG_R9},
+ {"r9", REG_R9},
+ {"f10", REG_R10},
+ {"r10", REG_R10},
+ {"f11", REG_R11},
+ {"r11", REG_R11},
+ {"ivtp", REG_IVTP},
+ {"tvtp", REG_TVTP},
+ {"", 0}
+};
+
+const unsigned int c4x_num_registers = (((sizeof c4x_registers) / (sizeof c4x_registers[0])) - 1);
+
+/* Instruction template. */
+struct c4x_inst
+{
+ char * name;
+ unsigned long opcode;
+ unsigned long opmask;
+ char * args;
+};
+
+typedef struct c4x_inst c4x_inst_t;
+
+/* B condition 16--20
+ C condition 23--27
+ , required arg follows
+ ; optional arg follows
+ General addressing modes
+ * indirect 0--15
+ # direct (for ldp only) 0--15
+ @ direct 0--15
+ F short float immediate 0--15
+ Q register 0--15
+ R register 16--20
+ S short int immediate 0--15
+ D src and dst same reg
+ Three operand addressing modes
+ E register 0--7
+ G register 8--15
+ I indirect(short) 0--7
+ J indirect(short) 8--15
+ R register 16--20
+ W short int (C4x) 0--7
+ C indirect(short) (C4x) 0--7
+ O indirect(short) (C4x) 8--15
+ Parallel instruction addressing modes
+ E register 0--7
+ G register 8--15
+ I indirect(short) 0--7
+ J indirect(short) 8--15
+ K register 19--21
+ L register 22--24
+ M register (R2,R3) 22--22
+ N register (R0,R1) 23--23
+ Misc. addressing modes
+ A address register 22--24
+ B unsigned integer 0--23 (absolute on C3x, relative on C4x)
+ P displacement (PC Rel) 0--15
+ U unsigned integer 0--15
+ V vector 0--4 (C4x 0--8)
+ T integer (C4x stik) 16--20
+ Y address reg (C4x) 16--20
+ X expansion reg (C4x) 0--4
+ Z expansion reg (C4x) 16--20. */
+
+#define C4X_OPERANDS_MAX 7 /* Max number of operands for an inst. */
+#define C4X_NAME_MAX 16 /* Max number of chars in parallel name. */
+
+/* General (two) operand group. */
+#define G_F_r "F,R"
+#define G_I_r "S,R"
+#define G_L_r "U,R"
+#define G_Q_r "*,R"
+#define G_T_r "@,R"
+#define G_r_r "Q;R"
+
+/* Three operand group (Type 1 with missing third operand). */
+#define T_rr_ "E,G"
+#define T_rS_ "E,J"
+#define T_Sr_ "I,G"
+#define T_SS_ "I,J"
+
+/* Three operand group (Type 2 with missing third operand). */
+#define T_Jr_ "W,G" /* C4x only */
+#define T_rJ_ "G,W" /* C4x only (commutative insns only) */
+#define T_Rr_ "C,G" /* C4x only */
+#define T_rR_ "G,C" /* C4x only (commutative insns only) */
+#define T_JR_ "W,O" /* C4x only */
+#define T_RJ_ "O,W" /* C4x only (commutative insns only) */
+#define T_RR_ "C,O" /* C4x only */
+
+/* Three operand group (Type 1). */
+#define T_rrr "E,G;R"
+#define T_Srr "E,J,R"
+#define T_rSr "I,G;R"
+#define T_SSr "I,J,R"
+
+/* Three operand group (Type 2). */
+#define T_Jrr "W,G;R" /* C4x only */
+#define T_rJr "G,W,R" /* C4x only (commutative insns only) */
+#define T_Rrr "C,G;R" /* C4x only */
+#define T_rRr "G,C,R" /* C4x only (commutative insns only) */
+#define T_JRr "W,O,R" /* C4x only */
+#define T_RJr "O,W,R" /* C4x only (commutative insns only) */
+#define T_RRr "C,O,R" /* C4x only */
+
+/* Parallel group (store || op). */
+#define Q_rS_rSr "H,J|K,I,L"
+#define Q_rS_Sr "H,J|I,L"
+#define Q_rS_Srr "H,J|I,K;L"
+
+/* Parallel group (op || store). */
+#define P_rSr_rS "K,I,L|H,J"
+#define P_Srr_rS "I,K;L|H,J"
+#define P_rS_rS "L,I|H,J"
+
+/* Parallel group (load || load). */
+#define P_Sr_Sr "I,L|J,K"
+#define Q_Sr_Sr "J,K|I,L"
+
+/* Parallel group (store || store). */
+#define P_Sr_rS "I,L|H,J"
+#define Q_rS_rS "H,J|L,I"
+
+/* Parallel group (multiply || add/sub). */
+#define P_SSr_rrr "I,J,N|H,K;M" /* 00 (User manual transposes I,J) */
+#define P_Srr_rSr "J,K;N|H,I,M" /* 01 */
+#define P_rSr_rSr "K,J,N|H,I,M" /* 01 */
+#define P_rrr_SSr "H,K;N|I,J,M" /* 10 (User manual transposes H,K) */
+#define P_Srr_Srr "J,K;N|I,H;M" /* 11 */
+#define P_rSr_Srr "K,J,N|I,H;M" /* 11 */
+
+#define Q_rrr_SSr "H,K;M|I,J,N" /* 00 (User manual transposes I,J) */
+#define Q_rSr_Srr "H,I,M|J,K;N" /* 01 */
+#define Q_rSr_rSr "H,I,M|K,J,N" /* 01 */
+#define Q_SSr_rrr "I,J,M|H,K;N" /* 10 (User manual transposes H,K) */
+#define Q_Srr_Srr "I,H;M|J,K;N" /* 11 */
+#define Q_Srr_rSr "I,H;M|K,J,N" /* 11 */
+
+/* Define c3x opcodes for assembler and disassembler. */
+static const c4x_inst_t c3x_insts[] =
+{
+ /* Put synonyms after the desired forms in table so that they get
+ overwritten in the lookup table. The disassembler will thus
+ print the `proper' mnemonics. Note that the disassembler
+ only decodes the 11 MSBs, so instructions like ldp @0x500 will
+ be printed as ldiu 5, dp. Note that with parallel instructions,
+ the second part is executed before the first part, unless
+ the sti1||sti2 form is used. We also allow sti2||sti1
+ which is equivalent to the default sti||sti form.
+
+ Put most common forms first to speed up assembler.
+
+ FIXME: Add all the other parallel/load forms, like absf1_stf2
+ Perhaps I should have used a few macros...especially with
+ all the bloat after adding the C4x opcodes...too late now! */
+
+ /* Parallel instructions. */
+ { "absf_stf", 0xc8000000, 0xfe000000, P_Sr_rS },
+ { "absi_sti", 0xca000000, 0xfe000000, P_Sr_rS },
+ { "addf_mpyf", 0x80000000, 0xff000000, Q_rrr_SSr },
+ { "addf_mpyf", 0x81000000, 0xff000000, Q_rSr_Srr },
+ { "addf_mpyf", 0x81000000, 0xff000000, Q_rSr_rSr },
+ { "addf_mpyf", 0x82000000, 0xff000000, Q_SSr_rrr },
+ { "addf_mpyf", 0x83000000, 0xff000000, Q_Srr_Srr },
+ { "addf_mpyf", 0x83000000, 0xff000000, Q_Srr_rSr },
+ { "addf3_mpyf3", 0x80000000, 0xff000000, Q_rrr_SSr },
+ { "addf3_mpyf3", 0x81000000, 0xff000000, Q_rSr_Srr },
+ { "addf3_mpyf3", 0x81000000, 0xff000000, Q_rSr_rSr },
+ { "addf3_mpyf3", 0x82000000, 0xff000000, Q_SSr_rrr },
+ { "addf3_mpyf3", 0x83000000, 0xff000000, Q_Srr_Srr },
+ { "addf3_mpyf3", 0x83000000, 0xff000000, Q_Srr_rSr },
+ { "addf_stf", 0xcc000000, 0xfe000000, P_Srr_rS },
+ { "addf_stf", 0xcc000000, 0xfe000000, P_rSr_rS },
+ { "addf3_stf", 0xcc000000, 0xfe000000, P_Srr_rS },
+ { "addf3_stf", 0xcc000000, 0xfe000000, P_rSr_rS },
+ { "addi_mpyi", 0x88000000, 0xff000000, Q_rrr_SSr },
+ { "addi_mpyi", 0x89000000, 0xff000000, Q_rSr_Srr },
+ { "addi_mpyi", 0x89000000, 0xff000000, Q_rSr_rSr },
+ { "addi_mpyi", 0x8a000000, 0xff000000, Q_SSr_rrr },
+ { "addi_mpyi", 0x8b000000, 0xff000000, Q_Srr_Srr },
+ { "addi3_mpyi3", 0x88000000, 0xff000000, Q_rrr_SSr },
+ { "addi3_mpyi3", 0x89000000, 0xff000000, Q_rSr_Srr },
+ { "addi3_mpyi3", 0x8a000000, 0xff000000, Q_SSr_rrr },
+ { "addi3_mpyi3", 0x8b000000, 0xff000000, Q_Srr_Srr },
+ { "addi3_mpyi3", 0x8b000000, 0xff000000, Q_Srr_rSr },
+ { "addi_sti", 0xce000000, 0xfe000000, P_Srr_rS },
+ { "addi_sti", 0xce000000, 0xfe000000, P_rSr_rS },
+ { "addi3_sti", 0xce000000, 0xfe000000, P_Srr_rS },
+ { "addi3_sti", 0xce000000, 0xfe000000, P_rSr_rS },
+ { "and_sti", 0xd0000000, 0xfe000000, P_Srr_rS },
+ { "and_sti", 0xd0000000, 0xfe000000, P_rSr_rS },
+ { "and3_sti", 0xd0000000, 0xfe000000, P_Srr_rS },
+ { "and3_sti", 0xd0000000, 0xfe000000, P_rSr_rS },
+ { "ash_sti", 0xd2000000, 0xfe000000, P_rSr_rS },
+ { "ash3_sti", 0xd2000000, 0xfe000000, P_rSr_rS },
+ { "fix_sti", 0xd4000000, 0xfe000000, P_Sr_rS },
+ { "float_stf", 0xd6000000, 0xfe000000, P_Sr_rS },
+ { "ldf_ldf", 0xc4000000, 0xfe000000, P_Sr_Sr },
+ { "ldf1_ldf2", 0xc4000000, 0xfe000000, Q_Sr_Sr }, /* synonym */
+ { "ldf2_ldf1", 0xc4000000, 0xfe000000, P_Sr_Sr }, /* synonym */
+ { "ldf_stf", 0xd8000000, 0xfe000000, P_Sr_rS },
+ { "ldi_ldi", 0xc6000000, 0xfe000000, P_Sr_Sr },
+ { "ldi1_ldi2", 0xc6000000, 0xfe000000, Q_Sr_Sr }, /* synonym */
+ { "ldi2_ldi1", 0xc6000000, 0xfe000000, P_Sr_Sr }, /* synonym */
+ { "ldi_sti", 0xda000000, 0xfe000000, P_Sr_rS },
+ { "lsh_sti", 0xdc000000, 0xfe000000, P_rSr_rS },
+ { "lsh3_sti", 0xdc000000, 0xfe000000, P_rSr_rS },
+ { "mpyf_addf", 0x80000000, 0xff000000, P_SSr_rrr },
+ { "mpyf_addf", 0x81000000, 0xff000000, P_Srr_rSr },
+ { "mpyf_addf", 0x81000000, 0xff000000, P_rSr_rSr },
+ { "mpyf_addf", 0x82000000, 0xff000000, P_rrr_SSr },
+ { "mpyf_addf", 0x83000000, 0xff000000, P_Srr_Srr },
+ { "mpyf_addf", 0x83000000, 0xff000000, P_rSr_Srr },
+ { "mpyf3_addf3", 0x80000000, 0xff000000, P_SSr_rrr },
+ { "mpyf3_addf3", 0x81000000, 0xff000000, P_Srr_rSr },
+ { "mpyf3_addf3", 0x81000000, 0xff000000, P_rSr_rSr },
+ { "mpyf3_addf3", 0x82000000, 0xff000000, P_rrr_SSr },
+ { "mpyf3_addf3", 0x83000000, 0xff000000, P_Srr_Srr },
+ { "mpyf3_addf3", 0x83000000, 0xff000000, P_rSr_Srr },
+ { "mpyf_stf", 0xde000000, 0xfe000000, P_Srr_rS },
+ { "mpyf_stf", 0xde000000, 0xfe000000, P_rSr_rS },
+ { "mpyf3_stf", 0xde000000, 0xfe000000, P_Srr_rS },
+ { "mpyf3_stf", 0xde000000, 0xfe000000, P_rSr_rS },
+ { "mpyf_subf", 0x84000000, 0xff000000, P_SSr_rrr },
+ { "mpyf_subf", 0x85000000, 0xff000000, P_Srr_rSr },
+ { "mpyf_subf", 0x85000000, 0xff000000, P_rSr_rSr },
+ { "mpyf_subf", 0x86000000, 0xff000000, P_rrr_SSr },
+ { "mpyf_subf", 0x87000000, 0xff000000, P_Srr_Srr },
+ { "mpyf_subf", 0x87000000, 0xff000000, P_rSr_Srr },
+ { "mpyf3_subf3", 0x84000000, 0xff000000, P_SSr_rrr },
+ { "mpyf3_subf3", 0x85000000, 0xff000000, P_Srr_rSr },
+ { "mpyf3_subf3", 0x85000000, 0xff000000, P_rSr_rSr },
+ { "mpyf3_subf3", 0x86000000, 0xff000000, P_rrr_SSr },
+ { "mpyf3_subf3", 0x87000000, 0xff000000, P_Srr_Srr },
+ { "mpyf3_subf3", 0x87000000, 0xff000000, P_rSr_Srr },
+ { "mpyi_addi", 0x88000000, 0xff000000, P_SSr_rrr },
+ { "mpyi_addi", 0x89000000, 0xff000000, P_Srr_rSr },
+ { "mpyi_addi", 0x89000000, 0xff000000, P_rSr_rSr },
+ { "mpyi_addi", 0x8a000000, 0xff000000, P_rrr_SSr },
+ { "mpyi_addi", 0x8b000000, 0xff000000, P_Srr_Srr },
+ { "mpyi_addi", 0x8b000000, 0xff000000, P_rSr_Srr },
+ { "mpyi3_addi3", 0x88000000, 0xff000000, P_SSr_rrr },
+ { "mpyi3_addi3", 0x89000000, 0xff000000, P_Srr_rSr },
+ { "mpyi3_addi3", 0x89000000, 0xff000000, P_rSr_rSr },
+ { "mpyi3_addi3", 0x8a000000, 0xff000000, P_rrr_SSr },
+ { "mpyi3_addi3", 0x8b000000, 0xff000000, P_Srr_Srr },
+ { "mpyi3_addi3", 0x8b000000, 0xff000000, P_rSr_Srr },
+ { "mpyi_sti", 0xe0000000, 0xfe000000, P_Srr_rS },
+ { "mpyi_sti", 0xe0000000, 0xfe000000, P_rSr_rS },
+ { "mpyi3_sti", 0xe0000000, 0xfe000000, P_Srr_rS },
+ { "mpyi3_sti", 0xe0000000, 0xfe000000, P_rSr_rS },
+ { "mpyi_subi", 0x8c000000, 0xff000000, P_SSr_rrr },
+ { "mpyi_subi", 0x8d000000, 0xff000000, P_Srr_rSr },
+ { "mpyi_subi", 0x8d000000, 0xff000000, P_rSr_rSr },
+ { "mpyi_subi", 0x8e000000, 0xff000000, P_rrr_SSr },
+ { "mpyi_subi", 0x8f000000, 0xff000000, P_Srr_Srr },
+ { "mpyi_subi", 0x8f000000, 0xff000000, P_rSr_Srr },
+ { "mpyi3_subi3", 0x8c000000, 0xff000000, P_SSr_rrr },
+ { "mpyi3_subi3", 0x8d000000, 0xff000000, P_Srr_rSr },
+ { "mpyi3_subi3", 0x8d000000, 0xff000000, P_rSr_rSr },
+ { "mpyi3_subi3", 0x8e000000, 0xff000000, P_rrr_SSr },
+ { "mpyi3_subi3", 0x8f000000, 0xff000000, P_Srr_Srr },
+ { "mpyi3_subi3", 0x8f000000, 0xff000000, P_rSr_Srr },
+ { "negf_stf", 0xe2000000, 0xfe000000, P_Sr_rS },
+ { "negi_sti", 0xe4000000, 0xfe000000, P_Sr_rS },
+ { "not_sti", 0xe6000000, 0xfe000000, P_Sr_rS },
+ { "or3_sti", 0xe8000000, 0xfe000000, P_Srr_rS },
+ { "or3_sti", 0xe8000000, 0xfe000000, P_rSr_rS },
+ { "stf_absf", 0xc8000000, 0xfe000000, Q_rS_Sr },
+ { "stf_addf", 0xcc000000, 0xfe000000, Q_rS_Srr },
+ { "stf_addf", 0xcc000000, 0xfe000000, Q_rS_rSr },
+ { "stf_addf3", 0xcc000000, 0xfe000000, Q_rS_Srr },
+ { "stf_addf3", 0xcc000000, 0xfe000000, Q_rS_rSr },
+ { "stf_float", 0xd6000000, 0xfe000000, Q_rS_Sr },
+ { "stf_mpyf", 0xde000000, 0xfe000000, Q_rS_Srr },
+ { "stf_mpyf", 0xde000000, 0xfe000000, Q_rS_rSr },
+ { "stf_mpyf3", 0xde000000, 0xfe000000, Q_rS_Srr },
+ { "stf_mpyf3", 0xde000000, 0xfe000000, Q_rS_rSr },
+ { "stf_negf", 0xe2000000, 0xfe000000, Q_rS_Sr },
+ { "stf_stf", 0xc0000000, 0xfe000000, P_rS_rS },
+ { "stf1_stf2", 0xc0000000, 0xfe000000, Q_rS_rS }, /* synonym */
+ { "stf2_stf1", 0xc0000000, 0xfe000000, P_rS_rS }, /* synonym */
+ { "stf_subf", 0xea000000, 0xfe000000, Q_rS_rSr },
+ { "stf_subf3", 0xea000000, 0xfe000000, Q_rS_rSr },
+ { "sti_absi", 0xca000000, 0xfe000000, Q_rS_Sr },
+ { "sti_addi", 0xce000000, 0xfe000000, Q_rS_Srr },
+ { "sti_addi", 0xce000000, 0xfe000000, Q_rS_rSr },
+ { "sti_addi3", 0xce000000, 0xfe000000, Q_rS_Srr },
+ { "sti_addi3", 0xce000000, 0xfe000000, Q_rS_rSr },
+ { "sti_and", 0xd0000000, 0xfe000000, Q_rS_Srr },
+ { "sti_and", 0xd0000000, 0xfe000000, Q_rS_rSr },
+ { "sti_and3", 0xd0000000, 0xfe000000, Q_rS_Srr },
+ { "sti_and3", 0xd0000000, 0xfe000000, Q_rS_rSr },
+ { "sti_ash3", 0xd2000000, 0xfe000000, Q_rS_rSr },
+ { "sti_fix", 0xd4000000, 0xfe000000, Q_rS_Sr },
+ { "sti_ldi", 0xda000000, 0xfe000000, Q_rS_Sr },
+ { "sti_lsh", 0xdc000000, 0xfe000000, Q_rS_rSr },
+ { "sti_lsh3", 0xdc000000, 0xfe000000, Q_rS_rSr },
+ { "sti_mpyi", 0xe0000000, 0xfe000000, Q_rS_Srr },
+ { "sti_mpyi", 0xe0000000, 0xfe000000, Q_rS_rSr },
+ { "sti_mpyi3", 0xe0000000, 0xfe000000, Q_rS_Srr },
+ { "sti_mpyi3", 0xe0000000, 0xfe000000, Q_rS_rSr },
+ { "sti_negi", 0xe4000000, 0xfe000000, Q_rS_Sr },
+ { "sti_not", 0xe6000000, 0xfe000000, Q_rS_Sr },
+ { "sti_or", 0xe8000000, 0xfe000000, Q_rS_Srr },
+ { "sti_or", 0xe8000000, 0xfe000000, Q_rS_rSr },
+ { "sti_or3", 0xe8000000, 0xfe000000, Q_rS_Srr },
+ { "sti_or3", 0xe8000000, 0xfe000000, Q_rS_rSr },
+ { "sti_sti", 0xc2000000, 0xfe000000, P_rS_rS },
+ { "sti1_sti2", 0xc2000000, 0xfe000000, Q_rS_rS }, /* synonym */
+ { "sti2_sti1", 0xc2000000, 0xfe000000, P_rS_rS }, /* synonym */
+ { "sti_subi", 0xec000000, 0xfe000000, Q_rS_rSr },
+ { "sti_subi3", 0xec000000, 0xfe000000, Q_rS_rSr },
+ { "sti_xor", 0xee000000, 0xfe000000, Q_rS_Srr },
+ { "sti_xor", 0xee000000, 0xfe000000, Q_rS_rSr },
+ { "sti_xor3", 0xee000000, 0xfe000000, Q_rS_Srr },
+ { "sti_xor3", 0xee000000, 0xfe000000, Q_rS_rSr },
+ { "subf_mpyf", 0x84000000, 0xff000000, Q_rrr_SSr },
+ { "subf_mpyf", 0x85000000, 0xff000000, Q_rSr_Srr },
+ { "subf_mpyf", 0x85000000, 0xff000000, Q_rSr_rSr },
+ { "subf_mpyf", 0x86000000, 0xff000000, Q_SSr_rrr },
+ { "subf_mpyf", 0x87000000, 0xff000000, Q_Srr_Srr },
+ { "subf_mpyf", 0x87000000, 0xff000000, Q_Srr_rSr },
+ { "subf3_mpyf3", 0x84000000, 0xff000000, Q_rrr_SSr },
+ { "subf3_mpyf3", 0x85000000, 0xff000000, Q_rSr_Srr },
+ { "subf3_mpyf3", 0x85000000, 0xff000000, Q_rSr_rSr },
+ { "subf3_mpyf3", 0x86000000, 0xff000000, Q_SSr_rrr },
+ { "subf3_mpyf3", 0x87000000, 0xff000000, Q_Srr_Srr },
+ { "subf3_mpyf3", 0x87000000, 0xff000000, Q_Srr_rSr },
+ { "subf_stf", 0xea000000, 0xfe000000, P_rSr_rS },
+ { "subf3_stf", 0xea000000, 0xfe000000, P_rSr_rS },
+ { "subi_mpyi", 0x8c000000, 0xff000000, Q_rrr_SSr },
+ { "subi_mpyi", 0x8d000000, 0xff000000, Q_rSr_Srr },
+ { "subi_mpyi", 0x8d000000, 0xff000000, Q_rSr_rSr },
+ { "subi_mpyi", 0x8e000000, 0xff000000, Q_SSr_rrr },
+ { "subi_mpyi", 0x8f000000, 0xff000000, Q_Srr_Srr },
+ { "subi_mpyi", 0x8f000000, 0xff000000, Q_Srr_rSr },
+ { "subi3_mpyi3", 0x8c000000, 0xff000000, Q_rrr_SSr },
+ { "subi3_mpyi3", 0x8d000000, 0xff000000, Q_rSr_Srr },
+ { "subi3_mpyi3", 0x8d000000, 0xff000000, Q_rSr_rSr },
+ { "subi3_mpyi3", 0x8e000000, 0xff000000, Q_SSr_rrr },
+ { "subi3_mpyi3", 0x8f000000, 0xff000000, Q_Srr_Srr },
+ { "subi3_mpyi3", 0x8f000000, 0xff000000, Q_Srr_rSr },
+ { "subi_sti", 0xec000000, 0xfe000000, P_rSr_rS },
+ { "subi3_sti", 0xec000000, 0xfe000000, P_rSr_rS },
+ { "xor_sti", 0xee000000, 0xfe000000, P_Srr_rS },
+ { "xor_sti", 0xee000000, 0xfe000000, P_rSr_rS },
+ { "xor3_sti", 0xee000000, 0xfe000000, P_Srr_rS },
+ { "xor3_sti", 0xee000000, 0xfe000000, P_rSr_rS },
+
+ { "absf", 0x00000000, 0xffe00000, G_r_r },
+ { "absf", 0x00200000, 0xffe00000, G_T_r },
+ { "absf", 0x00400000, 0xffe00000, G_Q_r },
+ { "absf", 0x00600000, 0xffe00000, G_F_r },
+ { "absi", 0x00800000, 0xffe00000, G_r_r },
+ { "absi", 0x00a00000, 0xffe00000, G_T_r },
+ { "absi", 0x00c00000, 0xffe00000, G_Q_r },
+ { "absi", 0x00e00000, 0xffe00000, G_I_r },
+ { "addc", 0x01000000, 0xffe00000, G_r_r },
+ { "addc", 0x01200000, 0xffe00000, G_T_r },
+ { "addc", 0x01400000, 0xffe00000, G_Q_r },
+ { "addc", 0x01600000, 0xffe00000, G_I_r },
+ { "addc", 0x20000000, 0xffe00000, T_rrr },
+ { "addc", 0x20200000, 0xffe00000, T_Srr },
+ { "addc", 0x20400000, 0xffe00000, T_rSr },
+ { "addc", 0x20600000, 0xffe00000, T_SSr },
+ { "addc", 0x30000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "addc", 0x30000000, 0xffe00000, T_rJr }, /* C4x */
+ { "addc", 0x30200000, 0xffe00000, T_rRr }, /* C4x */
+ { "addc", 0x30200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "addc", 0x30400000, 0xffe00000, T_JRr }, /* C4x */
+ { "addc", 0x30400000, 0xffe00000, T_RJr }, /* C4x */
+ { "addc", 0x30600000, 0xffe00000, T_RRr }, /* C4x */
+ { "addc3", 0x20000000, 0xffe00000, T_rrr },
+ { "addc3", 0x20200000, 0xffe00000, T_Srr },
+ { "addc3", 0x20400000, 0xffe00000, T_rSr },
+ { "addc3", 0x20600000, 0xffe00000, T_SSr },
+ { "addc3", 0x30000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "addc3", 0x30000000, 0xffe00000, T_rJr }, /* C4x */
+ { "addc3", 0x30200000, 0xffe00000, T_rRr }, /* C4x */
+ { "addc3", 0x30200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "addc3", 0x30400000, 0xffe00000, T_JRr }, /* C4x */
+ { "addc3", 0x30400000, 0xffe00000, T_RJr }, /* C4x */
+ { "addc3", 0x30600000, 0xffe00000, T_RRr }, /* C4x */
+ { "addf", 0x01800000, 0xffe00000, G_r_r },
+ { "addf", 0x01a00000, 0xffe00000, G_T_r },
+ { "addf", 0x01c00000, 0xffe00000, G_Q_r },
+ { "addf", 0x01e00000, 0xffe00000, G_F_r },
+ { "addf", 0x20800000, 0xffe00000, T_rrr },
+ { "addf", 0x20a00000, 0xffe00000, T_Srr },
+ { "addf", 0x20c00000, 0xffe00000, T_rSr },
+ { "addf", 0x20e00000, 0xffe00000, T_SSr },
+ { "addf", 0x30800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "addf", 0x30800000, 0xffe00000, T_rJr }, /* C4x */
+ { "addf", 0x30a00000, 0xffe00000, T_rRr }, /* C4x */
+ { "addf", 0x30a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "addf", 0x30c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "addf", 0x30c00000, 0xffe00000, T_RJr }, /* C4x */
+ { "addf", 0x30e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "addf3", 0x20800000, 0xffe00000, T_rrr },
+ { "addf3", 0x20a00000, 0xffe00000, T_Srr },
+ { "addf3", 0x20c00000, 0xffe00000, T_rSr },
+ { "addf3", 0x20e00000, 0xffe00000, T_SSr },
+ { "addf3", 0x30800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "addf3", 0x30800000, 0xffe00000, T_rJr }, /* C4x */
+ { "addf3", 0x30a00000, 0xffe00000, T_rRr }, /* C4x */
+ { "addf3", 0x30a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "addf3", 0x30c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "addf3", 0x30c00000, 0xffe00000, T_RJr }, /* C4x */
+ { "addf3", 0x30e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "addi", 0x02000000, 0xffe00000, G_r_r },
+ { "addi", 0x02200000, 0xffe00000, G_T_r },
+ { "addi", 0x02400000, 0xffe00000, G_Q_r },
+ { "addi", 0x02600000, 0xffe00000, G_I_r },
+ { "addi", 0x21000000, 0xffe00000, T_rrr },
+ { "addi", 0x21200000, 0xffe00000, T_Srr },
+ { "addi", 0x21400000, 0xffe00000, T_rSr },
+ { "addi", 0x21600000, 0xffe00000, T_SSr },
+ { "addi", 0x31000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "addi", 0x31000000, 0xffe00000, T_rJr }, /* C4x */
+ { "addi", 0x31200000, 0xffe00000, T_rRr }, /* C4x */
+ { "addi", 0x31200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "addi", 0x31400000, 0xffe00000, T_JRr }, /* C4x */
+ { "addi", 0x31400000, 0xffe00000, T_RJr }, /* C4x */
+ { "addi", 0x31600000, 0xffe00000, T_RRr }, /* C4x */
+ { "addi3", 0x21000000, 0xffe00000, T_rrr },
+ { "addi3", 0x21200000, 0xffe00000, T_Srr },
+ { "addi3", 0x21400000, 0xffe00000, T_rSr },
+ { "addi3", 0x21600000, 0xffe00000, T_SSr },
+ { "addi3", 0x31000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "addi3", 0x31000000, 0xffe00000, T_rJr }, /* C4x */
+ { "addi3", 0x31200000, 0xffe00000, T_rRr }, /* C4x */
+ { "addi3", 0x31200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "addi3", 0x31400000, 0xffe00000, T_JRr }, /* C4x */
+ { "addi3", 0x31400000, 0xffe00000, T_RJr }, /* C4x */
+ { "addi3", 0x31600000, 0xffe00000, T_RRr }, /* C4x */
+ { "and", 0x02800000, 0xffe00000, G_r_r },
+ { "and", 0x02a00000, 0xffe00000, G_T_r },
+ { "and", 0x02c00000, 0xffe00000, G_Q_r },
+ { "and", 0x02e00000, 0xffe00000, G_L_r },
+ { "and", 0x21800000, 0xffe00000, T_rrr },
+ { "and", 0x21a00000, 0xffe00000, T_Srr },
+ { "and", 0x21c00000, 0xffe00000, T_rSr },
+ { "and", 0x21e00000, 0xffe00000, T_SSr },
+ { "and", 0x31800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "and", 0x31800000, 0xffe00000, T_rJr }, /* C4x */
+ { "and", 0x31a00000, 0xffe00000, T_rRr }, /* C4x */
+ { "and", 0x31a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "and", 0x31c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "and", 0x31c00000, 0xffe00000, T_RJr }, /* C4x */
+ { "and", 0x31e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "and3", 0x21800000, 0xffe00000, T_rrr },
+ { "and3", 0x21a00000, 0xffe00000, T_Srr },
+ { "and3", 0x21c00000, 0xffe00000, T_rSr },
+ { "and3", 0x21e00000, 0xffe00000, T_SSr },
+ { "and3", 0x31800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "and3", 0x31800000, 0xffe00000, T_rJr }, /* C4x */
+ { "and3", 0x31a00000, 0xffe00000, T_rRr }, /* C4x */
+ { "and3", 0x31a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "and3", 0x31c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "and3", 0x31c00000, 0xffe00000, T_RJr }, /* C4x */
+ { "and3", 0x31e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "andn", 0x03000000, 0xffe00000, G_r_r },
+ { "andn", 0x03200000, 0xffe00000, G_T_r },
+ { "andn", 0x03400000, 0xffe00000, G_Q_r },
+ { "andn", 0x03600000, 0xffe00000, G_L_r },
+ { "andn", 0x22000000, 0xffe00000, T_rrr },
+ { "andn", 0x22200000, 0xffe00000, T_Srr },
+ { "andn", 0x22400000, 0xffe00000, T_rSr },
+ { "andn", 0x22600000, 0xffe00000, T_SSr },
+ { "andn", 0x32000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "andn", 0x32200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "andn", 0x32400000, 0xffe00000, T_JRr }, /* C4x */
+ { "andn", 0x32600000, 0xffe00000, T_RRr }, /* C4x */
+ { "andn3", 0x22000000, 0xffe00000, T_rrr },
+ { "andn3", 0x22200000, 0xffe00000, T_Srr },
+ { "andn3", 0x22400000, 0xffe00000, T_rSr },
+ { "andn3", 0x22600000, 0xffe00000, T_SSr },
+ { "andn3", 0x32000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "andn3", 0x32200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "andn3", 0x32400000, 0xffe00000, T_JRr }, /* C4x */
+ { "andn3", 0x32600000, 0xffe00000, T_RRr }, /* C4x */
+ { "ash", 0x03800000, 0xffe00000, G_r_r },
+ { "ash", 0x03a00000, 0xffe00000, G_T_r },
+ { "ash", 0x03c00000, 0xffe00000, G_Q_r },
+ { "ash", 0x03e00000, 0xffe00000, G_I_r },
+ { "ash", 0x22800000, 0xffe00000, T_rrr },
+ { "ash", 0x22a00000, 0xffe00000, T_Srr },
+ { "ash", 0x22c00000, 0xffe00000, T_rSr },
+ { "ash", 0x22e00000, 0xffe00000, T_SSr },
+ { "ash", 0x32800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "ash", 0x32a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "ash", 0x32c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "ash", 0x32e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "ash3", 0x22800000, 0xffe00000, T_rrr },
+ { "ash3", 0x22a00000, 0xffe00000, T_Srr },
+ { "ash3", 0x22c00000, 0xffe00000, T_rSr },
+ { "ash3", 0x22e00000, 0xffe00000, T_SSr },
+ { "ash3", 0x32800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "ash3", 0x32a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "ash3", 0x32c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "ash3", 0x32e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "bB", 0x68000000, 0xffe00000, "Q" },
+ { "bB", 0x6a000000, 0xffe00000, "P" },
+ { "b", 0x68000000, 0xffe00000, "Q" }, /* synonym for bu */
+ { "b", 0x6a000000, 0xffe00000, "P" }, /* synonym for bu */
+ { "bBd", 0x68200000, 0xffe00000, "Q" },
+ { "bBd", 0x6a200000, 0xffe00000, "P" },
+ { "bd", 0x68200000, 0xffe00000, "Q" }, /* synonym for bud */
+ { "bd", 0x6a200000, 0xffe00000, "P" }, /* synonym for bud */
+ { "br", 0x60000000, 0xff000000, "B" },
+ { "brd", 0x61000000, 0xff000000, "B" },
+ { "call", 0x62000000, 0xff000000, "B" },
+ { "callB", 0x70000000, 0xffe00000, "Q" },
+ { "callB", 0x72000000, 0xffe00000, "P" },
+ { "cmpf", 0x04000000, 0xffe00000, G_r_r },
+ { "cmpf", 0x04200000, 0xffe00000, G_T_r },
+ { "cmpf", 0x04400000, 0xffe00000, G_Q_r },
+ { "cmpf", 0x04600000, 0xffe00000, G_F_r },
+ { "cmpf", 0x23000000, 0xffe00000, T_rr_ },
+ { "cmpf", 0x23200000, 0xffe00000, T_rS_ },
+ { "cmpf", 0x23400000, 0xffe00000, T_Sr_ },
+ { "cmpf", 0x23600000, 0xffe00000, T_SS_ },
+ { "cmpf", 0x33200000, 0xffe00000, T_Rr_ }, /* C4x */
+ { "cmpf", 0x33600000, 0xffe00000, T_RR_ }, /* C4x */
+ { "cmpf3", 0x23000000, 0xffe00000, T_rr_ },
+ { "cmpf3", 0x23200000, 0xffe00000, T_rS_ },
+ { "cmpf3", 0x23400000, 0xffe00000, T_Sr_ },
+ { "cmpf3", 0x23600000, 0xffe00000, T_SS_ },
+ { "cmpf3", 0x33200000, 0xffe00000, T_Rr_ }, /* C4x */
+ { "cmpf3", 0x33600000, 0xffe00000, T_RR_ }, /* C4x */
+ { "cmpi", 0x04800000, 0xffe00000, G_r_r },
+ { "cmpi", 0x04a00000, 0xffe00000, G_T_r },
+ { "cmpi", 0x04c00000, 0xffe00000, G_Q_r },
+ { "cmpi", 0x04e00000, 0xffe00000, G_I_r },
+ { "cmpi", 0x23800000, 0xffe00000, T_rr_ },
+ { "cmpi", 0x23a00000, 0xffe00000, T_rS_ },
+ { "cmpi", 0x23c00000, 0xffe00000, T_Sr_ },
+ { "cmpi", 0x23e00000, 0xffe00000, T_SS_ },
+ { "cmpi", 0x33800000, 0xffe00000, T_Jr_ }, /* C4x */
+ { "cmpi", 0x33a00000, 0xffe00000, T_Rr_ }, /* C4x */
+ { "cmpi", 0x33c00000, 0xffe00000, T_JR_ }, /* C4x */
+ { "cmpi", 0x33e00000, 0xffe00000, T_RR_ }, /* C4x */
+ { "cmpi3", 0x23800000, 0xffe00000, T_rr_ },
+ { "cmpi3", 0x23a00000, 0xffe00000, T_rS_ },
+ { "cmpi3", 0x23c00000, 0xffe00000, T_Sr_ },
+ { "cmpi3", 0x23e00000, 0xffe00000, T_SS_ },
+ { "cmpi3", 0x33800000, 0xffe00000, T_Jr_ }, /* C4x */
+ { "cmpi3", 0x33a00000, 0xffe00000, T_Rr_ }, /* C4x */
+ { "cmpi3", 0x33c00000, 0xffe00000, T_JR_ }, /* C4x */
+ { "cmpi3", 0x33e00000, 0xffe00000, T_RR_ }, /* C4x */
+ { "dbB", 0x6c000000, 0xfe200000, "A,Q" },
+ { "dbB", 0x6e000000, 0xfe200000, "A,P" },
+ { "db", 0x6c000000, 0xfe200000, "A,Q" }, /* synonym for dbu */
+ { "db", 0x6e000000, 0xfe200000, "A,P" }, /* synonym for dbu */
+ { "dbBd", 0x6c200000, 0xfe200000, "A,Q" },
+ { "dbBd", 0x6e200000, 0xfe200000, "A,P" },
+ { "dbd", 0x6c200000, 0xfe200000, "A,Q" }, /* synonym for dbud */
+ { "dbd", 0x6e200000, 0xfe200000, "A,P" }, /* synonym for dbud */
+ { "fix", 0x05000000, 0xffe00000, G_r_r },
+ { "fix", 0x05200000, 0xffe00000, G_T_r },
+ { "fix", 0x05400000, 0xffe00000, G_Q_r },
+ { "fix", 0x05600000, 0xffe00000, G_F_r },
+ { "float", 0x05800000, 0xffe00000, G_r_r },
+ { "float", 0x05a00000, 0xffe00000, G_T_r },
+ { "float", 0x05c00000, 0xffe00000, G_Q_r },
+ { "float", 0x05e00000, 0xffe00000, G_I_r },
+ { "iack", 0x1b200000, 0xffe00000, "@" },
+ { "iack", 0x1b400000, 0xffe00000, "*" },
+ { "idle", 0x06000000, 0xffffffff, "" },
+ { "lde", 0x06800000, 0xffe00000, G_r_r },
+ { "lde", 0x06a00000, 0xffe00000, G_T_r },
+ { "lde", 0x06c00000, 0xffe00000, G_Q_r },
+ { "lde", 0x06e00000, 0xffe00000, G_F_r },
+ { "ldf", 0x07000000, 0xffe00000, G_r_r },
+ { "ldf", 0x07200000, 0xffe00000, G_T_r },
+ { "ldf", 0x07400000, 0xffe00000, G_Q_r },
+ { "ldf", 0x07600000, 0xffe00000, G_F_r },
+ { "ldfC", 0x40000000, 0xf0600000, G_r_r },
+ { "ldfC", 0x40200000, 0xf0600000, G_T_r },
+ { "ldfC", 0x40400000, 0xf0600000, G_Q_r },
+ { "ldfC", 0x40600000, 0xf0600000, G_F_r },
+ { "ldfi", 0x07a00000, 0xffe00000, G_T_r },
+ { "ldfi", 0x07c00000, 0xffe00000, G_Q_r },
+ { "ldi", 0x08000000, 0xffe00000, G_r_r },
+ { "ldi", 0x08200000, 0xffe00000, G_T_r },
+ { "ldi", 0x08400000, 0xffe00000, G_Q_r },
+ { "ldi", 0x08600000, 0xffe00000, G_I_r },
+ { "ldiC", 0x50000000, 0xf0600000, G_r_r },
+ { "ldiC", 0x50200000, 0xf0600000, G_T_r },
+ { "ldiC", 0x50400000, 0xf0600000, G_Q_r },
+ { "ldiC", 0x50600000, 0xf0600000, G_I_r },
+ { "ldii", 0x08a00000, 0xffe00000, G_T_r },
+ { "ldii", 0x08c00000, 0xffe00000, G_Q_r },
+ { "ldp", 0x50700000, 0xffff0000, "#" }, /* synonym for ldiu #,dp */
+ { "ldm", 0x09000000, 0xffe00000, G_r_r },
+ { "ldm", 0x09200000, 0xffe00000, G_T_r },
+ { "ldm", 0x09400000, 0xffe00000, G_Q_r },
+ { "ldm", 0x09600000, 0xffe00000, G_F_r },
+ { "lsh", 0x09800000, 0xffe00000, G_r_r },
+ { "lsh", 0x09a00000, 0xffe00000, G_T_r },
+ { "lsh", 0x09c00000, 0xffe00000, G_Q_r },
+ { "lsh", 0x09e00000, 0xffe00000, G_I_r },
+ { "lsh", 0x24000000, 0xffe00000, T_rrr },
+ { "lsh", 0x24200000, 0xffe00000, T_Srr },
+ { "lsh", 0x24400000, 0xffe00000, T_rSr },
+ { "lsh", 0x24600000, 0xffe00000, T_SSr },
+ { "lsh", 0x34000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "lsh", 0x34200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "lsh", 0x34400000, 0xffe00000, T_JRr }, /* C4x */
+ { "lsh", 0x34600000, 0xffe00000, T_RRr }, /* C4x */
+ { "lsh3", 0x24000000, 0xffe00000, T_rrr },
+ { "lsh3", 0x24200000, 0xffe00000, T_Srr },
+ { "lsh3", 0x24400000, 0xffe00000, T_rSr },
+ { "lsh3", 0x24600000, 0xffe00000, T_SSr },
+ { "lsh3", 0x34000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "lsh3", 0x34200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "lsh3", 0x34400000, 0xffe00000, T_JRr }, /* C4x */
+ { "lsh3", 0x34600000, 0xffe00000, T_RRr }, /* C4x */
+ { "mpyf", 0x0a000000, 0xffe00000, G_r_r },
+ { "mpyf", 0x0a200000, 0xffe00000, G_T_r },
+ { "mpyf", 0x0a400000, 0xffe00000, G_Q_r },
+ { "mpyf", 0x0a600000, 0xffe00000, G_F_r },
+ { "mpyf", 0x24800000, 0xffe00000, T_rrr },
+ { "mpyf", 0x24a00000, 0xffe00000, T_Srr },
+ { "mpyf", 0x24c00000, 0xffe00000, T_rSr },
+ { "mpyf", 0x24e00000, 0xffe00000, T_SSr },
+ { "mpyf", 0x34800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "mpyf", 0x34800000, 0xffe00000, T_rJr }, /* C4x */
+ { "mpyf", 0x34a00000, 0xffe00000, T_rRr }, /* C4x */
+ { "mpyf", 0x34a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "mpyf", 0x34c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "mpyf", 0x34c00000, 0xffe00000, T_RJr }, /* C4x */
+ { "mpyf", 0x34e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "mpyf3", 0x24800000, 0xffe00000, T_rrr },
+ { "mpyf3", 0x24a00000, 0xffe00000, T_Srr },
+ { "mpyf3", 0x24c00000, 0xffe00000, T_rSr },
+ { "mpyf3", 0x24e00000, 0xffe00000, T_SSr },
+ { "mpyf3", 0x34800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "mpyf3", 0x34800000, 0xffe00000, T_rJr }, /* C4x */
+ { "mpyf3", 0x34a00000, 0xffe00000, T_rRr }, /* C4x */
+ { "mpyf3", 0x34a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "mpyf3", 0x34c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "mpyf3", 0x34c00000, 0xffe00000, T_RJr }, /* C4x */
+ { "mpyf3", 0x34e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "mpyi", 0x0a800000, 0xffe00000, G_r_r },
+ { "mpyi", 0x0aa00000, 0xffe00000, G_T_r },
+ { "mpyi", 0x0ac00000, 0xffe00000, G_Q_r },
+ { "mpyi", 0x0ae00000, 0xffe00000, G_I_r },
+ { "mpyi", 0x25000000, 0xffe00000, T_rrr },
+ { "mpyi", 0x25200000, 0xffe00000, T_Srr },
+ { "mpyi", 0x25400000, 0xffe00000, T_rSr },
+ { "mpyi", 0x25600000, 0xffe00000, T_SSr },
+ { "mpyi", 0x35000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "mpyi", 0x35000000, 0xffe00000, T_rJr }, /* C4x */
+ { "mpyi", 0x35200000, 0xffe00000, T_rRr }, /* C4x */
+ { "mpyi", 0x35200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "mpyi", 0x35400000, 0xffe00000, T_JRr }, /* C4x */
+ { "mpyi", 0x35400000, 0xffe00000, T_RJr }, /* C4x */
+ { "mpyi", 0x35600000, 0xffe00000, T_RRr }, /* C4x */
+ { "mpyi3", 0x25000000, 0xffe00000, T_rrr },
+ { "mpyi3", 0x25200000, 0xffe00000, T_Srr },
+ { "mpyi3", 0x25400000, 0xffe00000, T_rSr },
+ { "mpyi3", 0x25600000, 0xffe00000, T_SSr },
+ { "mpyi3", 0x35000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "mpyi3", 0x35000000, 0xffe00000, T_rJr }, /* C4x */
+ { "mpyi3", 0x35200000, 0xffe00000, T_rRr }, /* C4x */
+ { "mpyi3", 0x35200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "mpyi3", 0x35400000, 0xffe00000, T_JRr }, /* C4x */
+ { "mpyi3", 0x35400000, 0xffe00000, T_RJr }, /* C4x */
+ { "mpyi3", 0x35600000, 0xffe00000, T_RRr }, /* C4x */
+ { "negb", 0x0b000000, 0xffe00000, G_r_r },
+ { "negb", 0x0b200000, 0xffe00000, G_T_r },
+ { "negb", 0x0b400000, 0xffe00000, G_Q_r },
+ { "negb", 0x0b600000, 0xffe00000, G_I_r },
+ { "negf", 0x0b800000, 0xffe00000, G_r_r },
+ { "negf", 0x0ba00000, 0xffe00000, G_T_r },
+ { "negf", 0x0bc00000, 0xffe00000, G_Q_r },
+ { "negf", 0x0be00000, 0xffe00000, G_F_r },
+ { "negi", 0x0c000000, 0xffe00000, G_r_r },
+ { "negi", 0x0c200000, 0xffe00000, G_T_r },
+ { "negi", 0x0c400000, 0xffe00000, G_Q_r },
+ { "negi", 0x0c600000, 0xffe00000, G_I_r },
+ { "nop", 0x0c800000, 0xffe00000, "Q" },
+ { "nop", 0x0cc00000, 0xffe00000, "*" },
+ { "nop", 0x0c800000, 0xffe00000, "" },
+ { "norm", 0x0d000000, 0xffe00000, G_r_r },
+ { "norm", 0x0d200000, 0xffe00000, G_T_r },
+ { "norm", 0x0d400000, 0xffe00000, G_Q_r },
+ { "norm", 0x0d600000, 0xffe00000, G_F_r },
+ { "not", 0x0d800000, 0xffe00000, G_r_r },
+ { "not", 0x0da00000, 0xffe00000, G_T_r },
+ { "not", 0x0dc00000, 0xffe00000, G_Q_r },
+ { "not", 0x0de00000, 0xffe00000, G_L_r },
+ { "or", 0x10000000, 0xffe00000, G_r_r },
+ { "or", 0x10200000, 0xffe00000, G_T_r },
+ { "or", 0x10400000, 0xffe00000, G_Q_r },
+ { "or", 0x10600000, 0xffe00000, G_L_r },
+ { "or", 0x25800000, 0xffe00000, T_rrr },
+ { "or", 0x25a00000, 0xffe00000, T_Srr },
+ { "or", 0x25c00000, 0xffe00000, T_rSr },
+ { "or", 0x25e00000, 0xffe00000, T_SSr },
+ { "or", 0x35800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "or", 0x35800000, 0xffe00000, T_rJr }, /* C4x */
+ { "or", 0x35a00000, 0xffe00000, T_rRr }, /* C4x */
+ { "or", 0x35a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "or", 0x35c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "or", 0x35c00000, 0xffe00000, T_RJr }, /* C4x */
+ { "or", 0x35e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "or3", 0x25800000, 0xffe00000, T_rrr },
+ { "or3", 0x25a00000, 0xffe00000, T_Srr },
+ { "or3", 0x25c00000, 0xffe00000, T_rSr },
+ { "or3", 0x25e00000, 0xffe00000, T_SSr },
+ { "or3", 0x35800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "or3", 0x35800000, 0xffe00000, T_rJr }, /* C4x */
+ { "or3", 0x35a00000, 0xffe00000, T_rRr }, /* C4x */
+ { "or3", 0x35a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "or3", 0x35c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "or3", 0x35c00000, 0xffe00000, T_RJr }, /* C4x */
+ { "or3", 0x35e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "pop", 0x0e200000, 0xffe00000, "R" },
+ { "popf", 0x0ea00000, 0xffe00000, "R" },
+ { "push", 0x0f200000, 0xffe00000, "R" },
+ { "pushf", 0x0fa00000, 0xffe00000, "R" },
+ { "retiB", 0x78000000, 0xffe00000, "" },
+ { "reti", 0x78000000, 0xffe00000, "" }, /* synonym for reti */
+ { "retsB", 0x78800000, 0xffe00000, "" },
+ { "rets", 0x78800000, 0xffe00000, "" }, /* synonym for rets */
+ { "rnd", 0x11000000, 0xffe00000, G_r_r },
+ { "rnd", 0x11200000, 0xffe00000, G_T_r },
+ { "rnd", 0x11400000, 0xffe00000, G_Q_r },
+ { "rnd", 0x11600000, 0xffe00000, G_F_r },
+ { "rol", 0x11e00000, 0xffe00000, "R" },
+ { "rolc", 0x12600000, 0xffe00000, "R" },
+ { "ror", 0x12e00000, 0xffe00000, "R" },
+ { "rorc", 0x13600000, 0xffe00000, "R" },
+ { "rptb", 0x64000000, 0xff000000, "B" },
+ { "rptb", 0x79000000, 0xff000000, "Q" }, /* C4x */
+ { "rpts", 0x139b0000, 0xffff0000, "Q" },
+ { "rpts", 0x13bb0000, 0xffff0000, "@" },
+ { "rpts", 0x13db0000, 0xffff0000, "*" },
+ { "rpts", 0x13fb0000, 0xffff0000, "U" },
+ { "sigi", 0x16000000, 0xffe00000, "" }, /* C3x */
+ { "sigi", 0x16200000, 0xffe00000, G_T_r }, /* C4x */
+ { "sigi", 0x16400000, 0xffe00000, G_Q_r }, /* C4x */
+ { "stf", 0x14200000, 0xffe00000, "R,@" },
+ { "stf", 0x14400000, 0xffe00000, "R,*" },
+ { "stfi", 0x14a00000, 0xffe00000, "R,@" },
+ { "stfi", 0x14c00000, 0xffe00000, "R,*" },
+ { "sti", 0x15000000, 0xffe00000, "T,@" }, /* C4x only */
+ { "sti", 0x15200000, 0xffe00000, "R,@" },
+ { "sti", 0x15400000, 0xffe00000, "R,*" },
+ { "sti", 0x15600000, 0xffe00000, "T,*" }, /* C4x only */
+ { "stii", 0x15a00000, 0xffe00000, "R,@" },
+ { "stii", 0x15c00000, 0xffe00000, "R,*" },
+ { "subb", 0x16800000, 0xffe00000, G_r_r },
+ { "subb", 0x16a00000, 0xffe00000, G_T_r },
+ { "subb", 0x16c00000, 0xffe00000, G_Q_r },
+ { "subb", 0x16e00000, 0xffe00000, G_I_r },
+ { "subb", 0x26000000, 0xffe00000, T_rrr },
+ { "subb", 0x26200000, 0xffe00000, T_Srr },
+ { "subb", 0x26400000, 0xffe00000, T_rSr },
+ { "subb", 0x26600000, 0xffe00000, T_SSr },
+ { "subb", 0x36000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "subb", 0x36200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "subb", 0x36400000, 0xffe00000, T_JRr }, /* C4x */
+ { "subb", 0x36600000, 0xffe00000, T_RRr }, /* C4x */
+ { "subb3", 0x26000000, 0xffe00000, T_rrr },
+ { "subb3", 0x26200000, 0xffe00000, T_Srr },
+ { "subb3", 0x26400000, 0xffe00000, T_rSr },
+ { "subb3", 0x26600000, 0xffe00000, T_SSr },
+ { "subb3", 0x36000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "subb3", 0x36200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "subb3", 0x36400000, 0xffe00000, T_JRr }, /* C4x */
+ { "subb3", 0x36600000, 0xffe00000, T_RRr }, /* C4x */
+ { "subc", 0x17000000, 0xffe00000, G_r_r },
+ { "subc", 0x17200000, 0xffe00000, G_T_r },
+ { "subc", 0x17400000, 0xffe00000, G_Q_r },
+ { "subc", 0x17600000, 0xffe00000, G_I_r },
+ { "subf", 0x17800000, 0xffe00000, G_r_r },
+ { "subf", 0x17a00000, 0xffe00000, G_T_r },
+ { "subf", 0x17c00000, 0xffe00000, G_Q_r },
+ { "subf", 0x17e00000, 0xffe00000, G_F_r },
+ { "subf", 0x26800000, 0xffe00000, T_rrr },
+ { "subf", 0x26a00000, 0xffe00000, T_Srr },
+ { "subf", 0x26c00000, 0xffe00000, T_rSr },
+ { "subf", 0x26e00000, 0xffe00000, T_SSr },
+ { "subf", 0x36800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "subf", 0x36a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "subf", 0x36c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "subf", 0x36e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "subf3", 0x26800000, 0xffe00000, T_rrr },
+ { "subf3", 0x26a00000, 0xffe00000, T_Srr },
+ { "subf3", 0x26c00000, 0xffe00000, T_rSr },
+ { "subf3", 0x26e00000, 0xffe00000, T_SSr },
+ { "subf3", 0x36800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "subf3", 0x36a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "subf3", 0x36c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "subf3", 0x36e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "subi", 0x18000000, 0xffe00000, G_r_r },
+ { "subi", 0x18200000, 0xffe00000, G_T_r },
+ { "subi", 0x18400000, 0xffe00000, G_Q_r },
+ { "subi", 0x18600000, 0xffe00000, G_I_r },
+ { "subi", 0x27000000, 0xffe00000, T_rrr },
+ { "subi", 0x27200000, 0xffe00000, T_Srr },
+ { "subi", 0x27400000, 0xffe00000, T_rSr },
+ { "subi", 0x27600000, 0xffe00000, T_SSr },
+ { "subi", 0x37000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "subi", 0x37200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "subi", 0x37400000, 0xffe00000, T_JRr }, /* C4x */
+ { "subi", 0x37600000, 0xffe00000, T_RRr }, /* C4x */
+ { "subi3", 0x27000000, 0xffe00000, T_rrr },
+ { "subi3", 0x27200000, 0xffe00000, T_Srr },
+ { "subi3", 0x27400000, 0xffe00000, T_rSr },
+ { "subi3", 0x27600000, 0xffe00000, T_SSr },
+ { "subi3", 0x37000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "subi3", 0x37200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "subi3", 0x37400000, 0xffe00000, T_JRr }, /* C4x */
+ { "subi3", 0x37600000, 0xffe00000, T_RRr }, /* C4x */
+ { "subrb", 0x18800000, 0xffe00000, G_r_r },
+ { "subrb", 0x18a00000, 0xffe00000, G_T_r },
+ { "subrb", 0x18c00000, 0xffe00000, G_Q_r },
+ { "subrb", 0x18e00000, 0xffe00000, G_I_r },
+ { "subrf", 0x19000000, 0xffe00000, G_r_r },
+ { "subrf", 0x19200000, 0xffe00000, G_T_r },
+ { "subrf", 0x19400000, 0xffe00000, G_Q_r },
+ { "subrf", 0x19600000, 0xffe00000, G_F_r },
+ { "subri", 0x19800000, 0xffe00000, G_r_r },
+ { "subri", 0x19a00000, 0xffe00000, G_T_r },
+ { "subri", 0x19c00000, 0xffe00000, G_Q_r },
+ { "subri", 0x19e00000, 0xffe00000, G_I_r },
+ { "swi", 0x66000000, 0xffffffff, "" },
+ { "trapB", 0x74000000, 0xffe00000, "V" },
+ { "trap", 0x74000000, 0xffe00000, "V" }, /* synonym for trapu */
+ { "tstb", 0x1a000000, 0xffe00000, G_r_r },
+ { "tstb", 0x1a200000, 0xffe00000, G_T_r },
+ { "tstb", 0x1a400000, 0xffe00000, G_Q_r },
+ { "tstb", 0x1a600000, 0xffe00000, G_L_r },
+ { "tstb", 0x27800000, 0xffe00000, T_rr_ },
+ { "tstb", 0x27a00000, 0xffe00000, T_rS_ },
+ { "tstb", 0x27c00000, 0xffe00000, T_Sr_ },
+ { "tstb", 0x27e00000, 0xffe00000, T_SS_ },
+ { "tstb", 0x37800000, 0xffe00000, T_Jr_ }, /* C4x */
+ { "tstb", 0x37800000, 0xffe00000, T_rJ_ }, /* C4x */
+ { "tstb", 0x37a00000, 0xffe00000, T_rR_ }, /* C4x */
+ { "tstb", 0x37a00000, 0xffe00000, T_Rr_ }, /* C4x */
+ { "tstb", 0x37c00000, 0xffe00000, T_JR_ }, /* C4x */
+ { "tstb", 0x37c00000, 0xffe00000, T_RJ_ }, /* C4x */
+ { "tstb", 0x37e00000, 0xffe00000, T_RR_ }, /* C4x */
+ { "tstb3", 0x27800000, 0xffe00000, T_rr_ },
+ { "tstb3", 0x27a00000, 0xffe00000, T_rS_ },
+ { "tstb3", 0x27c00000, 0xffe00000, T_Sr_ },
+ { "tstb3", 0x27e00000, 0xffe00000, T_SS_ },
+ { "tstb3", 0x37800000, 0xffe00000, T_Jr_ }, /* C4x */
+ { "tstb3", 0x37800000, 0xffe00000, T_rJ_ }, /* C4x */
+ { "tstb3", 0x37a00000, 0xffe00000, T_rR_ }, /* C4x */
+ { "tstb3", 0x37a00000, 0xffe00000, T_Rr_ }, /* C4x */
+ { "tstb3", 0x37c00000, 0xffe00000, T_JR_ }, /* C4x */
+ { "tstb3", 0x37c00000, 0xffe00000, T_RJ_ }, /* C4x */
+ { "tstb3", 0x37e00000, 0xffe00000, T_RR_ }, /* C4x */
+ { "xor", 0x1a800000, 0xffe00000, G_r_r },
+ { "xor", 0x1aa00000, 0xffe00000, G_T_r },
+ { "xor", 0x1ac00000, 0xffe00000, G_Q_r },
+ { "xor", 0x1ae00000, 0xffe00000, G_L_r },
+ { "xor", 0x28000000, 0xffe00000, T_rrr },
+ { "xor", 0x28200000, 0xffe00000, T_Srr },
+ { "xor", 0x28400000, 0xffe00000, T_rSr },
+ { "xor", 0x28600000, 0xffe00000, T_SSr },
+ { "xor", 0x38000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "xor", 0x38000000, 0xffe00000, T_rJr }, /* C4x */
+ { "xor", 0x38200000, 0xffe00000, T_rRr }, /* C4x */
+ { "xor", 0x38200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "xor", 0x3c400000, 0xffe00000, T_JRr }, /* C4x */
+ { "xor", 0x3c400000, 0xffe00000, T_RJr }, /* C4x */
+ { "xor", 0x3c600000, 0xffe00000, T_RRr }, /* C4x */
+ { "xor3", 0x28000000, 0xffe00000, T_rrr },
+ { "xor3", 0x28200000, 0xffe00000, T_Srr },
+ { "xor3", 0x28400000, 0xffe00000, T_rSr },
+ { "xor3", 0x28600000, 0xffe00000, T_SSr },
+ { "xor3", 0x38000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "xor3", 0x38000000, 0xffe00000, T_rJr }, /* C4x */
+ { "xor3", 0x38200000, 0xffe00000, T_rRr }, /* C4x */
+ { "xor3", 0x38200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "xor3", 0x3c400000, 0xffe00000, T_JRr }, /* C4x */
+ { "xor3", 0x3c400000, 0xffe00000, T_RJr }, /* C4x */
+ { "xor3", 0x3c600000, 0xffe00000, T_RRr }, /* C4x */
+
+ /* Dummy entry, not included in c3x_num_insts. This
+ lets code examine entry i + 1 without checking
+ if we've run off the end of the table. */
+ { "", 0x0, 0x00, "" }
+};
+
+const unsigned int c3x_num_insts = (((sizeof c3x_insts) / (sizeof c3x_insts[0])) - 1);
+
+/* Define c4x additional opcodes for assembler and disassembler. */
+static const c4x_inst_t c4x_insts[] =
+{
+ /* Parallel instructions. */
+ { "frieee_stf", 0xf2000000, 0xfe000000, P_Sr_rS },
+ { "toieee_stf", 0xf0000000, 0xfe000000, P_Sr_rS },
+
+ { "bBaf", 0x68a00000, 0xffe00000, "Q" },
+ { "bBaf", 0x6aa00000, 0xffe00000, "P" },
+ { "baf", 0x68a00000, 0xffe00000, "Q" }, /* synonym for buaf */
+ { "baf", 0x6aa00000, 0xffe00000, "P" }, /* synonym for buaf */
+ { "bBat", 0x68600000, 0xffe00000, "Q" },
+ { "bBat", 0x6a600000, 0xffe00000, "P" },
+ { "bat", 0x68600000, 0xffe00000, "Q" }, /* synonym for buat */
+ { "bat", 0x6a600000, 0xffe00000, "P" }, /* synonym for buat */
+ { "laj", 0x63000000, 0xff000000, "B" },
+ { "lajB", 0x70200000, 0xffe00000, "Q" },
+ { "lajB", 0x72200000, 0xffe00000, "P" },
+ { "latB", 0x74800000, 0xffe00000, "V" },
+
+ { "frieee", 0x1c000000, 0xffe00000, G_r_r },
+ { "frieee", 0x1c200000, 0xffe00000, G_T_r },
+ { "frieee", 0x1c400000, 0xffe00000, G_Q_r },
+ { "frieee", 0x1c600000, 0xffe00000, G_F_r },
+
+ { "lb0", 0xb0000000, 0xffe00000, G_r_r },
+ { "lb0", 0xb0200000, 0xffe00000, G_T_r },
+ { "lb0", 0xb0400000, 0xffe00000, G_Q_r },
+ { "lb0", 0xb0600000, 0xffe00000, G_I_r },
+ { "lbu0", 0xb2000000, 0xffe00000, G_r_r },
+ { "lbu0", 0xb2200000, 0xffe00000, G_T_r },
+ { "lbu0", 0xb2400000, 0xffe00000, G_Q_r },
+ { "lbu0", 0xb2600000, 0xffe00000, G_L_r },
+ { "lb1", 0xb0800000, 0xffe00000, G_r_r },
+ { "lb1", 0xb0a00000, 0xffe00000, G_T_r },
+ { "lb1", 0xb0c00000, 0xffe00000, G_Q_r },
+ { "lb1", 0xb0e00000, 0xffe00000, G_I_r },
+ { "lbu1", 0xb2800000, 0xffe00000, G_r_r },
+ { "lbu1", 0xb2a00000, 0xffe00000, G_T_r },
+ { "lbu1", 0xb2c00000, 0xffe00000, G_Q_r },
+ { "lbu1", 0xb2e00000, 0xffe00000, G_L_r },
+ { "lb2", 0xb1000000, 0xffe00000, G_r_r },
+ { "lb2", 0xb1200000, 0xffe00000, G_T_r },
+ { "lb2", 0xb1400000, 0xffe00000, G_Q_r },
+ { "lb2", 0xb1600000, 0xffe00000, G_I_r },
+ { "lbu2", 0xb3000000, 0xffe00000, G_r_r },
+ { "lbu2", 0xb3200000, 0xffe00000, G_T_r },
+ { "lbu2", 0xb3400000, 0xffe00000, G_Q_r },
+ { "lbu2", 0xb3600000, 0xffe00000, G_L_r },
+ { "lb3", 0xb1800000, 0xffe00000, G_r_r },
+ { "lb3", 0xb1a00000, 0xffe00000, G_T_r },
+ { "lb3", 0xb1c00000, 0xffe00000, G_Q_r },
+ { "lb3", 0xb1e00000, 0xffe00000, G_I_r },
+ { "lbu3", 0xb3800000, 0xffe00000, G_r_r },
+ { "lbu3", 0xb3a00000, 0xffe00000, G_T_r },
+ { "lbu3", 0xb3c00000, 0xffe00000, G_Q_r },
+ { "lbu3", 0xb3e00000, 0xffe00000, G_L_r },
+ { "lda", 0x1e800000, 0xffe00000, "Q,Y" },
+ { "lda", 0x1ea00000, 0xffe00000, "@,Y" },
+ { "lda", 0x1ec00000, 0xffe00000, "*,Y" },
+ { "lda", 0x1ee00000, 0xffe00000, "S,Y" },
+ { "ldep", 0x76000000, 0xffe00000, "X,R" },
+ { "ldhi", 0x1fe00000, 0xffe00000, G_L_r },
+ { "ldhi", 0x1fe00000, 0xffe00000, "#,R" },
+ { "ldpe", 0x76800000, 0xffe00000, "Q,Z" },
+ { "ldpk", 0x1F700000, 0xffff0000, "#" },
+ { "lh0", 0xba000000, 0xffe00000, G_r_r },
+ { "lh0", 0xba200000, 0xffe00000, G_T_r },
+ { "lh0", 0xba400000, 0xffe00000, G_Q_r },
+ { "lh0", 0xba600000, 0xffe00000, G_I_r },
+ { "lhu0", 0xbb000000, 0xffe00000, G_r_r },
+ { "lhu0", 0xbb200000, 0xffe00000, G_T_r },
+ { "lhu0", 0xbb400000, 0xffe00000, G_Q_r },
+ { "lhu0", 0xbb600000, 0xffe00000, G_L_r },
+ { "lh1", 0xba800000, 0xffe00000, G_r_r },
+ { "lh1", 0xbaa00000, 0xffe00000, G_T_r },
+ { "lh1", 0xbac00000, 0xffe00000, G_Q_r },
+ { "lh1", 0xbae00000, 0xffe00000, G_I_r },
+ { "lhu1", 0xbb800000, 0xffe00000, G_r_r },
+ { "lhu1", 0xbba00000, 0xffe00000, G_T_r },
+ { "lhu1", 0xbbc00000, 0xffe00000, G_Q_r },
+ { "lhu1", 0xbbe00000, 0xffe00000, G_L_r },
+ { "lwl0", 0xb4000000, 0xffe00000, G_r_r },
+ { "lwl0", 0xb4200000, 0xffe00000, G_T_r },
+ { "lwl0", 0xb4400000, 0xffe00000, G_Q_r },
+ { "lwl0", 0xb4600000, 0xffe00000, G_I_r },
+ { "lwl1", 0xb4800000, 0xffe00000, G_r_r },
+ { "lwl1", 0xb4a00000, 0xffe00000, G_T_r },
+ { "lwl1", 0xb4c00000, 0xffe00000, G_Q_r },
+ { "lwl1", 0xb4e00000, 0xffe00000, G_I_r },
+ { "lwl2", 0xb5000000, 0xffe00000, G_r_r },
+ { "lwl2", 0xb5200000, 0xffe00000, G_T_r },
+ { "lwl2", 0xb5400000, 0xffe00000, G_Q_r },
+ { "lwl2", 0xb5600000, 0xffe00000, G_I_r },
+ { "lwl3", 0xb5800000, 0xffe00000, G_r_r },
+ { "lwl3", 0xb5a00000, 0xffe00000, G_T_r },
+ { "lwl3", 0xb5c00000, 0xffe00000, G_Q_r },
+ { "lwl3", 0xb5e00000, 0xffe00000, G_I_r },
+ { "lwr0", 0xb6000000, 0xffe00000, G_r_r },
+ { "lwr0", 0xb6200000, 0xffe00000, G_T_r },
+ { "lwr0", 0xb6400000, 0xffe00000, G_Q_r },
+ { "lwr0", 0xb6600000, 0xffe00000, G_I_r },
+ { "lwr1", 0xb6800000, 0xffe00000, G_r_r },
+ { "lwr1", 0xb6a00000, 0xffe00000, G_T_r },
+ { "lwr1", 0xb6c00000, 0xffe00000, G_Q_r },
+ { "lwr1", 0xb6e00000, 0xffe00000, G_I_r },
+ { "lwr2", 0xb7000000, 0xffe00000, G_r_r },
+ { "lwr2", 0xb7200000, 0xffe00000, G_T_r },
+ { "lwr2", 0xb7400000, 0xffe00000, G_Q_r },
+ { "lwr2", 0xb7600000, 0xffe00000, G_I_r },
+ { "lwr3", 0xb7800000, 0xffe00000, G_r_r },
+ { "lwr3", 0xb7a00000, 0xffe00000, G_T_r },
+ { "lwr3", 0xb7c00000, 0xffe00000, G_Q_r },
+ { "lwr3", 0xb7e00000, 0xffe00000, G_I_r },
+ { "mb0", 0xb8000000, 0xffe00000, G_r_r },
+ { "mb0", 0xb8200000, 0xffe00000, G_T_r },
+ { "mb0", 0xb8400000, 0xffe00000, G_Q_r },
+ { "mb0", 0xb8600000, 0xffe00000, G_I_r },
+ { "mb1", 0xb8800000, 0xffe00000, G_r_r },
+ { "mb1", 0xb8a00000, 0xffe00000, G_T_r },
+ { "mb1", 0xb8c00000, 0xffe00000, G_Q_r },
+ { "mb1", 0xb8e00000, 0xffe00000, G_I_r },
+ { "mb2", 0xb9000000, 0xffe00000, G_r_r },
+ { "mb2", 0xb9200000, 0xffe00000, G_T_r },
+ { "mb2", 0xb9400000, 0xffe00000, G_Q_r },
+ { "mb2", 0xb9600000, 0xffe00000, G_I_r },
+ { "mb3", 0xb9800000, 0xffe00000, G_r_r },
+ { "mb3", 0xb9a00000, 0xffe00000, G_T_r },
+ { "mb3", 0xb9c00000, 0xffe00000, G_Q_r },
+ { "mb3", 0xb9e00000, 0xffe00000, G_I_r },
+ { "mh0", 0xbc000000, 0xffe00000, G_r_r },
+ { "mh0", 0xbc200000, 0xffe00000, G_T_r },
+ { "mh0", 0xbc400000, 0xffe00000, G_Q_r },
+ { "mh0", 0xbc600000, 0xffe00000, G_I_r },
+ { "mh1", 0xbc800000, 0xffe00000, G_r_r },
+ { "mh1", 0xbca00000, 0xffe00000, G_T_r },
+ { "mh1", 0xbcc00000, 0xffe00000, G_Q_r },
+ { "mh1", 0xbce00000, 0xffe00000, G_I_r },
+ { "mh2", 0xbd000000, 0xffe00000, G_r_r },
+ { "mh2", 0xbd200000, 0xffe00000, G_T_r },
+ { "mh2", 0xbd400000, 0xffe00000, G_Q_r },
+ { "mh2", 0xbd600000, 0xffe00000, G_I_r },
+ { "mh3", 0xbd800000, 0xffe00000, G_r_r },
+ { "mh3", 0xbda00000, 0xffe00000, G_T_r },
+ { "mh3", 0xbdc00000, 0xffe00000, G_Q_r },
+ { "mh3", 0xbde00000, 0xffe00000, G_I_r },
+ { "mpyshi", 0x1d800000, 0xffe00000, G_r_r },
+ { "mpyshi", 0x1da00000, 0xffe00000, G_T_r },
+ { "mpyshi", 0x1dc00000, 0xffe00000, G_Q_r },
+ { "mpyshi", 0x1de00000, 0xffe00000, G_I_r },
+ { "mpyshi", 0x28800000, 0xffe00000, T_rrr },
+ { "mpyshi", 0x28a00000, 0xffe00000, T_Srr },
+ { "mpyshi", 0x28c00000, 0xffe00000, T_rSr },
+ { "mpyshi", 0x28e00000, 0xffe00000, T_SSr },
+ { "mpyshi", 0x38800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "mpyshi", 0x38800000, 0xffe00000, T_rJr }, /* C4x */
+ { "mpyshi", 0x38a00000, 0xffe00000, T_rRr }, /* C4x */
+ { "mpyshi", 0x38a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "mpyshi", 0x38c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "mpyshi", 0x38c00000, 0xffe00000, T_RJr }, /* C4x */
+ { "mpyshi", 0x38e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "mpyshi3", 0x28800000, 0xffe00000, T_rrr },
+ { "mpyshi3", 0x28a00000, 0xffe00000, T_Srr },
+ { "mpyshi3", 0x28c00000, 0xffe00000, T_rSr },
+ { "mpyshi3", 0x28e00000, 0xffe00000, T_SSr },
+ { "mpyshi3", 0x38800000, 0xffe00000, T_Jrr }, /* C4x */
+ { "mpyshi3", 0x38800000, 0xffe00000, T_rJr }, /* C4x */
+ { "mpyshi3", 0x38a00000, 0xffe00000, T_rRr }, /* C4x */
+ { "mpyshi3", 0x38a00000, 0xffe00000, T_Rrr }, /* C4x */
+ { "mpyshi3", 0x38c00000, 0xffe00000, T_JRr }, /* C4x */
+ { "mpyshi3", 0x38c00000, 0xffe00000, T_RJr }, /* C4x */
+ { "mpyshi3", 0x38e00000, 0xffe00000, T_RRr }, /* C4x */
+ { "mpyuhi", 0x1e000000, 0xffe00000, G_r_r },
+ { "mpyuhi", 0x1e200000, 0xffe00000, G_T_r },
+ { "mpyuhi", 0x1e400000, 0xffe00000, G_Q_r },
+ { "mpyuhi", 0x1e600000, 0xffe00000, G_I_r },
+ { "mpyuhi", 0x29000000, 0xffe00000, T_rrr },
+ { "mpyuhi", 0x29200000, 0xffe00000, T_Srr },
+ { "mpyuhi", 0x29400000, 0xffe00000, T_rSr },
+ { "mpyuhi", 0x29600000, 0xffe00000, T_SSr },
+ { "mpyuhi", 0x39000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "mpyuhi", 0x39000000, 0xffe00000, T_rJr }, /* C4x */
+ { "mpyuhi", 0x39200000, 0xffe00000, T_rRr }, /* C4x */
+ { "mpyuhi", 0x39200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "mpyuhi", 0x39400000, 0xffe00000, T_JRr }, /* C4x */
+ { "mpyuhi", 0x39400000, 0xffe00000, T_RJr }, /* C4x */
+ { "mpyuhi", 0x39600000, 0xffe00000, T_RRr }, /* C4x */
+ { "mpyuhi3", 0x29000000, 0xffe00000, T_rrr },
+ { "mpyuhi3", 0x29200000, 0xffe00000, T_Srr },
+ { "mpyuhi3", 0x29400000, 0xffe00000, T_rSr },
+ { "mpyuhi3", 0x29600000, 0xffe00000, T_SSr },
+ { "mpyuhi3", 0x39000000, 0xffe00000, T_Jrr }, /* C4x */
+ { "mpyuhi3", 0x39000000, 0xffe00000, T_rJr }, /* C4x */
+ { "mpyuhi3", 0x39200000, 0xffe00000, T_rRr }, /* C4x */
+ { "mpyuhi3", 0x39200000, 0xffe00000, T_Rrr }, /* C4x */
+ { "mpyuhi3", 0x39400000, 0xffe00000, T_JRr }, /* C4x */
+ { "mpyuhi3", 0x39400000, 0xffe00000, T_RJr }, /* C4x */
+ { "mpyuhi3", 0x39600000, 0xffe00000, T_RRr }, /* C4x */
+ { "rcpf", 0x1d000000, 0xffe00000, G_r_r },
+ { "rcpf", 0x1d200000, 0xffe00000, G_T_r },
+ { "rcpf", 0x1d400000, 0xffe00000, G_Q_r },
+ { "rcpf", 0x1d600000, 0xffe00000, G_F_r },
+ { "retiBd", 0x78200000, 0xffe00000, "" },
+ { "retid", 0x78200000, 0xffe00000, "" }, /* synonym for retiud */
+ { "rptbd", 0x79800000, 0xff000000, "Q" },
+ { "rptbd", 0x65000000, 0xff000000, "B" },
+ { "rsqrf", 0x1c800000, 0xffe00000, G_r_r },
+ { "rsqrf", 0x1ca00000, 0xffe00000, G_T_r },
+ { "rsqrf", 0x1cc00000, 0xffe00000, G_Q_r },
+ { "rsqrf", 0x1ce00000, 0xffe00000, G_F_r },
+ { "stik", 0x15000000, 0xffe00000, "T,@" },
+ { "stik", 0x15600000, 0xffe00000, "T,*" },
+ { "toieee", 0x1b800000, 0xffe00000, G_r_r },
+ { "toieee", 0x1ba00000, 0xffe00000, G_T_r },
+ { "toieee", 0x1bc00000, 0xffe00000, G_Q_r },
+ { "toieee", 0x1be00000, 0xffe00000, G_F_r },
+ { "idle2", 0x06000001, 0xffffffff, "" },
+
+ /* Dummy entry, not included in num_insts. This
+ lets code examine entry i+1 without checking
+ if we've run off the end of the table. */
+ { "", 0x0, 0x00, "" }
+};
+
+const unsigned int c4x_num_insts = (((sizeof c4x_insts) / (sizeof c4x_insts[0])) - 1);
+
+
+struct c4x_cond
+{
+ char * name;
+ unsigned long cond;
+};
+
+typedef struct c4x_cond c4x_cond_t;
+
+/* Define conditional branch/load suffixes. Put desired form for
+ disassembler last. */
+static const c4x_cond_t c4x_conds[] =
+{
+ { "u", 0x00 },
+ { "c", 0x01 }, { "lo", 0x01 },
+ { "ls", 0x02 },
+ { "hi", 0x03 },
+ { "nc", 0x04 }, { "hs", 0x04 },
+ { "z", 0x05 }, { "eq", 0x05 },
+ { "nz", 0x06 }, { "ne", 0x06 },
+ { "n", 0x07 }, { "l", 0x07 }, { "lt", 0x07 },
+ { "le", 0x08 },
+ { "p", 0x09 }, { "gt", 0x09 },
+ { "nn", 0x0a }, { "ge", 0x0a },
+ { "nv", 0x0c },
+ { "v", 0x0d },
+ { "nuf", 0x0e },
+ { "uf", 0x0f },
+ { "nlv", 0x10 },
+ { "lv", 0x11 },
+ { "nluf", 0x12 },
+ { "luf", 0x13 },
+ { "zuf", 0x14 },
+ /* Dummy entry, not included in num_conds. This
+ lets code examine entry i+1 without checking
+ if we've run off the end of the table. */
+ { "", 0x0}
+};
+
+const unsigned int num_conds = (((sizeof c4x_conds) / (sizeof c4x_conds[0])) - 1);
+
+struct c4x_indirect
+{
+ char * name;
+ unsigned long modn;
+};
+
+typedef struct c4x_indirect c4x_indirect_t;
+
+/* Define indirect addressing modes where:
+ d displacement (signed)
+ y ir0
+ z ir1 */
+
+static const c4x_indirect_t c4x_indirects[] =
+{
+ { "*+a(d)", 0x00 },
+ { "*-a(d)", 0x01 },
+ { "*++a(d)", 0x02 },
+ { "*--a(d)", 0x03 },
+ { "*a++(d)", 0x04 },
+ { "*a--(d)", 0x05 },
+ { "*a++(d)%", 0x06 },
+ { "*a--(d)%", 0x07 },
+ { "*+a(y)", 0x08 },
+ { "*-a(y)", 0x09 },
+ { "*++a(y)", 0x0a },
+ { "*--a(y)", 0x0b },
+ { "*a++(y)", 0x0c },
+ { "*a--(y)", 0x0d },
+ { "*a++(y)%", 0x0e },
+ { "*a--(y)%", 0x0f },
+ { "*+a(z)", 0x10 },
+ { "*-a(z)", 0x11 },
+ { "*++a(z)", 0x12 },
+ { "*--a(z)", 0x13 },
+ { "*a++(z)", 0x14 },
+ { "*a--(z)", 0x15 },
+ { "*a++(z)%", 0x16 },
+ { "*a--(z)%", 0x17 },
+ { "*a", 0x18 },
+ { "*a++(y)b", 0x19 },
+ /* Dummy entry, not included in num_indirects. This
+ lets code examine entry i+1 without checking
+ if we've run off the end of the table. */
+ { "", 0x0}
+};
+
+#define C3X_MODN_MAX 0x19
+
+const unsigned int num_indirects = (((sizeof c4x_indirects) / (sizeof c4x_indirects[0])) - 1);
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 8bbcdffb45b..138483f371e 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,31 @@
+2002-09-02 Nick Clifton <nickc@redhat.com>
+
+ * v850-opc.c: Remove redundant references to V850EA architecture.
+
+2002-09-02 Alan Modra <amodra@bigpond.net.au>
+
+ * arc-opc.c: Include bfd.h.
+ (arc_get_opcode_mach): Subtract off base bfd_mach value.
+
+2002-08-30 Alan Modra <amodra@bigpond.net.au>
+
+ * v850-dis.c (disassemble): Remove bfd_mach_v850ea case.
+
+ * mips-dis.c (_print_insn_mips): Don't use hard-coded mach constants.
+
+2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * configure.in: Added bfd_tic4x_arch.
+ * configure: Regenerate.
+ * Makefile.am: Added tic4x-dis.o target.
+ * Makefile.in: Regenerate.
+
+2002-08-28 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * disassemble.c: Added tic4x target and c4x
+ disassembler routine.
+ * tic4x-dis.c: New file.
+
2002-08-16 Christian Groessler <chris@groessler.org>
* z8k-dis.c (unparse_instr): case CLASS_BA: Designate hex
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index d2f043cf7d7..d2c21434f00 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -140,6 +140,7 @@ CFILES = \
sparc-dis.c \
sparc-opc.c \
tic30-dis.c \
+ tic4x-dis.c \
tic54x-dis.c \
tic54x-opc.c \
tic80-dis.c \
@@ -243,6 +244,7 @@ ALL_MACHINES = \
sparc-dis.lo \
sparc-opc.lo \
tic30-dis.lo \
+ tic4x-dis.lo \
tic54x-dis.lo \
tic54x-opc.lo \
tic80-dis.lo \
@@ -721,6 +723,8 @@ sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/sparc.h
tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic30.h
+tic4x-dis.lo: tic4x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/tic4x.h
tic54x-dis.lo: tic54x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h \
$(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index c2a5c5afc5e..634161834a3 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -251,6 +251,7 @@ CFILES = \
sparc-dis.c \
sparc-opc.c \
tic30-dis.c \
+ tic4x-dis.c \
tic54x-dis.c \
tic54x-opc.c \
tic80-dis.c \
@@ -355,6 +356,7 @@ ALL_MACHINES = \
sparc-dis.lo \
sparc-opc.lo \
tic30-dis.lo \
+ tic4x-dis.lo \
tic54x-dis.lo \
tic54x-opc.lo \
tic80-dis.lo \
@@ -447,7 +449,7 @@ acinclude.m4 aclocal.m4 config.in configure configure.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
@@ -1217,6 +1219,8 @@ sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/sparc.h
tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic30.h
+tic4x-dis.lo: tic4x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/tic4x.h
tic54x-dis.lo: tic54x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h \
$(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
diff --git a/opcodes/arc-opc.c b/opcodes/arc-opc.c
index b7afb86ac92..c2d9e1b7478 100644
--- a/opcodes/arc-opc.c
+++ b/opcodes/arc-opc.c
@@ -20,6 +20,7 @@
#include "sysdep.h"
#include <stdio.h>
#include "ansidecl.h"
+#include "bfd.h"
#include "opcode/arc.h"
#define INSERT_FN(fn) \
@@ -513,7 +514,7 @@ arc_get_opcode_mach (bfd_mach, big_p)
ARC_MACH_7,
ARC_MACH_8
};
- return mach_type_map[bfd_mach] | (big_p ? ARC_MACH_BIG : 0);
+ return mach_type_map[bfd_mach - bfd_mach_arc_5] | (big_p ? ARC_MACH_BIG : 0);
}
/* Initialize any tables that need it.
diff --git a/opcodes/configure b/opcodes/configure
index 9b6992b1fca..6825a0b020b 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -4654,6 +4654,7 @@ if test x${all_targets} = xfalse ; then
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
+ bfd_tic4x_arch) ta="$ta tic4x-dis.lo" ;;
bfd_tic54x_arch) ta="$ta tic54x-dis.lo tic54x-opc.lo" ;;
bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
diff --git a/opcodes/configure.in b/opcodes/configure.in
index 3ce5e379218..0e5eb6f5fb4 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -229,6 +229,7 @@ if test x${all_targets} = xfalse ; then
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
+ bfd_tic4x_arch) ta="$ta tic4x-dis.lo" ;;
bfd_tic54x_arch) ta="$ta tic54x-dis.lo tic54x-opc.lo" ;;
bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;;
bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;;
diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
index 88fa63573a6..4d78a73b403 100644
--- a/opcodes/disassemble.c
+++ b/opcodes/disassemble.c
@@ -60,6 +60,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_sh
#define ARCH_sparc
#define ARCH_tic30
+#define ARCH_tic4x
#define ARCH_tic54x
#define ARCH_tic80
#define ARCH_v850
@@ -305,6 +306,11 @@ disassembler (abfd)
disassemble = print_insn_tic30;
break;
#endif
+#ifdef ARCH_tic4x
+ case bfd_arch_tic4x:
+ disassemble = print_insn_tic4x;
+ break;
+#endif
#ifdef ARCH_tic54x
case bfd_arch_tic54x:
disassemble = print_insn_tic54x;
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 9b35a472712..af44788821a 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -595,7 +595,7 @@ _print_insn_mips (memaddr, info, endianness)
#endif
#if SYMTAB_AVAILABLE
- if (info->mach == 16
+ if (info->mach == bfd_mach_mips16
|| (info->flavour == bfd_target_elf_flavour
&& info->symbols != NULL
&& ((*(elf_symbol_type **) info->symbols)->internal_elf_sym.st_other
diff --git a/opcodes/tic4x-dis.c b/opcodes/tic4x-dis.c
new file mode 100644
index 00000000000..eff4ebb8ff1
--- /dev/null
+++ b/opcodes/tic4x-dis.c
@@ -0,0 +1,677 @@
+/* Print instructions for the Texas TMS320C[34]X, for GDB and GNU Binutils.
+
+ Copyright 2002 Free Software Foundation, Inc.
+
+ Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+#include "libiberty.h"
+#include "dis-asm.h"
+#include "opcode/tic4x.h"
+
+#define C4X_DEBUG 0
+
+#define C4X_HASH_SIZE 11 /* 11 and above should give unique entries. */
+
+typedef enum
+ {
+ IMMED_SINT,
+ IMMED_SUINT,
+ IMMED_SFLOAT,
+ IMMED_INT,
+ IMMED_UINT,
+ IMMED_FLOAT
+ }
+immed_t;
+
+typedef enum
+ {
+ INDIRECT_SHORT,
+ INDIRECT_LONG,
+ INDIRECT_C4X
+ }
+indirect_t;
+
+static int c4x_version = 0;
+static int c4x_dp = 0;
+
+static int
+c4x_pc_offset (unsigned int op)
+{
+ /* Determine the PC offset for a C[34]x instruction.
+ This could be simplified using some boolean algebra
+ but at the expense of readability. */
+ switch (op >> 24)
+ {
+ case 0x60: /* br */
+ case 0x62: /* call (C4x) */
+ case 0x64: /* rptb (C4x) */
+ return 1;
+ case 0x61: /* brd */
+ case 0x63: /* laj */
+ case 0x65: /* rptbd (C4x) */
+ return 3;
+ case 0x66: /* swi */
+ case 0x67:
+ return 0;
+ default:
+ break;
+ }
+
+ switch ((op & 0xffe00000) >> 20)
+ {
+ case 0x6a0: /* bB */
+ case 0x720: /* callB */
+ case 0x740: /* trapB */
+ return 1;
+
+ case 0x6a2: /* bBd */
+ case 0x6a6: /* bBat */
+ case 0x6aa: /* bBaf */
+ case 0x722: /* lajB */
+ case 0x748: /* latB */
+ case 0x798: /* rptbd */
+ return 3;
+
+ default:
+ break;
+ }
+
+ switch ((op & 0xfe200000) >> 20)
+ {
+ case 0x6e0: /* dbB */
+ return 1;
+
+ case 0x6e2: /* dbBd */
+ return 3;
+
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+static int
+c4x_print_char (struct disassemble_info * info, char ch)
+{
+ if (info != NULL)
+ (*info->fprintf_func) (info->stream, "%c", ch);
+ return 1;
+}
+
+static int
+c4x_print_str (struct disassemble_info *info, char *str)
+{
+ if (info != NULL)
+ (*info->fprintf_func) (info->stream, "%s", str);
+ return 1;
+}
+
+static int
+c4x_print_register (struct disassemble_info *info,
+ unsigned long regno)
+{
+ static c4x_register_t **registertable = NULL;
+ unsigned int i;
+
+ if (registertable == NULL)
+ {
+ registertable = (c4x_register_t **)
+ xmalloc (sizeof (c4x_register_t *) * REG_TABLE_SIZE);
+ for (i = 0; i < c3x_num_registers; i++)
+ registertable[c3x_registers[i].regno] = (void *)&c3x_registers[i];
+ if (IS_CPU_C4X (c4x_version))
+ {
+ /* Add C4x additional registers, overwriting
+ any C3x registers if necessary. */
+ for (i = 0; i < c4x_num_registers; i++)
+ registertable[c4x_registers[i].regno] = (void *)&c4x_registers[i];
+ }
+ }
+ if ((int) regno > (IS_CPU_C4X (c4x_version) ? C4X_REG_MAX : C3X_REG_MAX))
+ return 0;
+ if (info != NULL)
+ (*info->fprintf_func) (info->stream, "%s", registertable[regno]->name);
+ return 1;
+}
+
+static int
+c4x_print_addr (struct disassemble_info *info,
+ unsigned long addr)
+{
+ if (info != NULL)
+ (*info->print_address_func)(addr, info);
+ return 1;
+}
+
+static int
+c4x_print_relative (struct disassemble_info *info,
+ unsigned long pc,
+ long offset,
+ unsigned long opcode)
+{
+ return c4x_print_addr (info, pc + offset + c4x_pc_offset (opcode));
+}
+
+static int
+c4x_print_direct (struct disassemble_info *info,
+ unsigned long arg)
+{
+ if (info != NULL)
+ {
+ (*info->fprintf_func) (info->stream, "@");
+ c4x_print_addr (info, arg + (c4x_dp << 16));
+ }
+ return 1;
+}
+
+/* FIXME: make the floating point stuff not rely on host
+ floating point arithmetic. */
+void
+c4x_print_ftoa (unsigned int val,
+ FILE *stream,
+ int (*pfunc)())
+{
+ int e;
+ int s;
+ int f;
+ double num = 0.0;
+
+ e = EXTRS (val, 31, 24); /* exponent */
+ if (e != -128)
+ {
+ s = EXTRU (val, 23, 23); /* sign bit */
+ f = EXTRU (val, 22, 0); /* mantissa */
+ if (s)
+ f += -2 * (1 << 23);
+ else
+ f += (1 << 23);
+ num = f / (double)(1 << 23);
+ num = ldexp (num, e);
+ }
+ (*pfunc)(stream, "%.9g", num);
+}
+
+static int
+c4x_print_immed (struct disassemble_info *info,
+ immed_t type,
+ unsigned long arg)
+{
+ int s;
+ int f;
+ int e;
+ double num = 0.0;
+
+ if (info == NULL)
+ return 1;
+ switch (type)
+ {
+ case IMMED_SINT:
+ case IMMED_INT:
+ (*info->fprintf_func) (info->stream, "%d", (long)arg);
+ break;
+
+ case IMMED_SUINT:
+ case IMMED_UINT:
+ (*info->fprintf_func) (info->stream, "%u", arg);
+ break;
+
+ case IMMED_SFLOAT:
+ e = EXTRS (arg, 15, 12);
+ if (e != -8)
+ {
+ s = EXTRU (arg, 11, 11);
+ f = EXTRU (arg, 10, 0);
+ if (s)
+ f += -2 * (1 << 11);
+ else
+ f += (1 << 11);
+ num = f / (double)(1 << 11);
+ num = ldexp (num, e);
+ }
+ (*info->fprintf_func) (info->stream, "%f", num);
+ break;
+ case IMMED_FLOAT:
+ e = EXTRS (arg, 31, 24);
+ if (e != -128)
+ {
+ s = EXTRU (arg, 23, 23);
+ f = EXTRU (arg, 22, 0);
+ if (s)
+ f += -2 * (1 << 23);
+ else
+ f += (1 << 23);
+ num = f / (double)(1 << 23);
+ num = ldexp (num, e);
+ }
+ (*info->fprintf_func) (info->stream, "%f", num);
+ break;
+ }
+ return 1;
+}
+
+static int
+c4x_print_cond (struct disassemble_info *info,
+ unsigned int cond)
+{
+ static c4x_cond_t **condtable = NULL;
+ unsigned int i;
+
+ if (condtable == NULL)
+ {
+ condtable = (c4x_cond_t **)xmalloc (sizeof (c4x_cond_t *) * 32);
+ for (i = 0; i < num_conds; i++)
+ condtable[c4x_conds[i].cond] = (void *)&c4x_conds[i];
+ }
+ if (cond > 31 || condtable[cond] == NULL)
+ return 0;
+ if (info != NULL)
+ (*info->fprintf_func) (info->stream, "%s", condtable[cond]->name);
+ return 1;
+}
+
+static int
+c4x_print_indirect (struct disassemble_info *info,
+ indirect_t type,
+ unsigned long arg)
+{
+ unsigned int aregno;
+ unsigned int modn;
+ unsigned int disp;
+ char *a;
+
+ aregno = 0;
+ modn = 0;
+ disp = 1;
+ switch(type)
+ {
+ case INDIRECT_C4X: /* *+ARn(disp) */
+ disp = EXTRU (arg, 7, 3);
+ aregno = EXTRU (arg, 2, 0) + REG_AR0;
+ modn = 0;
+ break;
+ case INDIRECT_SHORT:
+ disp = 1;
+ aregno = EXTRU (arg, 2, 0) + REG_AR0;
+ modn = EXTRU (arg, 7, 3);
+ break;
+ case INDIRECT_LONG:
+ disp = EXTRU (arg, 7, 0);
+ aregno = EXTRU (arg, 10, 8) + REG_AR0;
+ modn = EXTRU (arg, 15, 11);
+ if (modn > 7 && disp != 0)
+ return 0;
+ break;
+ default:
+ abort ();
+ }
+ if (modn > C3X_MODN_MAX)
+ return 0;
+ a = c4x_indirects[modn].name;
+ while (*a)
+ {
+ switch (*a)
+ {
+ case 'a':
+ c4x_print_register (info, aregno);
+ break;
+ case 'd':
+ c4x_print_immed (info, IMMED_UINT, disp);
+ break;
+ case 'y':
+ c4x_print_str (info, "ir0");
+ break;
+ case 'z':
+ c4x_print_str (info, "ir1");
+ break;
+ default:
+ c4x_print_char (info, *a);
+ break;
+ }
+ a++;
+ }
+ return 1;
+}
+
+static int
+c4x_print_op (struct disassemble_info *info,
+ unsigned long instruction,
+ c4x_inst_t *p, unsigned long pc)
+{
+ int val;
+ char *s;
+ char *parallel = NULL;
+
+ /* Print instruction name. */
+ s = p->name;
+ while (*s && parallel == NULL)
+ {
+ switch (*s)
+ {
+ case 'B':
+ if (! c4x_print_cond (info, EXTRU (instruction, 20, 16)))
+ return 0;
+ break;
+ case 'C':
+ if (! c4x_print_cond (info, EXTRU (instruction, 27, 23)))
+ return 0;
+ break;
+ case '_':
+ parallel = s + 1; /* Skip past `_' in name */
+ break;
+ default:
+ c4x_print_char (info, *s);
+ break;
+ }
+ s++;
+ }
+
+ /* Print arguments. */
+ s = p->args;
+ if (*s)
+ c4x_print_char (info, ' ');
+
+ while (*s)
+ {
+ switch (*s)
+ {
+ case '*': /* indirect 0--15 */
+ if (! c4x_print_indirect (info, INDIRECT_LONG,
+ EXTRU (instruction, 15, 0)))
+ return 0;
+ break;
+
+ case '#': /* only used for ldp, ldpk */
+ c4x_print_immed (info, IMMED_UINT, EXTRU (instruction, 15, 0));
+ break;
+
+ case '@': /* direct 0--15 */
+ c4x_print_direct (info, EXTRU (instruction, 15, 0));
+ break;
+
+ case 'A': /* address register 24--22 */
+ if (! c4x_print_register (info, EXTRU (instruction, 24, 22) +
+ REG_AR0))
+ return 0;
+ break;
+
+ case 'B': /* 24-bit unsigned int immediate br(d)/call/rptb
+ address 0--23. */
+ if (IS_CPU_C4X (c4x_version))
+ c4x_print_relative (info, pc, EXTRS (instruction, 23, 0),
+ p->opcode);
+ else
+ c4x_print_addr (info, EXTRU (instruction, 23, 0));
+ break;
+
+ case 'C': /* indirect (short C4x) 0--7 */
+ if (! IS_CPU_C4X (c4x_version))
+ return 0;
+ if (! c4x_print_indirect (info, INDIRECT_C4X,
+ EXTRU (instruction, 7, 0)))
+ return 0;
+ break;
+
+ case 'D':
+ /* Cockup if get here... */
+ break;
+
+ case 'E': /* register 0--7 */
+ if (! c4x_print_register (info, EXTRU (instruction, 7, 0)))
+ return 0;
+ break;
+
+ case 'F': /* 16-bit float immediate 0--15 */
+ c4x_print_immed (info, IMMED_SFLOAT,
+ EXTRU (instruction, 15, 0));
+ break;
+
+ case 'I': /* indirect (short) 0--7 */
+ if (! c4x_print_indirect (info, INDIRECT_SHORT,
+ EXTRU (instruction, 7, 0)))
+ return 0;
+ break;
+
+ case 'J': /* indirect (short) 8--15 */
+ if (! c4x_print_indirect (info, INDIRECT_SHORT,
+ EXTRU (instruction, 15, 8)))
+ return 0;
+ break;
+
+ case 'G': /* register 8--15 */
+ if (! c4x_print_register (info, EXTRU (instruction, 15, 8)))
+ return 0;
+ break;
+
+ case 'H': /* register 16--18 */
+ if (! c4x_print_register (info, EXTRU (instruction, 18, 16)))
+ return 0;
+ break;
+
+ case 'K': /* register 19--21 */
+ if (! c4x_print_register (info, EXTRU (instruction, 21, 19)))
+ return 0;
+ break;
+
+ case 'L': /* register 22--24 */
+ if (! c4x_print_register (info, EXTRU (instruction, 24, 22)))
+ return 0;
+ break;
+
+ case 'M': /* register 22--22 */
+ c4x_print_register (info, EXTRU (instruction, 22, 22) + REG_R2);
+ break;
+
+ case 'N': /* register 23--23 */
+ c4x_print_register (info, EXTRU (instruction, 22, 22) + REG_R0);
+ break;
+
+ case 'O': /* indirect (short C4x) 8--15 */
+ if (! IS_CPU_C4X (c4x_version))
+ return 0;
+ if (! c4x_print_indirect (info, INDIRECT_C4X,
+ EXTRU (instruction, 15, 8)))
+ return 0;
+ break;
+
+ case 'P': /* displacement 0--15 (used by Bcond and BcondD) */
+ c4x_print_relative (info, pc, EXTRS (instruction, 15, 0),
+ p->opcode);
+ break;
+
+ case 'Q': /* register 0--15 */
+ if (! c4x_print_register (info, EXTRU (instruction, 15, 0)))
+ return 0;
+ break;
+
+ case 'R': /* register 16--20 */
+ if (! c4x_print_register (info, EXTRU (instruction, 20, 16)))
+ return 0;
+ break;
+
+ case 'S': /* 16-bit signed immediate 0--15 */
+ c4x_print_immed (info, IMMED_SINT,
+ EXTRS (instruction, 15, 0));
+ break;
+
+ case 'T': /* 5-bit signed immediate 16--20 (C4x stik) */
+ if (! IS_CPU_C4X (c4x_version))
+ return 0;
+ if (! c4x_print_immed (info, IMMED_SUINT,
+ EXTRU (instruction, 20, 16)))
+ return 0;
+ break;
+
+ case 'U': /* 16-bit unsigned int immediate 0--15 */
+ c4x_print_immed (info, IMMED_SUINT, EXTRU (instruction, 15, 0));
+ break;
+
+ case 'V': /* 5/9-bit unsigned vector 0--4/8 */
+ c4x_print_immed (info, IMMED_SUINT,
+ IS_CPU_C4X (c4x_version) ?
+ EXTRU (instruction, 8, 0) :
+ EXTRU (instruction, 4, 0) & ~0x20);
+ break;
+
+ case 'W': /* 8-bit signed immediate 0--7 */
+ if (! IS_CPU_C4X (c4x_version))
+ return 0;
+ c4x_print_immed (info, IMMED_SINT, EXTRS (instruction, 7, 0));
+ break;
+
+ case 'X': /* expansion register 4--0 */
+ val = EXTRU (instruction, 4, 0) + REG_IVTP;
+ if (val < REG_IVTP || val > REG_TVTP)
+ return 0;
+ if (! c4x_print_register (info, val))
+ return 0;
+ break;
+
+ case 'Y': /* address register 16--20 */
+ val = EXTRU (instruction, 20, 16);
+ if (val < REG_AR0 || val > REG_SP)
+ return 0;
+ if (! c4x_print_register (info, val))
+ return 0;
+ break;
+
+ case 'Z': /* expansion register 16--20 */
+ val = EXTRU (instruction, 20, 16) + REG_IVTP;
+ if (val < REG_IVTP || val > REG_TVTP)
+ return 0;
+ if (! c4x_print_register (info, val))
+ return 0;
+ break;
+
+ case '|': /* Parallel instruction */
+ c4x_print_str (info, " || ");
+ c4x_print_str (info, parallel);
+ c4x_print_char (info, ' ');
+ break;
+
+ case ';':
+ c4x_print_char (info, ',');
+ break;
+
+ default:
+ c4x_print_char (info, *s);
+ break;
+ }
+ s++;
+ }
+ return 1;
+}
+
+static void
+c4x_hash_opcode (c4x_inst_t **optable,
+ const c4x_inst_t *inst)
+{
+ int j;
+ int opcode = inst->opcode >> (32 - C4X_HASH_SIZE);
+ int opmask = inst->opmask >> (32 - C4X_HASH_SIZE);
+
+ /* Use a C4X_HASH_SIZE bit index as a hash index. We should
+ have unique entries so there's no point having a linked list
+ for each entry? */
+ for (j = opcode; j < opmask; j++)
+ if ((j & opmask) == opcode)
+ {
+#if C4X_DEBUG
+ /* We should only have collisions for synonyms like
+ ldp for ldi. */
+ if (optable[j] != NULL)
+ printf("Collision at index %d, %s and %s\n",
+ j, optable[j]->name, inst->name);
+#endif
+ optable[j] = (void *)inst;
+ }
+}
+
+/* Disassemble the instruction in 'instruction'.
+ 'pc' should be the address of this instruction, it will
+ be used to print the target address if this is a relative jump or call
+ the disassembled instruction is written to 'info'.
+ The function returns the length of this instruction in words. */
+
+static int
+c4x_disassemble (unsigned long pc,
+ unsigned long instruction,
+ struct disassemble_info *info)
+{
+ static c4x_inst_t **optable = NULL;
+ c4x_inst_t *p;
+ int i;
+
+ c4x_version = info->mach;
+
+ if (optable == NULL)
+ {
+ optable = (c4x_inst_t **)
+ xcalloc (sizeof (c4x_inst_t *), (1 << C4X_HASH_SIZE));
+ /* Install opcodes in reverse order so that preferred
+ forms overwrite synonyms. */
+ for (i = c3x_num_insts - 1; i >= 0; i--)
+ c4x_hash_opcode (optable, &c3x_insts[i]);
+ if (IS_CPU_C4X (c4x_version))
+ {
+ for (i = c4x_num_insts - 1; i >= 0; i--)
+ c4x_hash_opcode (optable, &c4x_insts[i]);
+ }
+ }
+
+ /* See if we can pick up any loading of the DP register... */
+ if ((instruction >> 16) == 0x5070 || (instruction >> 16) == 0x1f70)
+ c4x_dp = EXTRU (instruction, 15, 0);
+
+ p = optable[instruction >> (32 - C4X_HASH_SIZE)];
+ if (p != NULL && ((instruction & p->opmask) == p->opcode)
+ && c4x_print_op (NULL, instruction, p, pc))
+ c4x_print_op (info, instruction, p, pc);
+ else
+ (*info->fprintf_func) (info->stream, "%08x", instruction);
+
+ /* Return size of insn in words. */
+ return 1;
+}
+
+/* The entry point from objdump and gdb. */
+int
+print_insn_tic4x (memaddr, info)
+ bfd_vma memaddr;
+ struct disassemble_info *info;
+{
+ int status;
+ unsigned long pc;
+ unsigned long op;
+ bfd_byte buffer[4];
+
+ status = (*info->read_memory_func) (memaddr, buffer, 4, info);
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, memaddr, info);
+ return -1;
+ }
+
+ pc = memaddr;
+ op = bfd_getl32 (buffer);
+ info->bytes_per_line = 4;
+ info->bytes_per_chunk = 4;
+ info->octets_per_byte = 4;
+ info->display_endian = BFD_ENDIAN_LITTLE;
+ return c4x_disassemble (pc, op, info) * 4;
+}
diff --git a/opcodes/v850-dis.c b/opcodes/v850-dis.c
index e72b1e8d2e1..dbd43aac76e 100644
--- a/opcodes/v850-dis.c
+++ b/opcodes/v850-dis.c
@@ -77,10 +77,6 @@ disassemble (memaddr, info, insn)
case bfd_mach_v850e:
target_processor = PROCESSOR_V850E;
break;
-
- case bfd_mach_v850ea:
- target_processor = PROCESSOR_V850EA;
- break;
}
/* Find the opcode. */
diff --git a/opcodes/v850-opc.c b/opcodes/v850-opc.c
index 43ce2f15fc2..94969ac48f2 100644
--- a/opcodes/v850-opc.c
+++ b/opcodes/v850-opc.c
@@ -608,17 +608,13 @@ const struct v850_opcode v850_opcodes[] =
{ "jmp", one (0x0060), one (0xffe0), {R1}, 1, PROCESSOR_ALL },
/* load/store instructions */
-{ "sld.bu", one (0x0300), one (0x0780), {D7, EP, R2_NOTR0}, 1, PROCESSOR_V850EA },
{ "sld.bu", one (0x0060), one (0x07f0), {D4, EP, R2_NOTR0}, 1, PROCESSOR_V850E },
-{ "sld.hu", one (0x0400), one (0x0780), {D8_7, EP, R2_NOTR0}, 1, PROCESSOR_V850EA },
{ "sld.hu", one (0x0070), one (0x07f0), {D5_4, EP, R2_NOTR0}, 1, PROCESSOR_V850E },
-{ "sld.b", one (0x0060), one (0x07f0), {D4, EP, R2}, 1, PROCESSOR_V850EA },
{ "sld.b", one (0x0300), one (0x0780), {D7, EP, R2}, 1, PROCESSOR_V850E },
{ "sld.b", one (0x0300), one (0x0780), {D7, EP, R2}, 1, PROCESSOR_V850 },
-{ "sld.h", one (0x0070), one (0x07f0), {D5_4, EP, R2}, 1, PROCESSOR_V850EA },
{ "sld.h", one (0x0400), one (0x0780), {D8_7, EP, R2}, 1, PROCESSOR_V850E },
{ "sld.h", one (0x0400), one (0x0780), {D8_7, EP, R2}, 1, PROCESSOR_V850 },
{ "sld.w", one (0x0500), one (0x0781), {D8_6, EP, R2}, 1, PROCESSOR_ALL },
@@ -626,10 +622,6 @@ const struct v850_opcode v850_opcodes[] =
{ "sst.h", one (0x0480), one (0x0780), {R2, D8_7, EP}, 2, PROCESSOR_ALL },
{ "sst.w", one (0x0501), one (0x0781), {R2, D8_6, EP}, 2, PROCESSOR_ALL },
-{ "pushml", two (0x07e0, 0x0001), two (0xfff0, 0x0007), {LIST18_L}, 0, PROCESSOR_V850EA },
-{ "pushmh", two (0x07e0, 0x0003), two (0xfff0, 0x0007), {LIST18_H}, 0, PROCESSOR_V850EA },
-{ "popml", two (0x07f0, 0x0001), two (0xfff0, 0x0007), {LIST18_L}, 0, PROCESSOR_V850EA },
-{ "popmh", two (0x07f0, 0x0003), two (0xfff0, 0x0007), {LIST18_H}, 0, PROCESSOR_V850EA },
{ "prepare", two (0x0780, 0x0003), two (0xffc0, 0x001f), {LIST12, IMM5, SP}, 0, PROCESSOR_NOT_V850 },
{ "prepare", two (0x0780, 0x000b), two (0xffc0, 0x001f), {LIST12, IMM5, IMM16}, 0, PROCESSOR_NOT_V850 },
{ "prepare", two (0x0780, 0x0013), two (0xffc0, 0x001f), {LIST12, IMM5, IMM16}, 0, PROCESSOR_NOT_V850 },
@@ -677,15 +669,6 @@ const struct v850_opcode v850_opcodes[] =
{ "divh", two (0x07e0, 0x0280), two (0x07e0, 0x07ff), {R1, R2, R3}, 0, PROCESSOR_NOT_V850 },
{ "divh", OP (0x02), OP_MASK, {R1, R2_NOTR0}, 0, PROCESSOR_ALL },
-{ "divhn", two (0x07e0, 0x0280), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
-{ "divhun", two (0x07e0, 0x0282), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
-{ "divn", two (0x07e0, 0x02c0), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
-{ "divun", two (0x07e0, 0x02c2), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
-{ "sdivhn", two (0x07e0, 0x0180), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
-{ "sdivhun", two (0x07e0, 0x0182), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
-{ "sdivn", two (0x07e0, 0x01c0), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
-{ "sdivun", two (0x07e0, 0x01c2), two (0x07e0, 0x07c3), {I5DIV, R1, R2, R3}, 0, PROCESSOR_V850EA },
-
{ "nop", one (0x00), one (0xffff), {0}, 0, PROCESSOR_ALL },
{ "mov", OP (0x10), OP_MASK, {I5, R2_NOTR0}, 0, PROCESSOR_ALL },
{ "mov", one (0x0620), one (0xffe0), {IMM32, R1_NOTR0}, 0, PROCESSOR_NOT_V850 },
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 8e7aabc42ee..ae252fd2769 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,7 @@
+2002-08-29 Dave Brolley <brolley@redhat.com>
+
+ * Make-common.in (CGEN_READ_SCM): Remove ../../cgen/stamp-cgen.
+
2002-07-17 Andrew Cagney <cagney@redhat.com>
* run-sim.h: Add #ifdef RUN_SIM_H wrapper.
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 744295a02cb..1f29f6a13f6 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -655,7 +655,7 @@ CGEN = `if [ -f ../../guile/libguile/guile ]; then echo ../../guile/libguile/gui
CGENFLAGS = -v
CGEN_CPU_DIR = $(CGENDIR)/cpu
-CGEN_READ_SCM = ../../cgen/stamp-cgen $(CGENDIR)/sim.scm
+CGEN_READ_SCM = $(CGENDIR)/sim.scm
CGEN_ARCH_SCM = $(CGENDIR)/sim-arch.scm
CGEN_CPU_SCM = $(CGENDIR)/sim-cpu.scm $(CGENDIR)/sim-model.scm
CGEN_DECODE_SCM = $(CGENDIR)/sim-decode.scm
diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog
index 436ba3b8534..9484c2226ef 100644
--- a/sim/igen/ChangeLog
+++ b/sim/igen/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-28 Dave Brolley <brolley@redhat.com>
+
+ * gen-support.c (gen_support_h): Generate
+ '#define semantic_illegal <PREFIX>_semantic_illegal'.
+
2002-08-22 Chris Demetriou <cgd@broadcom.com>
* compare_igen_models: New script.
diff --git a/sim/igen/gen-support.c b/sim/igen/gen-support.c
index 93efaa74f72..e2663ac5fc6 100644
--- a/sim/igen/gen-support.c
+++ b/sim/igen/gen-support.c
@@ -141,10 +141,14 @@ gen_support_h (lf *file,
lf_printf(file, "#define _SD SD_ /* deprecated */\n");
lf_printf(file, "\n");
- /* Map <PREFIX>_instruction_word and <PREFIX>_idecode_issue onto the
- shorter instruction_word and idecode_issue. Map defined here as,
- name space problems are created when the name is defined in
- idecode.h */
+ /* Map <PREFIX>_xxxx onto the shorter xxxx for the following names:
+
+ instruction_word
+ idecode_issue
+ semantic_illegal
+
+ Map defined here as name space problems are created when the name is
+ defined in idecode.h */
if (strcmp (options.module.idecode.prefix.l, "") != 0)
{
lf_indent_suppress (file);
@@ -159,6 +163,12 @@ gen_support_h (lf *file,
options.module.idecode.prefix.l,
"idecode_issue");
lf_printf (file, "\n");
+ lf_indent_suppress (file);
+ lf_printf (file, "#define %s %s%s\n",
+ "semantic_illegal",
+ options.module.idecode.prefix.l,
+ "semantic_illegal");
+ lf_printf (file, "\n");
}
/* output a declaration for all functions */
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index cb20ad5f864..c8b3aabdc4a 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -1,3 +1,12 @@
+2002-08-29 Nick Clifton <nickc@redhat.com>
+
+ From 2001-08-23 Catherine Moore <clm@redhat.com>
+
+ * Makefile.in: Add gen-zero-r0 option.
+ * sim-main.h (GPR_SET, GPR_CLEAR): Define.
+ * simops.c (OP_24007E0): Sign extend the imm9
+ operand of a mul instruction.
+
2002-06-17 Andrew Cagney <cagney@redhat.com>
* simops.c (trace_result): Fix printf formatting.
diff --git a/sim/v850/Makefile.in b/sim/v850/Makefile.in
index 110cb1761f9..89029d6a627 100644
--- a/sim/v850/Makefile.in
+++ b/sim/v850/Makefile.in
@@ -82,6 +82,7 @@ tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
../igen/igen \
$(IGEN_TRACE) \
-G gen-direct-access \
+ -G gen-zero-r0 \
-i $(IGEN_INSN) \
-o $(IGEN_DC) \
-x \
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
index 37ea31f3f4c..a16ec00a699 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -366,6 +366,8 @@ do { \
#endif
+#define GPR_SET(N, VAL) (State.regs[(N)] = (VAL))
+#define GPR_CLEAR(N) (State.regs[(N)] = 0)
extern void divun ( unsigned int N,
unsigned long int als,
diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index 9a83d0796a2..d8a4d58ae11 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -2458,7 +2458,7 @@ OP_24007E0 (void)
{
trace_input ("mul", OP_IMM_REG_REG, 0);
- Multiply64 (true, (OP[3] & 0x1f) | ((OP[3] >> 13) & 0x1e0));
+ Multiply64 (true, SEXT9 ((OP[3] & 0x1f) | ((OP[3] >> 13) & 0x1e0)));
trace_output (OP_IMM_REG_REG);