This commit was manufactured by cvs2svn to create tag 'gdb-pre-
ptid_t-2001-05-03'.

Sprout from dberlin-typesystem-branch 2001-07-06 14:44:20 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'dberlin-'
Cherrypick from master 2001-05-03 13:42:12 UTC Jonathan Larmour <jifl@eCosCentric.com> '        * rdi-share/devsw.c: Include <time.h> for struct tm':
    gdb/ChangeLog
    gdb/MAINTAINERS
    gdb/Makefile.in
    gdb/NEWS
    gdb/TODO
    gdb/a68v-nat.c
    gdb/alphabsd-nat.c
    gdb/arch-utils.c
    gdb/arch-utils.h
    gdb/arm-linux-nat.c
    gdb/blockframe.c
    gdb/breakpoint.c
    gdb/breakpoint.h
    gdb/cli-out.c
    gdb/cli/cli-cmds.c
    gdb/cli/cli-script.c
    gdb/cli/cli-setshow.c
    gdb/coff-solib.c
    gdb/coffread.c
    gdb/completer.c
    gdb/completer.h
    gdb/config/alpha/alpha-osf1.mh
    gdb/config/alpha/alpha-osf2.mh
    gdb/config/alpha/alpha-osf3.mh
    gdb/config/alpha/nm-linux.h
    gdb/config/arm/nm-linux.h
    gdb/config/arm/tm-arm.h
    gdb/config/djgpp/djconfig.sh
    gdb/config/djgpp/fnchange.lst
    gdb/config/h8500/tm-h8500.h
    gdb/config/i386/nm-i386sol2.h
    gdb/config/i386/nm-linux.h
    gdb/config/i386/nm-ptx4.h
    gdb/config/i386/nm-symmetry.h
    gdb/config/i386/tm-cygwin.h
    gdb/config/i386/tm-i386.h
    gdb/config/i386/tm-i386sco5.h
    gdb/config/i386/tm-i386sol2.h
    gdb/config/i386/tm-i386v.h
    gdb/config/i386/tm-i386v42mp.h
    gdb/config/i386/xm-cygwin.h
    gdb/config/i386/xm-go32.h
    gdb/config/i386/xm-linux.h
    gdb/config/ia64/nm-linux.h
    gdb/config/m68k/nm-hp300bsd.h
    gdb/config/mips/nm-irix4.h
    gdb/config/mips/nm-irix5.h
    gdb/config/mips/tm-mips.h
    gdb/config/mn10300/tm-mn10300.h
    gdb/config/nm-linux.h
    gdb/config/nm-lynx.h
    gdb/config/pa/nm-hppah.h
    gdb/config/pa/tm-hppa.h
    gdb/config/powerpc/nm-linux.h
    gdb/config/powerpc/ppc-eabi.mt
    gdb/config/powerpc/ppc-sim.mt
    gdb/config/powerpc/ppcle-eabi.mt
    gdb/config/powerpc/ppcle-sim.mt
    gdb/config/rs6000/nm-rs6000.h
    gdb/config/sparc/nm-sun4sol2.h
    gdb/config/sparc/tm-sun4sol2.h
    gdb/configure
    gdb/configure.host
    gdb/configure.in
    gdb/configure.tgt
    gdb/corelow.c
    gdb/cp-abi.h
    gdb/cxux-nat.c
    gdb/d10v-tdep.c
    gdb/defs.h
    gdb/dink32-rom.c
    gdb/doc/ChangeLog
    gdb/doc/Makefile.in
    gdb/doc/annotate.texi
    gdb/doc/gdb.texinfo
    gdb/doc/gdbint.texinfo
    gdb/dve3900-rom.c
    gdb/dwarf2read.c
    gdb/elfread.c
    gdb/fork-child.c
    gdb/frame.c
    gdb/gdb-events.c
    gdb/gdb-events.h
    gdb/gdb-events.sh
    gdb/gdbarch.c
    gdb/gdbarch.h
    gdb/gdbarch.sh
    gdb/gdbthread.h
    gdb/gdbtypes.c
    gdb/gdbtypes.h
    gdb/gnu-nat.c
    gdb/gnu-regex.c
    gdb/gnu-v2-abi.c
    gdb/go32-nat.c
    gdb/h8500-tdep.c
    gdb/hp-symtab-read.c
    gdb/hp300ux-nat.c
    gdb/hppa-tdep.c
    gdb/hppab-nat.c
    gdb/hppah-nat.c
    gdb/hpux-thread.c
    gdb/i386-linux-nat.c
    gdb/i386-tdep.c
    gdb/i386aix-nat.c
    gdb/i386b-nat.c
    gdb/i386bsd-nat.c
    gdb/i386gnu-nat.c
    gdb/i386mach-nat.c
    gdb/i386nbsd-nat.c
    gdb/i387-tdep.c
    gdb/ia64-linux-nat.c
    gdb/ia64-linux-tdep.c
    gdb/ia64-tdep.c
    gdb/infcmd.c
    gdb/inferior.h
    gdb/inflow.c
    gdb/infptrace.c
    gdb/infrun.c
    gdb/inftarg.c
    gdb/infttrace.c
    gdb/irix5-nat.c
    gdb/language.c
    gdb/lin-lwp.c
    gdb/lin-thread.c
    gdb/linux-thread.c
    gdb/lynx-nat.c
    gdb/m3-nat.c
    gdb/m32r-rom.c
    gdb/m68hc11-tdep.c
    gdb/m68knbsd-nat.c
    gdb/m88k-nat.c
    gdb/mac-nat.c
    gdb/main.c
    gdb/mdebugread.c
    gdb/memattr.c
    gdb/memattr.h
    gdb/mi/ChangeLog
    gdb/mi/gdbmi.texinfo
    gdb/mi/mi-cmd-disas.c
    gdb/mi/mi-cmd-stack.c
    gdb/mi/mi-cmd-var.c
    gdb/mi/mi-main.c
    gdb/mi/mi-out.c
    gdb/mi/mi-out.h
    gdb/minsyms.c
    gdb/mips-nat.c
    gdb/mips-tdep.c
    gdb/mipsread.c
    gdb/mn10300-tdep.c
    gdb/mon960-rom.c
    gdb/monitor.c
    gdb/nindy-share/ttyflush.c
    gdb/ns32knbsd-nat.c
    gdb/objfiles.c
    gdb/ocd.c
    gdb/ocd.h
    gdb/osfsolib.c
    gdb/p-exp.y
    gdb/partial-stab.h
    gdb/ppc-bdm.c
    gdb/ppc-linux-nat.c
    gdb/ppcnbsd-nat.c
    gdb/printcmd.c
    gdb/proc-api.c
    gdb/proc-service.c
    gdb/procfs.c
    gdb/ptx4-nat.c
    gdb/rdi-share/host.h
    gdb/rdi-share/hostchan.h
    gdb/rdi-share/unixcomm.c
    gdb/regcache.c
    gdb/regcache.h
    gdb/remote-adapt.c
    gdb/remote-array.c
    gdb/remote-bug.c
    gdb/remote-e7000.c
    gdb/remote-eb.c
    gdb/remote-es.c
    gdb/remote-mips.c
    gdb/remote-mm.c
    gdb/remote-nindy.c
    gdb/remote-os9k.c
    gdb/remote-rdi.c
    gdb/remote-rdp.c
    gdb/remote-sds.c
    gdb/remote-sim.c
    gdb/remote-st.c
    gdb/remote-udi.c
    gdb/remote-vx.c
    gdb/remote.c
    gdb/rs6000-nat.c
    gdb/rs6000-tdep.c
    gdb/ser-e7kpc.c
    gdb/ser-go32.c
    gdb/ser-ocd.c
    gdb/ser-tcp.c
    gdb/ser-unix.c
    gdb/sh-tdep.c
    gdb/sh3-rom.c
    gdb/sol-thread.c
    gdb/solib-aix5.c
    gdb/solib-svr4.c
    gdb/solib.c
    gdb/solib.h
    gdb/solist.h
    gdb/somsolib.c
    gdb/source.c
    gdb/sparc-nat.c
    gdb/sparc-tdep.c
    gdb/stack.c
    gdb/standalone.c
    gdb/sun3-nat.c
    gdb/sun386-nat.c
    gdb/symfile.c
    gdb/symm-nat.c
    gdb/symtab.c
    gdb/symtab.h
    gdb/target.c
    gdb/target.h
    gdb/testsuite/ChangeLog
    gdb/testsuite/config/gdbserver.exp
    gdb/testsuite/config/sid.exp
    gdb/testsuite/gdb.base/annota1.exp
    gdb/testsuite/gdb.base/arithmet.exp
    gdb/testsuite/gdb.base/callfuncs.exp
    gdb/testsuite/gdb.base/commands.exp
    gdb/testsuite/gdb.base/completion.exp
    gdb/testsuite/gdb.base/condbreak.exp
    gdb/testsuite/gdb.base/corefile.exp
    gdb/testsuite/gdb.base/dbx.exp
    gdb/testsuite/gdb.base/default.exp
    gdb/testsuite/gdb.base/define.exp
    gdb/testsuite/gdb.base/ending-run.exp
    gdb/testsuite/gdb.base/exprs.exp
    gdb/testsuite/gdb.base/finish.exp
    gdb/testsuite/gdb.base/help.exp
    gdb/testsuite/gdb.base/long_long.exp
    gdb/testsuite/gdb.base/restore.c
    gdb/testsuite/gdb.base/return2.c
    gdb/testsuite/gdb.c++/classes.exp
    gdb/testsuite/gdb.c++/cplusfuncs.cc
    gdb/testsuite/gdb.disasm/Makefile.in
    gdb/testsuite/gdb.mi/ChangeLog-mi
    gdb/testsuite/gdb.mi/mi-basics.exp
    gdb/testsuite/gdb.mi/mi-break.exp
    gdb/testsuite/gdb.mi/mi-console.exp
    gdb/testsuite/gdb.mi/mi-disassemble.exp
    gdb/testsuite/gdb.mi/mi-eval.exp
    gdb/testsuite/gdb.mi/mi-hack-cli.exp
    gdb/testsuite/gdb.mi/mi-read-memory.exp
    gdb/testsuite/gdb.mi/mi-regs.exp
    gdb/testsuite/gdb.mi/mi-return.exp
    gdb/testsuite/gdb.mi/mi-simplerun.exp
    gdb/testsuite/gdb.mi/mi-stack.exp
    gdb/testsuite/gdb.mi/mi-stepi.exp
    gdb/testsuite/gdb.mi/mi-until.exp
    gdb/testsuite/gdb.mi/mi-var-block.exp
    gdb/testsuite/gdb.mi/mi-var-child.exp
    gdb/testsuite/gdb.mi/mi-var-cmd.exp
    gdb/testsuite/gdb.mi/mi-var-display.exp
    gdb/testsuite/gdb.mi/mi-watch.exp
    gdb/testsuite/gdb.threads/linux-dp.exp
    gdb/testsuite/gdb.threads/pthreads.exp
    gdb/testsuite/gdb.trace/actions.c
    gdb/testsuite/gdb.trace/gdb_c_test.c
    gdb/testsuite/lib/gdb.exp
    gdb/testsuite/lib/mi-support.exp
    gdb/thread-db.c
    gdb/thread.c
    gdb/top.c
    gdb/tracepoint.c
    gdb/ui-out.c
    gdb/ui-out.h
    gdb/ultra3-nat.c
    gdb/utils.c
    gdb/uw-thread.c
    gdb/v850ice.c
    gdb/valops.c
    gdb/value.h
    gdb/values.c
    gdb/varobj.c
    gdb/win32-nat.c
    gdb/wince.c
    gdb/xcoffsolib.c
Delete:
    gdb/config/mips/irix6.mh
    gdb/config/mips/irix6.mt
    gdb/config/mips/nm-irix6.h
    gdb/config/mips/tm-irix6.h
    gdb/config/mips/xm-irix6.h
    gdb/gnu-v3-abi.c
    gdb/solib-osf.c
    gdb/testsuite/gdb.disasm/h8300s.exp
    gdb/testsuite/gdb.disasm/h8300s.s
    gdb/testsuite/gdb.mi/ChangeLog
    gdb/testsuite/gdb.mi/mi0-basics.exp
    gdb/testsuite/gdb.mi/mi0-break.exp
    gdb/testsuite/gdb.mi/mi0-console.exp
    gdb/testsuite/gdb.mi/mi0-disassemble.exp
    gdb/testsuite/gdb.mi/mi0-eval.exp
    gdb/testsuite/gdb.mi/mi0-hack-cli.exp
    gdb/testsuite/gdb.mi/mi0-read-memory.exp
    gdb/testsuite/gdb.mi/mi0-regs.exp
    gdb/testsuite/gdb.mi/mi0-return.exp
    gdb/testsuite/gdb.mi/mi0-simplerun.exp
    gdb/testsuite/gdb.mi/mi0-stack.exp
    gdb/testsuite/gdb.mi/mi0-stepi.exp
    gdb/testsuite/gdb.mi/mi0-until.exp
    gdb/testsuite/gdb.mi/mi0-var-block.exp
    gdb/testsuite/gdb.mi/mi0-var-child.exp
    gdb/testsuite/gdb.mi/mi0-var-cmd.exp
    gdb/testsuite/gdb.mi/mi0-var-display.exp
    gdb/testsuite/gdb.mi/mi0-watch.exp
    gdb/version.in
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 59ffe44..5d09573 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,2008 +1,3 @@
-2001-07-06  Jim Blandy  <jimb@redhat.com>
-
-	* gdbtypes.h (builtin_type_void_func_ptr): New builtin type.
-	* gdbtypes.c (builtin_type_void_func_ptr): Define the variable.
-	(build_gdbtypes): Initialize it.
-	(_initialize_gdbtypes): Swap it.
-
-2001-07-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* mips-tdep.c (mips32_op): Correct offset.
-	(itype_op): Likewise.
-	(itype_rs): Fix formatting.
-	(itype_immediate): Fix formatting.
-	(jtype_op): Correct offset.
-	(jtype_target): Fix formatting.
-	(rtype_op): Correct offset.
-	(rtype_rs): Fix formatting.
-	(rtype_rt): Likewise.
-	(rtype_rd): Likewise.
-	(rtype_shamt): Likewise.
-	(rtype_funct): Likewise.
-
-	(mips32_next_pc):  Fix formatting and comments.  Recognize
-	coprocessor 1 branches.  Check the correct field for BLT family
-	branches.  Use itype_rt instead of itype_rs for the second register
-	of a BNE or BNEL branch.  Move (unreachable) default case.
-
-2001-07-04  Andrew Cagney  <ac131313@redhat.com>
-
-	* ui-out.h (struct ui_out_impl): Add field is_mi_like_p.
-	(ui_out_is_mi_like_p): Declare.
-	* ui-out.c (ui_out_is_mi_like_p): Define.
-	(default_ui_out_impl): Initialize is_mi_like_p to zero.
-	* cli-out.c (cli_ui_out_impl): Ditto.
-	* breakpoint.c (print_it_typical): Use ui_out_is_mi_like_p.
-	(watchpoint_check, print_one_breakpoint, mention): Ditto.
-	* infrun.c (print_stop_reason, normal_stop): Ditto.
-
-2001-07-05  Daniel Jacobowitz  <drow@mvista.com>
-
-	* mips-tdep.c (mips_software_single_step): New function.
-	* config/mips/tm-mips.h: Add prototype for
-	mips_software_single_step.
-
-2001-07-05  Daniel Jacobowitz  <drow@mvista.com>
-
-	* ppc-linux-nat.c (supply_gregset): Use elf_greg_t instead
-	of greg_t.
-	(fill_gregset): Likewise.
-
-2001-07-05  Andrew Cagney  <ac131313@redhat.com>
-
-	* objfiles.c (open_mapped_file): Use lbasename instead of
-	basename.
-
-2001-07-05  Jim Blandy  <jimb@redhat.com>
-
-	* d10v-tdep.c (d10v_frame_chain, d10v_frame_init_saved_regs,
-	show_regs, d10v_read_pc, d10v_write_pc, d10v_read_sp,
-	d10v_write_sp, d10v_write_fp, d10v_read_fp,
-	d10v_push_return_address): Call the functions d10v_make_daddr,
-	d10v_make_iaddr, d10v_convert_iaddr_to_raw, and
-	d10v_convert_daddr_to_raw, not the global macros D10V_MAKE_DADDR,
-	D10V_MAKE_IADDR, D10V_CONVERT_IADDR_TO_RAW, and
-	D10V_CONVERT_DADDR_TO_RAW.
-
-	* dwarf2read (dwarf2_build_psymtabs_hard): Doc fix.
-
-2001-07-05  Mark Kettenis  <kettenis@gnu.org>
-
-	* config/i386/xm-go32.h (HOST_I386): Removed.
-	* config/i386/xm-linux.h (HOST_I386): Removed.
-
-2001-07-04  Mark Kettenis  <kettenis@gnu.org>
-
-	* i387-tdep.c (print_i387_value): Add extra space after final full
-	stop in comment.
-
-2001-07-04  Andrew Cagney  <ac131313@redhat.com>
-
-	* TODO (5.1): Update.  Doco changes committed.
-
-2001-06-29  Andrew Cagney  <ac131313@redhat.com>
-
-	* config/arm/tm-arm.h: Include "floatformat.h".
-
-2001-06-29  Andrew Cagney  <ac131313@redhat.com>
-
-	* i387-tdep.c: Include "gdb_assert.h".
-	(print_i387_value): Use extract_floating to extract the FP value
-	from a zero padded local buffer.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	* TODO: Delete all thread items.  The thread code was overhauled.
-
-2001-07-04  Elena Zannoni  <ezannoni@redhat.com>
-
-	* memattr.c (create_mem_region): Move n to next memory region,
-	to avoid infinite loop.
-
-	* memattr.h: Add copyright statement.
-	* memattr.c: Ditto.
-
-2001-07-04  Jim Blandy  <jimb@redhat.com>
-
-	* dwarf2read.c (struct partial_die_info): New member: has_pc_info.
-	(read_partial_die): Delete fourth argument; we return this info in
-	the struct partial_die_info object itself now.
-	(dwarf2_build_psymtabs_hard, scan_partial_symbols): Use the
-	has_pc_info field of the partial die struct, rather than passing a
-	variable by reference to read_partial_die.
-
-	* dwarf2read.c (dwarf2_build_psymtabs_hard): Remove extraneous
-	code in loop condition.
-
-2001-07-03  Michael Snyder  <msnyder@redhat.com>
-
-	* thread_db (find_new_threads_callback, thread_db_thread_alive, 
-	attach_thread): Update comments.
-
-2001-06-29  Ken Whaley  <ken@believe.com>
-
-	* thread-db.c (attach_thread): Check for TD_THR_ZOMBIE in addition
-	to TD_THR_UNKNOWN when looking for defunct zombie threads.
-	(thread_db_thread_alive): Ditto.
-	(find_new_threads_callback): Ditto.
-
-2001-07-02  Daniel Jacobowitz  <drow@mvista.com>
-
-	* MAINTAINERS: Add myself to the write-after-approval list.
-
-2001-07-02  Daniel Jacobowitz  <drow@mvista.com>
-
-	* solib-svr4.c: Include "elf/mips.h".
-	(elf_locate_base): Make DT_MIPS_RLD_MAP block unconditional.
-
-2001-07-02  Jim Blandy  <jimb@redhat.com>
-
-	* dwarf2read.c (read_comp_unit, sibling_die, dump_die,
-	dump_die_list, store_in_ref_table, follow_die_ref): Make these
-	static; they're private functions.
-
-2001-07-01  Mark Elbrecht <snowball@bigfoot.com>
-
-	* coffread.c (coff_symfile_read): Parse DWARF2 info if present.
-
-2001-06-28  Elena Zannoni  <ezannoni@redhat.com>
-
-	* TODO: Add import of readline 4.2 as a gdb 5.2 task.
-
-2001-06-29  Andrew Cagney  <ac131313@redhat.com>
-
-	* config/djgpp/fnchange.lst: Sort.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	* config/djgpp/fnchange.lst: Rename mi0-var-block.exp,
-	mi0-var-cmd.exp, mi0-var-child.exp and mi0-var-display.exp.
-
-2001-06-29  Andreas Jaeger  <aj@suse.de>
-
-	* MAINTAINERS: Add myself to the write-after-approval list.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	* remote-array.c (SWAP_TARGET_AND_HOST): Delete macro.
-	(get_hex_word): Don't use HOST_BYTE_ORDER.
-	(array_fetch_registers): Add variable ``reg''.  Use
-	store_unsigned_integer to byte-swap the register.  Delete unused
-	local ``regs''.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	* MAINTAINERS: Add Per Bothner to Java maintainers.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	* rdi-share/unixcomm.c (SERIAL_PREFIX): Always provide a default.
-	* rdi-share/hostchan.h (__unix): Hack, provide a default value.
-	* rdi-share/host.h (__unix): Hack, define when __NetBSD__.
-	* TODO: Update.
-	* MAINTAINERS: Update.  arm-elf builds.
-
-2001-06-28  Jim Blandy  <jimb@redhat.com>
-
-	* d10v-tdep.c (d10v_ts2_dmap_register): Doc fix.
-
-	* d10v-tdep.c (d10v_frame_chain_valid, d10v_use_struct_convention,
-	d10v_breakpoint_from_pc, d10v_register_byte,
-	d10v_register_raw_size, d10v_register_virtual_size,
-	d10v_register_virtual_type, d10v_register_convertible,
-	d10v_register_convert_to_virtual, d10v_register_convert_to_raw,
-	d10v_make_daddr, d10v_make_iaddr, d10v_daddr_p, d10v_iaddr_p,
-	d10v_convert_iaddr_to_raw, d10v_convert_daddr_to_raw,
-	d10v_store_struct_return, d10v_store_return_value,
-	d10v_extract_struct_value_address, d10v_frame_saved_pc,
-	d10v_saved_pc_after_call, d10v_pop_frame, d10v_skip_prologue,
-	d10v_frame_chain, d10v_frame_init_saved_regs,
-	d10v_init_extra_frame_info, d10v_read_pc, d10v_write_pc,
-	d10v_read_sp, d10v_write_sp, d10v_write_fp, d10v_read_fp,
-	d10v_push_return_address, d10v_push_arguments,
-	d10v_extract_return_value): Make these functions static.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	From Fernando Nasser:
-	* infrun.c (handle_inferior_event): Handle "nexti" inside function
-	prologues.
-	
-2001-06-28  Michael Snyder  <msnyder@redhat.com>
-
-	* infrun.c (handle_inferior_event): Replace prev_pc test in all
-	calls to bpstat_stop_status (removed in 1999-09-24).  This test
-	helps distinguish stepping over a breakpoint trap from stepping
-	thru a jump to the instruction after a breakpoint trap.
-	(handle_inferior_event): Don't bother writing the PC if
-	DECR_PC_AFTER_BREAK is zero (optimization).
-	* breakpoint.c (bpstat_stop_status): Add comment explaining the
-	purpose and usage of the "not_a_breakpoint" argument in computing
-	the breakpoint address.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	From 2000-12-03 Stephane Carrez <Stephane.Carrez@worldnet.fr>:
-	* monitor.c (setmem_resp_delim_pattern): New regexp pattern.
-	(setreg_resp_delim_pattern): Likewise.
-	(setmem_resp_delim_fastmap): New buffer.
-	(setreg_resp_delim_fastmap): Likewise.
-	(monitor_open): Initialize above regexp if they are defined.
-	(monitor_write_memory): Use regexp to check the result of write.
-	(monitor_store_register): Likewise to check result of register set.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	From 2000-06-14 John Marshall <john_w_marshall@palm.com>:
-	* coff-solib.c: Include symfile.h and objfiles.h to make
-	OBJF_SHARED visible.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	* configure.in (--enable-gdbmi): Enable by default.
-	* configure: Regenerate.
-	* TODO: Update.
-	* NEWS: Update
-
-2001-06-28  Joel Brobecker  <brobecker@act-europe.fr>
-
-        * solib-osf.c (osf_in_dynsym_resolve_code): Add a comment
-        explaining the consequences of always returning zero. No code
-        change.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	From 2001-06-08 Daniel Jacobowitz <djacobowitz@mvista.com>:
-	* defs.h (enum target_signal): Add TARGET_SIGNAL_REALTIME_65
-	to TARGET_SIGNAL_REALTIME_127.
-	* target.c (struct signals): Add SIG63 to SIG127.
-	(target_signal_from_host): Handle up to 127 signals.
-	(do_target_signal_to_host): Likewise.
-	
-2001-06-27  Andrew Cagney  <ac131313@redhat.com>
-
-	* remote-sds.c (sds_start_remote): Change type of ``c'' to int
-	from possibly unsigned char.
-
-2001-06-27  Andrew Cagney  <ac131313@redhat.com>
-
-	* ser-ocd.c: Delete file.
-	* Makefile.in (ALLDEPFILES): Remove ser-ocd.c
-	(ser-ocd.o): Delete target.
-	* TODO: Update.
-	* NEWS: Update.
-
-2001-06-27  Andrew Cagney  <ac131313@redhat.com>
-
-	* MAINTAINERS (Write After Approval): Sort.
-	(Past Maintainers): Daniel Berlin stepped down as C++ maintainer.
-
-2001-06-26  Andrew Cagney  <ac131313@redhat.com>
-
-	* breakpoint.c (breakpoint_1): Always output the breakpoint
-	headings.  Leave it to ui-out to decide which
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* stack.c (print_frame): For ui_out, output a list of arguments.
-
-2001-06-25  Kevin Buettner  <kevinb@redhat.com>
-
-	* MAINTAINERS (paper trail): Update.
-
-2001-06-25  Michael Snyder  <msnyder@redhat.com>
-
-	* infrun.c: Eliminate the "thread_step_needed" state variable, 
-	and replace it with a relatively simple test in resume.
-	(resume): Replace thread_step_needed logic with a test for
-	stepping, breakpoint_here_p and breakpoints_inserted.
-	Move CANNOT_STEP_BREAKPOINT logic to after thread_step logic.
-	(proceed): Discard thread_step_needed logic.
-	(wait_for_inferior, fetch_inferior_event, handle_inferior_event):
-	Discard thread_step_needed logic.
-
-2001-06-24  Fernando Nasser  <fnasser@redhat.com>
-
-	* remote-rdi.c (arm_rdi_wait): Fix return type in prototype.
-	* rdi-share/host.h: Add missing parenthesis in conditional.
-
-2001-06-22  J.T. Conklin  <jtc@redback.com>
-
-	* configure.in: include nlist.h when checking for member som_addr
-	in struct so_map.
-	* configure: regenerate.
-
-2001-06-21  Keith Seitz  <keiths@redhat.com>
-
-	* cli-out.c (cli_out_new): Initialize new structure member
-	"suppress_output".
-
-2001-06-20  Andrew Cagney  <ac131313@redhat.com>
-
-	* ui-out.h (ui_out_table_header): Add parameter ``col_name''.
-	(table_header_ftype): Ditto.
-	* cli-out.c (cli_table_header): Update.
-	* ui-out.c (ui_out_table_header): Update.
-	(uo_table_header): Update.
-	(default_table_header): Update.
-	(append_header_to_list): Update.
-	(struct ui_out_header): Add field ``col_name''.
-	(append_header_to_list): Use xstrdup.  Initialize col_name.
-	* breakpoint.c (breakpoint_1): Pass COL_NAME to
-	ui_out_table_header.
-
-2001-06-19  Andrew Cagney  <ac131313@redhat.com>
-
-	* cli-out.c: Include "gdb_assert.h'.
-	(struct ui_out_data): Add field ``suppress_output.
-	(cli_table_begin): When NR_ROWS is zero, suppress_output.
-	(cli_table_end): Clear suppress_output.
-	(cli_table_body): Check suppress_output.
-	(cli_table_header, cli_begin): Ditto.
-	(cli_end, cli_field_int, cli_field_skip): Ditto.
-	(cli_field_string, cli_field_fmt, cli_spaces): Ditto.
-	(cli_text, cli_message, cli_wrap_hint): Ditto.
-	* breakpoint.c (breakpoint_1): Close the ui_out table before
-	printing the breakpoint not found message.
-
-2001-06-18  Andrew Cagney  <ac131313@redhat.com>
-
-	* ui-out.c (ui_out_table_begin): Add parameter ``nr_rows''.
-	(default_table_begin): Ditto.
-	(uo_table_begin): Ditto.
-	* cli-out.c (cli_table_begin): Ditto.
-	* ui-out.h (ui_out_table_begin): Update
-	(table_begin_ftype): Update.
-	* breakpoint.c (breakpoint_1): Pass nr_printable_breakpoints to
-	ui_out_table_begin.
-
-2001-06-16  Andrew Cagney  <ac131313@redhat.com>
-
-	* breakpoint.c (breakpoint_1): Restructure.  Compute the
-	nr_printable_breakpoints.  Move the header output to before the
-	main print breakpoints loop.
-	(user_settable_breakpoint): New function.
-
-2001-06-18  Andrew Cagney  <ac131313@redhat.com>
-
-	* infrun.c, breakpoint.c: Use strncmp as the "mi" test.  Allow,
-	"mi", "mi0" and "mi1".
-
-2001-06-17  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbarch.sh: Generate an error when conflicting macro
-	definitions.  Generate an error when both pure multi-arch and
-	"tm.h".
-	* gdbarch.h, gdbarch.c: Regenerate.
-	* defs.h (GDB_MULTI_ARCH_TM): Rewrite definition.
-	
-2001-06-17  Andrew Cagney  <ac131313@redhat.com>
-
-	* config/sparc/tm-sun4sol2.h (GDB_MULTI_ARCH): Down grade to
-	GDB_MULTI_ARCH_PARTIAL from two.
-
-2001-06-17  Fernando Nasser  <fnasser@redhat.com>
-
-	From 2001-06-15  Eirik Fuller  <eirik@hackrat.com>
-	* cli/cli-script.c (free_command_lines): Reset list pointer.
-
-2001-06-16  Andrew Cagney  <ac131313@redhat.com>
-
-	* arch-utils.c (init_frame_pc_default): New function
-	* arch-utils.h (init_frame_pc_default): Declare.
-	* gdbarch.sh (INIT_FRAME_PC): Default to init_frame_pc_default and
-	not init_frame_pc_noop.
-	* gdbarch.h, gdbarch.c: Re-generate.
-	* blockframe.c (INIT_FRAME_PC): Delete macro definition.
-	* mips-tdep.c (mips_gdbarch_init): Set init_frame_pc to
-	init_frame_pc_noop.
-
-2001-06-16  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbarch.c: Regenerate.  Out-of-sync with gdbarch.sh.
-
-2001-06-15  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbarch.sh (CANNOT_FETCH_REGISTER): Multi-arch.
-	(CANNOT_STORE_REGISTER): Ditto.
-	* infptrace.c (CANNOT_FETCH_REGISTER): Delete definition.
-	(CANNOT_STORE_REGISTER): Ditto.
-	* regcache.c (CANNOT_STORE_REGISTER): Ditto.
-	* lynx-nat.c (CANNOT_STORE_REGISTER): Ditto.
-	* arch-utils.h (cannot_register_not): Define.
-	* arch-utils.c (cannot_register_not): Declare.
-	
-2001-06-15  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbarch.sh: Clarify pre/post default
-	(INIT_FRAME_PC_FIRST, INIT_FRAME_PC): Multiarch.
-	* blockframe.c (get_prev_frame): Remove #ifdef from around
-	INIT_FRAME_PC_FIRST call.
-	* arch-utils.c (init_frame_pc_noop): Define.
-	* arch-utils.h (init_frame_pc_noop): Declare.
-	* config/mips/tm-mips.h (INIT_FRAME_PC_FIRST): Delete.
-	(INIT_FRAME_PC, mips_init_frame_pc_first): Ditto.
-	* mips-tdep.c (mips_init_frame_pc_first): Make static.
-	(mips_gdbarch_init): Initialize init_frame_pc_first.
-	(mips_dump_tdep): Update.
-
-2001-06-15  Michael Snyder  <msnyder@redhat.com>
-
-	* infrun.c (context_switch): New function.  Abstract the operation
-	of saving and restoring infrun's state when switching threads.
-	(handle_inferior_event): Normalize the handling of the 'thread hop'
-	event (when the wrong thread hits a thread-specific breakpoint, 
-	and we need to solo-step that thread past the breakpoint).
-	Call keep_going, instead of target_resume.  Handle the subsequent
-	singlestep-trap as a normal event instead of just resuming.
-
-2001-06-15  Andrew Cagney  <ac131313@redhat.com>
-
-	* arch-utils.c (core_addr_identity): New function.  Rename
-	default_convert_from_func_ptr_addr.
-	* gdbarch.sh (CONVERT_FROM_FUNC_PTR_ADDR): Update.
-	(ADDR_BITS_REMOVE): Define.  Default to core_addr_identity.
-	* defs.h (ADDR_BITS_REMOVE): Delete macro definition.
-	* config/mips/tm-mips.h (ADDR_BITS_REMOVE): Delete definition.
-	* mips-tdep.c (mips_addr_bits_remove): Make static.
-	(mips_gdbarch_init): Initialize addr_bits_remove.
-
-2001-06-15  Andrew Cagney  <ac131313@redhat.com>
-
-	From 2001-02-26  D.J. Barrow <djbarrow@de.ibm.com>:
-	* configure.tgt: Add S/390 31 & 64 bit target configuration.
-	* configure.host: Ditto for host.
-
-2001-06-15  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbarch.sh (EXTRACT_STRUCT_VALUE_ADDRESS_P): Delete definition.
-	(EXTRACT_STRUCT_VALUE_ADDRESS): Change to a function with
-	predicate.
-	* gdbarch.h, gdbarch.c: Regenerate.
-	* values.c (value_being_returned): Change the reference to
-	EXTRACT_STRUCT_VALUE_ADDRESS_P to a function call.
-
-2001-06-15  Joel Brobecker <brobecker@act-europe.fr>
-
-        * MAINTAINERS: Add Paul Hilfinger and Joel Brobecker to the
-        Write After Approval list.
-
-2001-06-14  Michael Snyder  <msnyder@redhat.com>
-
-	* remote.c (show_remote_protocol_qSymbol_packet_cmd, 
-	set_remote_protocol_qSymbol_packet_cmd): New functions.
-	(init_all_packet_configs, show_remote_cmd): Add qSymbol packet.
-	(remote_check_symbols): New function.  Implement qSymbol packet, 
-	allowing target to request symbol lookup service from gdb.
-	(remote_open_1, remote_async_open_1): Call remote_check_symbols,
-	allowing symbol lookup from exec_bfd on connection to target.
-	(remote_new_objfile): New function.  Catch new objfile notifications
-	from shared library module, and call remote_check_symbols.
-	(_initialize_remote): Hook remote_new_objfile into the shared
-	library notification chain.  Add "set remote symbol-lookup" command.
-
-2001-06-14  Keith Seitz  <keiths@redhat.com>
-
-	* tracepoint.c (trace_command): We now have tracepoint
-	events. Get rid of those ugly hooks.
-	(tracepoint_operation): Likewise.
-	(trace_pass_command): Likewise.
-
-2001-06-13  Michael Snyder  <msnyder@redhat.com>
-
-	* gdbthread.h (struct thread_info): Add new fields: 
-	current_line, current_symtab, step_sp, for saved infrun state.
-	* thread.c (save_infrun_state, load_infrun_state): Save and
-	restore current_line, current_symtab, and step_sp.
-	(add_thread): Rather than adding assignments to initialize
-	the new fields, just use memset (tp, 0, sizeof (*tp).
-	This way future new fields will not be overlooked.
-	* infrun.c (handle_inferior_event): Save and restore save_sp,
-	current_line, and current_symtab when switching threads.
-
-2001-06-13  Elena Zannoni  <ezannoni@redhat.com>
-
-	* MAINTAINERS: Add Andrew Cagney as co-maintainer of
-        testsuite/gdb.mi.
-
-2001-06-11  Andrew Cagney  <ac131313@redhat.com>
-
-	* symtab.c (lookup_symtab_1): Replace basename with lbasename.
-	(lookup_partial_symtab, file_matches): Ditto.
-	(make_source_files_completion_list): Ditto.
-	(make_file_symbol_completion_list): Ditto.  Make local char*
-	variable ``tail'' constant.
-	(make_source_files_completion_list): Ditto with ``base_name''.
-	* source.c (open_source_file): Use lbasename. Make ``p'' const
-	char *.
-
-2001-06-13  Eli Zaretskii  <eliz@is.elta.co.il>
-
-	* config/i386/xm-go32.h (SLASH_P, ROOTED_P, SLASH_CHAR)
-	(SLASH_STRING): Remove unised definitions.
-	* config/i386/xm-cygwin.h: Likewise.
-
-2001-06-12  Andrew Cagney  <ac131313@redhat.com>
-
-	* ui-out.c (ui_out_list_begin): Add parameter ``id''.
-	(make_cleanup_ui_out_list_begin_end): Ditto.  Open the list.
-	* ui-out.h: Update declarations.
-
-Mon Jun 11 17:26:43 2001  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* source.c (openp): Make parameters ``path'' and ``string''
- 	constant.
-	(openp): Use alloca to safely duplicate ``string''. Make local
- 	variables ``p'' and ``p1'' constant. Delete char* casts.
-	* defs.h: Update.
-
-	* symtab.c (lookup_symtab_1): Make parameter ``name'' constant.
-	(lookup_symtab, lookup_partial_symtab): Ditto.
-	* symtab.h (lookup_symtab, lookup_partial_symtab): Update.
-
-2001-06-11  Andrew Cagney  <ac131313@redhat.com>
-
-	* ui-out.h (ui_out_table_begin): Make char* parameters constant.
-	(ui_out_table_header, ui_out_field_int): Ditto.
-	(ui_out_field_core_addr, ui_out_field_string): Ditto.
-	(ui_out_field_stream, ui_out_field_fmt): Ditto.
-	(ui_out_field_skip, ui_out_text, ui_out_message): Ditto.
-	* ui-out.c (ui_out_table_begin, ui_out_table_header): Update.
-	(ui_out_field_core_addr, ui_out_field_stream): Update.
-	(ui_out_field_string, ui_out_field_fmt): Update.
-	(ui_out_text, ui_out_message): Update.
-	(append_header_to_list): Make char* parameters constant.
-	(uo_table_header, uo_table_begin): Ditto.
-	(uo_field_int, uo_field_skip): Ditto.
-	(uo_field_string, uo_field_fmt): Ditto.
-	(uo_text, uo_message): Ditto.
-
-2001-06-11  Eli Zaretskii  <eliz@is.elta.co.il>
-
-	* completer.c (gdb_completer_loc_break_characters): New variable.
-	(line_completion_function): If we are completing on locations,
-	back up the start of word pointer past all characters which can
-	appear in a location spec.
-	(location_completer): New function.
-
-	* completer.h: Add prototype for location_completer.
-
-	* symtab.c (make_source_files_completion_list)
-	(add_filename_to_list, not_interesting_fname): New functions.
-	(filename_seen): New function, body extracted from
-	output_source_filename.
-	(output_source_filename): Call filename_seen to check if the file
-	was already printed.
-	(make_symbol_completion_list): If TEXT includes a
-	double-quoted string, return an empty list, not NULL.
-	(make_file_symbol_completion_list): New function, similar to
-	make_symbol_completion_list but with an additional argument
-	SRCFILE.
-
-	* symtab.h (make_file_symbol_completion_list)
-	(make_source_files_completion_list): Add prototypes.
-
-	* breakpoint.c (_initialize_breakpoint): Make location_completer
-	be the completion function for all commands which set breakpoints
-	and watchpoints.
-	(top-level): #include "completer.h".
-
-	* tracepoint.c (_initialize_tracepoint): Make location_completer
-	be the completion function for the "trace" command.
-	(top-level): #include "completer.h".
-
-	* printcmd.c (_initialize_printcmd): Make location_completer be
-	the completion function for the "print", "inspect", "call", and
-	"disassemble" commands.
-	(top-level): #include "completer.h".
-
-	* infcmd.c (_initialize_infcmd): Make location_completer be the
-	completion function for the "go", "jump", and "until" commands.
-	(top-level): #include "completer.h".
-
-2001-06-10 Christopher Faylor <cgf@redhat.com>
-
-	* gnu-regex.c: Eliminate obsolete check for _MSC_VER.
-	* utils.c (notice_quit): Remove dummy function only used for _MSC_VER.
-	* values.c (unpack_double): Remove obsolete check for _MSC_VER.
-	* defs.h: Ditto.
-	* m32r-rom.c: Ditto.
-	* p-exp.y: Ditto.
-	* ser-e7kpc.c: Ditto.  Define WIN32_LEAN_AND_MEAN under _WIN32, for
-	faster compilation.
-	(get_ds_base): Remove _MSC_VER version of this function.
-	* nindy-share/ttyflush.c: Ditto.
-	* rdi-share/host.h: Ditto.
-	* ser-go32.c (dos_readchar): Remove call to obsolete function.
-	* remote-sim.c (gdb_os_poll_quit): Ditto.
-	* remote-e7000.c (expect): Remove obsolete #if 0'ed code.
-
-	* main.c (captured_main): Eliminate special Cygwin checks.
-	* ser-tcp.c: Remove unneeded __CYGWIN__ guard against system include.
-
-2001-06-09  Andrew Cagney  <ac131313@redhat.com>
-
-	* Makefile.in (gdbcmd_h): Add ui_out_h.
-	(breakpoint.o, infcmd.o, main.o, printcmd.o, stack.o): Ditto.
-	(thread.o, top.o): Ditto.
-
-	* ui-out.h (table_begin_ftype): Make string parameters constant.
-	(table_header_ftype): Ditto.
-	(field_int_ftype): Ditto.
-	(field_skip_ftype): Ditto.
-	(field_string_ftype): Ditto.
-	(field_fmt_ftype): Ditto.
-	(text_ftype): Ditto.
-	(message_ftype): Ditto.
-	* cli-out.c (cli_table_begin): Ditto.
-	(cli_table_header): Ditto.
-	(cli_field_int): Ditto.
-	(cli_field_skip): Ditto.
-	(cli_field_string): Ditto.
-	(cli_field_fmt): Ditto.
-	(cli_text): Ditto.
-	(cli_message): Ditto.
-	(out_field_fmt): Ditto.
-	* ui-out.c (default_table_begin): Ditto.
-	(default_table_header): Ditto.
-	(default_field_int): Ditto.
-	(default_field_skip): Ditto.
-	(default_field_string): Ditto.
-	(default_field_fmt): Ditto.
-	(default_text): Ditto.
-	(default_message): Ditto.
-
-2001-06-08  Michael Snyder  <msnyder@redhat.com>
-
-	* breakpoint.c (delete_breakpoint): Pass mark_inserted to 
-	remove_breakpoint, so that the subsequent test for
-	bpt->inserted will succeed, and duplicates will be fixed up.
-
-2001-06-08  Per Bothner  <per@bothner.com>
-
-	* dwarf2read.c (set_cu_language):  Handle DW_LANG_Java.
-
-2001-06-07  Keith Seitz  <keiths@redhat.com>
-
-	* tracepoint.c (tracepoint_opertation): Add ui event
-	notifications.
-	(trace_pass_command): Ditto.
-	
-2001-06-07  Andrew Cagney  <ac131313@redhat.com>
-
-	* MAINTAINERS (Write After Approval): Note the entry criteria.
-	(HP/PA): Jeff Law stepped down
-
-2001-06-07  Jim Blandy  <jimb@redhat.com>
-
-	* gdbarch.sh: Make sure that '[' doesn't interpret interesting
-	variable values as operators.
-
-2001-06-07  Keith Seitz  <keiths@redhat.com>
-
-	* gdb-events.sh: Fix quote escaping which was obsoleted
-	by last patch.
-
-2001-06-07  Keith Seitz  <keiths@redhat.com>
-
-	* gdb-events.sh: Make if statements and tests
-	a little more portable.
-	Don't use shell's echo command to put strings containing
-	escaped characeters into a file -- different flavors of /bin/sh
-	require differnt levels of escaping. Use cat <<EOF instead.
-	Our internal field separator is a colon. Change all
-	commands which assume it is a space.
-
-2001-06-06  Mark Kettenis  <kettenis@gnu.org>
-
-	* lin-lwp.c (struct lwp_info): Add member `resumed'.
-	(iterate_over_lwps): Make sure we can handle CALLBACK deleting the
-	LWP it's called for.
-	(lin_lwp_attach): Mark LWP as resumed to make sure the fake
-	SIGSTOP is reported.
-	(resume_clear_callback): New function.
-	(resume_set_callback): New function.
-	(lin_lwp_resume): Mark all LWP's that we're going to resume as
-	resumed, and unmark all others.
-	(status_callback): Only report a pending wait status if we pretend
-	that LP has been resumed.
-	(resumed_callback): New function.
-	(lin_lwp_wait): Add assertions to check that LWP's are properly
-	marked as resumed.  Partially revert 2001-05-25 patch by Michael
-	Snyder: do not resume all threads.  Add comment explaining the
-	problems associated with this bit of code.
-
-2001-06-07  Keith Seitz  <keiths@redhat.com>
-
-	* MAINTAINTERS: Syd Polk is stepping down from
-	maintaining libgui. I am replacing him.
-
-2001-06-07  Eli Zaretskii  <elis@is.elta.co.il>
-
-	* config/mips/tm-irix6.h: New file.
-
-	* config/mips/irix6.mh: New file.
-
-	* config/mips/irix6.mt: New file.
-
-	* config/mips/xm-irix6.h: New file.
-
-	* config/mips/nm-irix6.h: New file.
-
-	* mips-tdep.c (mips_gdbarch_init) <MIPS_ABI_N32>: Set up the
-	disassembler info in tm_print_insn_info as appropriate for the N32
-	ABI.  Force N32 ABI to be the default if the CPU is R8000 or
-	R10000.
-
-	* configure.tgt (mips*-sgi-irix6*): Map to irix6.
-
-	* configure.host (mips*-sgi-irix6*): Ditto.
-
-2001-06-07  Andrew Cagney  <ac131313@redhat.com>
-
-	* gnu-v3-abi.c: Include "gdb_assert.h".
-	(build_gdb_vtable_type): Replace abort() with gdb_assert().
-
-2001-06-06  Jim Blandy  <jimb@redhat.com>
-
-	* cp-abi.h: Rearrange code to put documentation comments above the
-	functions we export.  The actual function table itself simply
-	refers to those functions.  Minor doc fixes.
-
-	* gdbarch.sh: Changes to effect the following:
-	* gdbarch.c (initialize_non_multiarch): New function.
-	* gdbarch.h (initialize_non_multiarch): New declaration.
-	* arch-utils.c (initialize_current_architecture): For
-	non-multiarch configurations, call initialize_non_multiarch.
-
-2001-06-06  Andrew Cagney  <ac131313@redhat.com>
-
-	* symfile.c (compare_psymbols): Replace PTR with void*. Delete
-	declaration.
-	(compare_symbols): Ditto.
-
-2001-06-06  Jonathan Larmour  <jlarmour@redhat.com>
-
-	* arch-utils.c (generic_prepare_to_proceed): Allow for having
-	stopped due to a Ctrl-C as well as breakpoints.
-
-	* hppa-tdep.c (hppa_prepare_to_proceed): Add FIXME as this may not
-	support thread switches after Ctrl-C.
-	* lin-lwp.c (lin_lwp_prepare_to_proceed): Ditto.
-	* linux-thread.c (linuxthreads_prepare_to_proceed): Ditto.
-	* m3-nat.c (mach3_prepare_to_proceed): Ditto.
-
-2001-06-06  Jim Blandy  <jimb@redhat.com>
-
-	* gdbarch.sh, gdbarch.c: Revert change of 2001-06-01; all
-	per-architecture data should be registered at initialization time,
-	before any gdbarch objects get used, so the generality is
-	unnecessary.
-
-2001-06-06  Keith Seitz  <keiths@redhat.com>
-
-	* gdb-events.sh (function_list): Add tracepoint_create,
-	tracepoint_delete, and tracepoint_modify events.
-	* gdb-events.c: Regenerated.
-	* gdb-events.h: Regenerated.
-
-2001-06-06  Keith Seitz  <keiths@redhat.com>
-
-	* gdb-events.sh: Update copyrights.
-	Change free to xfree.
-	* gdb-events.c: Regenerated.
-	* gdb-events.h: Regenerated.
-
-2001-06-06  Eli Zaretskii  <eliz@is.elta.co.il>
-
-	* source.c (mod_path, openp): Use #ifdef HAVE_DOS_BASED_FILE_SYSTEM
-	instead of #if HAVE_DOS_BASED_FILE_SYSTEM.
-	* completer.c: Ditto.
-	* cli/cli-cmds.c (cd_command): Ditto.
-
-2001-06-04  Eli Zaretskii  <eliz@is.elta.co.il>
-
-	* mips-tdep.c (show_mipsfpu_command): Remove unused variable msg.
-	(mips_set_processor_type_command): Remove unused variable j.
-	(mips_breakpoint_from_pc): Declare breakpoint instruction
-	sequences as unsigned char, to avoid compiler warnings.
-
-	* source.c (mod_path, openp): Use HAVE_DOS_BASED_FILE_SYSTEM
-	instead of system-specific define's like _WIN32 and __MSDOS__.
-	Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_P and
-	ROOTED_P.
-	(top-level): #include "filenames.h".
-
-	* solib.c (solib_open): Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH
-	instead of SLASH_CHAR, ROOTED_P and SLASH_P.
-	(top-level): #include "filenames.h".
-
-	* defs.h (SLASH_P, SLASH_CHAR, ROOTED_P): Remove definitions.
-	(SLASH_STRING): Define only for _WIN32.
-
-	* completer.c: Use HAVE_DOS_BASED_FILE_SYSTEM instead of
-	__MSDOS_.
-
-	* cli/cli-cmds.c (cd_command): Use IS_DIR_SEPARATOR and
-	IS_ABSOLUTE_PATH instead of SLASH_P and ROOTED_P.  Replace
-	system-specific ifdefs with HAVE_DOS_BASED_FILE_SYSTEM.
-	(top-level): #include "filenames.h".
-
-	* go32-nat.c (go32_wait): Change the return value to ptid_t.
-
-	* config/djgpp/fnchange.lst: Add two new files in the
-	gdb/testsuite/gdb.c++/ directory to the remapped names.
-
-	* config/djgpp/djconfig.sh (lt_cv_sys_max_cmd_len): Set to 12KB.
-
-2001-06-01  Jim Blandy  <jimb@redhat.com>
-
-	Expand the gdbarch per-architecture data vector as needed, rather
-	than requiring that all per-architecture data be registered before
-	the first gdbarch object is allocated.
-	* gdbarch.sh: Changes to effect the following:
-	* gdbarch.c (alloc_gdbarch_data, init_gdbarch_data): Delete
-	declarations and definitions.
-	(check_gdbarch_data): New function, and declaration.
-	(gdbarch_alloc): Don't call alloc_gdbarch_data; leaving the fields
-	zero is good enough.
-	(free_gdbarch_data): Tolerate a null data pointer.  Free only
-	those data items gdbarch->data actually has allocated.
-	(set_gdbarch_data, gdbarch_data): Call check_gdbarch_data.
-	(gdbarch_update_p): No need to call init_gdbarch_data.
-
-2001-06-01  Kevin Buettner  <kevinb@redhat.com>
-
-	* ia64-tdep.c (is_float_or_hfa_type_recurse): Call check_typedef()
-	on types that we wish to recurse on.
-	(slot_alignment_is_next_even): New function.
-	(ia64_push_arguments): Call slot_alignment_is_next_even() to
-	examine the type in order to decide if it's necessary to skip
-	an odd slot.
-
-2001-06-01  Michael Snyder  <msnyder@redhat.com>
-
-	* thread.c (delete_step_resume_breakpoint): New function.
-	Maintain internal consistency of the thread list while deleting
-	a step_resume_breakpoint.
-	* gdbthread.h (delete_step_resume_breakpoint): Export.
-	* breakpoint.c (bpstat_find_step_resume_breakpoint):
-	Make thread-aware: don't return a step_resume_breakpoint 
-	for the wrong thread.
-	* infrun.c (wait_for_inferior): Call delete_step_resume_breakpoint
-	instead of delete_breakpoint_current_contents.
-	(fetch_inferior_event): Ditto.
-	(handle_inferior_event): Call delete_step_resume_breakpoint
-	instead of delete_breakpoint.
-	* infrun.c (handle_inferior_event): After singlestepping over a
-	thread-specific breakpoint, use currently_stepping() to decide
-	whether to step or continue.
-
-2001-06-01  Jim Blandy  <jimb@redhat.com>
-
-	* gnu-v3-abi.c (gnu_v3_abi_ops, vtable_type_gdbarch_data): Make
-	these static --- there's no reason other files should use these.
-
-	* partial-stab.h (case N_FUN: case 'f':, case N_FUN: case 'F':)
-	Fix memory leak.
-
-	* partial-stab.h: New complaint: function_outside_compilation_unit.
-	(case N_FUN: case 'f':, case N_FUN: case 'F':): If pst is zero,
-	complain, and don't try to set pst's start address.
-
-2001-05-31  Kevin Buettner  <kevinb@redhat.com>
-
-	* ia64-linux-tdep.c (IA64_LINUX_SIGCONTEXT_OFFSET):  Revise to
-	match the location at which the kernel is placing the sigcontext
-	struct.
-
-	* ia64-tdep.c (max_skip_non_prologue_insns): New static global.
-	(refine_prologue_limit): New function.
-	(examine_prologue):  Further limit number of instructions
-	scanned by calling refine_prologue_limit().  Revise way in
-	which the end of prologue address is computed for frameless
-	functions.
-
-2001-05-29  Christopher Faylor  <cgf@redhat.com>
-
-	* partial-stab.h: Revert previous patch.
-
-2001-05-29  Christopher Faylor  <cgf@redhat.com>
-
-	* partial-stab.h: Consistently guard against pst being NULL.
-
-2001-05-29  Alexandre Oliva  <aoliva@redhat.com>
-
-	* symfile.c (compare_psymbols, compare_symbols): Declare using
-	PTR, as in the definition.
-	* minsyms.c (compare_minimal_symbols): Likewise.
-	* coffread.c (find_targ_sec): Likewise.
-	* elfread.c (free_elfinfo, elf_locate_sections): Likewise.
-	* mipsread.c (alphacoff_locate_sections): Likewise.
-	* mdebugread.c (compare_blocks): Likewise.
-
-2001-05-25  Nick Duffek  <nsd@redhat.com>
-
-	* solib.c (update_solib_list): Move target_resize_to_sections()
-	into solib_map_sections() loop.
-	(info_sharedlibrary_command): Try bfd_arch_bits_per_address() if
-	bfd_get_arch_size() fails.
-
-2001-05-25  Nick Duffek  <nsd@redhat.com>
-
-	* Makefile.in (osfsolib.c, osfsolib.o): Rename to solib-osf.c and
-	solib-osf.o.
-	* config/alpha/alpha-osf1.mh (NATDEPFILES): Replace osfsolib.o
-	with solib-osf.o and solib.o.
-	* config/alpha/alpha-osf2.mh: Likewise.
-	* config/alpha/alpha-osf3.mh: Likewise.
-	* solib-osf.c: New file, renamed and largely rewritten from
-	osfsolib.c.
-
-2001-05-25  Michael Snyder  <msnyder@redhat.com>
-
-	* lin-lwp.c (lin_lwp_attach_lwp): Call stop_wait_callback,
-	to consume the SIGSTOP generated by PTRACE_ATTACH.
-	(stop_wait_callback): If a SIGTRAP or a SIGINT event is consumed,
-	try again to get the SIGSTOP event.
-	(lin_lwp_wait): Resume all threads when ignoring a signal.
-	This will insure that newly attached threads get resumed.
-	* lin-lwp.c (stop_wait_callback): Discard redundant SIGINT events.
-	* remote.c (remote_write_bytes): Update 'p' packet pointer.
-
-2001-05-25  Jim Blandy  <jimb@redhat.com>
-
-	* gnu-v2-abi.c (gnuv2_virtual_fn_field): There's no need to clear
-	VALUE_POINTED_TO_OFFSET here; if value_cast doesn't return a
-	useful value, then we should fix that instead.
-
-2001-05-24  Nick Duffek  <nsd@redhat.com>
-
-	* solist.h (struct so_list): Document the requirement that
-	current_sos initialize some fields to 0.
-
-2001-05-24  Mark Kettenis  <kettenis@gnu.org>
-
-	* gnu-nat.c: Include <ctype.h>.
-	(gnu_pid_to_exec_file): Add PID parameter.
-	(set_sig_thread_cmd): Use PIDGET on return value from
-	thread_id_to_pid.
-	(proc_string): Use MERGEPID to construct argument to
-	pid_to_thread_id.
-
-2001-05-22  Kevin Buettner  <kevinb@redhat.com>
-
-	* breakpoint.c (breakpoint_address_is_meaningful): New function.
-	(check_duplicates): Don't compare non-meaningful addresses.
-
-2001-05-22  Michael Snyder  <msnyder@redhat.com>
-
-	* thread-db.c: Allow for defunct zombie threads.	
-	(attach_thread): Do not attempt to attach zombie thread.
-	(thread_db_thread_alive): Return false for defunct zombie thread.
-	(find_new_threads_callback): Don't add defunct zombie thread to list.
-
-2001-05-22  Jim Blandy  <jimb@redhat.com>
-
-	Add support for the GNU V3 C++ ABI.
-	(Includes changes by Dan Berlin.)
-
-        * gnu-v3-abi.c: New file.
-	* minsyms.c: #include "value.h" and "cp-abi.h".
-	(install_minimal_symbols): Check the minimal symbol table for
-	symbols that look mangled in the V3 style, and select the V3 ABI
-	if we find any.
-	* Makefile.in (SFILES): Add gnu-v3-abi.c.
-	(COMMON_OBS): Add gnu-v3-abi.o.
-	(gnu-v3-abi.o): Add new rule.
-	(minsyms.o): Depend on $(cp_abi_h) and $(value_h).
-
-2001-05-21  Jim Blandy  <jimb@redhat.com>
-
-	* values.c (value_primitive_field): If we're extracting a base
-	class, then the type of the result should be the base class being
-	extracted, not the type of which it is a base class.
-
-	* value.h (struct value): Doc fix, and rearrange members to place
-	them near their explanations.
-
-2001-05-21  Michael Snyder  <msnyder@redhat.com>
-
-	* remote.c (remote_async_wait): Added new variable fieldsize.
-	Add fieldsize (return value of hex2bin) to string pointer p.
-
-2001-05-20  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
-
-	* m68hc11-tdep.c (m68hc11_pop_frame): Fix stack pointer computation.
-	(m68hc11_analyze_instruction): Update the pc correctly.
-	(m68hc11_guess_from_prologue): Take into account the stack correction
-	for the saving address.
-
-2001-05-07  Daniel Berlin  <dan@cgsoftware.com>
-
-	Changes by Jim Ingham:
-	
-	* values.c (value_change_enclosing_type): New function.  If the
-	new enclosing type is larger than the old one, we need to allocate
-	more space.
-	* value.h: Add value_change_enclosing_type prototype.
-	* valops.c (value_cast): Use it.
-	(value_assign): Use it.
-	(value_addr): Use it.
-	(value_ind): Use it.
-	(value_full_object): Use it.
-	
-2001-05-07  Daniel Berlin  <dan@cgsoftware.com>
-
-	* values.c (value_static_field): Handle static fields that have a
-	constant value.
-
-2001-05-17  Michael Snyder  <msnyder@redhat.com>
-
-	* blockframe.c (create_new_frame): Zero all the fields via memset,
-	rather than zeroing them one by one.
-
-2001-05-17  Eli Zaretskii  <eliz@is.elta.co.il>
-
-	* top.c (user_args): Remove unused declaration.
-
-2001-05-16  Michael Snyder  <msnyder@redhat.com>
-
-	* infcmd.c (do_registers_info): Move alloca outside of loop.
-
-2001-05-15  John S Kallal  <jskallal@home.com>
-
-	* remote.c (remote_wait): Added new variable fieldsize.
-	Add fieldsize (return value of hex2bin) to string pointer p.
-
-2001-05-15  Mark Kettenis  <kettenis@gnu.org>
-
-	* sparc-tdep.c (sparc_gdbarch_init): Get the architecture from
-	info.bfd_arch_info.
-
-2001-05-14  Kevin Buettner  <kevinb@redhat.com>
-
-	* lin-lwp.c (detach_callback, lin_lwp_wait, lin_lwp_pid_to_str):
-	Adjust format strings for printing LWPs to account for the fact
-	that the type returned by GET_LWP() is now a long instead of an
-	int.
-
-2001-05-14  Kevin Buettner  <kevinb@redhat.com>
-
-	* inferior.h (null_ptid, minus_one_ptid): New variable declarations.
-	(ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
-	(ptid_get_tid, ptid_equal): New function declarations.
-	* infrun.c (null_ptid, minus_one_ptid): New variables.
-	(ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
-	(ptid_get_tid, ptid_equal): New functions.
-	(_initialize_infrun): Initialize null_ptid, minus_one_ptid,
-	inferior_ptid, and target_last_wait_ptid.
-
-	* defs.h (ptid_t): Redefine to be a struct rather than an int.
-	(pid_to_ptid, null_ptid, ptid_equal): Delete these macros.
-	(PIDGET, TIDGET, MERGEPID): Redefine these macros using the
-	new ptid accessors and constructor.
-
-	* config/i386/tm-i386v42mp.h (PIDGET, TIDGET, LIDGET, MERGEPID,
-	MKLID, MKTID, ISTID): Provide new definitions for these macros.
-	The old macros are retained, but disabled via #if 0 in order
-	to aid in future restructuring.  See FIXME.
-
-	* arm-linux-nat.c (PIDGET, TIDGET): Delete macro definitions.
-	* i386-linux-nat.c (PIDGET, TIDGET): Likewise.
-	* infptrace.c (PIDGET, TIDGET): Likewise.
-	* lin-lwp.c (PIDGET0, PIDGET, TIDGET, MERGEPID): Likewise.
-	* lin-thread.c (PIDGET0, PIDGET, TIDGET, MERGEPID): Likewise.
-	* proc-service.c (MERGEPID): Likewise.
-	* procfs.c (PIDGET, TIDGET, MERGEPID): Likewise.
-	* thread-db.c (PIDGET0, PIDGET, TIDGET, MERGEPID): Likewise.
-	* config/nm-linux.h (PIDGET0, PIDGET, TIDGET, MERGEPID): Likewise.
-	* config/i386/tm-i386sol2.h (PIDGET0, PIDGET, TIDGET, MERGEPID):
-	Likewise.
-	* config/sparc/tm-sun4sol2.h (PIDGET0, PIDGET, TIDGET, MERGEPID):
-	Likewise.
-
-	* lin-lwp.c (THREAD_FLAG): Delete macro definition.
-	(GET_LWP): Redefine in terms of ptid_get_lwp().
-	(GET_PID): Redefine in terms of ptid_get_pid().
-	(is_lwp): Redefine without the need for THREAD_FLAG.
-	(BUILD_LWP): Redefine in terms of ptid_build().
-	* lin-thread.c (THREAD_FLAG): Delete macro definition.
-	(GET_LWP): Redefine in terms of ptid_get_lwp().
-	(GET_PID): Redefine in terms of ptid_get_pid().
-	(GET_THREAD): Redefine in terms of ptid_get_tid().
-	(BUILD_THREAD, BUILD_LWP): Redefine in terms of ptid_build().
-	(is_lwp, is_thread): Redefine.
-	(linux_child_wait, check_all_signal_numbers)
-	(linuxthreads_discard_global_state, attach_thread): Declare these
-	functions to squash warnings about missing declarations.
-	* sol-thread.c (THREAD_FLAG): Delete macro definition.
-	(GET_PID): Redefine in terms of ptid_get_pid().
-	(GET_LWP): Redefine in terms of ptid_get_lwp().
-	(GET_THREAD): Redefine in terms of ptid_get_tid().
-	(BUILD_THREAD, BUILD_LWP): Redefine in terms of ptid_build().
-	(is_lwp, is_thread): Redefine.
-	* thread-db.c (THREAD_FLAG): Delete macro definition.
-	(GET_PID): Redefine in terms of ptid_get_pid().
-	(GET_LWP): Redefine in terms of ptid_get_lwp().
-	(GET_THREAD): Redefine in terms of ptid_get_tid().
-	(BUILD_THREAD, BUILD_LWP): Redefine in terms of ptid_build().
-	(is_lwp, is_thread): Redefine.
-
-	* corelow.c (add_to_thread_list, get_core_register_section):
-	Eliminate hacks needed to prevent regressions when inferior_ptid
-	wasn't wide enough to hold the core file thread id in the pid
-	component of inferior_ptid.
-
-2001-05-14  Michael Snyder  <msnyder@redhat.com>
-
-	* remote.c (hex2bin): 	Make first argument const.
-	Require explicit count, don't accept null-terminated str.
-	(remote_resume, remote_async_resume): White space fix-up.
-	(remote_write_bytes): Set nr_bytes to return value of bin2hex.
-
-2001-05-13  Mark Kettenis  <kettenis@gnu.org>
-
-	* symtab.c (lookup_symtab_1): Use lbasename (NAME) instead of
-	basename (NAME).  The FreeBSD basename returns a pointer to a
-	static buffer, even if it's simply returning a string identical to
-	its argument.
-	(lookup_partial_symtab): Likewise.
-
-2001-05-14  Michael Snyder  <msnyder@redhat.com>
-
-	* solib.c, solib.h: Add comment for function no_shared_libraries.
-	
-2001-05-14  Kevin Buettner  <kevinb@redhat.com>
-
-	* solib.h (no_shared_libraries): Make declaration match definition
-	in solib.c.
-
-2001-05-14  Andrew Cagney  <ac131313@redhat.com>
-
-	* remote.c (remote_write_bytes): Set nr_bytes before returning it.
-	* solib.h (no_shared_libraries): Declare.
-
-2001-05-12  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbarch.sh (struct gdbarch_info): Delete field bfd_architecture.
-	(gdbarch_update_p): Rewrite logic filling in INFO struct.  Use
-	user specified values when available.
-	* rs6000-tdep.c (rs6000_gdbarch_init): Update.  Get the
-	architecture from info.bfd_arch_info.
-	* gdbarch.c, gdbarch.h: Regenerate.
-
-2001-05-12  Fernando Nasser  <fnasser@redhat.com>
-
-	* remote-e7000.c (e7000_open): Check for bad baud rate.
-	* remote-st.c (st2000_open): Ditto.
-
-2001-05-11  Jim Blandy  <jimb@redhat.com>
-
-	* thread.c (do_captured_list_thread_ids): Use ui_out_tuple_begin
-	and ui_out_tuple_end instead of ui_out_list_begin and
-	ui_out_list_end.
-
-	* Makefile.in (gnu-v2-abi.o): Add $(demangle_h) to list of
-	dependencies.  Reorder dependencies to match #includes in file,
-	for easier verification.
-	
-Fri May 11 13:32:50 2001  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* breakpoint.c: Replace ui_out_list_begin, ui_out_list_end and
- 	make_cleanup_ui_out_list_end with ui_out_tuple_begin,
- 	ui_out_tuple_end and make_cleanup_ui_out_tuple_begin_end.
-	* cli/cli-setshow.c: Ditto.
-	* printcmd.c: Ditto.
-	* stack.c: Ditto.
-
-	* ui-out.h (enum ui_out_type): Fix tipo - tupple -> tuple.
-	* ui-out.c (ui_out_list_begin): Delete ``lstid'' parameter.
-	(ui_out_tuple_begin): New function.
-	(ui_out_tuple_end): New function.
-	(ui_out_tuple_begin_end): New function.
-	(make_cleanup_ui_out_list_begin_end): Replace
- 	make_cleanup_ui_out_list_end function.
-	* ui-out.h (ui_out_list_begin): Update declaration.
-	(make_cleanup_ui_out_list_begin_end): Replace
- 	make_cleanup_ui_out_list_end declaration.
-	(ui_out_tuple_begin, ui_out_tuple_end): Declare.
-	(ui_out_tuple_begin_end): Declare.
-
-2001-05-11  Jim Blandy  <jimb@redhat.com>
-
-	* gnu-v2-abi.c: Don't #include "gdb_regex.h".  We don't use it.
-
-2001-05-11  Andrew Cagney  <ac131313@redhat.com>
-
-	From 2001-03-26 Rodney Brown <RodneyBrown@mynd.com>
-	* config/pa/tm-hppa.h: Remove trigraph.
-	* hp-symtab-read.c (hpread_type_translate): Provide return value.
-	(hpread_read_struct_type): Remove trigraph. Add parameter in
-	`warning'.
-	(hpread_read_array_type): Provide return value.
-	(hpread_type_lookup): Avoid ambiguous `else'. Provide return
-	value.
-	* hppa-tdep.c (initialize_hp_cxx_exception_support): Remove
-	trigraph.
-
-2001-05-11  Jim Blandy  <jimb@redhat.com>
-
-	* mips-tdep.c (mips_store_return_value,
-	mips_extract_return_value): Pass arguments to
-	return_value_location in the proper order.
-
-2001-05-11  Andrew Cagney  <ac131313@redhat.com>
-
-	* Makefile.in (VERSION): Delete.  Moved to file ``version.in''.
-	(version.c): Depends on file ``version.in''.  Extract version
-	number from ``version.in'' file.
-	(clean mostlyclean): Update.
-	* version.in: New file.
-	* NEWS: Update.
-	
-2001-05-11  Kevin Buettner  <kevinb@redhat.com>
-
-	* breakpoint.c (set_raw_breakpoint): Add new parameter
-	representing the breakpoint's type.  Adjust all callers.
-	(create_longjmp_breakpoint, create_temp_exception_breakpoint)
-	(create_thread_event_breakpoint): Don't test for zero return
-	value from set_raw_breakpoint().  It can never be zero.
-	(create_exception_catchpoint, watch_command_1): Move logic
-	which calculates the breakpoint type prior to the call to
-	set_raw_breakpoint().
-
-2001-05-11  Fernando Nasser  <fnasser@redhat.com>
-
-	* ser-unix.c (rate_to_code): Issue warning if baud rate is invalid.
-	(hardwire_setbaudrate): Set errno to EINVAL and return with error
-	if the conversion of the baud rate to code fails.
-
-2001-05-10  Andrew Cagney  <ac131313@redhat.com>
-
-	* ui-out.h (make_cleanup_ui_out_begin_end): Declare.
-	* ui-out.c (struct ui_out_end_cleanup_data): Define.
-	(do_cleanup_end): New function.  Replace do_list_end.
-	(make_cleanup_ui_out_end): New function.
-	(make_cleanup_ui_out_begin_end): New function.
-	(make_cleanup_ui_out_list_end): Use make_cleanup_ui_out_end.
-
-2001-05-10  Elena Zannoni  <ezannoni@redhat.com>
-
-        * MAINTAINERS: Declare xcoffread.c open to all maintainers,
-        and make Kevin Buettner (kevinb@redhat.com) the reference person.
-
-2001-05-10  Elena Zannoni  <ezannoni@redhat.com>
-
-	* proc-api.c (ioctl_with_trace): Fix uninitialized variable.
-
-2001-05-10  Fernando Nasser  <fnasser@redhat.com>
-
-	* MAINTAINERS: Add testsuite subdirectory co-maintainers.
-
-Thu May 10 16:26:47 2001  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* Makefile.in (mi-main.o): Compile with -Werror.
-
-2001-05-10  Michael Snyder  <msnyder@redhat.com>
-
-	* remote.c (remote_open_1): Call no_shared_libraries, so that
-	symbols for shared libraries can be reloaded per session.
-	(remote_async_open_1): Ditto.
-	* remote.c (bin2hex, hex2bin): New functions.  Factor out these
-	two conversions which are coded for repeatedly in this module.
-	(remote_threads_extra_info, remote_wait, remote_async_wait, 
-	store_register_using_P, remote_store_registers, remote_write_bytes,
-	remote_read_bytes, remote_rcmd): Use bin2hex and hex2bin instead
-	of coding the conversions inline.
-	(fromhex): Not exported, change from extern to static.
-
-2001-05-10  Andrew Cagney  <ac131313@redhat.com>
-
-	* arch-utils.c (initialize_current_architecture): Delete obsolete
-	``info architecture'' command.
-	(info_architecture): Delete function.
-
-2001-05-10  Andrew Cagney  <ac131313@redhat.com>
-
-	* TODO (5.1, 5.2): Update.
-
-2001-05-09  Andrew Cagney  <ac131313@redhat.com>
-
-	* MAINTAINERS: Jim Ingham is no longer maintaining Arm related
-	stuff.
-
-2001-05-10  Keith Seitz  <keiths@cygnus.com>
-
-	* Makefile.in (SUBDIR_GDBTK_OBS): Add gdbtk-bp.o, gdbtk-register.o
-	and gdbtk-stack.o.
-	(SUBDIR_GDBTK_SRCS): Ditto for the sources.
-	(gdbtk-bp.o): New rule.
-	(gdbtk-register.o): New rule.
-	(gdbtk-stack.o): New rule.
-	(gdbtk-cmds.o): Update dependencies.
-	(gdbtk.o): Ditto.
-	(gdbtk-hooks.o): Ditto.
-	(gdbtk-varobj.o): Ditto.
-
-2001-05-10  Fernando Nasser  <fnasser@redhat.com>
-
-	* varobj.c (c_number_of_children): Fix memory leak. Delete unwanted old
-	variables, not just unregister them.
-
-2001-05-10  Fernando Nasser  <fnasser@redhat.com>
-
-	* varobj.c (c_number_of_children): Check for target type of void*,
-	not the target type name.  Allow dereferencing char*.
-
-2001-05-10  Fernando Nasser  <fnasser@redhat.com>
-
-	* symfile.c (symbol_file_add_main_1): New static function. 
-	Passes the flags arguments to  symbol_file_add() and takes care
-	of any necessary reinitializations.
-        (symbol_file_command): Call symbol_file_add_main_1() instead of
-        symbol_file_add().  
-        (symbol_file_add_main): Ditto.
-
-2001-05-09  Kevin Buettner  <kevinb@redhat.com>
-
-	* lin-lwp.c (lin_lwp_pid_to_str): Revert inadvertent format
-	string change in 2001-05-03 changes.
-	(lin_lwp_wait): Revert GET_LWP coercion introduced in 2001-05-03
-	changes.
-
-2001-05-09  Kevin Buettner  <kevinb@redhat.com>
-
-	* lin-lwp.c (lin_lwp_attach): Use PIDGET() to fetch the pid
-	component from inferior_ptid.
-	(lin_lwp_detach): Use pid_to_ptid() to convert from a pid to a
-	ptid.
-
-2001-05-09  Elena Zannoni  <ezannoni@redhat.com>
-
-	* sh3-rom.c (_initialize_sh3_rom): Get rid of specific _WINDOWS
- 	conditional for help with connections through parallel ports,
- 	given that the actual code for downloading through a parallel port
- 	is not conditionalized.
-
-	* sh-tdep.c: Remove WIN32_WCE conditional. The wince sh target is
- 	unmaintaned, and probably on its way to obsolescence.
-	
-2001-05-09  Mark Kettenis  <kettenis@gnu.org>
-
-	* i386-tdep.c (i386_frame_saved_pc): New function.
-	* config/i386/tm-i386.h (FRAME_SAVED_PC): Redefine in terms of
-	i386_frame_saved_pc.
-	(i386_frame_saved_pc): New prototype.
-
-	* i386-tdep.c (i386_register_virtual_type): New function.
-	(i386_register_convertible): New function.
-	* config/i386/tm-i386.h (REGISTER_VIRTUAL_TYPE): Redefine in terms
-	of i386_register_virtual_type.
-	(REGISTER_CONVERTIBLE): Redefine in terms of
-	i386_register_convertible.
-	(i386_register_virtual_type, i386_register_convertible): New
-	prototypes.
-
-2001-05-08  Jim Blandy  <jimb@redhat.com>
-
-	* Makefile.in (mn10300-tdep.o): New rule.
-
-	* Makefile.in (gdb_string_h): Define.  Use it throughout.
-	Some rules were already using this, even though it isn't defined.
-
-	* Makefile.in (obstack_h, target_h): Define; these are already
-	used elsewhere, but have been expanding to the empty string.
-	(memattr_h): Define; needed by target_h.
-
-	* mn10300-tdep.c (mn10300_extract_return_value): Mark this as
-	static.  (This was accidentally omitted from the earlier patch.)
-	
-	* mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): New function.
-	(mn10300_gdbarch_init): Register it as the architecture's
-	dwarf2_reg_to_regnum method.
-
-	Correct and expand handling of `movm' instruction, and register
-	saves in general.
-	* config/mn10300/tm-mn10300.h (D0_REGNUM, A0_REGNUM, MDRQ_REGNUM,
-	MCRH_REGNUM, MCRL_REGNUM, MCVF_REGNUM): New definitions.
-	(enum movm_register_bits): New enum.
-	* mn10300-tdep.c (set_movm_offsets): Use symbolic names for the
-	bits, not hex literals.  Handle the `other', `exreg0', and
-	`exother' bits.  Correct handling of `exreg1': it saves r4, r5,
-	r6, and r7, not r2, r3, r4, and r5.
-	(saved_regs_size): New function.
-	(mn10300_frame_chain, mn10300_frame_saved_pc): Use it, instead
-	of computing the same thing inline, incorrectly.
-
-	* mn10300-tdep.c (mn10300_gdbarch_init): We do have a
-	dummy_breakpoint_offset; it's zero.
-
-	* mn10300-tdep.c (mn10300_pop_frame): Split the mn10300-specific
-	stuff out into mn10300_pop_frame_regular, and use
-	generic_pop_current_frame.  This lets us share code, and also
-	makes this function's prototype match that expected by gdbarch.
-	Make this function static.
-	(mn10300_pop_frame_regular): New function.
-	(mn10300_gdbarch_init): Register mn10300_pop_frame as the
-	gdbarch's pop_frame method.
-	* config/mn10300/tm-mn10300.h (POP_FRAME): Delete definition.
-	(mn10300_pop_frame): Delete declaration.
-
-	* mn10300-tdep.c (mn10300_saved_pc_after_call,
-	mn10300_extract_return_value,
-	mn10300_extract_struct_value_address, mn10300_store_return_value,
-	mn10300_use_struct_convention, mn10300_breakpoint_from_pc,
-	mn10300_frame_chain, mn10300_skip_prologue,
-	mn10300_push_arguments, mn10300_push_return_address,
-	mn10300_store_struct_return, mn10300_frame_saved_pc,
-	mn10300_init_extra_frame_info, mn10300_frame_init_saved_regs):
-	Make these functions static; they should only be visible to the
-	outside world as gdbarch methods.
-
-	* config/mn10300/tm-mn10300.h (mn10300_find_callers_reg): Delete
-	unused declaration.
-	
-	* mn10300-tdep.c (mn10300_gdbarch_init): Put the gdbarch methods
-	in some rational order.
-
-	* mn10300-tdep.c (mn10300_gdbarch_init): Rather than using
-	generic_pc_in_call_dummy, use pc_in_call_dummy_at_entry_point.
-
-	Use gdbarch for most target parameters for the MN10300, rather
-	than the tm-*.h file.
-	* config/mn10300/tm-mn10300.h (MAX_REGISTER_VIRTUAL_SIZE,
-	REGISTER_BYTES, FP_REGNUM, BREAKPOINT_FROM_PC,
-	FUNCTION_START_OFFSET, DECR_PC_AFTER_BREAK, INNER_THAN,
-	SAVED_PC_AFTER_CALL, INIT_EXTRA_FRAME_INFO, FRAME_INIT_SAVED_REGS,
-	FRAME_CHAIN, FRAME_CHAIN_VALID, FRAME_SAVED_PC,
-	EXTRACT_RETURN_VALUE, EXTRACT_STRUCT_VALUE_ADDRESS,
-	STORE_RETURN_VALUE, STORE_STRUCT_RETURN, SKIP_PROLOGUE,
-	FRAME_ARGS_SKIP, FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS,
-	FRAME_NUM_ARGS, POP_FRAME, USE_GENERIC_DUMMY_FRAMES, CALL_DUMMY,
-	CALL_DUMMY_START_OFFSET, CALL_DUMMY_BREAKPOINT_OFFSET,
-	CALL_DUMMY_LOCATION, FIX_CALL_DUMMY, CALL_DUMMY_ADDRESS,
-	TARGET_READ_FP, PUSH_RETURN_ADDRESS, PUSH_DUMMY_FRAME,
-	SAVE_DUMMY_FRAME_TOS, PUSH_ARGUMENTS, PC_IN_CALL_DUMMY,
-	REG_STRUCT_HAS_ADDR, USE_STRUCT_CONVENTION, GET_SAVED_REGISTER):
-	Delete definitions.  We register gdbarch methods for these now.
-	(struct frame_info, struct type, struct value): Delete forward
-	declarations of these types; they're no longer necessary, since we
-	don't have function declarations here any more.
-	* mn10300-tdep.c: #include "arch-utils.h", to get declarations for
-	some default gdbarch methods.
-	(mn10300_store_struct_return): Return void, as expected by
-	gdbarch.
-	(mn10300_init_extra_frame_info): Take initial `fromleaf' argument,
-	as expected by gdbarch.
-	(mn10300_frame_init_saved_regs): Provide dummy definition for
-	this, as required by gdbarch.
-	(mn10300_gdbarch_init): Add mn10300_call_dummy_words, as expected
-	by gdbarch.  Register gdbarch methods or values for all the stuff
-	removed from tm-10300.h, listed above.
-
-2001-05-08  Andrew Cagney  <ac131313@redhat.com>
-
-	* cli-out.c (cli_begin, cli_end): Replace cli_list_begin and
-	cli_list_end.
-	(cli_ui_out_impl): Update.
-
-	* ui-out.c (default_begin, default_end): Replace
-	default_list_begin and default_list_end.
-	(default_ui_out_impl): Update.
-	(uo_begin, uo_end): Replace ou_list_begin and uo_list_end.
-	(ui_out_begin, ui_out_end): Replace ui_out_list_begin and
-	ui_out_list_end.
-	(ui_out_list_begin, ui_out_list_end): New.  Compatibility
-	functions.
-	(struct ui_out_level): Add field type.
-	(push_level, pop_level): Update.  Add type parameter.
-
-	* ui-out.h (enum ui_out_type): Declare.
-	(ui_out_begin, ui_out_end): Declare.
-	(ui_out_begin_ftype, ui_out_end_ftype): Replace list_begin_ftype
-	and list_end_ftype.
-	(struct ui_out_impl): Update.
-
-2001-05-07  Andrew Cagney  <ac131313@redhat.com>
-
-	* ui-out.h (list_begin_ftype, list_end_ftype): Rename argument
-	``list_flag'' to ``depth''.
-	* ui-out.c (default_list_begin, default_list_end): Update.
-	(uo_list_begin, uo_list_end): Update.
-	(MAX_UI_OUT_LEVELS): Define.
-	(struct ui_out_level): Define.
-	(top-level): Include "gdb_assert.h".
-	(struct ui_out): Add fields ``level'' and ``levels''.  Delete
- 	fields ``list_flag'' and ``field_count''.
-	(ui_out_new): Update.
-	(verify_field_proper_position): Update.
-	(current_level, push_level, pop_level): New functions.
-	(ui_out_list_begin): Use push_level.
-	(ui_out_list_end): Use pop_level.
-	(ui_out_field_int): Use current_level.
-	(ui_out_field_skip): Ditto.
-	(ui_out_field_fmt): Ditto.
-
-2001-05-08  Michael Snyder  <msnyder@redhat.com>
-
-	* language.c (longest_local_hex_string_custom): Strlen test is 
-	inverted -- reverse the sense of the test.
-
-2001-05-08  Mark Kettenis  <kettenis@gnu.org>
-
-	* config/i386/tm-i386v.h (struct frame_info, struct
-	frame_saved_regs):  Remove declarations.
-	(i386_frame_num_args): Remove prototype.
-
-2001-05-07  Andrew Cagney  <ac131313@redhat.com>
-
-	* MAINTAINERS: I'm no longer actively maintaining the mn10300
-	target.
-
-2001-05-04  Andrew Cagney  <ac131313@redhat.com>
- 
- 	* main.c (captured_main): Delete #ifndef _WIN32 conditional for
- 	WinGDB.
- 
-2001-05-06  Kevin Buettner  <kevinb@redhat.com>
-
-	* inferior.h (save_inferior_ptid): Declare.
-	* infrun.c (save_inferior_ptid, restore_inferior_ptid): Define.
-
-	* hpux-thread.c (save_inferior_ptid, restore_inferior_ptid):
-	Delete these functions.
-	* lin-lwp.c (save_inferior_ptid, restore_inferior_ptid): Likewise.
-	* lin-thread.c (save_inferior_ptid, restore_inferior_ptid): Likewise.
-	* linux-thread.c (save_inferior_ptid, restore_inferior_ptid):
-	Likewise.
-	* proc-service.c (save_inferior_ptid, restore_inferior_ptid):
-	Likewise.
-	* sol-thread.c (save_inferior_ptid, restore_inferior_ptid): Likewise.
-	* thread-db.c (save_inferior_ptid, restore_inferior_ptid): Likewise.
-
-	* somsolib.c (reset_inferior_ptid): Delete.
-	(som_solib_remove_inferior_hook): Use save_inferior_ptid() to
-	build the cleanup struct.
-
-	* breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
-	a cleanup to save/restore inferior_ptid.
-
-2001-05-06  Mark Kettenis  <kettenis@gnu.org>
-
-	Implement attach/detach for multi-threaded programs on Linux.
-	* thread-db.c (keep_thread_db): Adjust comment.
-	(deactivate_target): Removed.
-	(thread_db_new_objfile): Don't call deactivate_target.  Implement
-	guts of deactivate_target inline instead.
-	(attach_thread): Call ATTACH_LWP unconditionally if defined.
-	(thread_db_attach): New function.
-	(thread_db_detach): Don't call deactivate_target.  Do necessary
-	cleanup inline instead.  Set inferior_ptid to LWP corresponding to
-	the current user-level thread.
-	(thread_db_kill): Set inferior_ptid to LWP corresponding to the
-	current user-level thread.
-	(thread_db_create_inferior): Deactivate target vector if
-	KEEP_THREAD_DB is zero.
-	(thread_db_mourn_inferior): Don't call deactivate_target.  Do
-	necessary cleanup inline instead.
-	(init_thread_db_ops): Initialize to_attach field to
-	thread_db_attach.
-	* lin-lwp.c (lin_lwp_mourn_inferior): Remove prototype.
-	(stop_wait_callback): Add prototype.
-	(init_lwp_list): Add comment about when to re-initialize the LWP
-	list.
-	(lin_lwp_attach_lwp): Only call ptrace for cloned processes.
-	Avoid adding publicates to the LWP list.  Only mark an LWP as
-	signalled if it doesn't correspond to a cloned process.
-	(lin_lwp_attach): Add initial process to the LWP list.  Make sure
-	it's stopped and fake a SIGSTOP.
-	(detach_callback): New function.
-	(lin_lwp_detach): Implement.
-	(lin_lwp_create_inferior): Don't re-initialize LWP list here.
-	Call child_ops.to_create_inferior directly instead of via
-	target_beneath local.
-	(lin_lwp_mourn_inferior): Call child_ops.to_mourn_inferior
-	directly instead of via target_beneath local.
-
-2001-05-06  Eli Zaretskii  <eliz@is.elta.co.il>
-
-	* symtab.c (lookup_symtab_1, lookup_partial_symtab): Use basename
-	instead of non-portable search for `/'.  Use FILENAME_CMP instead
-	of STREQ, to account for case-insensitive filesystems.
-	(top-level): #include "filenames.h".
-
-2001-05-05  Jim Blandy  <jimb@redhat.com>
-
-	* breakpoint.c (check_duplicates): Use the breakpoint's type, not
-	its address, to decide whether it's a watchpoint or not.  Zero
-	is a valid code address.
-	(update_breakpoints_after_exec): Admonishing comments.
-	* breakpoint.h (struct breakpoint): Doc fixes.
-
-	* breakpoint.c (check_duplicates): Take a breakpoint object as an
-	argument, rather than an address and section.  All callers changed.
-
-2001-05-03  Kevin Buettner  <kevinb@redhat.com>
-
-	* defs.h (ptid_t): New typedef.
-	(pid_to_ptid, null_ptid, minus_one_ptid, ptid_equal): New macros.
-
-	* a68v-nat.c, alphabsd-nat.c, arch-utils.c, arm-linux-nat.c,
-	blockframe.c, breakpoint.c, breakpoint.h,
-	config/i386/nm-i386sol2.h, config/i386/tm-i386sco5.h,
-	config/ia64/nm-linux.h, config/m68k/nm-hp300bsd.h,
-	config/mips/nm-irix4.h, config/mips/nm-irix5.h,
-	config/pa/nm-hppah.h, config/pa/tm-hppa.h,
-	config/rs6000/nm-rs6000.h, config/sparc/nm-sun4sol2.h,
-	corelow.c, cxux-nat.c, d10v-tdep.c, dink32-rom.c,
-	dve3900-rom.c, fork-child.c, frame.c, gnu-nat.c, go32-nat.c,
-	hp300ux-nat.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c,
-	hpux-thread.c, i386-linux-nat.c, i386aix-nat.c, i386b-nat.c,
-	i386bsd-nat.c, i386gnu-nat.c, i386mach-nat.c, i386nbsd-nat.c,
-	infcmd.c, inferior.h, inflow.c, infptrace.c, infrun.c,
-	inftarg.c, infttrace.c, lin-lwp.c, lin-thread.c,
-	linux-thread.c, lynx-nat.c, m3-nat.c, m32r-rom.c,
-	m68knbsd-nat.c, m88k-nat.c, mac-nat.c, mips-nat.c,
-	mon960-rom.c, monitor.c, ns32knbsd-nat.c, ocd.c, ppc-bdm.c,
-	ppcnbsd-nat.c, proc-service.c, procfs.c, ptx4-nat.c,
-	regcache.c, remote-adapt.c, remote-array.c, remote-bug.c,
-	remote-e7000.c, remote-es.c, remote-mips.c, remote-mm.c,
-	remote-nindy.c, remote-os9k.c, remote-rdi.c, remote-rdp.c,
-	remote-sds.c, remote-sim.c, remote-st.c, remote-udi.c,
-	remote-vx.c, remote.c, rs6000-nat.c, sol-thread.c,
-	solib-aix5.c, solib-svr4.c, somsolib.c, sparc-nat.c,
-	standalone.c, sun3-nat.c, sun386-nat.c, symm-nat.c, target.c,
-	target.h, thread-db.c, thread.c, top.c, ultra3-nat.c,
-	uw-thread.c, v850ice.c, win32-nat.c, wince.c, xcoffsolib.c
-	(inferior_pid):  Rename to inferior_ptid everywhere - even in
-	comments and obsolete ports.  In cases where this variable
-	really is supposed to be used as a process id, use PIDGET() to
-	extract the process id component from inferior_ptid.  The
-	other cases, either involving other variables whose types had
-	to be changed or functions whose signatures had to changed
-	are listed separately below.
-
-	* arm-linux-nat.c (get_thread_id): Change type of argument
-	representing a combined process/thread id from ``int'' to
-	``ptid_t''.  Also change parameter name to ptid.
-	* breakpoint.h, breakpoint.c (breakpoint_thread_match): Likewise.
-	* corelow.c (core_file_thread_alive): Likewise.
-	* d10v-tdep.c (d10v_read_pc, d10v_write_pc): Likewise.
-	* defs.h (*target_wait_hook): Likewise.
-	* gdbthread.h (thread_info, delete_thread, pid_to_thread_id)
-	(find_thread_pid, save_infrun_state, load_infrun_state): Likewise.
-	* gnu-nat.c (gnu_thread_alive, gnu_pid_to_str, gnu_wait)
-	(gnu_resume): Likewise.
-	* go32-nat.c (go32_wait, go32_resume): Likewise.
-	* h8500-tdep.c (h8500_read_pc, h8500_write_pc): Likewise.
-	* hppa-tdep.c (target_read_pc, target_write_pc): Likewise.
-	* hppah-nat.c (child_pid_to_str, hppa_tid_to_str,
-	(hppa_pid_or_tid_to_str, child_post_startup_inferior)
-	(child_thread_alive): Likewise.
-	* hpux-thread.c (hpux_thread_notice_signals, hpux_thread_alive)
-	(hpux_pid_to_str, hpux_thread_wait, hpux_thread_resume): Likewise.
-	* i386-linux-nat.c (child_resume): Likewise.
-	* ia64-linux-nat.c (enable_watchpoints_in_psr, fetch_debug_register)
-	(store_debug_register, fetch_debug_register_pair)
-	(store_debug_register_pair, ia64_linux_insert_watchpoint)
-	(ia64_linux_remove_watchpoint, ia64_linux_stopped_by_watchpoint):
-	Likewise.
-	* ia64-tdep.c (ia64_read_pc, ia64_write_pc): Likewise.
-	* inferior.h (read_pc_pid, generic_target_read_pc, write_pc_pid)
-	(generic_target_write_pc, ptrace_wait, child_resume)
-	(get_last_target_status): Likewise.
-	* infptrace.c (ptrace_wait, child_resume): Likewise.
-	* inftarg.c (child_wait, child_post_wait, child_thread_live)
-	(child_pid_to_str): Likewise.
-	* infttrace.c (ptrace_wait, child_thread_alive, child_resume)
-	(hppa_pid_or_tid_to_str, child_post_startup_inferior): Likewise.
-	* lin-lwp.c (add_lwp, delete_lwp, find_lwp_pid, lin_lwp_attach_lwp)
-	(lin_lwp_resume, lin_lwp_wait, lin_lwp_thread_alive)
-	(lin_lwp_pid_to_str): Likewise.
-	* lin-thread.c (thread_db_alive, thread_db_pid_to_str)
-	(thread_db_resume, thread_db_wait): Likewise.
-	* linux-thread.c (linuxthreads_thread_alive, linuxthreads_pid_to_str)
-	(linuxthreads_resume, linuxthreads_wait): Likewise.
-	* lynx-nat.c (child_wait, child_thread_alive, child_resume)
-	(child_pid_to_str): Likewise.
-	* m3-nat.c (mach_really_wait, m3_resume): Likewise.
-	* mac-nat.c (child_wait, child_resume): Likewise.
-	* mips-tdep.c (mips_read_pc): Likewise.
-	* monitor.c (monitor_wait, monitor_resume): Likewise.
-	* ocd.c, ocd.h (ocd_thread_alive, ocd_resume): Likewise.
-	* ppc-bdm.c (bdm_ppc_wait): Likewise.
-	* procfs.c (do_attach, procfs_wait, procfs_resume)
-	(procfs_notice_signals, procfs_thread_alive, procfs_pid_to_str)
-	(procfs_set_watchpoint, procfs_stopped_by_watchpoint)
-	(procfs_find_LDT_entry): Likewise.
-	* regcache.c (read_register_pid, read_signed_register_pid)
-	(write_register_pid, generic_target_read_pc, read_pc_pid)
-	(generic_target_write_pc, write_pc_pid): Likewise.
-	* regcache.h (read_register_pid, read_signed_register_pid)
-	(write_register_pid): Likewise.
-	* remote-adapt.c (adapt_wait, adapt_resume): Likewise.
-	* remote-array.c (array_wait, array_resume): Likewise.
-	* remote-bug.c (bug_wait, bug_resume): Likewise.
-	* remote-e7000.c (e7000_wait, e7000_resume): Likewise.
-	* remote-eb.c (eb_wait, eb_resume): Likewise.
-	* remote-es.c (es1800_wait, es1800_resume): Likewise.
-	* remote-mips.c (mips_wait, mips_resume): Likewise.
-	* remote-mm.c (mm_wait, mm_resume): Likewise.
-	* remote-nindy.c (nindy_wait, nindy_resume): Likewise.
-	* remote-os9k.c (rombug_wait, rombug_resume): Likewise.
-	* remote-rdi.c (arm_rdi_wait, arm_rdi_resume): Likewise.
-	* remote-rdp.c (remote_rdp_resume, remote_rdp_wait): Likewise.
-	* remote-sds.c (sds_wait, sds_resume): Likewise.
-	* remote-sim.c (gdbsim_wait, gdbsim_resume): Likewise.
-	* remote-st.c (st2000_wait, st2000_resume): Likewise.
-	* remote-udi.c (udi_wait, udi_resume): Likewise.
-	* remote-vx.c (vx_wait, vx_resume): Likewise.
-	* remote.c (remote_current_thread, remote_resume, remote_wait)
-	(remote_async_resume, remote_async_wait, remote_cisco_wait)
-	(remote_thread_alive): Likewise.
-	* sol-thread.c (thread_to_lwp, lwp_to_thread, sol_thread_resume)
-	(sol_thread_wait, sol_thread_notice_signals, sol_thread_alive)
-	(solaris_pid_to_str): Likewise.
-	* symm-nat.c (child_wait, child_resume): Likewise.
-	* target.c (debug_to_resume, debug_to_wait, debug_to_post_wait)
-	(debug_to_notice_signals, debug_to_thread_alive)
-	(normal_target_post_startup_inferior, normal_pid_to_str)
-	(debug_to_post_startup_inferior): Likewise.
-	* target.h (to_resume, to_wait, to_post_wait)
-	(to_post_startup_inferior, to_notice_signals, to_thread_alive)
-	(to_pid_to_str [all in struct target_ops]): Likewise.
-	(child_post_wait, child_thread_alive, normal_pid_to_str): Likewise.
-	* thread-db.c (thread_from_lwp, lwp_from_thread, thread_db_wait)
-	(attach_thread, detach_thread, thread_db_resume, check_event)
-	(thread_db_post_startup_inferior, thread_db_thread_alive)
-	(thread_db_pid_to_str): Likewise.
-	* thread.c (add_thread, delete_thread, find_thread_pid)
-	(pid_to_thread_id, in_thread_list, load_infrun_state)
-	(save_infrun_state, switch_to_thread, restore_current_thread)
-	(make_cleanup_restore_current_thread): Likewise.
-	* top.c (target_wait_hook): Likewise.
-	* uw-thread.c (dbgpid, thr_to_lwp, lwp_to_thr, add_thread_uw)
-	(uw_thread_resume, libtrhead_stub, uw_thread_wait, uw_thread_alive)
-	(uw_thread_pid_to_str): Likewise.
-	* v850ice.c (v850ice_wait, v850ice_resume): Likewise.
-	* win32-nat.c (child_wait, child_resume, win32_child_thread_alive)
-	(cywin_pid_to_str): Likewise.
-	* wince.c (child_wait, child_resume, win32_child_thread_alive):
-	Likewise.
-	* config/nm-linux.h (linuxthreads_pid_to_str): Likewise.
-	* config/nm-lynx.h (child_wait, lynx_pid_to_str): Likewise.
-	* config/alpha/nm-linux.h (lin_lwp_attach_lwp): Likewise.
-	* config/arm/nm-linux.h (lin_lwp_attach_lwp): Likewise.
-	* config/h8500/tm-h8500.h (h8500_read_pc, h8500_write_pc): Likewise.
-	* config/i386/nm-i386sol2.h (procfs_stopped_by_watchpoint)
-	(procfs_set_watchpoint): Likewise.
-	* config/i386/nm-linux.h (lin_lwp_attach_lwp): Likewise.
-	* config/i386/nm-ptx4.h (child_wait): Likewise.
-	* config/i386/nm-symmetry.h (child_wait): Likewise.
-	* config/i386/tm-cygwin.h (cygwin_pid_to_str): Likewise.
-	* config/ia64/nm-linux.h (ia64_linux_stopped_by_watchpoint)
-	(ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
-	(lin_lwp_attach_lwp): Likewise.
-	* config/mips/nm-irix4.h, config/mips/nm-irix5.h
-	(procfs_stopped_by_watchpoint, procfs_set_watchpoint): Likewise.
-	* config/pa/nm-hppah.h (child_pid_to_str, hppa_tid_to_str)
-	(hppa_pid_or_tid_to_str): Likewise.
-	* config/pa/tm-hppa.h (target_read_pc, target_write_pc): Likewise.
-	* config/powerpc/nm-linux.h (lin_lwp_attach_lwp): Likewise.
-	* config/sparc/nm-sun4sol2.h (procfs_stopped_by_watchpoint)
-	(procfs_set_watchpoint): Likewise.
-
-	* gdbthread.h (thread_id_to_pid): Change return type which
-	represents a combined process/thread id from ``int'' to
-	``ptid_t''.
-	* gnu-nat.c (gnu_wait): Likewise.
-	* go32-nat.c (go32_wait): Likewise.
-	* hpux-thread.c (hpux_thread_wait): Likewise.
-	* inferior.h (procfs_first_available): Likewise.
-	* inftarg.c (child_wait): Likewise.
-	* infttrace.c (ptrace_wait): Likewise.
-	* lin-lwp.c (lin_lwp_wait): Likewise.
-	* lin-thread.c (thread_db_wait): Likewise.
-	* linux-thread.c (linuxthreads_wait): Likewise.
-	* lynx-nat.c (child_wait): Likewise.
-	* m3-nat.c (mach_really_wait): Likewise.
-	* mac-nat.c (child_wait): Likewise.
-	* monitor.c (monitor_wait): Likewise.
-	* ppc-bdm.c (bdm_ppc_wait): Likewise.
-	* procfs.c (do_attach, procfs_wait, procfs_first_available): Likewise.
-	* remote-adapt.c (adapt_wait): Likewise.
-	* remote-array.c (array_wait): Likewise.
-	* remote-bug.c (bug_wait): Likewise.
-	* remote-e7000.c (e7000_wait): Likewise.
-	* remote-eb.c (eb_wait): Likewise.
-	* remote-es.c (es1800_wait): Likewise.
-	* remote-mips.c (mips_wait): Likewise.
-	* remote-mm.c (mm_wait): Likewise.
-	* remote-nindy.c (nindy_wait): Likewise.
-	* remote-os9k (rombug_wait): Likewise.
-	* remote-rdi.c (arm_rdi_wait): Likewise.
-	* remote-rdp.c (remote_rdp_wait): Likewise.
-	* remote-sds.c (sds_wait): Likewise.
-	* remote-sim.c (gdbsim_wait): Likewise.
-	* remote-st.c (st2000_wait): Likewise.
-	* remote-udi.c (udi_wait): Likewise.
-	* remote-vx.c (vx_wait): Likewise.
-	* remote.c (remote_wait, remote_async_wait, remote_current_thread)
-	(remote_cisco_wait): Likewise.
-	* sol-thread.c (thread_to_lwp, lwp_to_thread, sol_thread_wait):
-	Likewise.
-	* symm-nat.c (child_wait): Likewise.
-	* target.c (debug_to_wait): Likewise.
-	* target.h (to_wait [in struct target_ops]): Likewise.
-	* thread.c (thread_id_to_pid): Likewise.
-	* thread-db.c (thread_from_lwp, lwp_from_thread, thread_db_wait):
-	Likewise.
-	* top.c (*target_wait_hook): Likewise.
-	* uw-thread.c (lwp_to_thr, uw_thread_wait): Likewise.
-	* v850ice.c (v850ice_wait): Likewise.
-	* win32-nat.c (child_wait): Likewise.
-	* wince.c (child_wait): Likewise.
-	* config/nm-lynx.h (child_wait): Likewise.
-	* config/i386/nm-ptx4.h (child_wait): Likewise.
-	* config/i386/nm-symmetry.h (child_wait): Likewise.
-
-	* arch-utils.c (generic_prepare_to_proceed): Rename wait_pid
-	to wait_ptid and change its type from ``int'' to ``ptid_t''.
-	* breakpoint.c (reattach_breakpoints, detach_breakpoints): Likewise,
-	but rename saved_inferior_pid to saved_inferior_ptid.
-	* d10v-tdep.c (d10v_read_pc, d10_write_pc): Likewise, but rename
-	save_pid to save_ptid.
-	* gdbthread.h (struct thread_info): Likewise, but rename pid to ptid.
-	* hppah-nat.c (child_pid_to_exec): Likewise, but rename
-	saved_inferior_pid to saved_inferior_ptid.
-	* hpux-thread.c (main_ptid): Likewise, but rename from main_pid.
-	* infrun.c (previous_inferior_pid [static global]): Likewise,
-	but rename to previous_inferior_ptid.
-	(resume): Likewise, but rename resume_pid to resume_ptid.
-	(struct execution_control_state): Likewise, but rename
-	pid to ptid, saved_inferior_pid to saved_inferior_ptid,
-	and waiton_pid to waiton_ptid.
-	(target_last_wait_pid): Likewise, but rename to
-	target_last_wait_ptid.
-	* infttrace.c (saved_real_pid): Likewise, but rename to
-	saved_real_ptid.
-	(child_pid_to_exec_file): Likewise, but rename saved_inferior_pid
-	to saved_inferior_ptid.
-	* lin-lwp.c (struct lwp_info): Likewise, but rename pid to ptid.
-	(trap_ptid): Likewise, but renamed from trap_pid.
-	* lin-thread.c (handle_new_thread): Likewise, but rename gdb_pid
-	to gdb_ptid.
-	* linux-thread.c (detach_thread): Likewise, but rename pid to ptid.
-	(thread_db_wait): Likewise, but rename ret_pid to retptid.
-	* procfs.c (procfs_wait): Likewise, for retval whose name
-	doesn't change.  Also, ``temp'' becomes two separate variables,
-	one named temp_tid (an int) and the other temp_ptid.
-	(procfs_notice_thread): Likewise (type change) for gdb_threadid
-	whose name does not change.
-	* regcache.c (registers_ptid): Likewise, but renamed from
-	registers_pid.
-	(read_register_pid, read_signed_register_pid, write_register_pid):
-	Likewise, but rename save_pid to save_ptid.
-	(read_pc_pid, write_pc_pid): Likewise, but rename saved_inferior_pid
-	to saved_inferior_ptid.
-	* remote.c (remote_newthread_step): Likewise, but rename pid to ptid.
-	* sol-thread.c (struct ps_prochandle): Likewise.
-	(sol_thread_resume): Likewise, for save_pid which becomes save_ptid.
-	(sol_thread_wait): Likewise, for rtnval whose name does not
-	change, and for save_pid which becomes save_ptid.
-	(solaris_pid_to_str): Likewise for lwp whose name does not change.
-	(sol_find_new_threads_callback): Likewise, for pid which becomes
-	ptid.
-	* target.h (target_resume, target_wait, target_post_wait)
-	(target_post_startup_inferior, target_notice_signals)
-	(target_thread_alive): Likewise.
-	* thread.c (info_threads_command): Likewise, but rename
-	current_pid to current_ptid.
-	(struct current_thread_cleanup): Likewise, but rename field
-	inferior_pid to inferior_ptid.
-	* thread-db.c (find_new_threads_callback): Likewise, but rename
-	pid to ptid.
-	* uw-thread.c (thr_to_lwp): Likewise for lid whose name does not
-	change.
-	(lwp_to_tr): Likewise fo tid whose name remains unchanged.
-	(thr_infpid, lwp_infpid, notice_thread, libthread_stub): Likewise,
-	but rename pid to ptid.
-	* config/alpha/nm-linux.h (ATTACH_LWP): Likewise.
-	* config/arm/nm-linux.h (ATTACH_LWP): Likewise.
-	* config/i386/nm-linux.h (ATTACH_LWP): Likewise.
-	* config/ia64/nm-linux.h (ATTACH_LWP): Likewise.
-	* config/pa/nm-hppah.h (target_tid_to_str): Likewise.
-	* config/powerpc/nm-linux.h (ATTACH_LWP): Likewise.
-
-	* arch-utils.c (generic_prepare_to_proceed):  Test for the
-	"zero" ptid by using ptid_equal() to test to see if variable
-	in question is the same as null_ptid.  This replaces a direct
-	test against zero.
-	* cxux-nat.c (add_shared_symbol_files): Likewise.
-	* i386aix-nat.c, i386b-nat.c (i386_float_info): Likewise.
-	* infcmd.c (run_command): Likewise.
-	* inflow.c (kill_command): Likewise.
-	* infttrace.c (call_ttrace): Likewise.
-	* lin-lwp.c (lin_lwp_prepare_to_proceed): Likewise.
-	* lin-thread.c (thread_db_kill): Likewise.
-	* procfs.c (procfs_kill_inferior, procfs_mourn_inferior): Likewise.
-	* remote-es.c (es1800_kill): Likewise.
-	* sol-thread.c (sol_thread_create_inferior): Likewise.
-	* solib.c (locate_base): Likewise.
-	* target.c (nosupport_runtime): Likewise.
-	* thread-db.c (thread_db_wait): Likewise.
-	* top.c (quit_confirm, quit_force): Likewise.
-	* uw-thread (lwp_infpid, uw_thread_resume): Likewise.
-
-	* infrun.c (handle_inferior_event, stop_stepping, normal_stop):
-	Use ptid_equal to compare value of process/thread ids instead of
-	``=='' and ``!='' operators.
-	lin-lwp.c (delete_lwp, lin_lwp_prepare_to_proceed)
-	(stop_wait_callback, lin_lwp_wait): Likewise.
-	* procfs.c (procfs_wait): Likewise.
-	* regcache.c (read_register_bytes, read_register_gen)
-	(write_register_gen, read_register, read_register_pid)
-	(read_signed_register, read_signed_register_pid, write_register)
-	(write_register_pid, supply_register): Likewise.
-	* remote-vx.c (vx_resume): Likewise.
-	* sol-thread.c (sol_thread_wait): Likewise.
-	* symm-nat.c (kill_inferior): Likewise.
-	* thread.c (delete_thread, find_thread_pid, pid_to_thread_id)
-	(in_thread_list, info_threads_command, switch_to_thread)
-	(restore_current_thread): Likewise.
-	* uw-thread (libtread_stub): Likewise.
-
-	* arm-linux-nat.c (GET_THREAD_ID): Change PID to PTID.
-
-	* corelow.c (add_to_thread_list): Convert argument in add_thread()
-	call to a ptid_t.
-	* gnu-nat.c (inf_validate_procs): Likewise.
-	* linux-thread.c (stop_thread, update_stop_threads): Likewise.
-	* remote.c (record_currthread, remote_threads_info): Likewise.
-	* win32-nat.c (child_add_thread): Likewise.
-
-	* hpux-thread.c (save_inferior_pid, restore_inferior_pid): Rename,
-	respectively, to save_inferior_ptid() and restore_inferior_ptid().
-	Adjust implementations to operate on ``ptid_t'' instead of ``int''.
-	* lin-lwp.c (save_inferior_pid, restore_inferior_pid): Likewise.
-	* lin-thread.c (save_inferior_pid, restore_inferior_pid): Likewise.
-	* linux-thread.c (save_inferior_pid, restore_inferior_pid): Likewise.
-	* proc-service.c (save_inferior_pid, restore_inferior_pid): Likewise.
-	* sol-thread.c (save_inferior_pid, restore_inferior_pid): Likewise.
-	* thread-db.c (save_inferior_pid, restore_inferior_pid): Likewise.
-
-	* infrun.c (RESUME_ALL): New macro representing the -1 ptid
-	to be passed to target_resume() when all threads should resume.
-	(resume): Set resume_ptid to RESUME_ALL rather than -1.
-	(handle_inferior_event): Invoke target_resume() with RESUME_ALL
-	instead of -1.
-	* irix5-nat.c (solib_create_inferior_hook): Convert -1 to
-	a ptid_t in target_resume() call.
-	* osfsolib.c (solib_create_inferior_hook): Likewise.
-	* solib-svr4.c (solib_create_inferior_hook): Likewise.
-
-	* lin-lwp.c (PIDGET, PIDGET0): Rename original PIDGET macro to
-	PIDGET0.  Define new PIDGET macro which uses PIDGET0, the only
-	difference being that the 0xffff pattern will be interpreted
-	as -1.
-	* lin-thread.c (PIDGET, PIDGET0): Likewise.
-	* thread-db.c (PIDGET, PIDGET0): Likewise.
-	* config/nm-linux.h (PIDGET, PIDGET0): Likewise.
-	* config/i386/tm-i386sol2.h (PIDGET, PIDGET0): Likewise.
-	* config/i386/tm-i386v42mp.h (PIDGET, PIDGET0): Likewise.
-	* config/sparc/tm-sun4sol2.h (PIDGET, PIDGET0): Likewise.
-
-	* m3-nat.c (init_m3_ops): Fix typo; initialize to_wait field to
-	mach_really_wait rather than mach_really__wait.
-	* lin-thread.c (check_for_thread_event): Fix warning; make function
-	actually return a value.
-
-	* gdbarch.sh (TARGET_READ_PC, TARGET_WRITE_PC): Change type of
-	``pid'' arguments from ``int'' to ``ptid_t''.  Also renamed
-	pid to ptid.
-	* gdbarch.h, gdbarch.c: Regenerated.
-
 2001-05-03  Jonathan Larmour  <jlarmour@redhat.com>
 
 	* rdi-share/devsw.c: Include <time.h> for struct tm
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 9fff326..5c07445 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -57,8 +57,9 @@
 	arc		--target=arc-elf ,-Werror
 			Maintenance only
 
-	arm		--target=arm-coff,arm-elf,arm-pe -w
+	arm		(--target=arm-coff,arm-elf,arm-pe broken)
 			Fernando Nasser		fnasser@cygnus.com
+			Jim Ingham		jingham@apple.com
 			Scott Bambrough		scottb@netwinder.org
 
 	d10v		--target=d10v-elf ,-Werror
@@ -111,13 +112,13 @@
 			Maintenance only
 
 	mn10300		--target=mn10300-elf ,-Werror
-			Maintenance only
+			Andrew Cagney		cagney@cygnus.com
 
 	ns32k		--target=ns32k-netbsd ,-Werror
 			Maintenance only
 
 	pa		(--target=hppa1.1-hp-proelf broken)
-			Maintenance only
+			Jeff Law		law@cygnus.com
 
 	powerpc		--target=powerpc-eabi,powerpcle-eabi ,-Werror
 			Kevin Buettner		kevinb@cygnus.com
@@ -196,6 +197,7 @@
 FreeBSD native & host	Mark Kettenis		kettenis@gnu.org
 			David O'Brien		obrien@freebsd.org
 hurd native		Mark Kettenis		kettenis@gnu.org
+hpux, hp pa native	Jeff Law		law@cygnus.com
 NetBSD native & host	J.T. Conklin		jtc@redback.com
 SCO/Unixware		Nick Duffek		nsd@cygnus.com
 			Robert Lipe		rjl@sco.com
@@ -229,8 +231,6 @@
   stabs reader		Jim Blandy		jimb@cygnus.com
 			Elena Zannoni		ezannoni@cygnus.com
   coff reader		Philippe De Muyter	phdm@macqel.be
-  xcoff reader		Any maintainer can modify this; please send tricky
-			ones to Kevin Buettner <kevinb@cygnus.com>
   linespec		Jim Blandy		jimb@cygnus.com
 			Elena Zannoni		ezannoni@cygnus.com
 			Fernando Nasser		fnasser@cygnus.com
@@ -242,9 +242,8 @@
 breakpoints		Michael Snyder		msnyder@cygnus.com
 			Jim Blandy		jimb@cygnus.com
 language support	David Taylor		taylor@cygnus.com
-  Java support (devolved)
-			Per Bothner		per@bothner.com
-			Anthony Green 		green@cygnus.com
+  C++ support		Daniel Berlin		dan@cgsoftware.com
+  Java support		Anthony Green 		green@cygnus.com
   Objective-C/C++	Klee Dienes		kdienes@apple.com
 			Jim Ingham		jimgham@apple.com
   Pascal support	Pierre Muller		muller@sourceware.cygnus.com
@@ -262,17 +261,11 @@
 include/remote-sim.h, remote-sim.c
 			Andrew Cagney		cagney@cygnus.com
 sds protocol		Fernando Nasser		fnasser@cygnus.com
+			Jim Ingham		jingham@apple.com
 rdi/adp protocol	Fernando Nasser		fnasser@cygnus.com
+			Jim Ingham		jingham@apple.com
 documentation		Eli Zaretskii		eliz@gnu.org
 testsuite		Fernando Nasser		fnasser@cygnus.com
-  config                Mark Salter             msalter@redhat.com
-  lib                   Mark Salter             msalter@redhat.com
-  gdbtk (gdb.gdbtk)     Keith Seitz             keiths@redhat.com
-  mi tests (gdb.mi)     Elena Zannoni           ezannoni@redhat.com
-                        Andrew Cagney           cagney@redhat.com
-  stabs (gdb.satbs)     Elena Zannoni           ezannoni@redhat.com
-  threads (gdb.threads) Michael Snyder          msnyder@redhat.com
-  trace (gdb.trace)     Michael Snyder          msnyder@redhat.com
   hp tests (gdb.hp)	(vacant)
   Java tests (gdb.java)	Anthony Green 		green@cygnus.com
 Kernel Object Display	Fernando Nasser		fnasser@cygnus.com
@@ -285,8 +278,8 @@
 gdbtk (c & tcl)		Jim Ingham		jingham@apple.com
 			Fernando Nasser         fnasser@cygnus.com
 			Keith Seitz		keiths@cygnus.com
-libgui (w/foundry, sn)	Jim Ingham              jingham@apple.com
-			Keith Seitz		keiths@redhat.com
+libgui (w/foundry, sn)	Syd Polk		spolk@cygnus.com
+			Jim Ingham		jingham@apple.com
 mi (gdb/mi)		Andrew Cagney		cagney@cygnus.com
 			Elena Zannoni           ezannoni@cygnus.com
 			Fernando Nasser		fnasser@cygnus.com
@@ -313,52 +306,42 @@
 
 
 
-			Write After Approval
-			   (alphabetic)
-
-To get recommended for the Write After Approval list you need a valid
-FSF assignment and have submitted one good patch.
+		Write After Approval
 
 David Anderson					davea@sgi.com
-Philip Blundell					philb@gnu.org
-Joel Brobecker					brobecker@act-europe.fr
-Michael Chastain				chastain@redhat.com
-Nick Clifton					nickc@cygnus.com
-Orjan Friberg					orjanf@axis.com
-Paul Hilfinger					hilfinger@gnat.com
-Matt Hiller					hiller@redhat.com
-Kazu Hirata					kazu@hxi.com
-Jeff Holcomb					jeffh@redhat.com
-Don Howard					dhoward@redhat.com
-Martin Hunt					hunt@redhat.com
-Daniel Jacobowitz				dan@debian.org
-Andreas Jaeger					aj@suse.de
-Geoff Keating					geoffk@redhat.com
 Jim Kingdon					jkingdon@engr.sgi.com  ++
-Jonathan Larmour				jlarmour@redhat.co.uk
-H.J. Lu						hjl@lucon.org
-Glen McCready					gkm@cygnus.com
 Jason Molenda					jsm@cygnus.com
+H.J. Lu						hjl@lucon.org
+Nick Clifton					nickc@cygnus.com
+Jonathan Larmour				jlarmour@redhat.co.uk
+Glen McCready					gkm@cygnus.com
+Gary Thomas					gthomas@redhat.com
 Pierre Muller					muller@sourceware.cygnus.com
+Kazu Hirata					kazu@hxi.com
+Tom Tromey					tromey@cygnus.com
 Alexandre Oliva					aoliva@redhat.com
 Mark Salter					msalter@redhat.com
-Keith Seitz					keiths@cygnus.com
+Michael Chastain				chastain@redhat.com
+Orjan Friberg					orjanf@axis.com
+Jeff Holcomb					jeffh@redhat.com
 David Smith					dsmith@redhat.com
-Gary Thomas					gthomas@redhat.com
-Tom Tromey					tromey@cygnus.com
-
+Martin Hunt					hunt@redhat.com
+Matt Hiller					hiller@redhat.com
+Philip Blundell					philb@gnu.org
+Keith Seitz					keiths@cygnus.com
+Geoff Keating					geoffk@redhat.com
+Don Howard					dhoward@redhat.com
 
 
 			Past Maintainers
 
 Jimmy Guo (gdb.hp, tui)				guo@cup.hp.com
-Jeff Law (hppa)					law@cygnus.com
-Daniel Berlin (C++ support)			dan@cgsoftware.com
 
 
 Folks that have been caught up in a paper trail:
 
 Jim Kingdon					jkingdon@engr.sgi.com
+Paul Hilfinger					hilfingr@gnat.com (*)
 Chris G. Demetriou				cgd@sibyte.com
 
 --
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 46bd68d..a2beabe 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -265,13 +265,11 @@
 IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
 
 SUBDIR_GDBTK_OBS = \
-	gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o \
-	gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o
+	gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-varobj.o gdbtk-wrapper.o
 SUBDIR_GDBTK_SRCS = \
-	gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \
-	gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \
-	gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \
-	gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c
+	gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c \
+	gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-varobj.c \
+	gdbtk/generic/gdbtk-wrapper.c
 SUBDIR_GDBTK_DEPS = \
 	$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)
 SUBDIR_GDBTK_INITS = gdbtk/generic/gdbtk.c
@@ -359,6 +357,7 @@
 ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
 ADD_DEPS = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
 
+VERSION = 5.0
 DIST=gdb
 
 LINT=/usr/5bin/lint
@@ -541,7 +540,7 @@
 	tui/tui-file.h tui/tui-file.c \
 	ui-file.h ui-file.c \
 	frame.c \
-	gnu-v2-abi.c gnu-v3-abi.c hpacc-abi.c cp-abi.c
+	gnu-v2-abi.c hpacc-abi.c cp-abi.c
 
 LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
 
@@ -556,7 +555,6 @@
 dis-asm_h =	$(INCLUDE_DIR)/dis-asm.h 
 remote-sim_h =	$(INCLUDE_DIR)/remote-sim.h
 demangle_h =    $(INCLUDE_DIR)/demangle.h
-obstack_h =     $(INCLUDE_DIR)/obstack.h
 
 dcache_h = dcache.h
 remote_utils_h = $(dcache_h) serial.h target.h remote-utils.h $(remote-sim_h)
@@ -588,7 +586,7 @@
 breakpoint_h =	breakpoint.h $(frame_h) $(value_h)
 
 command_h =	command.h
-gdbcmd_h =	gdbcmd.h $(command_h) $(ui_out_h)
+gdbcmd_h =	gdbcmd.h $(command_h)
 call_cmds_h =	call-cmds.h
 regcache_h =	regcache.h
 
@@ -599,8 +597,6 @@
 
 top_h =		top.h
 inferior_h =	inferior.h $(breakpoint_h)
-target_h =      target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
-memattr_h =     memattr.h
 tracepoint_h =	tracepoint.h
 ax_h = 		ax.h
 event_loop_h =  event-loop.h
@@ -611,7 +607,6 @@
 ui_out_h =      ui-out.h
 cli_out_h =	cli-out.h
 arch_utils_h = arch-utils.h
-gdb_string_h =  gdb_string.h
 
 cli_decode_h =	$(srcdir)/cli/cli-decode.h
 cli_cmds_h =	$(srcdir)/cli/cli-cmds.h
@@ -695,7 +690,7 @@
 	nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o \
 	ui-file.o tui-file.o \
 	frame.o \
-	gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o
+	gnu-v2-abi.o hpacc-abi.o cp-abi.o
 
 OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
 
@@ -932,7 +927,7 @@
 
 clean mostlyclean: $(CONFIG_CLEAN)
 	@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do 
-	rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp
+	rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp
 	rm -f init.c version.c
 	rm -f gdb$(EXEEXT) core make.log
 	rm -f gdb[0-9]$(EXEEXT)
@@ -1013,13 +1008,12 @@
 		< $(srcdir)/COPYING > $(srcdir)/copying.tmp
 	mv $(srcdir)/copying.tmp $(srcdir)/copying.c
 
-version.c: Makefile version.in
-	rm -f version.c-tmp version.c
-	echo '#include "version.h"' >> version.c-tmp
-	echo 'const char version[] = "'"`head -1 ${srcdir}/version.in`"'";' >> version.c-tmp
-	echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp
-	echo 'const char target_name[] = "$(target_alias)";' >> version.c-tmp
-	mv version.c-tmp version.c
+version.c: Makefile
+	rm -f version.c
+	echo '#include "version.h"' >> version.c
+	echo 'const char version[] = "$(VERSION)";' >> version.c
+	echo 'const char host_name[] = "$(host_alias)";' >> version.c
+	echo 'const char target_name[] = "$(target_alias)";' >> 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
@@ -1163,7 +1157,7 @@
 	mips-tdep.c mipsm3-nat.c mipsv4-nat.c news-xdep.c \
 	nindy-share/Onindy.c nindy-share/nindy.c \
 	nindy-share/ttyflush.c nindy-tdep.c \
-	ns32k-tdep.c solib-osf.c \
+	ns32k-tdep.c osfsolib.c \
 	somread.c somsolib.c $(HPREAD_SOURCE) \
 	ppc-linux-nat.c ppc-linux-tdep.c \
 	procfs.c \
@@ -1173,7 +1167,7 @@
 	remote-st.c remote-utils.c dcache.c \
 	remote-udi.c remote-vx.c remote-vx29k.c \
 	rs6000-nat.c rs6000-tdep.c \
-	ser-go32.c ser-pipe.c ser-tcp.c \
+	ser-go32.c ser-pipe.c ser-ocd.c ser-tcp.c \
 	sh-tdep.c solib.c sparc-nat.c \
 	sparc-tdep.c sparcl-tdep.c sun3-nat.c \
 	symm-tdep.c symm-nat.c \
@@ -1201,13 +1195,13 @@
 	$(regcache_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 \
+	$(inferior_h) $(symtab_h) $(dis-asm.h) gdb_string.h linespec.h \
 	$(regcache_h)
 
 annotate.o: annotate.c $(defs_h) annotate.h $(value_h) target.h $(gdbtypes_h)
 
 arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
-	$(gdb_string_h) $(regcache_h)
+	gdb_string.h $(regcache_h)
 
 arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) target.h $(value_h) \
 	$(gdbtypes_h) $(floatformat_h) $(regcache_h)
@@ -1221,31 +1215,31 @@
 	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)
+	$(inferior_h) language.h target.h gdbthread.h gdb_string.h \
+	gdb-events.h linespec.h
 
 buildsym.o: buildsym.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
-	objfiles.h symfile.h $(symtab_h) $(gdb_string_h)
+	objfiles.h symfile.h $(symtab_h) gdb_string.h
 
 c-lang.o: c-lang.c c-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
 	language.h parser-defs.h $(symtab_h)
 
 c-typeprint.o: c-typeprint.c c-lang.h $(defs_h) $(expression_h) \
 	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) \
-	target.h typeprint.h $(value_h) $(gdb_string_h) $(cp_abi_h)
+	target.h typeprint.h $(value_h) gdb_string.h $(cp_abi_h)
 
 c-valprint.o: c-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
 	language.h $(symtab_h) valprint.h $(value_h) $(cp_abi_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)
+	language.h parser-defs.h $(symtab_h) gdb_string.h
 
 f-typeprint.o: f-typeprint.c f-lang.h $(defs_h) $(expression_h) \
 	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) \
-	target.h typeprint.h $(value_h) $(gdb_string_h)
+	target.h typeprint.h $(value_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)
+	language.h $(symtab_h) valprint.h $(value_h) gdb_string.h
 
 ch-exp.o: ch-exp.c ch-lang.h $(defs_h) language.h parser-defs.h $(bfd_h) symfile.h objfiles.h $(value_h)
 
@@ -1254,7 +1248,7 @@
 
 ch-typeprint.o: ch-typeprint.c ch-lang.h $(defs_h) $(expression_h) \
 	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) \
-	target.h $(value_h) typeprint.h $(gdb_string_h)
+	target.h $(value_h) typeprint.h gdb_string.h
 
 ch-valprint.o: ch-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
 	language.h $(symtab_h) valprint.h $(value_h) c-lang.h
@@ -1264,7 +1258,7 @@
 coffread.o: coffread.c $(bfd_h) $(breakpoint_h) buildsym.h \
 	complaints.h $(defs_h) $(expression_h) $(gdbtypes_h) objfiles.h \
 	symfile.h $(symtab_h) gdb-stabs.h stabsread.h target.h \
-	$(gdb_string_h)
+	gdb_string.h
 
 complaints.o: complaints.c complaints.h $(defs_h) $(gdbcmd_h)
 
@@ -1276,60 +1270,60 @@
 	$(regcache_h)
 
 core-sol2.o: core-sol2.c $(command_h) $(defs_h) $(gdbcore_h) \
-	$(inferior_h) target.h $(gdb_string_h) $(regcache_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)
+	$(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 \
+	$(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)
+	target.h gdbthread.h gdb_string.h $(regcache_h)
 
 cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h)
 
 cp-valprint.o: cp-valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
-	$(gdbtypes_h) $(symtab_h) $(value_h) $(gdb_string_h)
+	$(gdbtypes_h) $(symtab_h) $(value_h) gdb_string.h
 
-dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) $(gdb_string_h) \
+dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) gdb_string.h \
 	$(gdbcore_h) target.h
 
 dbxread.o: dbxread.c $(breakpoint_h) buildsym.h $(command_h) \
 	complaints.h $(defs_h) $(expression_h) gdb-stabs.h $(gdbcore_h) \
 	$(gdbtypes_h) language.h objfiles.h partial-stab.h stabsread.h \
-	symfile.h $(symtab_h) target.h $(gdb_string_h) $(cp_abi_h)
+	symfile.h $(symtab_h) target.h gdb_string.h $(cp_abi_h)
 
 delta68-nat.o: delta68-nat.c $(defs_h)
 
-demangle.o: demangle.c $(defs_h) $(gdbcmd_h) $(gdb_string_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)
 
-dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h)
+dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) gdb_string.h
 
-dstread.o: dstread.c $(gdb_string_h)
+dstread.o: dstread.c gdb_string.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)
+	$(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)
+	$(symtab_h) gdb_string.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) \
+	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)
+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)
+	gdb_string.h $(cp_abi_h)
 
 event-loop.o: event-loop.c $(defs_h) $(top_h) $(event_loop_h) $(event_top_h)
 
@@ -1341,13 +1335,13 @@
 	 $(event_top_h)
 
 exec.o: exec.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
-	target.h language.h $(gdb_string_h) completer.h
+	target.h language.h gdb_string.h completer.h
 
 expprint.o: expprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
 	language.h parser-defs.h $(symtab_h) $(value_h)
 
 findvar.o: findvar.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
-	$(gdb_string_h) $(regcache_h)
+	gdb_string.h $(regcache_h)
 
 frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
 	$(regcache_h)
@@ -1355,7 +1349,7 @@
 regcache.o: regcache.c $(defs_h) $(inferior_h) target.h $(regcache_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)
+	$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
 
 # FIXME: cagney/2000-03-27: Post 5.0 this link code can be removed.
 # It should now be possible to run GDBtk from the build directory
@@ -1398,57 +1392,31 @@
 gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \
 	$(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \
 	$(symtab_h) $(inferior_h) $(command_h) \
-	$(bfd_h) $(symfile_h) objfiles.h $(target_h) $(gdb_string_h) \
-	$(tracepoint_h) $(top_h) 
+	$(bfd_h) symfile.h objfiles.h target.h gdb_string.h $(tracepoint_h) \
+	$(top_h) 
 	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
         $(ITK_CFLAGS) $(TIX_CFLAGS) \
 	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
 		$(srcdir)/gdbtk/generic/gdbtk.c -DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
 
-gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
-	$(defs_h) $(breakpoint_h) $(tracepoint_h) $(symfile_h) $(symtab_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
-	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
-	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \
-	-DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
-
 gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
+	$(srcdir)/gdbtk/generic/gdbtk.h \
 	$(defs_h) $(symtab_h) $(inferior_h)	\
-	$(command_h) $(bfd_h) $(top_h) $(symfile_h) objfiles.h $(target_h) \
-	$(gdb_string_h) $(tracepoint_h) source.h $(regcache_h)
+	$(command_h) $(bfd_h) $(top_h) symfile.h objfiles.h target.h	\
+	gdb_string.h $(tracepoint_h) $(frame_h) source.h $(regcache_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)	\
 	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)		\
-	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c		\
+	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c				\
 	-DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
 
 gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \
 	$(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \
 	$(symtab_h) $(inferior_h) $(command_h) \
-	$(bfd_h) $(symfile_h) objfiles.h $(target_h) $(gdb_string_h) $(tracepoint_h)
+	$(bfd_h) symfile.h objfiles.h target.h gdb_string.h $(tracepoint_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
 	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
 		$(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
 
-gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
-	$(defs_h) $(frame_h) $(value_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
-	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
-	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \
-	-DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
-
-gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
-	$(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
-	$(defs_h) $(frame_h) $(value_h) $(target_h) $(breakpoint_h) \
-	linespec.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
-	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
-	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \
-	-DGDBTK_LIBRARY=\"$(datadir)/gdbtcl\"
-
 gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \
 	$(srcdir)/gdbtk/generic/gdbtk.h \
 	$(defs_h) $(value_h) varobj.h
@@ -1463,7 +1431,7 @@
 
 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)
+	gdb_string.h target.h objfiles.h $(regcache_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
 	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
 		$(srcdir)/v850ice.c
@@ -1474,7 +1442,7 @@
 
 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 \
+	language.h gdb_string.h $(readline_headers) $(remote_h) linespec.h \
 	$(regcache_h)
 
 gdbarch.o: gdbarch.c $(defs_h) $(bfd_h) $(gdbcmd_h)
@@ -1484,7 +1452,7 @@
 
 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)
+	$(value_h) gdb_string.h wrapper.h $(cp_abi_h)
 
 go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) gdb_wait.h $(gdbcore_h) \
 	$(command_h) $(floatformat_h) target.h i387-nat.h $(regcache_h)
@@ -1492,11 +1460,9 @@
 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
 
-gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \
-	$(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h) 
+gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(cp_abi_h) gdb_string.h $(symtab_h) \
+	$(gdbtypes_h) $(value_h)
 
-gnu-v3-abi.o: gnu-v2-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(demangle_h)
- 
 h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(regcache_h)
 
 h8500-tdep.o: h8500-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h) \
@@ -1505,7 +1471,7 @@
 
 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) \
+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) \
@@ -1519,7 +1485,7 @@
 
 i386gnu-nat.o: gnu-nat.h
 
-i386-tdep.o: i386-tdep.c $(defs_h) $(gdb_string_h) $(frame_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)
 
@@ -1569,17 +1535,16 @@
 	$(INCLUDE_DIR)/elf/common.h $(regcache_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)
+	$(inferior_h) target.h language.h symfile.h gdb_string.h
 
 inflow.o: inflow.c $(bfd_h) $(command_h) $(defs_h) $(inferior_h) \
-	target.h terminal.h gdbthread.h $(gdb_string_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)
+	gdb_string.h gdb_wait.h $(command_h) $(regcache_h)
 
 infrun.o: infrun.c gdb_wait.h $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
-	$(inferior_h) target.h gdbthread.h $(gdb_string_h) $(event_loop_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) \
@@ -1588,29 +1553,29 @@
 irix4-nat.o: irix4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_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) gnu-regex.h \
-	language.h $(gdb_string_h) $(regcache_h)
+	language.h gdb_string.h $(regcache_h)
 
 # OBSOLETE isi-xdep.o: isi-xdep.c
 
 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)
+	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) \
+	$(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
 
-kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) target.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
+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)
+	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)
@@ -1620,7 +1585,7 @@
 
 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)
+	$(value_h) gdb_string.h
 
 m2-valprint.o: m2-valprint.c $(defs_h) $(gdbtypes_h) $(symtab_h) \
 	valprint.h m2-lang.h
@@ -1629,17 +1594,17 @@
 	gdb_wait.h $(gdbcmd_h) $(gdbcore_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)
+	language.h parser-defs.h $(symtab_h) gdb_string.h
 
 p-typeprint.o: p-typeprint.c p-lang.h $(defs_h) $(expression_h) \
 	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) \
-	target.h typeprint.h $(value_h) $(gdb_string_h)
+	target.h typeprint.h $(value_h) gdb_string.h
 
 p-valprint.o: p-valprint.c p-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
-	language.h $(symtab_h) valprint.h $(value_h) $(gdb_string_h)
+	language.h $(symtab_h) valprint.h $(value_h) gdb_string.h
 
 m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
-	$(gdbcore_h) $(gdb_string_h) $(regcache_h)
+	$(gdbcore_h) gdb_string.h $(regcache_h)
 
 m68kly-nat.o: m68kly-nat.c $(defs_h) $(frame_h) $(inferior_h) target.h
 
@@ -1650,10 +1615,10 @@
 
 m88k-tdep.o: m88k-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
 
-mac-nat.o: mac-nat.c $(defs_h) $(gdb_string_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) $(srcdir)/tui/tui-file.h $(ui_out_h)
+main.o: main.c top.h $(defs_h) gdb_string.h $(event_loop_h) \
+	symfile.h  $(gdbcore_h) $(srcdir)/tui/tui-file.h
 
 maint.o: maint.c $(defs_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) language.h \
 	$(expression_h) objfiles.h symfile.h
@@ -1662,12 +1627,12 @@
 	$(symtab_h) $(symfile_h) $(gdbcore_h) $(inferior_h)
 
 mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) target.h monitor.h \
-	$(gdb_string_h) $(regcache_h)
+	gdb_string.h $(regcache_h)
 
 mdebugread.o: mdebugread.c buildsym.h complaints.h $(bfd_h) $(defs_h) \
 	$(expression_h) gdb-stabs.h $(gdbcore_h) $(gdbtypes_h) language.h \
 	objfiles.h partial-stab.h stabsread.h symfile.h $(symtab_h) \
-	$(gdb_string_h)
+	gdb_string.h
 
 mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
 
@@ -1676,34 +1641,30 @@
 os9kread.o: os9kread.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) \
-		target.h $(gdb_string_h)
+		target.h gdb_string.h
 	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
 
 mem-break.o: mem-break.c $(defs_h) 
 
 minsyms.o: minsyms.c $(bfd_h) $(defs_h) objfiles.h symfile.h \
-	$(symtab_h) $(gdb_string_h) $(value_h) $(cp_abi_h)
+	$(symtab_h) gdb_string.h
 
 mips-nat.o: mips-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_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)
+	$(inferior_h) language.h objfiles.h symfile.h gdb_string.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 partial-stab.h stabsread.h symfile.h $(symtab_h) \
-	$(gdb_string_h)
+	gdb_string.h
 
 mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
 	$(regcache_h)
 
-mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
-	$(obstack_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)
+	$(inferior_h) target.h serial.h terminal.h gdb_string.h $(regcache_h)
 
 news-xdep.o: news-xdep.c
 
@@ -1717,7 +1678,7 @@
 
 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)
+	gdb_string.h
 
 # OBSOLETE ns32km3-nat.o: ns32km3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
 
@@ -1729,13 +1690,13 @@
 ns32k-tdep.o: ns32k-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h)
 
 objfiles.o: objfiles.c $(bfd_h) $(defs_h) objfiles.h symfile.h \
-	$(symtab_h) $(gdb_string_h) $(breakpoint_h)
+	$(symtab_h) gdb_string.h $(breakpoint_h)
 
-solib-osf.o: solib-osf.c $(defs_h) $(inferior_h) $(symtab_h) objfiles.h \
-	$(symfile_h) $(target_h) $(gdb_string_h) solist.h
+osfsolib.o: osfsolib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
+	objfiles.h gnu-regex.h symfile.h target.h language.h gdb_string.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)
+	gdb-stabs.h objfiles.h symfile.h $(symtab_h) gdb_string.h
 
 somsolib.o: somsolib.c $(defs_h) $(regcache_h)
 
@@ -1748,20 +1709,20 @@
 
 # FIXME!!!
 hpread.o: hpread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
-	gdb-stabs.h objfiles.h symfile.h $(symtab_h) $(gdb_string_h)
+	gdb-stabs.h objfiles.h symfile.h $(symtab_h) gdb_string.h
 
 hp-psymtab-read.o: hp-psymtab-read.c hpread.h $(bfd_h) buildsym.h complaints.h \
-	$(defs_h) gdb-stabs.h objfiles.h symfile.h $(symtab_h) $(gdb_string_h)
+	$(defs_h) gdb-stabs.h objfiles.h symfile.h $(symtab_h) gdb_string.h
  
 hp-symtab-read.o: hp-symtab-read.c hpread.h $(bfd_h) buildsym.h complaints.h \
-	$(defs_h) gdb-stabs.h objfiles.h symfile.h $(symtab_h) $(gdb_string_h)
+	$(defs_h) gdb-stabs.h objfiles.h symfile.h $(symtab_h) gdb_string.h
 # END FIXME!!!  
 
 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
+	gdb_string.h linespec.h
 
-ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_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)
 
@@ -1776,12 +1737,12 @@
 
 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)
+	symfile.h $(symtab_h) target.h gdb_string.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
+	target.h gdb_string.h gdbthread.h proc-utils.h
 	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
 
 proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) proc-utils.h
@@ -1808,17 +1769,17 @@
 proc-service.o: proc-service.c $(defs_h) $(inferior_h) gdb_proc_service.h \
 	$(symtab_h) $(target_h) gregset.h
 
-gnu-regex.o: gnu-regex.c gnu-regex.h $(defs_h) $(gdb_string_h)
+gnu-regex.o: gnu-regex.c gnu-regex.h $(defs_h) gdb_string.h
 
 remote-adapt.o: remote-adapt.c $(defs_h) $(gdbcore_h) \
-	$(inferior_h) target.h terminal.h $(gdb_string_h) $(regcache_h)
+	$(inferior_h) target.h terminal.h gdb_string.h $(regcache_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) \
+      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)
+	$(inferior_h) gdb_string.h
 
 rdi-share/libangsd.a:	force
 	@dir=rdi-share; \
@@ -1831,10 +1792,10 @@
 	fi
 
 remote-rdp.o: remote-rdp.c $(defs_h) $(gdbcore_h) \
-	$(inferior_h) $(gdb_string_h)
+	$(inferior_h) gdb_string.h
 
 remote-bug.o: remote-bug.c $(defs_h) $(gdbcore_h) \
-	$(inferior_h) target.h terminal.h $(remote_utils_h) $(gdb_string_h) \
+	$(inferior_h) target.h terminal.h $(remote_utils_h) gdb_string.h \
 	$(regcache_h)
 
 # FIXME: For the SH target, remote-e7000 contains numerous -Wformat
@@ -1842,15 +1803,15 @@
 # handles the SH remote protocol the changes need to be tested against
 # an SH board before they can be committed. cagney 1999-09-01.
 remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) target.h \
-	serial.h $(gdb_string_h) $(regcache_h)
+	serial.h gdb_string.h $(regcache_h)
 	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
 
 remote-eb.o: remote-eb.c $(srcdir)/config/a29k/tm-a29k.h \
 	$(defs_h) $(gdbcore_h) $(inferior_h) symfile.h target.h terminal.h \
-	$(gdb_string_h) $(regcache_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) \
+	$(inferior_h) $(remote_utils_h) terminal.h gdb_string.h \
 	symfile.h $(regcache_h)
 
 remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) \
@@ -1863,7 +1824,7 @@
 	$(gdbcore_h) $(inferior_h) serial.h symfile.h target.h $(regcache_h)
 
 remote-mm.o: remote-mm.c $(bfd_h) $(defs_h) $(inferior_h) \
-	minimon.h target.h terminal.h $(gdb_string_h) $(regcache_h)
+	minimon.h target.h terminal.h gdb_string.h $(regcache_h)
 
 remote-nindy.o: remote-nindy.c $(floatformat_h) $(command_h) \
 	$(defs_h) $(gdbcore_h) $(inferior_h) \
@@ -1872,43 +1833,43 @@
 
 remote-os9k.o: remote-os9k.c $(defs_h) $(gdbcore_h) \
 	$(command_h) monitor.h $(remote_utils_h) $(symtab_h) symfile.h \
-	objfiles.h gdb-stabs.h $(gdb_string_h) $(regcache_h)
+	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) \
+	$(inferior_h) $(remote_utils_h) symfile.h terminal.h gdb_string.h \
 	$(regcache_h)
 
 remote-sim.o: remote-sim.c $(defs_h) $(gdbcore_h) \
-	$(inferior_h) target.h terminal.h $(gdb_string_h) \
+	$(inferior_h) target.h terminal.h gdb_string.h \
 	$(INCLUDE_DIR)/callback.h $(regcache_h)
 
 remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) serial.h \
-	target.h $(gdb_string_h) $(regcache_h)
+	target.h gdb_string.h $(regcache_h)
 
 remote-udi.o: remote-udi.c $(bfd_h) $(defs_h) $(gdbcmd_h) \
-	$(inferior_h) target.h terminal.h $(udiheaders) $(gdb_string_h) \
+	$(inferior_h) target.h terminal.h $(udiheaders) 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)
+	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)
+        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) \
+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)
+	$(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) \
+	$(inferior_h) $(remote_utils_h) symfile.h terminal.h gdb_string.h \
 	$(event_loop_h) $(event_top_h) $(remote_h) $(inf_loop_h)
 
 remote-nrom.o: remote-nrom.c $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
@@ -1928,7 +1889,7 @@
 	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-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)
@@ -1937,13 +1898,15 @@
 
 ser-mac.o: ser-mac.c $(defs_h) serial.h 
 
-ser-pipe.o: ser-pipe.c $(defs_h) serial.h $(gdb_string_h) ser-unix.h
+ser-ocd.o: ser-ocd.c $(defs_h) serial.h gdb_string.h
 
-ser-tcp.o: ser-tcp.c $(defs_h) serial.h $(gdb_string_h) ser-unix.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)
+serial.o: serial.c $(defs_h) serial.h gdb_string.h
 
 sh-tdep.o: sh-tdep.c $(bfd_h) $(dis-asm_h) \
 	$(srcdir)/../opcodes/sh-opc.h $(defs_h) $(expression_h) $(frame_h) \
@@ -1958,23 +1921,23 @@
 	$(inferior_h) target.h serial.h terminal.h
 
 solib.o: solib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
-	objfiles.h gnu-regex.h symfile.h target.h $(gdb_string_h) solist.h
+	objfiles.h gnu-regex.h symfile.h target.h gdb_string.h solist.h
 
 solib-svr4.o: solib-svr4.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
-	objfiles.h gnu-regex.h symfile.h target.h $(gdb_string_h) solist.h \
+	objfiles.h gnu-regex.h symfile.h target.h gdb_string.h solist.h \
 	solib-svr4.h $(regcache_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 gnu-regex.h symfile.h $(symtab_h) \
-	$(gdb_string_h) source.h completer.h linespec.h $(ui_out_h)
+	gdb_string.h source.h completer.h linespec.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 $(floatformat_h) $(defs_h) $(gdbcore_h) \
-	$(inferior_h) objfiles.h symfile.h target.h $(gdb_string_h) \
+	$(inferior_h) objfiles.h symfile.h target.h gdb_string.h \
 	$(arch_utils_h) $(regcache_h)
 
 sparcl-tdep.o: sparcl-tdep.c $(defs_h) $(gdbcore_h) target.h $(regcache_h)
@@ -1984,10 +1947,10 @@
 stabsread.o: stabsread.c $(bfd_h) $(INCLUDE_DIR)/aout/stab.def \
 	$(INCLUDE_DIR)/aout/stab_gnu.h buildsym.h complaints.h $(defs_h) \
 	$(gdbtypes_h) objfiles.h stabsread.h symfile.h $(symtab_h) \
-	$(gdb_string_h)
+	gdb_string.h
 
 stack.o: stack.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
-	language.h target.h $(gdb_string_h) $(ui_out_h)
+	language.h target.h gdb_string.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
@@ -2004,7 +1967,7 @@
 symfile.o: symfile.c $(breakpoint_h) complaints.h $(defs_h) \
 	$(expression_h) gdb-stabs.h $(gdbcmd_h) $(gdbcore_h) \
 	$(gdbtypes_h) language.h objfiles.h symfile.h $(symtab_h) \
-	target.h $(gdb_string_h) completer.h
+	target.h gdb_string.h completer.h
 
 symm-tdep.o: symm-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
 
@@ -2012,12 +1975,12 @@
 
 symmisc.o: symmisc.c $(bfd_h) $(breakpoint_h) $(command_h) $(defs_h) \
 	$(expression_h) $(gdbtypes_h) language.h objfiles.h symfile.h \
-	$(symtab_h) $(gdb_string_h)
+	$(symtab_h) gdb_string.h
 
 symtab.o: symtab.c call-cmds.h $(defs_h) $(expression_h) $(frame_h) \
 	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h objfiles.h \
 	gnu-regex.h symfile.h $(symtab_h) target.h $(value_h) \
-	$(gdb_string_h) linespec.h $(cp_abi_h)
+	gdb_string.h linespec.h $(cp_abi_h)
 
 linespec.o: linespec.c linespec.h $(defs_h) $(frame_h) $(value_h) \
 	objfiles.h symfile.h completer.h $(symtab_h) \
@@ -2026,22 +1989,21 @@
 tic80-tdep.o: tic80-tdep.c $(defs_h) $(regcache_h)
 
 target.o: target.c $(bfd_h) $(defs_h) $(gdbcmd_h) $(inferior_h) \
-	objfiles.h symfile.h target.h $(gdb_string_h) $(regcache_h)
+	objfiles.h symfile.h target.h gdb_string.h $(regcache_h)
 
-thread.o: thread.c $(defs_h) gdbthread.h $(gdbcmd_h) target.h \
-	$(regcache_h) $(ui_out_h)
+thread.o: thread.c $(defs_h) gdbthread.h $(gdbcmd_h) target.h $(regcache_h)
 
 completer.o: completer.c completer.h $(gdbtypes_h) $(symtab_h) \
 	$(defs_h) $(gdbcmd_h) $(expression_h) $(readline_headers)
 
 top.o: top.c top.h $(bfd_h) $(getopt_h) $(readline_headers) call-cmds.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)
+	$(remote_utils_h) gdb_string.h $(event_loop_h) $(event_top_h) \
+	completer.h $(version_h)
 
 typeprint.o: typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
 	$(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
-	$(value_h) $(gdb_string_h) $(cp_abi.h)
+	$(value_h) gdb_string.h $(cp_abi.h)
 
 # OBSOLETE ultra3-nat.o: ultra3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
 
@@ -2051,29 +2013,29 @@
 
 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)
+	gdb_string.h $(event_loop_h) $(event_top_h)
 
 valarith.o: valarith.c $(bfd_h) $(defs_h) $(expression_h) \
 	$(gdbtypes_h) language.h $(symtab_h) target.h $(value_h) \
-	$(gdb_string_h)
+	gdb_string.h
 
 valops.o: valops.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
-	$(gdb_string_h) $(regcache_h) $(cp_abi_h)
+	gdb_string.h $(regcache_h) $(cp_abi_h)
 
 valprint.o: valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
 	$(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
-	$(value_h) $(gdb_string_h) valprint.h
+	$(value_h) gdb_string.h valprint.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
+	gdb_string.h scm-lang.h
 
 vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax.h $(defs_h) $(symtab_h)
 
 w65-tdep.o : w65-tdep.c $(gdbcore_h) $(regcache_h)
 
 win32-nat.o: win32-nat.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \
-	$(gdb_string_h) $(regcache_h)
+	gdb_string.h $(regcache_h)
 
 xdr_ld.o: vx-share/xdr_ld.c $(defs_h) vx-share/vxTypes.h \
 	vx-share/vxWorks.h vx-share/xdr_ld.h
@@ -2091,7 +2053,7 @@
 	$(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) partial-stab.h $(gdb_string_h)
+	$(symtab_h) partial-stab.h gdb_string.h
 
 xcoffsolib.o: xcoffsolib.c $(bfd_h) $(defs_h) xcoffsolib.h $(inferior_h) \
 	$(gdbcmd_h) symfile.h $(frame_h) gnu-regex.h
@@ -2191,7 +2153,7 @@
 mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(top_h) $(mi_cmds_h) $(ui_out_h) \
 		$(mi_console_h) $(mi_getopt_h) $(event_loop_h) $(event_top_h) \
 		$(mi_getopt_h) $(regcache_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c
+	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/mi/mi-main.c
 mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(mi_out_h) $(ui_out_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c
 mi-console.o: $(srcdir)/mi/mi-console.c $(mi_out_h) $(defs_h)
diff --git a/gdb/NEWS b/gdb/NEWS
index 816cf4c..4840471 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -5,11 +5,6 @@
 
 * "info symbol" works on platforms which use COFF, ECOFF, XCOFF, and NLM.
 
-* The MI enabled.
-
-The new machine oriented interface (MI) introduced in GDB 5.0 has been
-revised and enabled.
-
 * New native configurations
 
 Alpha FreeBSD					alpha*-*-freebsd*
@@ -42,14 +37,13 @@
 configurations, the next release of GDB will have their sources
 permanently REMOVED.
 
-* REMOVED configurations and files
+* REMOVED configurations
 
 Altos 3068					m68*-altos-*
 Convex						c1-*-*, c2-*-*
 Pyramid						pyramid-*-*
 ARM RISCix					arm-*-* (as host)
 Tahoe						tahoe-*-*
-ser-ocd.c					*-*-*
 
 * Other news:
 
@@ -57,12 +51,6 @@
 
 Multi-arch support is enabled for all MIPS configurations.
 
-* GDB's version number moved to ``version.in''
-
-The Makefile variable VERSION has been replaced by the file
-``version.in''.  People creating GDB distributions should update the
-contents of this file.
-
 * gdba.el deleted
 
 GUD support is now a standard part of the EMACS distribution.
diff --git a/gdb/TODO b/gdb/TODO
index 21e6904..1941cc3 100644
--- a/gdb/TODO
+++ b/gdb/TODO
@@ -10,6 +10,20 @@
 Below is a list of problems identified during the GDB 5.0 release
 cycle.  People hope to have these problems fixed in 5.1.
 
+-- 2001-03-08
+
+Update GDB's coding standard documentation.  Known topics:
+
+       o     alloca/malloc et.al.
+
+       o     typedef and structs
+
+       o	ISO-C
+
+and most likely also:
+
+       o	 include conventions
+
 --
 
 Wow, three bug reports for the same problem in one day!  We should
@@ -75,6 +89,25 @@
 
 --
 
+Enable MI by default.  Old code can be deleted after 5.1 is out.
+
+Issues:
+
+	o	syntax change where a list would
+		look like:
+		     [ foo=a, foo=b, foo=c ]
+		instead of
+		     { foo=a, foo=b, foo=c }
+
+	o	kill off the idea of a reverse
+		query.
+
+	o	review test cases
+
+	o	enable it
+
+--
+
 Pascal (Pierre Muller, David Taylor)
 
 Pierre Muller has contributed patches for adding Pascal Language
@@ -119,6 +152,14 @@
 
 The following code cleanups will hopefully be applied to GDB 5.1.
 
+-- 2001-03-26
+
+Resolve the build status of all broken targets as identified by the
+MAINTAINERS file.
+
+	o	arm-* vs NetBSD's lack of ``unix''
+	o	arm-* vs IRIX (see below)
+
 --
 
 Fix copyright notices.
@@ -168,6 +209,11 @@
 
 --
 
+Thread support.  Right now, as soon as a thread finishes and exits,
+you're hosed.  This problem is reported once a week or so.
+
+--
+
 		GDB 5.2 - New features
 		======================
 
@@ -181,10 +227,6 @@
 
 --
 
-Import of readline 4.2
-
---
-
 		GDB 5.2 - Cleanups
 		==================
 
@@ -200,13 +242,9 @@
 
 Compiler warnings.
 
-Eliminate warnings for all targets on at least one host for one of the
--W flags.  Flags up for debate include: -Wswitch -Wcomment -trigraphs
--Wtrigraphs -Wunused-function -Wunused-label -Wunused-variable
--Wunused-value -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
--Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
--Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
--Woverloaded-virtual -Winline
+Eliminate all warnings for at least one host/target for the flags:
+-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses
+-Wpointer-arith -Wuninitialized
 
 --
 
@@ -260,25 +298,6 @@
 		The size of the cache can be computed
 		on the fly.
 
-	IS_TRAPPED_INTERNALVAR
-		The pseudo registers should eventually make
-		this redundant.
-
---
-
-Obsolete the targets.
-
-arm*-wince-pe
-mips*-*-pe
-sh*-*-pe
-
-Obsolete the protocols:
-
-RDB
-
-``As of version 5.3, WindRiver has removed the RDB server (RDB
-protocol support is built into gdb).''  -- Till.
-
 --
 
 Restructure gdb directory tree so that it avoids any 8.3 and 14
@@ -318,6 +337,18 @@
 
 --
 
+Can't build IRIX -> arm GDB.
+http://sourceware.cygnus.com/ml/gdb-patches/2000-04/msg00356.html
+
+David Whedon writes:
+> Now I'm building for an embedded arm target.  If there is a way of turning
+> remote-rdi off, I couldn't find it. It looks like it gets built by default
+> in gdb/configure.tgt(line 58) Anyway, the build dies in
+> gdb/rdi-share/unixcomm.c.  SERPORT1 et. al. never get defined because we
+> aren't one of the architectures supported.
+
+--
+
 Problem with weak functions
 http://sourceware.cygnus.com/ml/gdb/2000-05/msg00060.html
 
@@ -579,11 +610,6 @@
 
 --
 
-Rewrite/break up sparcl-tdep.c so that it uses ser*.c as the mechanism
-for accessing either the serial or UDP port.
-
---
-
 			New Features and Fixes
 			======================
 
@@ -841,6 +867,58 @@
 
 --
 
+			Thread Support
+			==============
+
+--
+
+Generic: lin-thread cannot handle thread exit (Mark Kettenis, Michael
+Snyder) http://sourceware.cygnus.com/ml/gdb/2000-q1/msg00525.html
+
+The thread_db assisted debugging code doesn't handle exiting threads
+properly, at least in combination with glibc 2.1.3 (the framework is
+there, just not the actual code).  There are at least two problems
+that prevent this from working.
+
+As an additional reference point, the pre thread_db code did not work
+either.
+
+--
+
+GNU/Linux/x86 and random thread signals (and Solaris/SPARC but not
+Solaris/x86).
+http://sourceware.cygnus.com/ml/gdb/2000-q1/msg00336.html
+
+Christopher Blizzard writes:
+
+So, I've done some more digging into this and it looks like Jim
+Kingdon has reported this problem in the past:
+
+http://sourceware.cygnus.com/ml/bug-gdb/1999-10/msg00058.html
+
+I can reproduce this problem both with and without Tom's patch.  Has
+anyone seen this before?  Maybe have a solution for it hanging around?
+:)
+
+There's a test case for this documented at:
+
+when debugging threaded applications you get extra SIGTRAPs
+http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=9565
+
+[There should be a GDB testcase - cagney]
+
+--
+
+GDB5 TOT on unixware 7
+http://sourceware.cygnus.com/ml/gdb/2000-04/msg00119.html
+
+Robert Lipe writes:
+> I just spun the top of tree of the GDB5 branch on UnixWare 7.  As a
+> practical matter, the current thread support is somewhat more annoying
+> than when GDB was thread-unaware.
+
+--
+
 			Language Support
 			================
 
@@ -974,14 +1052,6 @@
 Underlying problem is that the register file is target endian.  If the
 target endianess changes gdb doesn't know.
 
-Suggest encoding registers as NN!VALUE.
-
---
-
-GDB should allow incomming packets to be larger than outgoing ones.  A
-fully loaded T packet (containing all registers) can be very large -
-definitly larger than a corresponding Gg packet.
-
 --
 
 			Symbol Support
@@ -1261,9 +1331,6 @@
 After that it needs to be multi-arched and made independent of any
 host signal numbering.
 
-Once this is done, the signal enum can probably be moved to
-include/gdb so that it is available to embedded stubs.
-
 --
 
 Update ALPHA so that it uses ``struct frame_extra_info'' instead of
diff --git a/gdb/a68v-nat.c b/gdb/a68v-nat.c
index 4cc25ce..851c0fc 100644
--- a/gdb/a68v-nat.c
+++ b/gdb/a68v-nat.c
@@ -43,19 +43,19 @@
 
   registers_fetched ();
 
-  ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers,
 	  ptrace_$data_set,
 	  (PTRACE_ARG3_TYPE) & inferior_registers,
 	  ptrace_$data_set);
 
-  ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers,
 	  ptrace_$floating_set_m68k,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers,
 	  ptrace_$floating_set_m68k);
 
-  ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_control_registers,
 	  ptrace_$control_set_m68k,
 	  (PTRACE_ARG3_TYPE) & inferior_control_registers,
@@ -82,13 +82,13 @@
   ptrace_$init_control (&inferior_control_registers);
   inferior_fp_registers.size = sizeof (inferior_fp_registers);
 
-  ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers,
 	  ptrace_$floating_set_m68k,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers,
 	  ptrace_$floating_set_m68k);
 
-  ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_control_registers,
 	  ptrace_$control_set_m68k,
 	  (PTRACE_ARG3_TYPE) & inferior_control_registers,
@@ -102,19 +102,19 @@
   inferior_control_registers.sr = *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
   inferior_control_registers.pc = *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
 
-  ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_SETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers,
 	  ptrace_$data_set_m68k,
 	  (PTRACE_ARG3_TYPE) & inferior_registers,
 	  ptrace_$data_set_m68k);
 
-  ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_SETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers,
 	  ptrace_$floating_set_m68k,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers,
 	  ptrace_$floating_set_m68k);
 
-  ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_SETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_control_registers,
 	  ptrace_$control_set_m68k,
 	  (PTRACE_ARG3_TYPE) & inferior_control_registers,
diff --git a/gdb/alphabsd-nat.c b/gdb/alphabsd-nat.c
index 5e7a361..e77b31b 100644
--- a/gdb/alphabsd-nat.c
+++ b/gdb/alphabsd-nat.c
@@ -135,8 +135,7 @@
 {
   gregset_t gregs;
 
-  if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+  if (ptrace (PT_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
     perror_with_name ("Couldn't get registers");
 
   supply_gregset (&gregs);
@@ -145,7 +144,7 @@
     {
       fpregset_t fpregs;
 
-      if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+      if (ptrace (PT_GETFPREGS, inferior_pid,
 		  (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
 	perror_with_name ("Couldn't get floating point status");
 
@@ -164,27 +163,25 @@
 {
   gregset_t gregs;
 
-  if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+  if (ptrace (PT_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
     perror_with_name ("Couldn't get registers");
 
   fill_gregset (&gregs, regno);
 
-  if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+  if (ptrace (PT_SETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
     perror_with_name ("Couldn't write registers");
 
   if (regno == -1 || regno >= FP0_REGNUM)
     {
       fpregset_t fpregs;
 
-      if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+      if (ptrace (PT_GETFPREGS, inferior_pid,
 		  (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
 	perror_with_name ("Couldn't get floating point status");
 
       fill_fpregset (&fpregs, regno);
 
-      if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+      if (ptrace (PT_SETFPREGS, inferior_pid,
 		  (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
 	perror_with_name ("Couldn't write floating point status");
     }
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 3da3c27..0fde5db 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -222,7 +222,7 @@
 
 
 CORE_ADDR
-core_addr_identity (CORE_ADDR addr)
+default_convert_from_func_ptr_addr (CORE_ADDR addr)
 {
   return addr;
 }
@@ -252,33 +252,33 @@
 int
 generic_prepare_to_proceed (int select_it)
 {
-  ptid_t wait_ptid;
+  int wait_pid;
   struct target_waitstatus wait_status;
 
   /* Get the last target status returned by target_wait().  */
-  get_last_target_status (&wait_ptid, &wait_status);
+  get_last_target_status (&wait_pid, &wait_status);
 
-  /* Make sure we were stopped either at a breakpoint, or because
-     of a Ctrl-C.  */
+  /* Make sure we were stopped at a breakpoint.  */
   if (wait_status.kind != TARGET_WAITKIND_STOPPED
-      || (wait_status.value.sig != TARGET_SIGNAL_TRAP &&
-          wait_status.value.sig != TARGET_SIGNAL_INT))
+      || wait_status.value.sig != TARGET_SIGNAL_TRAP)
     {
       return 0;
     }
 
-  if (!ptid_equal (wait_ptid, minus_one_ptid)
-      && !ptid_equal (inferior_ptid, wait_ptid))
+  if (wait_pid != -1 && inferior_pid != wait_pid)
     {
       /* Switched over from WAIT_PID.  */
-      CORE_ADDR wait_pc = read_pc_pid (wait_ptid);
+      CORE_ADDR wait_pc = read_pc_pid (wait_pid);
 
-      if (wait_pc != read_pc ())
+      /* Avoid switching where it wouldn't do any good, i.e. if both
+         threads are at the same breakpoint.  */
+      if (wait_pc != read_pc () && breakpoint_here_p (wait_pc))
 	{
 	  if (select_it)
 	    {
-	      /* Switch back to WAIT_PID thread.  */
-	      inferior_ptid = wait_ptid;
+	      /* User hasn't deleted the breakpoint.  Switch back to
+		 WAIT_PID and return non-zero.  */
+	      inferior_pid = wait_pid;
 
 	      /* FIXME: This stuff came from switch_to_thread() in
 		 thread.c (which should probably be a public function).  */
@@ -287,42 +287,14 @@
 	      stop_pc = wait_pc;
 	      select_frame (get_current_frame (), 0);
 	    }
-          /* We return 1 to indicate that there is a breakpoint here,
-             so we need to step over it before continuing to avoid
-             hitting it straight away. */
-          if (breakpoint_here_p (wait_pc))
-            {
-	      return 1;
-            }
+
+	  return 1;
 	}
     }
   return 0;
   
 }
 
-void
-init_frame_pc_noop (int fromleaf, struct frame_info *prev)
-{
-  return;
-}
-
-void
-init_frame_pc_default (int fromleaf, struct frame_info *prev)
-{
-  if (fromleaf)
-    prev->pc = SAVED_PC_AFTER_CALL (prev->next);
-  else if (prev->next != NULL)
-    prev->pc = FRAME_SAVED_PC (prev->next);
-  else
-    prev->pc = read_pc ();
-}
-
-int
-cannot_register_not (int regnum)
-{
-  return 0;
-}
-
 /* Functions to manipulate the endianness of the target.  */
 
 #ifdef TARGET_BYTE_ORDER_SELECTABLE
@@ -613,6 +585,40 @@
   show_architecture (NULL, from_tty);
 }
 
+/* Called if the user enters ``info architecture'' without an argument. */
+
+static void
+info_architecture (char *args, int from_tty)
+{
+  printf_filtered ("Available architectures are:\n");
+  if (GDB_MULTI_ARCH)
+    {
+      const char **arches = gdbarch_printable_names ();
+      const char **arch;
+      for (arch = arches; *arch != NULL; arch++)
+	{
+	  printf_filtered (" %s", *arch);
+	}
+      xfree (arches);
+    }
+  else
+    {
+      enum bfd_architecture a;
+      for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
+	{
+	  const struct bfd_arch_info *ap;
+	  for (ap = bfd_lookup_arch (a, 0);
+	       ap != NULL;
+	       ap = ap->next)
+	    {
+	      printf_filtered (" %s", ap->printable_name);
+	      ap = ap->next;
+	    }
+	}
+    }
+  printf_filtered ("\n");
+}
+
 /* Set the dynamic target-system-dependent parameters (architecture,
    byte-order) using information found in the BFD */
 
@@ -728,8 +734,6 @@
 			  "initialize_current_architecture: Selection of initial architecture failed");
 	}
     }
-  else
-    initialize_non_multiarch ();
 
   /* Create the ``set architecture'' command appending ``auto'' to the
      list of architectures. */
@@ -754,6 +758,9 @@
        current setting. */
     add_cmd ("architecture", class_support, show_architecture,
 	     "Show the current target architecture", &showlist);
+    c = add_cmd ("architecture", class_support, info_architecture,
+		 "List supported target architectures", &infolist);
+    deprecate_cmd (c, "set architecture");
   }
 }
 
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 071b530..d468da6 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -93,9 +93,9 @@
 
 extern int default_register_sim_regno (int reg_nr);
 
-/* Identity function on a CORE_ADDR.  Just returns its parameter.  */
+/* Default conversion of function pointer address - returns address.  */
 
-extern CORE_ADDR core_addr_identity (CORE_ADDR addr);
+extern CORE_ADDR default_convert_from_func_ptr_addr (CORE_ADDR addr);
 
 /* No-op conversion of reg to regnum. */
 
@@ -111,15 +111,4 @@
 
 extern int generic_prepare_to_proceed (int select_it);
 
-/* Versions of init_frame_pc().  Do nothing; do the default. */
-
-void init_frame_pc_noop (int fromleaf, struct frame_info *prev);
-
-void init_frame_pc_default (int fromleaf, struct frame_info *prev);
-
-/* Version of cannot_fetch_register() / cannot_store_register() that
-   always fails. */
-
-int cannot_register_not (int regnum);
-
 #endif
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index 50368b7..5d1487e 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -78,19 +78,24 @@
 
 /* On Linux, threads are implemented as pseudo-processes, in which
    case we may be tracing more than one process at a time.  In that
-   case, inferior_ptid will contain the main process ID and the
-   individual thread (process) ID.  get_thread_id () is used to
-   get the thread id if it's available, and the process id otherwise. */
+   case, inferior_pid will contain the main process ID and the
+   individual thread (process) ID mashed together.  These macros are
+   used to separate them out.  These definitions should be overridden
+   if thread support is included.  */
+
+#if !defined (PIDGET)	/* Default definition for PIDGET/TIDGET.  */
+#define PIDGET(PID)	PID
+#define TIDGET(PID)	0
+#endif
 
 int
-get_thread_id (ptid_t ptid)
+get_thread_id (int inferior_pid)
 {
-  int tid = TIDGET (ptid);
-  if (0 == tid)
-    tid = PIDGET (ptid);
+  int tid = TIDGET (inferior_pid);
+  if (0 == tid) tid = inferior_pid;
   return tid;
 }
-#define GET_THREAD_ID(PTID)	get_thread_id ((PTID));
+#define GET_THREAD_ID(PID)	get_thread_id ((PID));
 
 static void
 fetch_nwfpe_single (unsigned int fn, FPA11 * fpa11)
@@ -225,7 +230,7 @@
   FPA11 fp;
   
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = GET_THREAD_ID (inferior_pid);
 
   /* Read the floating point state.  */
   ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
@@ -274,7 +279,7 @@
   FPA11 fp;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = GET_THREAD_ID (inferior_pid);
   
   /* Read the floating point state.  */
   ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
@@ -322,7 +327,7 @@
   FPA11 fp;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = GET_THREAD_ID (inferior_pid);
   
   /* Read the floating point state.  */
   ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
@@ -360,7 +365,7 @@
   FPA11 fp;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = GET_THREAD_ID (inferior_pid);
   
   /* Read the floating point state.  */
   ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
@@ -398,7 +403,7 @@
   struct pt_regs regs;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = GET_THREAD_ID (inferior_pid);
   
   ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
   if (ret < 0)
@@ -435,7 +440,7 @@
   struct pt_regs regs;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = GET_THREAD_ID (inferior_pid);
   
   ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
   if (ret < 0)
@@ -469,7 +474,7 @@
     return;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = GET_THREAD_ID (inferior_pid);
   
   /* Get the general registers from the process.  */
   ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
@@ -497,7 +502,7 @@
   struct pt_regs regs;
 
   /* Get the thread id for the ptrace call.  */
-  tid = GET_THREAD_ID (inferior_ptid);
+  tid = GET_THREAD_ID (inferior_pid);
   
   /* Fetch the general registers.  */
   ret = ptrace (PTRACE_GETREGS, tid, 0, &regs);
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 34e1484..94ccb29 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -219,9 +219,10 @@
     obstack_alloc (&frame_cache_obstack,
 		   sizeof (struct frame_info));
 
-  /* Zero all fields by default.  */
-  memset (fi, 0, sizeof (struct frame_info));
-
+  /* Arbitrary frame */
+  fi->saved_regs = NULL;
+  fi->next = NULL;
+  fi->prev = NULL;
   fi->frame = addr;
   fi->pc = pc;
   find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
@@ -264,8 +265,8 @@
 {
   flush_cached_frames ();
 
-  /* FIXME: The inferior_ptid test is wrong if there is a corefile.  */
-  if (PIDGET (inferior_ptid) != 0)
+  /* FIXME: The inferior_pid test is wrong if there is a corefile.  */
+  if (inferior_pid != 0)
     {
       select_frame (get_current_frame (), 0);
     }
@@ -304,6 +305,12 @@
 
 /* Default a few macros that people seldom redefine.  */
 
+#if !defined (INIT_FRAME_PC)
+#define INIT_FRAME_PC(fromleaf, prev) \
+  prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \
+	      prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
+#endif
+
 #ifndef FRAME_CHAIN_COMBINE
 #define	FRAME_CHAIN_COMBINE(chain, thisframe) (chain)
 #endif
@@ -436,7 +443,9 @@
    Some machines won't use it.
    kingdon@cygnus.com, 13Apr93, 31Jan94, 14Dec94.  */
 
+#ifdef INIT_FRAME_PC_FIRST
   INIT_FRAME_PC_FIRST (fromleaf, prev);
+#endif
 
 #ifdef INIT_EXTRA_FRAME_INFO
   INIT_EXTRA_FRAME_INFO (fromleaf, prev);
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index ed152be..2d18f9d 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -40,7 +40,6 @@
 #include "symfile.h"
 #include "objfiles.h"
 #include "linespec.h"
-#include "completer.h"
 #ifdef UI_OUT
 #include "ui-out.h"
 #endif
@@ -92,9 +91,9 @@
 
 static void mention (struct breakpoint *);
 
-struct breakpoint *set_raw_breakpoint (struct symtab_and_line, enum bptype);
+struct breakpoint *set_raw_breakpoint (struct symtab_and_line);
 
-static void check_duplicates (struct breakpoint *);
+static void check_duplicates (CORE_ADDR, asection *);
 
 static void describe_other_breakpoints (CORE_ADDR, asection *);
 
@@ -989,13 +988,13 @@
 	switch (b->type)
 	  {
 	  case bp_catch_fork:
-	    val = target_insert_fork_catchpoint (PIDGET (inferior_ptid));
+	    val = target_insert_fork_catchpoint (inferior_pid);
 	    break;
 	  case bp_catch_vfork:
-	    val = target_insert_vfork_catchpoint (PIDGET (inferior_ptid));
+	    val = target_insert_vfork_catchpoint (inferior_pid);
 	    break;
 	  case bp_catch_exec:
-	    val = target_insert_exec_catchpoint (PIDGET (inferior_ptid));
+	    val = target_insert_exec_catchpoint (inferior_pid);
 	    break;
 	  default:
 	    warning ("Internal error, %s line %d.", __FILE__, __LINE__);
@@ -1062,10 +1061,10 @@
 {
   register struct breakpoint *b;
   int val;
-  struct cleanup *old_chain = save_inferior_ptid ();
+  int saved_inferior_pid = inferior_pid;
 
-  /* Set inferior_ptid; remove_breakpoint uses this global.  */
-  inferior_ptid = pid_to_ptid (pid);
+  /* FIXME: use a cleanup, to insure that inferior_pid gets replaced! */
+  inferior_pid = pid;	/* Because remove_breakpoint will use this global. */
   ALL_BREAKPOINTS (b)
   {
     if (b->inserted)
@@ -1077,12 +1076,12 @@
 	  val = target_insert_breakpoint (b->address, b->shadow_contents);
 	if (val != 0)
 	  {
-	    do_cleanups (old_chain);
+	    inferior_pid = saved_inferior_pid;
 	    return val;
 	  }
       }
   }
-  do_cleanups (old_chain);
+  inferior_pid = saved_inferior_pid;
   return 0;
 }
 
@@ -1145,17 +1144,7 @@
 
        ??rehrauer: Let's hope that merely clearing out this catchpoint's
        target address field, if any, is sufficient to have it be reset
-       automagically.  Certainly on HP-UX that's true.
-
-       Jim Blandy <jimb@redhat.com>: Actually, zero is a perfectly
-       valid code address on some platforms (like the mn10200 and
-       mn10300 simulators).  We shouldn't assign any special
-       interpretation to a breakpoint with a zero address.  And in
-       fact, GDB doesn't --- I can't see what that comment above is
-       talking about.  As far as I can tell, setting the address of a
-       bp_catch_exec/bp_catch_vfork/bp_catch_fork breakpoint to zero
-       is meaningless, since those are implemented with HP-UX kernel
-       hackery, not by storing breakpoint instructions somewhere.  */
+       automagically.  Certainly on HP-UX that's true. */
     if ((b->type == bp_catch_exec) ||
 	(b->type == bp_catch_vfork) ||
 	(b->type == bp_catch_fork))
@@ -1206,13 +1195,7 @@
 
     /* If this breakpoint has survived the above battery of checks, then
        it must have a symbolic address.  Be sure that it gets reevaluated
-       to a target address, rather than reusing the old evaluation.
-
-       Jim Blandy <jimb@redhat.com>: As explained above in the comment
-       for bp_catch_exec and friends, I'm pretty sure this is entirely
-       unnecessary.  A call to breakpoint_re_set_one always recomputes
-       the breakpoint's address from scratch, or deletes it if it can't.
-       So I think this assignment could be deleted without effect.  */
+       to a target address, rather than reusing the old evaluation.  */
     b->address = (CORE_ADDR) NULL;
   }
 }
@@ -1222,13 +1205,13 @@
 {
   register struct breakpoint *b;
   int val;
-  struct cleanup *old_chain = save_inferior_ptid ();
+  int saved_inferior_pid = inferior_pid;
 
-  if (pid == PIDGET (inferior_ptid))
-    error ("Cannot detach breakpoints of inferior_ptid");
+  if (pid == inferior_pid)
+    error ("Cannot detach breakpoints of inferior_pid");
 
-  /* Set inferior_ptid; remove_breakpoint uses this global.  */
-  inferior_ptid = pid_to_ptid (pid);
+  /* FIXME: use a cleanup, to insure that inferior_pid gets replaced! */
+  inferior_pid = pid;	/* Because remove_breakpoint will use this global. */
   ALL_BREAKPOINTS (b)
   {
     if (b->inserted)
@@ -1236,12 +1219,12 @@
 	val = remove_breakpoint (b, mark_inserted);
 	if (val != 0)
 	  {
-	    do_cleanups (old_chain);
+	    inferior_pid = saved_inferior_pid;
 	    return val;
 	  }
       }
   }
-  do_cleanups (old_chain);
+  inferior_pid = saved_inferior_pid;
   return 0;
 }
 
@@ -1364,13 +1347,13 @@
       switch (b->type)
 	{
 	case bp_catch_fork:
-	  val = target_remove_fork_catchpoint (PIDGET (inferior_ptid));
+	  val = target_remove_fork_catchpoint (inferior_pid);
 	  break;
 	case bp_catch_vfork:
-	  val = target_remove_vfork_catchpoint (PIDGET (inferior_ptid));
+	  val = target_remove_vfork_catchpoint (inferior_pid);
 	  break;
 	case bp_catch_exec:
-	  val = target_remove_exec_catchpoint (PIDGET (inferior_ptid));
+	  val = target_remove_exec_catchpoint (inferior_pid);
 	  break;
 	default:
 	  warning ("Internal error, %s line %d.", __FILE__, __LINE__);
@@ -1582,12 +1565,12 @@
    PC is valid for process/thread PID.  */
 
 int
-breakpoint_thread_match (CORE_ADDR pc, ptid_t ptid)
+breakpoint_thread_match (CORE_ADDR pc, int pid)
 {
   struct breakpoint *b;
   int thread;
 
-  thread = pid_to_thread_id (ptid);
+  thread = pid_to_thread_id (pid);
 
   ALL_BREAKPOINTS (b)
     if (b->enable != disabled
@@ -1720,19 +1703,13 @@
 struct breakpoint *
 bpstat_find_step_resume_breakpoint (bpstat bsp)
 {
-  int current_thread;
-
   if (bsp == NULL)
     error ("Internal error (bpstat_find_step_resume_breakpoint)");
 
-  current_thread = pid_to_thread_id (inferior_ptid);
-
   for (; bsp != NULL; bsp = bsp->next)
     {
       if ((bsp->breakpoint_at != NULL) &&
-	  (bsp->breakpoint_at->type == bp_step_resume) &&
-	  (bsp->breakpoint_at->thread == current_thread || 
-	   bsp->breakpoint_at->thread == -1))
+	  (bsp->breakpoint_at->type == bp_step_resume))
 	return bsp->breakpoint_at;
     }
 
@@ -1889,7 +1866,7 @@
 #ifdef UI_OUT
       annotate_breakpoint (bs->breakpoint_at->number);
       ui_out_text (uiout, "\nBreakpoint ");
-      if (ui_out_is_mi_like_p (uiout))
+      if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	ui_out_field_string (uiout, "reason", "breakpoint-hit");
       ui_out_field_int (uiout, "bkptno", bs->breakpoint_at->number);
       ui_out_text (uiout, ", ");
@@ -2034,17 +2011,17 @@
 	{
 	  annotate_watchpoint (bs->breakpoint_at->number);
 #ifdef UI_OUT
-	  if (ui_out_is_mi_like_p (uiout))
+	  if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	    ui_out_field_string (uiout, "reason", "watchpoint-trigger");
 	  mention (bs->breakpoint_at);
-	  ui_out_tuple_begin (uiout, "value");
+	  ui_out_list_begin (uiout, "value");
 	  ui_out_text (uiout, "\nOld value = ");
 	  value_print (bs->old_val, stb->stream, 0, Val_pretty_default);
 	  ui_out_field_stream (uiout, "old", stb);
 	  ui_out_text (uiout, "\nNew value = ");
 	  value_print (bs->breakpoint_at->val, stb->stream, 0, Val_pretty_default);
 	  ui_out_field_stream (uiout, "new", stb);
-	  ui_out_tuple_end (uiout);
+	  ui_out_list_end (uiout);
 	  ui_out_text (uiout, "\n");
 #else
 	  mention (bs->breakpoint_at);
@@ -2064,14 +2041,14 @@
 
     case bp_read_watchpoint:
 #ifdef UI_OUT
-      if (ui_out_is_mi_like_p (uiout))
+      if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	ui_out_field_string (uiout, "reason", "read-watchpoint-trigger");
       mention (bs->breakpoint_at);
-      ui_out_tuple_begin (uiout, "value");
+      ui_out_list_begin (uiout, "value");
       ui_out_text (uiout, "\nValue = ");
       value_print (bs->breakpoint_at->val, stb->stream, 0, Val_pretty_default);
       ui_out_field_stream (uiout, "value", stb);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
       ui_out_text (uiout, "\n");
 #else
       mention (bs->breakpoint_at);
@@ -2088,10 +2065,10 @@
       if (bs->old_val != NULL)     
 	{
 	  annotate_watchpoint (bs->breakpoint_at->number);
-	  if (ui_out_is_mi_like_p (uiout))
+	  if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	    ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
 	  mention (bs->breakpoint_at);
-	  ui_out_tuple_begin (uiout, "value");
+	  ui_out_list_begin (uiout, "value");
 	  ui_out_text (uiout, "\nOld value = ");
 	  value_print (bs->old_val, stb->stream, 0, Val_pretty_default);
 	  ui_out_field_stream (uiout, "old", stb);
@@ -2102,14 +2079,14 @@
       else 
 	{
 	  mention (bs->breakpoint_at);
-	  if (ui_out_is_mi_like_p (uiout))
+	  if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	    ui_out_field_string (uiout, "reason", "access-watchpoint-trigger");
-	  ui_out_tuple_begin (uiout, "value");
+	  ui_out_list_begin (uiout, "value");
 	  ui_out_text (uiout, "\nValue = ");
 	}
       value_print (bs->breakpoint_at->val, stb->stream, 0,Val_pretty_default);
       ui_out_field_stream (uiout, "new", stb);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
       ui_out_text (uiout, "\n");
 #else
       if (bs->old_val != NULL)     
@@ -2139,7 +2116,7 @@
 
     case bp_finish:
 #ifdef UI_OUT
-      if (ui_out_is_mi_like_p (uiout))
+      if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	ui_out_field_string (uiout, "reason", "function-finished");
 #endif
       return PRINT_UNKNOWN;
@@ -2147,7 +2124,7 @@
 
     case bp_until:
 #ifdef UI_OUT
-      if (ui_out_is_mi_like_p (uiout))
+      if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	ui_out_field_string (uiout, "reason", "location-reached");
 #endif
       return PRINT_UNKNOWN;
@@ -2354,7 +2331,7 @@
 	 will be deleted already. So we have no choice but print the
 	 information here. */
 #ifdef UI_OUT
-      if (ui_out_is_mi_like_p (uiout))
+      if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	ui_out_field_string (uiout, "reason", "watchpoint-scope");
       ui_out_text (uiout, "\nWatchpoint ");
       ui_out_field_int (uiout, "wpnum", bs->breakpoint_at->number);
@@ -2409,12 +2386,7 @@
   "Error evaluating expression for watchpoint %d\n";
   char message[sizeof (message1) + 30 /* slop */ ];
 
-  /* Get the address where the breakpoint would have been.  
-     The "not_a_breakpoint" argument is meant to distinguish 
-     between a breakpoint trap event and a trace/singlestep
-     trap event.  For a trace/singlestep trap event, we would
-     not want to subtract DECR_PC_AFTER_BREAK from the PC. */
-
+  /* Get the address where the breakpoint would have been.  */
   bp_addr = *pc - (not_a_breakpoint && !SOFTWARE_SINGLE_STEP_P () ? 
                    0 : DECR_PC_AFTER_BREAK);
 
@@ -2450,11 +2422,10 @@
        ignore it. */
     if ((b->type == bp_catch_load)
 #if defined(SOLIB_HAVE_LOAD_EVENT)
-	&& (!SOLIB_HAVE_LOAD_EVENT (PIDGET (inferior_ptid))
+	&& (!SOLIB_HAVE_LOAD_EVENT (inferior_pid)
 	    || ((b->dll_pathname != NULL)
 		&& (strcmp (b->dll_pathname, 
-			    SOLIB_LOADED_LIBRARY_PATHNAME (
-			      PIDGET (inferior_ptid)))
+			    SOLIB_LOADED_LIBRARY_PATHNAME (inferior_pid)) 
 		    != 0)))
 #endif
       )
@@ -2462,28 +2433,25 @@
 
     if ((b->type == bp_catch_unload)
 #if defined(SOLIB_HAVE_UNLOAD_EVENT)
-	&& (!SOLIB_HAVE_UNLOAD_EVENT (PIDGET (inferior_ptid))
+	&& (!SOLIB_HAVE_UNLOAD_EVENT (inferior_pid)
 	    || ((b->dll_pathname != NULL)
 		&& (strcmp (b->dll_pathname, 
-			    SOLIB_UNLOADED_LIBRARY_PATHNAME (
-			      PIDGET (inferior_ptid)))
+			    SOLIB_UNLOADED_LIBRARY_PATHNAME (inferior_pid)) 
 		    != 0)))
 #endif
       )
       continue;
 
     if ((b->type == bp_catch_fork)
-	&& !target_has_forked (PIDGET (inferior_ptid),
-	                       &b->forked_inferior_pid))
+	&& !target_has_forked (inferior_pid, &b->forked_inferior_pid))
       continue;
 
     if ((b->type == bp_catch_vfork)
-	&& !target_has_vforked (PIDGET (inferior_ptid),
-	                        &b->forked_inferior_pid))
+	&& !target_has_vforked (inferior_pid, &b->forked_inferior_pid))
       continue;
 
     if ((b->type == bp_catch_exec)
-	&& !target_has_execd (PIDGET (inferior_ptid), &b->exec_pathname))
+	&& !target_has_execd (inferior_pid, &b->exec_pathname))
       continue;
 
     if (ep_is_exception_catchpoint (b) &&
@@ -3066,11 +3034,9 @@
       if (ep->triggered_dll_pathname != NULL)
 	xfree (ep->triggered_dll_pathname);
       if (ep->type == bp_catch_load)
-	dll_pathname = SOLIB_LOADED_LIBRARY_PATHNAME (
-	                 PIDGET (inferior_ptid));
+	dll_pathname = SOLIB_LOADED_LIBRARY_PATHNAME (inferior_pid);
       else
-	dll_pathname = SOLIB_UNLOADED_LIBRARY_PATHNAME (
-	                 PIDGET (inferior_ptid));
+	dll_pathname = SOLIB_UNLOADED_LIBRARY_PATHNAME (inferior_pid);
 #else
       dll_pathname = NULL;
 #endif
@@ -3138,7 +3104,7 @@
 
   annotate_record ();
 #ifdef UI_OUT
-  ui_out_tuple_begin (uiout, "bkpt");
+  ui_out_list_begin (uiout, "bkpt");
 #endif
 
   /* 1 */
@@ -3481,7 +3447,7 @@
 #ifdef UI_OUT
   /* Output the count also if it is zero, but only if this is
      mi. FIXME: Should have a better test for this. */
-  if (ui_out_is_mi_like_p (uiout))
+  if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
     if (show_breakpoint_hit_counts && b->hit_count == 0)
       ui_out_field_int (uiout, "times", b->hit_count);
 #endif
@@ -3502,9 +3468,9 @@
     {
       annotate_field (9);
 #ifdef UI_OUT
-      ui_out_tuple_begin (uiout, "script");
+      ui_out_list_begin (uiout, "script");
       print_command_lines (uiout, l, 4);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
 #else
       while (l)
 	{
@@ -3514,7 +3480,7 @@
 #endif
     }
 #ifdef UI_OUT
-  ui_out_tuple_end (uiout);
+  ui_out_list_end (uiout);
   do_cleanups (old_chain);
 #endif
 }
@@ -3552,109 +3518,22 @@
 		       NULL, RETURN_MASK_ALL);
 }
 
-/* Return non-zero if B is user settable (breakpoints, watchpoints,
-   catchpoints, et.al.). */
-
-static int
-user_settable_breakpoint (const struct breakpoint *b)
-{
-  return (b->type == bp_breakpoint
-	  || b->type == bp_catch_load
-	  || b->type == bp_catch_unload
-	  || b->type == bp_catch_fork
-	  || b->type == bp_catch_vfork
-	  || b->type == bp_catch_exec
-	  || b->type == bp_catch_catch
-	  || b->type == bp_catch_throw
-	  || b->type == bp_hardware_breakpoint
-	  || b->type == bp_watchpoint
-	  || b->type == bp_read_watchpoint
-	  || b->type == bp_access_watchpoint
-	  || b->type == bp_hardware_watchpoint);
-}
-	
-/* Print information on user settable breakpoint (watchpoint, etc)
-   number BNUM.  If BNUM is -1 print all user settable breakpoints.
-   If ALLFLAG is non-zero, include non- user settable breakpoints. */
+/* Print information on breakpoint number BNUM, or -1 if all.
+   If WATCHPOINTS is zero, process only breakpoints; if WATCHPOINTS
+   is nonzero, process only watchpoints.  */
 
 static void
 breakpoint_1 (int bnum, int allflag)
 {
   register struct breakpoint *b;
   CORE_ADDR last_addr = (CORE_ADDR) -1;
-  int nr_printable_breakpoints;
+  int found_a_breakpoint = 0;
   
-  /* Compute the number of rows in the table. */
-  nr_printable_breakpoints = 0;
-  ALL_BREAKPOINTS (b)
-    if (bnum == -1
-	|| bnum == b->number)
-      {
-	if (allflag || user_settable_breakpoint (b))
-	  nr_printable_breakpoints++;
-      }
-
 #ifdef UI_OUT
   if (addressprint)
-    ui_out_table_begin (uiout, 6, nr_printable_breakpoints, "BreakpointTable");
+    ui_out_table_begin (uiout, 6, "BreakpointTable");
   else
-    ui_out_table_begin (uiout, 5, nr_printable_breakpoints, "BreakpointTable");
-#endif /* UI_OUT */
-
-#ifdef UI_OUT
-  if (nr_printable_breakpoints > 0)
-    annotate_breakpoints_headers ();
-  if (nr_printable_breakpoints > 0)
-    annotate_field (0);
-  ui_out_table_header (uiout, 3, ui_left, "number", "Num");		/* 1 */
-  if (nr_printable_breakpoints > 0)
-    annotate_field (1);
-  ui_out_table_header (uiout, 14, ui_left, "type", "Type");		/* 2 */
-  if (nr_printable_breakpoints > 0)
-    annotate_field (2);
-  ui_out_table_header (uiout, 4, ui_left, "disp", "Disp");		/* 3 */
-  if (nr_printable_breakpoints > 0)
-    annotate_field (3);
-  ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb");	/* 4 */
-  if (addressprint)
-	{
-	  if (nr_printable_breakpoints > 0)
-	    annotate_field (4);
-	  if (TARGET_ADDR_BIT <= 32)
-	    ui_out_table_header (uiout, 10, ui_left, "addr", "Address");/* 5 */
-	  else
-	    ui_out_table_header (uiout, 18, ui_left, "addr", "Address");/* 5 */
-	}
-  if (nr_printable_breakpoints > 0)
-    annotate_field (5);
-  ui_out_table_header (uiout, 40, ui_noalign, "what", "What");	/* 6 */
-  ui_out_table_body (uiout);
-  if (nr_printable_breakpoints > 0)
-    annotate_breakpoints_table ();
-#else
-  if (nr_printable_breakpoints > 0)
-    {
-      annotate_breakpoints_headers ();
-      annotate_field (0);
-      printf_filtered ("Num ");
-      annotate_field (1);
-      printf_filtered ("Type           ");
-      annotate_field (2);
-      printf_filtered ("Disp ");
-      annotate_field (3);
-      printf_filtered ("Enb ");
-      if (addressprint)
-	{
-	  annotate_field (4);
-	  if (TARGET_ADDR_BIT <= 32)
-	    printf_filtered ("Address    ");
-	  else
-	    printf_filtered ("Address            ");
-	}
-      annotate_field (5);
-      printf_filtered ("What\n");
-      annotate_breakpoints_table ();
-    }
+    ui_out_table_begin (uiout, 5, "BreakpointTable");
 #endif /* UI_OUT */
 
   ALL_BREAKPOINTS (b)
@@ -3663,16 +3542,72 @@
       {
 	/* We only print out user settable breakpoints unless the
 	   allflag is set. */
-	if (allflag || user_settable_breakpoint (b))
-	  print_one_breakpoint (b, &last_addr);
+	if (!allflag
+	    && b->type != bp_breakpoint
+	    && b->type != bp_catch_load
+	    && b->type != bp_catch_unload
+	    && b->type != bp_catch_fork
+	    && b->type != bp_catch_vfork
+	    && b->type != bp_catch_exec
+	    && b->type != bp_catch_catch
+	    && b->type != bp_catch_throw
+	    && b->type != bp_hardware_breakpoint
+	    && b->type != bp_watchpoint
+	    && b->type != bp_read_watchpoint
+	    && b->type != bp_access_watchpoint
+	    && b->type != bp_hardware_watchpoint)
+	  continue;
+	
+	if (!found_a_breakpoint++)
+	  {
+	    annotate_breakpoints_headers ();
+#ifdef UI_OUT
+	    annotate_field (0);
+	    ui_out_table_header (uiout, 3, ui_left, "Num");	/* 1 */
+	    annotate_field (1);
+	    ui_out_table_header (uiout, 14, ui_left, "Type");	/* 2 */
+	    annotate_field (2);
+	    ui_out_table_header (uiout, 4, ui_left, "Disp");	/* 3 */
+	    annotate_field (3);
+	    ui_out_table_header (uiout, 3, ui_left, "Enb");	/* 4 */
+	    if (addressprint)
+	      {
+		annotate_field (4);
+		if (TARGET_ADDR_BIT <= 32)
+		  ui_out_table_header (uiout, 10, ui_left, "Address");	/* 5 */
+		else
+		  ui_out_table_header (uiout, 18, ui_left, "Address");	/* 5 */
+	      }
+	    annotate_field (5);
+	    ui_out_table_header (uiout, 40, ui_noalign, "What");	/* 6 */
+	    ui_out_table_body (uiout);
+#else
+	    annotate_field (0);
+	    printf_filtered ("Num ");
+	    annotate_field (1);
+	    printf_filtered ("Type           ");
+	    annotate_field (2);
+	    printf_filtered ("Disp ");
+	    annotate_field (3);
+	    printf_filtered ("Enb ");
+	    if (addressprint)
+	      {
+		annotate_field (4);
+		if (TARGET_ADDR_BIT <= 32)
+		  printf_filtered ("Address    ");
+		else
+		  printf_filtered ("Address            ");
+	      }
+	    annotate_field (5);
+	    printf_filtered ("What\n");
+#endif /* UI_OUT */
+	    annotate_breakpoints_table ();
+	  }
+	
+	print_one_breakpoint (b, &last_addr);
       }
   
-
-#ifdef UI_OUT
-  ui_out_table_end (uiout);
-#endif /* UI_OUT */
-
-  if (nr_printable_breakpoints == 0)
+  if (!found_a_breakpoint)
     {
 #ifdef UI_OUT
       if (bnum == -1)
@@ -3695,6 +3630,9 @@
 	set_next_address (last_addr);
     }
 
+#ifdef UI_OUT
+  ui_out_table_end (uiout);
+#endif /* UI_OUT */
   /* FIXME? Should this be moved up so that it is only called when
      there have been breakpoints? */
   annotate_breakpoints_table_end ();
@@ -3775,56 +3713,20 @@
   default_breakpoint_line = line;
 }
 
-/* Return true iff it is meaningful to use the address member of
-   BPT.  For some breakpoint types, the address member is irrelevant
-   and it makes no sense to attempt to compare it to other addresses
-   (or use it for any other purpose either).
-
-   More specifically, each of the following breakpoint types will always
-   have a zero valued address and we don't want check_duplicates() to mark
-   breakpoints of any of these types to be a duplicate of an actual
-   breakpoint at address zero:
-
-      bp_watchpoint
-      bp_hardware_watchpoint
-      bp_read_watchpoint
-      bp_access_watchpoint
-      bp_catch_exec
-      bp_longjmp_resume
-      bp_catch_fork
-      bp_catch_vork */
-
-static int
-breakpoint_address_is_meaningful (struct breakpoint *bpt)
-{
-  enum bptype type = bpt->type;
-
-  return (type != bp_watchpoint
-	  && type != bp_hardware_watchpoint
-	  && type != bp_read_watchpoint
-	  && type != bp_access_watchpoint
-	  && type != bp_catch_exec
-	  && type != bp_longjmp_resume
-	  && type != bp_catch_fork
-	  && type != bp_catch_vfork);
-}
-
-/* Rescan breakpoints at the same address and section as BPT,
+/* Rescan breakpoints at address ADDRESS,
    marking the first one as "first" and any others as "duplicates".
    This is so that the bpt instruction is only inserted once.
-   If we have a permanent breakpoint at the same place as BPT, make
-   that one the official one, and the rest as duplicates.  */
+   If we have a permanent breakpoint at ADDRESS, make that one
+   the official one, and the rest as duplicates.  */
 
 static void
-check_duplicates (struct breakpoint *bpt)
+check_duplicates (CORE_ADDR address, asection *section)
 {
   register struct breakpoint *b;
   register int count = 0;
   struct breakpoint *perm_bp = 0;
-  CORE_ADDR address = bpt->address;
-  asection *section = bpt->section;
 
-  if (! breakpoint_address_is_meaningful (bpt))
+  if (address == 0)		/* Watchpoints are uninteresting */
     return;
 
   ALL_BREAKPOINTS (b)
@@ -3832,8 +3734,7 @@
 	&& b->enable != shlib_disabled
 	&& b->enable != call_disabled
 	&& b->address == address
-	&& (overlay_debugging == 0 || b->section == section)
-	&& breakpoint_address_is_meaningful (b))
+	&& (overlay_debugging == 0 || b->section == section))
     {
       /* Have we found a permanent breakpoint?  */
       if (b->enable == permanent)
@@ -3871,30 +3772,24 @@
 		&& b->enable != shlib_disabled
 		&& b->enable != call_disabled
 		&& b->address == address
-		&& (overlay_debugging == 0 || b->section == section)
-		&& breakpoint_address_is_meaningful (b))
+		&& (overlay_debugging == 0 || b->section == section))
 	      b->duplicate = 1;
 	  }
     }
 }
 
-/* set_raw_breakpoint() is a low level routine for allocating and
-   partially initializing a breakpoint of type BPTYPE.  The newly
-   created breakpoint's address, section, source file name, and line
-   number are provided by SAL.  The newly created and partially
-   initialized breakpoint is added to the breakpoint chain and
-   is also returned as the value of this function.
+/* Low level routine to set a breakpoint.
+   Takes as args the three things that every breakpoint must have.
+   Returns the breakpoint object so caller can set other things.
+   Does not set the breakpoint number!
+   Does not print anything.
 
-   It is expected that the caller will complete the initialization of
-   the newly created breakpoint struct as well as output any status
-   information regarding the creation of a new breakpoint.  In
-   particular, set_raw_breakpoint() does NOT set the breakpoint
-   number!  Care should be taken to not allow an error() to occur
-   prior to completing the initialization of the breakpoint.  If this
-   should happen, a bogus breakpoint will be left on the chain.  */
+   ==> This routine should not be called if there is a chance of later
+   error(); otherwise it leaves a bogus breakpoint on the chain.  Validate
+   your arguments BEFORE calling this routine!  */
 
 struct breakpoint *
-set_raw_breakpoint (struct symtab_and_line sal, enum bptype bptype)
+set_raw_breakpoint (struct symtab_and_line sal)
 {
   register struct breakpoint *b, *b1;
 
@@ -3907,7 +3802,6 @@
     b->source_file = savestring (sal.symtab->filename,
 				 strlen (sal.symtab->filename));
   b->section = sal.section;
-  b->type = bptype;
   b->language = current_language->la_language;
   b->input_radix = input_radix;
   b->thread = -1;
@@ -3937,7 +3831,7 @@
       b1->next = b;
     }
 
-  check_duplicates (b);
+  check_duplicates (sal.pc, sal.section);
   breakpoints_changed ();
 
   return b;
@@ -3976,9 +3870,11 @@
 	return;
     }
   sal.section = find_pc_overlay (sal.pc);
-  b = set_raw_breakpoint (sal,
-                          func_name != NULL ? bp_longjmp : bp_longjmp_resume);
+  b = set_raw_breakpoint (sal);
+  if (!b)
+    return;
 
+  b->type = func_name != NULL ? bp_longjmp : bp_longjmp_resume;
   b->disposition = donttouch;
   b->enable = disabled;
   b->silent = 1;
@@ -4002,7 +3898,7 @@
     if (b->type == bp_longjmp)
     {
       b->enable = enabled;
-      check_duplicates (b);
+      check_duplicates (b->address, b->section);
     }
 }
 
@@ -4016,7 +3912,7 @@
 	|| b->type == bp_longjmp_resume)
     {
       b->enable = disabled;
-      check_duplicates (b);
+      check_duplicates (b->address, b->section);
     }
 }
 
@@ -4030,10 +3926,13 @@
   INIT_SAL (&sal);		/* initialize to zeroes */
   sal.pc = address;
   sal.section = find_pc_overlay (sal.pc);
-  b = set_raw_breakpoint (sal, bp_thread_event);
+  if ((b = set_raw_breakpoint (sal)) == NULL)
+    return NULL;
   
   b->number = internal_breakpoint_number--;
   b->disposition = donttouch;
+  b->type = bp_thread_event;	/* XXX: do we need a new type? 
+				   bp_thread_event */
   b->enable = enabled;
   /* addr_string has to be used or breakpoint_re_set will delete me.  */
   sprintf (addr_string, "*0x%s", paddr (b->address));
@@ -4072,9 +3971,10 @@
   INIT_SAL (&sal);		/* initialize to zeroes */
   sal.pc = address;
   sal.section = find_pc_overlay (sal.pc);
-  b = set_raw_breakpoint (sal, bp_shlib_event);
+  b = set_raw_breakpoint (sal);
   b->number = internal_breakpoint_number--;
   b->disposition = donttouch;
+  b->type = bp_shlib_event;
 
   return b;
 }
@@ -4182,7 +4082,7 @@
   if (canonical != (char **) NULL)
     discard_cleanups (canonical_strings_chain);
 
-  b = set_raw_breakpoint (sals.sals[0], bp_kind);
+  b = set_raw_breakpoint (sals.sals[0]);
   set_breakpoint_count (breakpoint_count + 1);
   b->number = breakpoint_count;
   b->cond = NULL;
@@ -4205,6 +4105,7 @@
       b->dll_pathname = (char *) xmalloc (strlen (dll_pathname) + 1);
       strcpy (b->dll_pathname, dll_pathname);
     }
+  b->type = bp_kind;
 
   mention (b);
   do_cleanups (old_chain);
@@ -4239,7 +4140,7 @@
   sal.symtab = NULL;
   sal.line = 0;
 
-  b = set_raw_breakpoint (sal, bp_kind);
+  b = set_raw_breakpoint (sal);
   set_breakpoint_count (breakpoint_count + 1);
   b->number = breakpoint_count;
   b->cond = NULL;
@@ -4251,6 +4152,8 @@
   b->disposition = tempflag ? del : donttouch;
   b->forked_inferior_pid = 0;
 
+  b->type = bp_kind;
+
   mention (b);
 }
 
@@ -4278,7 +4181,7 @@
   sal.symtab = NULL;
   sal.line = 0;
 
-  b = set_raw_breakpoint (sal, bp_catch_exec);
+  b = set_raw_breakpoint (sal);
   set_breakpoint_count (breakpoint_count + 1);
   b->number = breakpoint_count;
   b->cond = NULL;
@@ -4289,6 +4192,8 @@
   b->enable = enabled;
   b->disposition = tempflag ? del : donttouch;
 
+  b->type = bp_catch_exec;
+
   mention (b);
 }
 
@@ -4350,7 +4255,7 @@
 	b->frame = frame->frame;
       else
 	b->frame = 0;
-      check_duplicates (b);
+      check_duplicates (b->address, b->section);
       return;
     }
 }
@@ -4370,7 +4275,7 @@
 	&& (b->enable == enabled))
       {
 	b->enable = call_disabled;
-	check_duplicates (b);
+	check_duplicates (b->address, b->section);
       }
   }
 }
@@ -4390,7 +4295,7 @@
 	&& (b->enable == call_disabled))
       {
 	b->enable = enabled;
-	check_duplicates (b);
+	check_duplicates (b->address, b->section);
       }
   }
 }
@@ -4405,7 +4310,8 @@
 			  enum bptype type)
 {
   register struct breakpoint *b;
-  b = set_raw_breakpoint (sal, type);
+  b = set_raw_breakpoint (sal);
+  b->type = type;
   b->enable = enabled;
   b->disposition = donttouch;
   b->frame = (frame ? frame->frame : 0);
@@ -4413,8 +4319,8 @@
   /* If we're debugging a multi-threaded program, then we
      want momentary breakpoints to be active in only a 
      single thread of control.  */
-  if (in_thread_list (inferior_ptid))
-    b->thread = pid_to_thread_id (inferior_ptid);
+  if (in_thread_list (inferior_pid))
+    b->thread = pid_to_thread_id (inferior_pid);
 
   return b;
 }
@@ -4451,21 +4357,21 @@
 #ifdef UI_OUT
     case bp_watchpoint:
       ui_out_text (uiout, "Watchpoint ");
-      ui_out_tuple_begin (uiout, "wpt");
+      ui_out_list_begin (uiout, "wpt");
       ui_out_field_int (uiout, "number", b->number);
       ui_out_text (uiout, ": ");
       print_expression (b->exp, stb->stream);
       ui_out_field_stream (uiout, "exp", stb);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
       break;
     case bp_hardware_watchpoint:
       ui_out_text (uiout, "Hardware watchpoint ");
-      ui_out_tuple_begin (uiout, "wpt");
+      ui_out_list_begin (uiout, "wpt");
       ui_out_field_int (uiout, "number", b->number);
       ui_out_text (uiout, ": ");
       print_expression (b->exp, stb->stream);
       ui_out_field_stream (uiout, "exp", stb);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
       break;
 #else
     case bp_watchpoint:
@@ -4480,21 +4386,21 @@
 #ifdef UI_OUT
     case bp_read_watchpoint:
       ui_out_text (uiout, "Hardware read watchpoint ");
-      ui_out_tuple_begin (uiout, "hw-rwpt");
+      ui_out_list_begin (uiout, "hw-rwpt");
       ui_out_field_int (uiout, "number", b->number);
       ui_out_text (uiout, ": ");
       print_expression (b->exp, stb->stream);
       ui_out_field_stream (uiout, "exp", stb);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
       break;
     case bp_access_watchpoint:
       ui_out_text (uiout, "Hardware access (read/write) watchpoint ");
-      ui_out_tuple_begin (uiout, "hw-awpt");
+      ui_out_list_begin (uiout, "hw-awpt");
       ui_out_field_int (uiout, "number", b->number);
       ui_out_text (uiout, ": ");
       print_expression (b->exp, stb->stream);
       ui_out_field_stream (uiout, "exp", stb);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
       break;
 #else
     case bp_read_watchpoint:
@@ -4509,7 +4415,7 @@
 #endif
     case bp_breakpoint:
 #ifdef UI_OUT
-      if (ui_out_is_mi_like_p (uiout))
+      if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	{
 	  say_where = 0;
 	  break;
@@ -4520,7 +4426,7 @@
       break;
     case bp_hardware_breakpoint:
 #ifdef UI_OUT
-      if (ui_out_is_mi_like_p (uiout))
+      if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	{
 	  say_where = 0;
 	  break;
@@ -4583,7 +4489,7 @@
   do_cleanups (old_chain);
 #endif
 #ifdef UI_OUT
-  if (ui_out_is_mi_like_p (uiout))
+  if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
     return;
 #endif
   printf_filtered ("\n");
@@ -4629,9 +4535,10 @@
 	if (from_tty)
 	  describe_other_breakpoints (sal.pc, sal.section);
 	
-	b = set_raw_breakpoint (sal, type);
+	b = set_raw_breakpoint (sal);
 	set_breakpoint_count (breakpoint_count + 1);
 	b->number = breakpoint_count;
+	b->type = type;
 	b->cond = cond[i];
 	b->thread = thread;
 	b->addr_string = addr_string[i];
@@ -5417,7 +5324,7 @@
      startup sequence by the dynamic linker.
 
      However, I tried avoiding that by having HP-UX's implementation of
-     TARGET_CAN_USE_HW_WATCHPOINT return FALSE if there was no inferior_ptid
+     TARGET_CAN_USE_HW_WATCHPOINT return FALSE if there was no inferior_pid
      yet, which forced slow watches before a "run" or "attach", and it
      still fails somewhere in the startup code.
 
@@ -5431,13 +5338,8 @@
     }
 #endif /* HPUXHPPA */
 
-  /* Change the type of breakpoint to an ordinary watchpoint if a hardware
-     watchpoint could not be set.  */
-  if (!mem_cnt || target_resources_ok <= 0)
-    bp_type = bp_watchpoint;
-
   /* Now set up the breakpoint.  */
-  b = set_raw_breakpoint (sal, bp_type);
+  b = set_raw_breakpoint (sal);
   set_breakpoint_count (breakpoint_count + 1);
   b->number = breakpoint_count;
   b->disposition = donttouch;
@@ -5460,6 +5362,11 @@
   else
     b->watchpoint_frame = (CORE_ADDR) 0;
 
+  if (mem_cnt && target_resources_ok > 0)
+    b->type = bp_type;
+  else
+    b->type = bp_watchpoint;
+
   /* If the expression is "local", then set up a "watchpoint scope"
      breakpoint at the point where we've left the scope of the watchpoint
      expression.  */
@@ -5474,11 +5381,11 @@
 	  scope_sal.pc = get_frame_pc (prev_frame);
 	  scope_sal.section = find_pc_overlay (scope_sal.pc);
 
-	  scope_breakpoint = set_raw_breakpoint (scope_sal,
-	                                         bp_watchpoint_scope);
+	  scope_breakpoint = set_raw_breakpoint (scope_sal);
 	  set_breakpoint_count (breakpoint_count + 1);
 	  scope_breakpoint->number = breakpoint_count;
 
+	  scope_breakpoint->type = bp_watchpoint_scope;
 	  scope_breakpoint->enable = enabled;
 
 	  /* Automatically delete the breakpoint when it hits.  */
@@ -6149,7 +6056,7 @@
   /* Create a load breakpoint that only triggers when a load of
      the specified dll (or any dll, if no pathname was specified)
      occurs. */
-  SOLIB_CREATE_CATCH_LOAD_HOOK (PIDGET (inferior_ptid), tempflag, 
+  SOLIB_CREATE_CATCH_LOAD_HOOK (inferior_pid, tempflag, 
 				dll_pathname, cond_string);
 }
 
@@ -6191,7 +6098,7 @@
   /* Create an unload breakpoint that only triggers when an unload of
      the specified dll (or any dll, if no pathname was specified)
      occurs. */
-  SOLIB_CREATE_CATCH_UNLOAD_HOOK (PIDGET (inferior_ptid), tempflag, 
+  SOLIB_CREATE_CATCH_UNLOAD_HOOK (inferior_pid, tempflag, 
 				  dll_pathname, cond_string);
 }
 #endif /* SOLIB_ADD */
@@ -6208,24 +6115,11 @@
 {
   struct breakpoint *b;
   int thread = -1;		/* All threads. */
-  enum bptype bptype;
 
   if (!sal)			/* no exception support? */
     return;
 
-  switch (ex_event)
-    {
-    case EX_EVENT_THROW:
-      bptype = bp_catch_throw;
-      break;
-    case EX_EVENT_CATCH:
-      bptype = bp_catch_catch;
-      break;
-    default:			/* error condition */
-      error ("Internal error -- invalid catchpoint kind");
-    }
-
-  b = set_raw_breakpoint (*sal, bptype);
+  b = set_raw_breakpoint (*sal);
   set_breakpoint_count (breakpoint_count + 1);
   b->number = breakpoint_count;
   b->cond = NULL;
@@ -6235,6 +6129,19 @@
   b->addr_string = NULL;
   b->enable = enabled;
   b->disposition = tempflag ? del : donttouch;
+  switch (ex_event)
+    {
+    case EX_EVENT_THROW:
+      b->type = bp_catch_throw;
+      break;
+    case EX_EVENT_CATCH:
+      b->type = bp_catch_catch;
+      break;
+    default:			/* error condition */
+      b->type = bp_none;
+      b->enable = disabled;
+      error ("Internal error -- invalid catchpoint kind");
+    }
   mention (b);
 }
 
@@ -6387,14 +6294,16 @@
       if (from_tty)
 	describe_other_breakpoints (sal.pc, sal.section);
 
+      b = set_raw_breakpoint (sal);
+      set_breakpoint_count (breakpoint_count + 1);
+      b->number = breakpoint_count;
+
       /* Important -- this is an ordinary breakpoint.  For platforms
 	 with callback support for exceptions,
 	 create_exception_catchpoint() will create special bp types
 	 (bp_catch_catch and bp_catch_throw), and there is code in
 	 insert_breakpoints() and elsewhere that depends on that. */
-      b = set_raw_breakpoint (sal, bp_breakpoint);
-      set_breakpoint_count (breakpoint_count + 1);
-      b->number = breakpoint_count;
+      b->type = bp_breakpoint;	
 
       b->cond = cond;
       b->enable = enabled;
@@ -6425,8 +6334,11 @@
   sal.symtab = NULL;
   sal.line = 0;
 
-  b = set_raw_breakpoint (sal, bp_breakpoint);
+  b = set_raw_breakpoint (sal);
+  if (!b)
+    error ("Internal error -- couldn't set temp exception breakpoint");
 
+  b->type = bp_breakpoint;
   b->disposition = del;
   b->enable = enabled;
   b->silent = 1;
@@ -6562,9 +6474,10 @@
 set_breakpoint_sal (struct symtab_and_line sal)
 {
   struct breakpoint *b;
-  b = set_raw_breakpoint (sal, bp_breakpoint);
+  b = set_raw_breakpoint (sal);
   set_breakpoint_count (breakpoint_count + 1);
   b->number = breakpoint_count;
+  b->type = bp_breakpoint;
   b->cond = 0;
   b->thread = -1;
   return b;
@@ -6797,7 +6710,7 @@
   breakpoint_delete_event (bpt->number);
 
   if (bpt->inserted)
-    remove_breakpoint (bpt, mark_inserted);
+    remove_breakpoint (bpt, mark_uninserted);
 
   if (breakpoint_chain == bpt)
     breakpoint_chain = bpt->next;
@@ -6851,7 +6764,7 @@
 	}
     }
 
-  check_duplicates (bpt);
+  check_duplicates (bpt->address, bpt->section);
   /* If this breakpoint was inserted, and there is another breakpoint
      at the same address, we need to insert the other breakpoint.  */
   if (bpt->inserted
@@ -7094,7 +7007,7 @@
 
 	  /* Now that this is re-enabled, check_duplicates
 	     can be used. */
-	  check_duplicates (b);
+	  check_duplicates (b->address, b->section);
 
 	}
       xfree (sals.sals);
@@ -7225,14 +7138,14 @@
 /* Reset the thread number of this breakpoint:
 
    - If the breakpoint is for all threads, leave it as-is.
-   - Else, reset it to the current thread for inferior_ptid. */
+   - Else, reset it to the current thread for inferior_pid. */
 void
 breakpoint_re_set_thread (struct breakpoint *b)
 {
   if (b->thread != -1)
     {
-      if (in_thread_list (inferior_ptid))
-	b->thread = pid_to_thread_id (inferior_ptid);
+      if (in_thread_list (inferior_pid))
+	b->thread = pid_to_thread_id (inferior_pid);
     }
 }
 
@@ -7359,7 +7272,7 @@
 
   bpt->enable = disabled;
 
-  check_duplicates (bpt);
+  check_duplicates (bpt->address, bpt->section);
 
   if (modify_breakpoint_hook)
     modify_breakpoint_hook (bpt);
@@ -7424,7 +7337,7 @@
   if (bpt->enable != permanent)
     bpt->enable = enabled;
   bpt->disposition = disposition;
-  check_duplicates (bpt);
+  check_duplicates (bpt->address, bpt->section);
   breakpoints_changed ();
 
   if (bpt->type == bp_watchpoint || 
@@ -7616,29 +7529,24 @@
 Usage is `condition N COND', where N is an integer and COND is an\n\
 expression to be evaluated whenever breakpoint N is reached.  ");
 
-  c = add_com ("tbreak", class_breakpoint, tbreak_command,
-	       "Set a temporary breakpoint.  Args like \"break\" command.\n\
+  add_com ("tbreak", class_breakpoint, tbreak_command,
+	   "Set a temporary breakpoint.  Args like \"break\" command.\n\
 Like \"break\" except the breakpoint is only temporary,\n\
 so it will be deleted when hit.  Equivalent to \"break\" followed\n\
 by using \"enable delete\" on the breakpoint number.");
-  c->completer = location_completer;
-
-  c = add_com ("txbreak", class_breakpoint, tbreak_at_finish_command,
-	       "Set temporary breakpoint at procedure exit.  Either there should\n\
+  add_com ("txbreak", class_breakpoint, tbreak_at_finish_command,
+	   "Set temporary breakpoint at procedure exit.  Either there should\n\
 be no argument or the argument must be a depth.\n");
-  c->completer = location_completer;
 
-  c = add_com ("hbreak", class_breakpoint, hbreak_command,
-	       "Set a hardware assisted  breakpoint. Args like \"break\" command.\n\
+  add_com ("hbreak", class_breakpoint, hbreak_command,
+	   "Set a hardware assisted  breakpoint. Args like \"break\" command.\n\
 Like \"break\" except the breakpoint requires hardware support,\n\
 some target hardware may not have this support.");
-  c->completer = location_completer;
 
-  c = add_com ("thbreak", class_breakpoint, thbreak_command,
-	       "Set a temporary hardware assisted breakpoint. Args like \"break\" command.\n\
+  add_com ("thbreak", class_breakpoint, thbreak_command,
+	   "Set a temporary hardware assisted breakpoint. Args like \"break\" command.\n\
 Like \"hbreak\" except the breakpoint is only temporary,\n\
 so it will be deleted when hit.");
-  c->completer = location_completer;
 
   add_prefix_cmd ("enable", class_breakpoint, enable_command,
 		  "Enable some breakpoints.\n\
@@ -7740,8 +7648,8 @@
 \n\
 See also the \"delete\" command which clears breakpoints by number.", NULL));
 
-  c = add_com ("break", class_breakpoint, break_command,
-	       concat ("Set breakpoint at specified line or function.\n\
+  add_com ("break", class_breakpoint, break_command,
+	   concat ("Set breakpoint at specified line or function.\n\
 Argument may be line number, function name, or \"*\" and an address.\n\
 If line number is specified, break at start of code for that line.\n\
 If function is specified, break at start of code for that function.\n\
@@ -7752,8 +7660,6 @@
 Multiple breakpoints at one place are permitted, and useful if conditional.\n\
 \n\
 Do \"help breakpoints\" for info on other commands dealing with breakpoints.", NULL));
-  c->completer = location_completer;
-
   add_com_alias ("b", "break", class_run, 1);
   add_com_alias ("br", "break", class_run, 1);
   add_com_alias ("bre", "break", class_run, 1);
@@ -7899,23 +7805,20 @@
 so it will be deleted when hit.  Equivalent to \"catch\" followed\n\
 by using \"enable delete\" on the catchpoint number.");
 
-  c = add_com ("watch", class_breakpoint, watch_command,
-	       "Set a watchpoint for an expression.\n\
+  add_com ("watch", class_breakpoint, watch_command,
+	   "Set a watchpoint for an expression.\n\
 A watchpoint stops execution of your program whenever the value of\n\
 an expression changes.");
-  c->completer = location_completer;
 
-  c = add_com ("rwatch", class_breakpoint, rwatch_command,
-	       "Set a read watchpoint for an expression.\n\
+  add_com ("rwatch", class_breakpoint, rwatch_command,
+	   "Set a read watchpoint for an expression.\n\
 A watchpoint stops execution of your program whenever the value of\n\
 an expression is read.");
-  c->completer = location_completer;
 
-  c = add_com ("awatch", class_breakpoint, awatch_command,
-	       "Set a watchpoint for an expression.\n\
+  add_com ("awatch", class_breakpoint, awatch_command,
+	   "Set a watchpoint for an expression.\n\
 A watchpoint stops execution of your program whenever the value of\n\
 an expression is either read or written.");
-  c->completer = location_completer;
 
   add_info ("watchpoints", breakpoints_info,
 	    "Synonym for ``info breakpoints''.");
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 1ef4a79..c89058c 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -193,17 +193,16 @@
     /* Number assigned to distinguish breakpoints.  */
     int number;
 
-    /* Address to break at.
-       Note that zero is a perfectly valid code address on some
-       platforms (for example, the mn10200 and mn10300 simulators).
-       NULL is not a special value for this field.  */
+    /* Address to break at, or NULL if not a breakpoint.  */
     CORE_ADDR address;
 
-    /* Line number of this address.  */
+    /* Line number of this address.  Only matters if address is
+       non-NULL.  */
 
     int line_number;
 
-    /* Source file name of this address.  */
+    /* Source file name of this address.  Only matters if address is
+       non-NULL.  */
 
     char *source_file;
 
@@ -218,10 +217,11 @@
        control of the target insert_breakpoint and remove_breakpoint routines.
        No other code should assume anything about the value(s) here.  */
     char shadow_contents[BREAKPOINT_MAX];
-    /* Nonzero if this breakpoint is now inserted.  */
+    /* Nonzero if this breakpoint is now inserted.  Only matters if address
+       is non-NULL.  */
     char inserted;
     /* Nonzero if this is not the first breakpoint in the list
-       for the given address.  */
+       for the given address.  Only matters if address is non-NULL.  */
     char duplicate;
     /* Chain of command lines to execute when this breakpoint is hit.  */
     struct command_line *commands;
@@ -231,7 +231,8 @@
     /* Conditional.  Break only if this expression's value is nonzero.  */
     struct expression *cond;
 
-    /* String we used to set the breakpoint (malloc'd).  */
+    /* String we used to set the breakpoint (malloc'd).  Only matters if
+       address is non-NULL.  */
     char *addr_string;
     /* Language we used to set the breakpoint.  */
     enum language language;
@@ -520,7 +521,7 @@
 
 extern int frame_in_dummy (struct frame_info *);
 
-extern int breakpoint_thread_match (CORE_ADDR, ptid_t);
+extern int breakpoint_thread_match (CORE_ADDR, int);
 
 extern void until_break_command (char *, int);
 
@@ -597,7 +598,7 @@
    be detached and allowed to run free.
 
    It is an error to use this function on the process whose id is
-   inferior_ptid.  */
+   inferior_pid.  */
 extern int detach_breakpoints (int);
 
 extern void enable_longjmp_breakpoint (void);
diff --git a/gdb/cli-out.c b/gdb/cli-out.c
index 9bcfa46..d6fa98e 100644
--- a/gdb/cli-out.c
+++ b/gdb/cli-out.c
@@ -24,7 +24,6 @@
 #include "ui-out.h"
 #include "cli-out.h"
 #include "gdb_string.h"
-#include "gdb_assert.h"
 
 /* Convenience macro for allocting typesafe memory. */
 
@@ -35,36 +34,31 @@
 struct ui_out_data
   {
     struct ui_file *stream;
-    int suppress_output;
   };
 
 /* These are the CLI output functions */
 
-static void cli_table_begin (struct ui_out *uiout, int nbrofcols,
-			     int nr_rows, const char *tblid);
+static void cli_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid);
 static void cli_table_body (struct ui_out *uiout);
 static void cli_table_end (struct ui_out *uiout);
 static void cli_table_header (struct ui_out *uiout, int width,
-			      enum ui_align alig, const char *col_name,
-			      const char *colhdr);
-static void cli_begin (struct ui_out *uiout, enum ui_out_type type,
-		       int level, const char *lstid);
-static void cli_end (struct ui_out *uiout, enum ui_out_type type, int level);
+			      enum ui_align alig, char *colhdr);
+static void cli_list_begin (struct ui_out *uiout, int list_flag, char *lstid);
+static void cli_list_end (struct ui_out *uiout, int list_flag);
 static void cli_field_int (struct ui_out *uiout, int fldno, int width,
-			   enum ui_align alig, const char *fldname, int value);
+			   enum ui_align alig, char *fldname, int value);
 static void cli_field_skip (struct ui_out *uiout, int fldno, int width,
-			    enum ui_align alig, const char *fldname);
+			    enum ui_align alig, char *fldname);
 static void cli_field_string (struct ui_out *uiout, int fldno, int width,
-			      enum ui_align alig, const char *fldname,
+			   enum ui_align alig, char *fldname,
 			      const char *string);
 static void cli_field_fmt (struct ui_out *uiout, int fldno,
 			   int width, enum ui_align align,
-			   const char *fldname, const char *format,
-			   va_list args);
+			   char *fldname, char *format, va_list args);
 static void cli_spaces (struct ui_out *uiout, int numspaces);
-static void cli_text (struct ui_out *uiout, const char *string);
-static void cli_message (struct ui_out *uiout, int verbosity,
-			 const char *format, va_list args);
+static void cli_text (struct ui_out *uiout, char *string);
+static void cli_message (struct ui_out *uiout, int verbosity, char *format,
+			 va_list args);
 static void cli_wrap_hint (struct ui_out *uiout, char *identstring);
 static void cli_flush (struct ui_out *uiout);
 
@@ -79,8 +73,8 @@
   cli_table_body,
   cli_table_end,
   cli_table_header,
-  cli_begin,
-  cli_end,
+  cli_list_begin,
+  cli_list_end,
   cli_field_int,
   cli_field_skip,
   cli_field_string,
@@ -89,8 +83,7 @@
   cli_text,
   cli_message,
   cli_wrap_hint,
-  cli_flush,
-  0, /* Does not need MI hacks (i.e. needs CLI hacks).  */
+  cli_flush
 };
 
 /* Prototypes for local functions */
@@ -99,9 +92,8 @@
 
 static void field_separator (void);
 
-static void out_field_fmt (struct ui_out *uiout, int fldno,
-			   const char *fldname,
-			   const char *format,...);
+static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
+			   char *format,...);
 
 /* local variables */
 
@@ -110,17 +102,8 @@
 /* Mark beginning of a table */
 
 void
-cli_table_begin (struct ui_out *uiout, int nbrofcols,
-		 int nr_rows,
-		 const char *tblid)
+cli_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
 {
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (nr_rows == 0)
-    data->suppress_output = 1;
-  else
-    /* Only the table suppresses the output and, fortunatly, a table
-       is not a recursive data structure. */
-    gdb_assert (data->suppress_output == 0);
 }
 
 /* Mark beginning of a table body */
@@ -128,9 +111,6 @@
 void
 cli_table_body (struct ui_out *uiout)
 {
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   /* first, close the table header line */
   cli_text (uiout, "\n");
 }
@@ -140,60 +120,39 @@
 void
 cli_table_end (struct ui_out *uiout)
 {
-  struct ui_out_data *data = ui_out_data (uiout);
-  data->suppress_output = 0;
 }
 
 /* Specify table header */
 
 void
 cli_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
-		  const char *col_name,
-		  const char *colhdr)
+		  char *colhdr)
 {
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   cli_field_string (uiout, 0, width, alignment, 0, colhdr);
 }
 
 /* Mark beginning of a list */
 
 void
-cli_begin (struct ui_out *uiout,
-	   enum ui_out_type type,
-	   int level,
-	   const char *id)
+cli_list_begin (struct ui_out *uiout, int list_flag, char *lstid)
 {
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
 }
 
 /* Mark end of a list */
 
 void
-cli_end (struct ui_out *uiout,
-	 enum ui_out_type type,
-	 int level)
+cli_list_end (struct ui_out *uiout, int list_flag)
 {
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
 }
 
 /* output an int field */
 
 void
 cli_field_int (struct ui_out *uiout, int fldno, int width,
-	       enum ui_align alignment,
-	       const char *fldname, int value)
+	       enum ui_align alignment, char *fldname, int value)
 {
   char buffer[20];		/* FIXME: how many chars long a %d can become? */
 
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   sprintf (buffer, "%d", value);
   cli_field_string (uiout, fldno, width, alignment, fldname, buffer);
 }
@@ -202,12 +161,8 @@
 
 void
 cli_field_skip (struct ui_out *uiout, int fldno, int width,
-		enum ui_align alignment,
-		const char *fldname)
+		enum ui_align alignment, char *fldname)
 {
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   cli_field_string (uiout, fldno, width, alignment, fldname, "");
 }
 
@@ -219,16 +174,12 @@
 		  int fldno,
 		  int width,
 		  enum ui_align align,
-		  const char *fldname,
+		  char *fldname,
 		  const char *string)
 {
   int before = 0;
   int after = 0;
 
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
-
   if ((align != ui_noalign) && string)
     {
       before = width - strlen (string);
@@ -268,14 +219,9 @@
 void
 cli_field_fmt (struct ui_out *uiout, int fldno,
 	       int width, enum ui_align align,
-	       const char *fldname,
-	       const char *format,
-	       va_list args)
+	       char *fldname, char *format, va_list args)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
-
   vfprintf_filtered (data->stream, format, args);
 
   if (align != ui_noalign)
@@ -286,27 +232,20 @@
 cli_spaces (struct ui_out *uiout, int numspaces)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   print_spaces_filtered (numspaces, data->stream);
 }
 
 void
-cli_text (struct ui_out *uiout, const char *string)
+cli_text (struct ui_out *uiout, char *string)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   fputs_filtered (string, data->stream);
 }
 
 void
-cli_message (struct ui_out *uiout, int verbosity,
-	     const char *format, va_list args)
+cli_message (struct ui_out *uiout, int verbosity, char *format, va_list args)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   if (ui_out_get_verblvl (uiout) >= verbosity)
     vfprintf_unfiltered (data->stream, format, args);
 }
@@ -314,9 +253,6 @@
 void
 cli_wrap_hint (struct ui_out *uiout, char *identstring)
 {
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   wrap_here (identstring);
 }
 
@@ -334,9 +270,8 @@
 
 /* VARARGS */
 static void
-out_field_fmt (struct ui_out *uiout, int fldno,
-	       const char *fldname,
-	       const char *format,...)
+out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
+	       char *format,...)
 {
   struct ui_out_data *data = ui_out_data (uiout);
   va_list args;
@@ -365,7 +300,6 @@
 
   struct ui_out_data *data = XMALLOC (struct ui_out_data);
   data->stream = stream;
-  data->suppress_output = 0;
   return ui_out_new (&cli_ui_out_impl, data, flags);
 }
 
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 660bbaf..c1c5f7b 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -23,7 +23,6 @@
 #include "target.h"	 /* For baud_rate, remote_debug and remote_timeout */
 #include "gdb_wait.h"		/* For shell escape implementation */
 #include "gnu-regex.h"		/* Used by apropos_command */
-#include "filenames.h"		/* for DOSish file names */
 
 #ifdef UI_OUT
 #include "ui-out.h"
@@ -293,7 +292,7 @@
   if (chdir (dir) < 0)
     perror_with_name (dir);
 
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+#if defined(_WIN32) || defined(__MSDOS__)
   /* There's too much mess with DOSish names like "d:", "d:.",
      "d:./foo" etc.  Instead of having lots of special #ifdef'ed code,
      simply get the canonicalized name of the current directory.  */
@@ -301,24 +300,24 @@
 #endif
 
   len = strlen (dir);
-  if (IS_DIR_SEPARATOR (dir[len - 1]))
+  if (SLASH_P (dir[len - 1]))
     {
       /* Remove the trailing slash unless this is a root directory
          (including a drive letter on non-Unix systems).  */
       if (!(len == 1)		/* "/" */
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
-	  && !(len == 3 && dir[1] == ':') /* "d:/" */
+#if defined(_WIN32) || defined(__MSDOS__)
+	  && !(!SLASH_P (*dir) && ROOTED_P (dir) && len <= 3)	/* "d:/" */
 #endif
 	  )
 	len--;
     }
 
   dir = savestring (dir, len);
-  if (IS_ABSOLUTE_PATH (dir))
+  if (ROOTED_P (dir))
     current_directory = dir;
   else
     {
-      if (IS_DIR_SEPARATOR (current_directory[strlen (current_directory) - 1]))
+      if (SLASH_P (current_directory[strlen (current_directory) - 1]))
 	current_directory = concat (current_directory, dir, NULL);
       else
 	current_directory = concat (current_directory, SLASH_STRING, dir, NULL);
@@ -330,18 +329,17 @@
   found_real_path = 0;
   for (p = current_directory; *p;)
     {
-      if (IS_DIR_SEPARATOR (p[0]) && p[1] == '.'
-	  && (p[2] == 0 || IS_DIR_SEPARATOR (p[2])))
+      if (SLASH_P (p[0]) && p[1] == '.' && (p[2] == 0 || SLASH_P (p[2])))
 	strcpy (p, p + 2);
-      else if (IS_DIR_SEPARATOR (p[0]) && p[1] == '.' && p[2] == '.'
-	       && (p[3] == 0 || IS_DIR_SEPARATOR (p[3])))
+      else if (SLASH_P (p[0]) && p[1] == '.' && p[2] == '.'
+	       && (p[3] == 0 || SLASH_P (p[3])))
 	{
 	  if (found_real_path)
 	    {
 	      /* Search backwards for the directory just before the "/.."
 	         and obliterate it and the "/..".  */
 	      char *q = p;
-	      while (q != current_directory && !IS_DIR_SEPARATOR (q[-1]))
+	      while (q != current_directory && !SLASH_P (q[-1]))
 		--q;
 
 	      if (q == current_directory)
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 69fc4fb..d4a9def 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1028,7 +1028,6 @@
       xfree (l);
       l = next;
     }
-  *lptr = NULL;
 }
 
 static void
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index bd3dd1a..47ad244 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -422,7 +422,7 @@
 cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
 {
 #ifdef UI_OUT
-  ui_out_tuple_begin (uiout, "showlist");
+  ui_out_list_begin (uiout, "showlist");
 #endif
   for (; list != NULL; list = list->next)
     {
@@ -431,19 +431,19 @@
 #ifdef UI_OUT
       if (list->prefixlist && !list->abbrev_flag)
 	{
-	  ui_out_tuple_begin (uiout, "optionlist");
+	  ui_out_list_begin (uiout, "optionlist");
 	  ui_out_field_string (uiout, "prefix", list->prefixname + 5);
 	  cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
-	  ui_out_tuple_end (uiout);
+	  ui_out_list_end (uiout);
 	}
       if (list->type == show_cmd)
 	{
-	  ui_out_tuple_begin (uiout, "option");
+	  ui_out_list_begin (uiout, "option");
 	  ui_out_text (uiout, prefix);
 	  ui_out_field_string (uiout, "name", list->name);
 	  ui_out_text (uiout, ":  ");
 	  do_setshow_command ((char *) NULL, from_tty, list);
-	  ui_out_tuple_end (uiout);
+	  ui_out_list_end (uiout);
 	}
 #else
       if (list->prefixlist && !list->abbrev_flag)
@@ -458,7 +458,7 @@
 #endif
     }
 #ifdef UI_OUT
-  ui_out_tuple_end (uiout);
+  ui_out_list_end (uiout);
 #endif
 }
 
diff --git a/gdb/coff-solib.c b/gdb/coff-solib.c
index fc13bca..0f3bc76 100644
--- a/gdb/coff-solib.c
+++ b/gdb/coff-solib.c
@@ -25,8 +25,6 @@
 #include "bfd.h"
 #include "gdbcore.h"
 #include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
 
 /*
 
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 60ef896..a343a68 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -312,7 +312,7 @@
     asection **resultp;
   };
 
-static void find_targ_sec (bfd *, asection *, PTR);
+static void find_targ_sec (bfd *, asection *, void *);
 
 static void
 find_targ_sec (bfd *abfd, asection *sect, PTR obj)
@@ -689,11 +689,6 @@
 			       info->stabsects,
 			       info->stabstrsect->filepos, stabstrsize);
     }
-  if (dwarf2_has_info (abfd))
-    {
-      /* DWARF2 sections.  */
-      dwarf2_build_psymtabs (objfile, mainline);
-    }
 
   do_cleanups (back_to);
 }
diff --git a/gdb/completer.c b/gdb/completer.c
index 19db617..57aced8 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -22,14 +22,12 @@
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
-#include "filenames.h"		/* for DOSish file names */
 
 /* FIXME: This is needed because of lookup_cmd_1().
    We should be calling a hook instead so we eliminate the CLI dependency. */
 #include "gdbcmd.h"
 
-/* Needed for rl_completer_word_break_characters() and for
-   filename_completion_function.  */
+/* Needed for rl_completer_word_break_characters() */
 #include <readline/readline.h>
 
 /* readline defines this.  */
@@ -66,7 +64,7 @@
    break characters any characters that are commonly used in file
    names, such as '-', '+', '~', etc.  Otherwise, readline displays
    incorrect completion candidates.  */
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+#ifdef __MSDOS__
 /* MS-DOS and MS-Windows use colon as part of the drive spec, and most
    programs support @foo style response files.  */
 static char *gdb_completer_file_name_break_characters = " \t\n*|\"';?><@";
@@ -74,10 +72,6 @@
 static char *gdb_completer_file_name_break_characters = " \t\n*|\"';:?><";
 #endif
 
-/* These are used when completing on locations, which can mix file
-   names and symbol names separated by a colon.  */
-static char *gdb_completer_loc_break_characters = " \t\n*|\"';:?><,";
-
 /* Characters that can be used to quote completion strings.  Note that we
    can't include '"' because the gdb C parser treats such quoted sequences
    as strings. */
@@ -101,6 +95,8 @@
 char **
 filename_completer (char *text, char *word)
 {
+  /* From readline.  */
+extern char *filename_completion_function (char *, int);
   int subsequent_name;
   char **return_val;
   int return_val_used;
@@ -174,153 +170,6 @@
   return return_val;
 }
 
-/* Complete on locations, which might be of two possible forms:
-
-       file:line
-   or
-       symbol+offset
-
-   This is intended to be used in commands that set breakpoints etc.  */
-char **
-location_completer (char *text, char *word)
-{
-  int n_syms = 0, n_files = 0;
-  char ** fn_list = NULL;
-  char ** list = NULL;
-  char *p;
-  int quote_found = 0;
-  int quoted = *text == '\'' || *text == '"';
-  int quote_char = '\0';
-  char *colon = NULL;
-  char *file_to_match = NULL;
-  char *symbol_start = text;
-  char *orig_text = text;
-  size_t text_len;
-
-  /* Do we have an unquoted colon, as in "break foo.c::bar"?  */
-  for (p = text; *p != '\0'; ++p)
-    {
-      if (*p == '\\' && p[1] == '\'')
-	p++;
-      else if (*p == '\'' || *p == '"')
-	{
-	  quote_found = *p;
-	  quote_char = *p++;
-	  while (*p != '\0' && *p != quote_found)
-	    {
-	      if (*p == '\\' && p[1] == quote_found)
-		p++;
-	      p++;
-	    }
-
-	  if (*p == quote_found)
-	    quote_found = 0;
-	  else
-	    break;		/* hit the end of text */
-	}
-#if HAVE_DOS_BASED_FILE_SYSTEM
-      /* If we have a DOS-style absolute file name at the beginning of
-	 TEXT, and the colon after the drive letter is the only colon
-	 we found, pretend the colon is not there.  */
-      else if (p < text + 3 && *p == ':' && p == text + 1 + quoted)
-	;
-#endif
-      else if (*p == ':' && !colon)
-	{
-	  colon = p;
-	  symbol_start = p + 1;
-	}
-      else if (strchr (gdb_completer_word_break_characters, *p))
-	symbol_start = p + 1;
-    }
-
-  if (quoted)
-    text++;
-  text_len = strlen (text);
-
-  /* Where is the file name?  */
-  if (colon)
-    {
-      char *s;
-
-      file_to_match = (char *) xmalloc (colon - text + 1);
-      strncpy (file_to_match, text, colon - text + 1);
-      /* Remove trailing colons and quotes from the file name.  */
-      for (s = file_to_match + (colon - text);
-	   s > file_to_match;
-	   s--)
-	if (*s == ':' || *s == quote_char)
-	  *s = '\0';
-    }
-  /* If the text includes a colon, they want completion only on a
-     symbol name after the colon.  Otherwise, we need to complete on
-     symbols as well as on files.  */
-  if (colon)
-    {
-      list = make_file_symbol_completion_list (symbol_start, word,
-					       file_to_match);
-      xfree (file_to_match);
-    }
-  else
-    {
-      list = make_symbol_completion_list (symbol_start, word);
-      /* If text includes characters which cannot appear in a file
-	 name, they cannot be asking for completion on files.  */
-      if (strcspn (text, gdb_completer_file_name_break_characters) == text_len)
-	fn_list = make_source_files_completion_list (text, text);
-    }
-
-  /* How many completions do we have in both lists?  */
-  if (fn_list)
-    for ( ; fn_list[n_files]; n_files++)
-      ;
-  if (list)
-    for ( ; list[n_syms]; n_syms++)
-      ;
-
-  /* Make list[] large enough to hold both lists, then catenate
-     fn_list[] onto the end of list[].  */
-  if (n_syms && n_files)
-    {
-      list = xrealloc (list, (n_syms + n_files + 1) * sizeof (char *));
-      memcpy (list + n_syms, fn_list, (n_files + 1) * sizeof (char *));
-      xfree (fn_list);
-    }
-  else if (n_files)
-    {
-      /* If we only have file names as possible completion, we should
-	 bring them in sync with what rl_complete expects.  The
-	 problem is that if the user types "break /foo/b TAB", and the
-	 possible completions are "/foo/bar" and "/foo/baz"
-	 rl_complete expects us to return "bar" and "baz", without the
-	 leading directories, as possible completions, because `word'
-	 starts at the "b".  But we ignore the value of `word' when we
-	 call make_source_files_completion_list above (because that
-	 would not DTRT when the completion results in both symbols
-	 and file names), so make_source_files_completion_list returns
-	 the full "/foo/bar" and "/foo/baz" strings.  This produces
-	 wrong results when, e.g., there's only one possible
-	 completion, because rl_complete will prepend "/foo/" to each
-	 candidate completion.  The loop below removes that leading
-	 part.  */
-      for (n_files = 0; fn_list[n_files]; n_files++)
-	{
-	  memmove (fn_list[n_files], fn_list[n_files] + (word - text),
-		   strlen (fn_list[n_files]) + 1 - (word - text));
-	}
-      /* Return just the file-name list as the result.  */
-      list = fn_list;
-    }
-  else if (!n_syms)
-    {
-      /* No completions at all.  As the final resort, try completing
-	 on the entire text as a symbol.  */
-      list = make_symbol_completion_list (orig_text, word);
-    }
-
-  return list;
-}
-
 /* Here are some useful test cases for completion.  FIXME: These should
    be put in the test suite.  They should be tested with both M-? and TAB.
 
@@ -513,7 +362,7 @@
 			     to complete the entire text after the
 			     command, just the last word.  To this
 			     end, we need to find the beginning of the
-			     file name by starting at `word' and going
+			     file name starting at `word' and going
 			     backwards.  */
 			  for (p = word;
 			       p > tmp_command
@@ -523,16 +372,6 @@
 			  rl_completer_word_break_characters =
 			    gdb_completer_file_name_break_characters;
 			}
-		      else if (c->completer == location_completer)
-			{
-			  /* Commands which complete on locations want to
-			     see the entire argument.  */
-			  for (p = word;
-			       p > tmp_command
-				 && p[-1] != ' ' && p[-1] != '\t';
-			       p--)
-			    ;
-			}
 		      list = (*c->completer) (p, word);
 		    }
 		}
@@ -591,14 +430,6 @@
 		      rl_completer_word_break_characters =
 			gdb_completer_file_name_break_characters;
 		    }
-		  else if (c->completer == location_completer)
-		    {
-		      for (p = word;
-			   p > tmp_command
-			     && p[-1] != ' ' && p[-1] != '\t';
-			   p--)
-			;
-		    }
 		  list = (*c->completer) (p, word);
 		}
 	    }
diff --git a/gdb/completer.h b/gdb/completer.h
index ae27395..abb3b8c 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -23,8 +23,6 @@
 
 extern char **filename_completer (char *, char *);
 
-extern char **location_completer (char *, char *);
-
 extern char *get_gdb_completer_word_break_characters (void); 
 
 extern char *get_gdb_completer_quote_characters (void);
diff --git a/gdb/config/alpha/alpha-osf1.mh b/gdb/config/alpha/alpha-osf1.mh
index 62654e8..6ed0f95 100644
--- a/gdb/config/alpha/alpha-osf1.mh
+++ b/gdb/config/alpha/alpha-osf1.mh
@@ -2,5 +2,4 @@
 XDEPFILES= 
 XM_FILE= xm-alphaosf.h
 NAT_FILE= nm-osf.h
-NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \
-	solib-osf.o solib.o
+NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o osfsolib.o
diff --git a/gdb/config/alpha/alpha-osf2.mh b/gdb/config/alpha/alpha-osf2.mh
index 8b4d841..bb200d8 100644
--- a/gdb/config/alpha/alpha-osf2.mh
+++ b/gdb/config/alpha/alpha-osf2.mh
@@ -3,5 +3,4 @@
 XM_FILE= xm-alphaosf.h
 NAT_FILE= nm-osf2.h
 NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \
-	solib-osf.o solib.o procfs.o proc-api.o proc-events.o proc-flags.o \
-	proc-why.o
+	osfsolib.o procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
diff --git a/gdb/config/alpha/alpha-osf3.mh b/gdb/config/alpha/alpha-osf3.mh
index 1ad2085..6af2808 100644
--- a/gdb/config/alpha/alpha-osf3.mh
+++ b/gdb/config/alpha/alpha-osf3.mh
@@ -3,5 +3,5 @@
 XM_FILE= xm-alphaosf.h
 NAT_FILE= nm-osf3.h
 NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \
-	solib-osf.o solib.o procfs.o proc-api.o proc-events.o proc-flags.o \
-	proc-why.o
+	osfsolib.o procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
+
diff --git a/gdb/config/alpha/nm-linux.h b/gdb/config/alpha/nm-linux.h
index 2cb2db6..d50d977 100644
--- a/gdb/config/alpha/nm-linux.h
+++ b/gdb/config/alpha/nm-linux.h
@@ -74,8 +74,8 @@
 #undef PREPARE_TO_PROCEED
 #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
 
-extern void lin_lwp_attach_lwp (ptid_t pid, int verbose);
-#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose))
+extern void lin_lwp_attach_lwp (int pid, int verbose);
+#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose))
 
 #include <signal.h>
 
diff --git a/gdb/config/arm/nm-linux.h b/gdb/config/arm/nm-linux.h
index ce4e5ff..3de162e 100644
--- a/gdb/config/arm/nm-linux.h
+++ b/gdb/config/arm/nm-linux.h
@@ -38,8 +38,8 @@
 #undef PREPARE_TO_PROCEED
 #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
 
-extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose);
-#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose))
+extern void lin_lwp_attach_lwp (int pid, int verbose);
+#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose))
 
 #include <signal.h>
 
diff --git a/gdb/config/arm/tm-arm.h b/gdb/config/arm/tm-arm.h
index b773adf..5df0454 100644
--- a/gdb/config/arm/tm-arm.h
+++ b/gdb/config/arm/tm-arm.h
@@ -23,7 +23,6 @@
 #define TM_ARM_H
 
 #include "regcache.h"
-#include "floatformat.h"
 
 /* Forward declarations for prototypes.  */
 struct type;
diff --git a/gdb/config/djgpp/djconfig.sh b/gdb/config/djgpp/djconfig.sh
index 65a4df8..ae3006d 100644
--- a/gdb/config/djgpp/djconfig.sh
+++ b/gdb/config/djgpp/djconfig.sh
@@ -126,12 +126,6 @@
 # Define explicitly the .exe extension because on W95 with LFN=y
 # the check might fail
 export am_cv_exeext=.exe
-# ltconfig wants to compute the maximum command-line length, but
-# Bash 2.04 doesn't like that (it doesn't have any limit ;-), and
-# reboots the system.  We know our limit in advance, so we don't
-# need all that crap.  Assuming that the environment size is less
-# than 4KB, we can afford 12KB of command-line arguments.
-export lt_cv_sys_max_cmd_len=12288
 
 # The configure script needs to see the `install-sh' script, otherwise
 # it decides the source installation is broken.  But "make install" will
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index a6f7bd8..70471f1 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -1,41 +1,4 @@
-@V@/bfd/ChangeLog-9193 @V@/bfd/ChangeLog.9193
-@V@/bfd/ChangeLog-9495 @V@/bfd/ChangeLog.9495
-@V@/bfd/ChangeLog-9697 @V@/bfd/ChangeLog.9697
-@V@/bfd/ChangeLog-9899 @V@/bfd/ChangeLog.9899
-@V@/bfd/coff-tic54x.c @V@/bfd/coff-tc54x.c
-@V@/bfd/coff-tic80.c @V@/bfd/coff-tc80.c
-@V@/bfd/cpu-ia64-opc.c @V@/bfd/cpuia64-opc.c
-@V@/bfd/cpu-m68hc11.c @V@/bfd/cm68hc11.c
-@V@/bfd/cpu-m68hc12.c @V@/bfd/cm68hc12.c
-@V@/bfd/efi-app-ia32.c @V@/bfd/efi-ia32-app.c
-@V@/bfd/efi-app-ia64.c @V@/bfd/efi-ia64-app.c
-@V@/bfd/elf32-i370.c @V@/bfd/elf32-i7.c
-@V@/bfd/elf32-m68hc11.c @V@/bfd/em68hc11.c
-@V@/bfd/elf32-m68hc12.c @V@/bfd/em68hc12.c
-@V@/bfd/elf32-m68k.c @V@/bfd/em68k.c
-@V@/bfd/elf32-sh-lin.c @V@/bfd/elf32-slin.c
-@V@/dejagnu/baseboards/mn10200-cygmon.exp @V@/dejagnu/baseboards/mn10200cygmon.exp
-@V@/dejagnu/baseboards/mn10200-sim.exp @V@/dejagnu/baseboards/mn10200sim.exp
-@V@/dejagnu/baseboards/mn10300-cygmon.exp @V@/dejagnu/baseboards/mn10300cygmon.exp
-@V@/dejagnu/baseboards/mn10300-sim.exp @V@/dejagnu/baseboards/mn10300sim.exp
-@V@/dejagnu/baseboards/powerpc-bug1.exp @V@/dejagnu/baseboards/powerpc1-bug.exp
-@V@/dejagnu/baseboards/powerpc-sim.exp @V@/dejagnu/baseboards/powerpcsim.exp
-@V@/dejagnu/baseboards/sparclite-coff.exp @V@/dejagnu/baseboards/sl-coff.exp
-@V@/dejagnu/baseboards/sparclite-cygmon.exp @V@/dejagnu/baseboards/sl-cygmon.exp
-@V@/dejagnu/baseboards/sparclite-sim-le.exp @V@/dejagnu/baseboards/sl-sim-le.exp
-@V@/dejagnu/baseboards/sparclite-sim.exp @V@/dejagnu/baseboards/sl-sim.exp
-@V@/dejagnu/contrib/test-g++ @V@/dejagnu/contrib/test-gxx
-@V@/dejagnu/doc/.cvsignore @V@/dejagnu/doc/_cvsignore
-@V@/dejagnu/example/calc/calc.h.in @V@/dejagnu/example/calc/calc.h-in
-@V@/expect/Dbg_cf.h.in @V@/expect/Dbg_cf.h-in
-@V@/expect/example/beer.exp.out @V@/expect/example/beer_exp.out
-@V@/expect/example/chesslib++.c @V@/expect/example/chesslibxx.c
-@V@/expect/example/chesslib.c @V@/expect/example/chesslb.c
-@V@/expect/example/chesslib2.c @V@/expect/example/chesslb2.c
-@V@/expect/example/chesslibxx.c @V@/expect/example/chesslbxx.c
-@V@/expect/exp_main_sub.c @V@/expect/exp_m_sub.c
-@V@/expect/exp_main_tk.c @V@/expect/exp_m_tk.c
-@V@/expect/expect_cf.h.in @V@/expect/expect_cf.h-in
+@V@/gdb/ChangeLog-3.x @V@/gdb/ChangeLog.3-x
 @V@/gdb/ChangeLog-1990 @V@/gdb/ChangeLog.90
 @V@/gdb/ChangeLog-1991 @V@/gdb/ChangeLog.91
 @V@/gdb/ChangeLog-1992 @V@/gdb/ChangeLog.92
@@ -48,10 +11,40 @@
 @V@/gdb/ChangeLog-1999 @V@/gdb/ChangeLog.99
 @V@/gdb/ChangeLog-2000 @V@/gdb/ChangeLog.000
 @V@/gdb/ChangeLog-2001 @V@/gdb/ChangeLog.001
-@V@/gdb/ChangeLog-3.x @V@/gdb/ChangeLog.3-x
-@V@/gdb/arm-linux-nat.c @V@/gdb/armlin-nat.c
+@V@/gdb/ppc-linux-tdep.c @V@/gdb/ppc-linx-tdep.c
+@V@/gdb/remote-adapt.c @V@/gdb/rmt-adapt.c
+@V@/gdb/remote-array.c @V@/gdb/rmt-array.c
+@V@/gdb/remote-e7000.c @V@/gdb/rmt-e7000.c
+@V@/gdb/remote-eb.c @V@/gdb/rmt-eb.c
+@V@/gdb/remote-es.c @V@/gdb/rmt-es.c
+@V@/gdb/remote-est.c @V@/gdb/rmt-est.c
+@V@/gdb/remote-mips.c @V@/gdb/emt-mips.c
+@V@/gdb/remote-mm.c @V@/gdb/emt-mm.c
+@V@/gdb/remote-nindy.c @V@/gdb/rmt-nindy.c
+@V@/gdb/remote-nrom.c @V@/gdb/rmt-nrom.c
+@V@/gdb/remote-rdi.c @V@/gdb/rmt-rdi.c
+@V@/gdb/remote-rdp.c @V@/gdb/rmt-rdp.c
+@V@/gdb/remote-sds.c @V@/gdb/rmt-sds.c
+@V@/gdb/remote-sim.c @V@/gdb/rmt-sim.c
+@V@/gdb/remote-st.c @V@/gdb/rmt-st.c
+@V@/gdb/remote-udi.c @V@/gdb/rmt-udi.c
+@V@/gdb/remote-vx.c @V@/gdb/rmt-vx.c
+@V@/gdb/remote-vx29k.c @V@/gdb/rmt-vx29k.c
+@V@/gdb/remote-vx68.c @V@/gdb/rmt-vx68.c
+@V@/gdb/remote-vx960.c @V@/gdb/rmt-vx960.c
+@V@/gdb/remote-vxmips.c @V@/gdb/rmt-vxmips.c
+@V@/gdb/remote-vxsparc.c @V@/gdb/rmt-vxsparc.c
+@V@/gdb/sparclet-rom.c @V@/gdb/splet-rom.c
+@V@/gdb/sparclet-stub.c @V@/gdb/splet-stub.c
+@V@/gdb/m68knbsd-nat.c @V@/gdb/m6nbsd-nat.c
+@V@/gdb/m68knbsd-tdep.c @V@/gdb/m6nbsd-tdep.c
+@V@/gdb/i386nbsd-nat.c @V@/gdb/i3nbsd-nat.c
+@V@/gdb/i386nbsd-tdep.c @V@/gdb/i3nbsd-tdep.c
+@V@/gdb/i386-linux-tdep.c @V@/gdb/i386linux-tdep.c
 @V@/gdb/arm-linux-tdep.c @V@/gdb/armlin-tdep.c
-@V@/gdb/c-exp.tab.c @V@/gdb/c-exp_tab.c
+@V@/gdb/arm-linux-nat.c @V@/gdb/armlin-nat.c
+@V@/gdb/ia64-aix-nat.c @V@/gdb/ia64aix-nat.c
+@V@/gdb/ia64-linux-nat.c @V@/gdb/ia64linux-nat.c
 @V@/gdb/config/alpha/alpha-osf1.mh @V@/gdb/config/alpha/alphosf1.mh
 @V@/gdb/config/alpha/alpha-osf2.mh @V@/gdb/config/alpha/alphosf2.mh
 @V@/gdb/config/alpha/alpha-osf3.mh @V@/gdb/config/alpha/alphosf3.mh
@@ -96,57 +89,64 @@
 @V@/gdb/config/sparc/tm-sparclynx.h @V@/gdb/config/sparc/tm-splynx.h
 @V@/gdb/config/sparc/xm-sparclynx.h @V@/gdb/config/sparc/xm-xplynx.h
 @V@/gdb/config/vax/xm-vaxult2.h @V@/gdb/config/vax/xm-vaxut2.h
-@V@/gdb/f-exp.tab.c @V@/gdb/f-exp_tab.c
-@V@/gdb/gdbtk/generic/ChangeLog-1997 @V@/gdb/gdbtk/generic/ChangeLog.97
-@V@/gdb/gdbtk/generic/ChangeLog-1998 @V@/gdb/gdbtk/generic/ChangeLog.98
-@V@/gdb/gdbtk/generic/ChangeLog-1999 @V@/gdb/gdbtk/generic/ChangeLog.99
-@V@/gdb/gdbtk/generic/ChangeLog-2000 @V@/gdb/gdbtk/generic/ChangeLog.000
-@V@/gdb/gdbtk/generic/ChangeLog-2001 @V@/gdb/gdbtk/generic/ChangeLog.001
 @V@/gdb/gdbtk/generic/gdbtk-varobj.c @V@/gdb/gdbtk/generic/gdbtk-vobj.c
-@V@/gdb/gdbtk/library/ChangeLog-1997 @V@/gdb/gdbtk/library/ChangeLog.97
-@V@/gdb/gdbtk/library/ChangeLog-1998 @V@/gdb/gdbtk/library/ChangeLog.98
-@V@/gdb/gdbtk/library/ChangeLog-1999 @V@/gdb/gdbtk/library/ChangeLog.99
-@V@/gdb/gdbtk/library/ChangeLog-2000 @V@/gdb/gdbtk/library/ChangeLog.000
-@V@/gdb/gdbtk/library/ChangeLog-2001 @V@/gdb/gdbtk/library/ChangeLog.001
-@V@/gdb/i386-linux-tdep.c @V@/gdb/i386linux-tdep.c
-@V@/gdb/i386nbsd-nat.c @V@/gdb/i3nbsd-nat.c
-@V@/gdb/i386nbsd-tdep.c @V@/gdb/i3nbsd-tdep.c
-@V@/gdb/ia64-aix-nat.c @V@/gdb/ia64aix-nat.c
-@V@/gdb/ia64-linux-nat.c @V@/gdb/ia64linux-nat.c
-@V@/gdb/jv-exp.tab.c @V@/gdb/jv-exp_tab.c
-@V@/gdb/m2-exp.tab.c @V@/gdb/m2-exp_tab.c
-@V@/gdb/m68knbsd-nat.c @V@/gdb/m6nbsd-nat.c
-@V@/gdb/m68knbsd-tdep.c @V@/gdb/m6nbsd-tdep.c
-@V@/gdb/nindy-share/b.out.h @V@/gdb/nindy-share/b_out.h
 @V@/gdb/osf-share/cma_stack_int.h @V@/gdb/osf-share/cma_stkint.h
-@V@/gdb/p-exp.tab.c @V@/gdb/p-exp_tab.c
-@V@/gdb/ppc-linux-tdep.c @V@/gdb/ppc-linx-tdep.c
-@V@/gdb/remote-adapt.c @V@/gdb/rmt-adapt.c
-@V@/gdb/remote-array.c @V@/gdb/rmt-array.c
-@V@/gdb/remote-e7000.c @V@/gdb/rmt-e7000.c
-@V@/gdb/remote-eb.c @V@/gdb/rmt-eb.c
-@V@/gdb/remote-es.c @V@/gdb/rmt-es.c
-@V@/gdb/remote-est.c @V@/gdb/rmt-est.c
-@V@/gdb/remote-mips.c @V@/gdb/emt-mips.c
-@V@/gdb/remote-mm.c @V@/gdb/emt-mm.c
-@V@/gdb/remote-nindy.c @V@/gdb/rmt-nindy.c
-@V@/gdb/remote-nrom.c @V@/gdb/rmt-nrom.c
-@V@/gdb/remote-rdi.c @V@/gdb/rmt-rdi.c
-@V@/gdb/remote-rdp.c @V@/gdb/rmt-rdp.c
-@V@/gdb/remote-sds.c @V@/gdb/rmt-sds.c
-@V@/gdb/remote-sim.c @V@/gdb/rmt-sim.c
-@V@/gdb/remote-st.c @V@/gdb/rmt-st.c
-@V@/gdb/remote-udi.c @V@/gdb/rmt-udi.c
-@V@/gdb/remote-vx.c @V@/gdb/rmt-vx.c
-@V@/gdb/remote-vx29k.c @V@/gdb/rmt-vx29k.c
-@V@/gdb/remote-vx68.c @V@/gdb/rmt-vx68.c
-@V@/gdb/remote-vx960.c @V@/gdb/rmt-vx960.c
-@V@/gdb/remote-vxmips.c @V@/gdb/rmt-vxmips.c
-@V@/gdb/remote-vxsparc.c @V@/gdb/rmt-vxsparc.c
-@V@/gdb/sparclet-rom.c @V@/gdb/splet-rom.c
-@V@/gdb/sparclet-stub.c @V@/gdb/splet-stub.c
-@V@/gdb/testsuite/.gdbinit @V@/gdb/testsuite/gdb.ini
 @V@/gdb/testsuite/gdb.base/coremaker2.c @V@/gdb/testsuite/gdb.base/core2maker.c
+@V@/gdb/tui/tuiSourceWin.c @V@/gdb/tui/tuiWinSource.c
+@V@/gdb/tui/tuiSourceWin.h @V@/gdb/tui/tuiWinSource.h
+@V@/bfd/ChangeLog-9193 @V@/bfd/ChangeLog.9193
+@V@/bfd/ChangeLog-9495 @V@/bfd/ChangeLog.9495
+@V@/bfd/ChangeLog-9697 @V@/bfd/ChangeLog.9697
+@V@/bfd/ChangeLog-9899 @V@/bfd/ChangeLog.9899
+@V@/bfd/coff-tic80.c @V@/bfd/coff-tc80.c
+@V@/bfd/coff-tic54x.c @V@/bfd/coff-tc54x.c
+@V@/bfd/elf32-i370.c @V@/bfd/elf32-i7.c
+@V@/bfd/elf32-sh-lin.c @V@/bfd/elf32-slin.c
+@V@/sim/mips/dv-tx3904irc.c @V@/sim/mips/dv-tx3irc.c
+@V@/sim/mips/dv-tx3904sio.c @V@/sim/mips/dv-tx3sio.c
+@V@/sim/mips/dv-tx3904tmr.c @V@/sim/mips/dv-tx3tmr.c
+@V@/sim/mn10300/dv-mn103int.c @V@/sim/mn10300/dv-mn1int.c
+@V@/sim/mn10300/dv-mn103iop.c @V@/sim/mn10300/dv-mn1iop.c
+@V@/sim/mn10300/dv-mn103ser.c @V@/sim/mn10300/dv-mn1ser.c
+@V@/sim/mn10300/dv-mn103tim.c @V@/sim/mn10300/dv-mn1tim.c
+@V@/sim/ppc/corefile-n.h @V@/sim/ppc/corefle-n.h
+@V@/sim/ppc/idecode_branch.h @V@/sim/ppc/idec_branch.h
+@V@/sim/ppc/idecode_expression.h @V@/sim/ppc/idec_expression.h
+@V@/sim/ppc/idecode_fields.h @V@/sim/ppc/idec_fields.h
+@V@/sim/ppc/sim-endian-n.h @V@/sim/ppc/sim-endn.h
+@V@/sim/testsuite/d10v-elf/t-ae-ld-d.s @V@/sim/testsuite/d10v-elf/t-ld-d.s
+@V@/sim/testsuite/d10v-elf/t-ae-ld-i.s @V@/sim/testsuite/d10v-elf/t-ld-i.s
+@V@/sim/testsuite/d10v-elf/t-ae-ld-id.s @V@/sim/testsuite/d10v-elf/t-ld-id.s
+@V@/sim/testsuite/d10v-elf/t-ae-ld-im.s @V@/sim/testsuite/d10v-elf/t-ld-im.s
+@V@/sim/testsuite/d10v-elf/t-ae-ld-ip.s @V@/sim/testsuite/d10v-elf/t-ld-ip.s
+@V@/sim/testsuite/d10v-elf/t-ae-ld2w-d.s @V@/sim/testsuite/d10v-elf/t-ld2-d.s
+@V@/sim/testsuite/d10v-elf/t-ae-ld2w-i.s @V@/sim/testsuite/d10v-elf/t-ld2-i.s
+@V@/sim/testsuite/d10v-elf/t-ae-ld2w-id.s @V@/sim/testsuite/d10v-elf/t-ld2-id.s
+@V@/sim/testsuite/d10v-elf/t-ae-ld2w-im.s @V@/sim/testsuite/d10v-elf/t-ld2-im.s
+@V@/sim/testsuite/d10v-elf/t-ae-ld2w-ip.s @V@/sim/testsuite/d10v-elf/t-ld2-ip.s
+@V@/sim/testsuite/d10v-elf/t-ae-st-d.s @V@/sim/testsuite/d10v-elf/t-st-d.s
+@V@/sim/testsuite/d10v-elf/t-ae-st-i.s @V@/sim/testsuite/d10v-elf/t-st-i.s
+@V@/sim/testsuite/d10v-elf/t-ae-st-id.s @V@/sim/testsuite/d10v-elf/t-st-id.s
+@V@/sim/testsuite/d10v-elf/t-ae-st-im.s @V@/sim/testsuite/d10v-elf/t-st-im.s
+@V@/sim/testsuite/d10v-elf/t-ae-st-ip.s @V@/sim/testsuite/d10v-elf/t-st-ip.s
+@V@/sim/testsuite/d10v-elf/t-ae-st-is.s @V@/sim/testsuite/d10v-elf/t-st-is.s
+@V@/sim/testsuite/d10v-elf/t-ae-st2w-d.s @V@/sim/testsuite/d10v-elf/t-st2-d.s
+@V@/sim/testsuite/d10v-elf/t-ae-st2w-i.s @V@/sim/testsuite/d10v-elf/t-st2-i.s
+@V@/sim/testsuite/d10v-elf/t-ae-st2w-id.s @V@/sim/testsuite/d10v-elf/t-st2-id.s
+@V@/sim/testsuite/d10v-elf/t-ae-st2w-im.s @V@/sim/testsuite/d10v-elf/t-st2-im.s
+@V@/sim/testsuite/d10v-elf/t-ae-st2w-ip.s @V@/sim/testsuite/d10v-elf/t-st2-ip.s
+@V@/sim/testsuite/d10v-elf/t-ae-st2w-is.s @V@/sim/testsuite/d10v-elf/t-st2-is.s
+@V@/sim/testsuite/d30v-elf/ls-ld4bhu.S @V@/sim/testsuite/d30v-elf/ls-ld4bu.S
+@V@/intl/po2tbl.sed.in @V@/intl/po2tblsed.in
+@V@/intl/intlh.inst.in @V@/intl/intlh_inst.in
+@V@/readline/config.h.in @V@/readline/config.h-in
+@V@/readline/config.h.bot @V@/readline/config.h-bot
+@V@/gdb/nindy-share/b.out.h @V@/gdb/nindy-share/b_out.h
+@V@/gdb/c-exp.tab.c @V@/gdb/c-exp_tab.c
+@V@/gdb/jv-exp.tab.c @V@/gdb/jv-exp_tab.c
+@V@/gdb/f-exp.tab.c @V@/gdb/f-exp_tab.c
+@V@/gdb/m2-exp.tab.c @V@/gdb/m2-exp_tab.c
+@V@/gdb/p-exp.tab.c @V@/gdb/p-exp_tab.c
 @V@/gdb/testsuite/gdb.c++ @V@/gdb/testsuite/gdb.cxx
 @V@/gdb/testsuite/gdb.c++/Makefile.in @V@/gdb/testsuite/gdb.cxx/Makefile.in
 @V@/gdb/testsuite/gdb.c++/ambiguous.cc @V@/gdb/testsuite/gdb.cxx/ambiguous.cc
@@ -177,8 +177,6 @@
 @V@/gdb/testsuite/gdb.c++/method.exp @V@/gdb/testsuite/gdb.cxx/method.exp
 @V@/gdb/testsuite/gdb.c++/misc.cc @V@/gdb/testsuite/gdb.cxx/misc.cc
 @V@/gdb/testsuite/gdb.c++/misc.exp @V@/gdb/testsuite/gdb.cxx/misc.exp
-@V@/gdb/testsuite/gdb.c++/namespace.cc @V@/gdb/testsuite/gdb.cxx/namespace.cc
-@V@/gdb/testsuite/gdb.c++/namespace.exp @V@/gdb/testsuite/gdb.cxx/namespace.exp
 @V@/gdb/testsuite/gdb.c++/overload.cc @V@/gdb/testsuite/gdb.cxx/overload.cc
 @V@/gdb/testsuite/gdb.c++/overload.exp @V@/gdb/testsuite/gdb.cxx/overload.exp
 @V@/gdb/testsuite/gdb.c++/ovldbreak.cc @V@/gdb/testsuite/gdb.cxx/ovldbreak.cc
@@ -192,23 +190,19 @@
 @V@/gdb/testsuite/gdb.c++/virtfunc.cc @V@/gdb/testsuite/gdb.cxx/virtfunc.cc
 @V@/gdb/testsuite/gdb.c++/virtfunc.exp @V@/gdb/testsuite/gdb.cxx/virtfunc.exp
 @V@/gdb/testsuite/gdb.mi/mi-var-cmd.exp @V@/gdb/testsuite/gdb.mi/mi-varcmd.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-block.exp @V@/gdb/testsuite/gdb.mi/mi0varblock.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-child.exp @V@/gdb/testsuite/gdb.mi/mi0varchild.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-cmd.exp @V@/gdb/testsuite/gdb.mi/mi0varcmd.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-display.exp @V@/gdb/testsuite/gdb.mi/mi0vardisplay.exp
-@V@/gdb/tui/tuiSourceWin.c @V@/gdb/tui/tuiWinSource.c
-@V@/gdb/tui/tuiSourceWin.h @V@/gdb/tui/tuiWinSource.h
-@V@/intl/intlh.inst.in @V@/intl/intlh_inst.in
-@V@/intl/po2tbl.sed.in @V@/intl/po2tblsed.in
+@V@/gdb/testsuite/.gdbinit @V@/gdb/testsuite/gdb.ini
+@V@/sim/ppc/.gdbinit @V@/sim/ppc/gdb.ini
+@V@/tcl/cygwin/tclConfig.sh.in @V@/tcl/cygwin/tclConfig.sh-in
+@V@/tcl/mac/tclMacProjects.sea.hqx @V@/tcl/mac/tclMacProjects.shqx
+@V@/tcl/unix/tclConfig.sh.in @V@/tcl/unix/tclConfig.sh-in
+@V@/tk/doc/tk4.0.ps @V@/tk/doc/tk4-0.ps
+@V@/tk/mac/tkMacProjects.sit.hqx @V@/tk/mac/tkMacProjects.shqx
+@V@/tk/unix/tkConfig.sh.in @V@/tk/unix/tkConfig.sh-in
 @V@/itcl/itcl/itclConfig.sh.in @V@/itcl/itcl/itclConfig.sh-in
 @V@/itcl/itcl/unix/pkgIndex.tcl.in @V@/itcl/itcl/unix/pkgIndex.t-in
 @V@/itcl/itk/itkConfig.sh.in @V@/itcl/itk/itkConfig.sh-in
 @V@/itcl/itk/unix/pkgIndex.tcl.in @V@/itcl/itk/unix/pkgIndex.t-in
 @V@/itcl/iwidgets3.0.0 @V@/itcl/iwidgets3.0-0
-@V@/itcl/iwidgets3.0.0/demos/extfileselectionbox @V@/itcl/iwidgets3.0-0/demos/efselbox
-@V@/itcl/iwidgets3.0.0/demos/extfileselectiondialog @V@/itcl/iwidgets3.0-0/demos/efseldialog
-@V@/itcl/iwidgets3.0.0/demos/fileselectionbox @V@/itcl/iwidgets3.0-0/demos/fselectbox
-@V@/itcl/iwidgets3.0.0/demos/fileselectiondialog @V@/itcl/iwidgets3.0-0/demos/fselectdialog
 @V@/itcl/iwidgets3.0.0/demos/html/buttonbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/buttonbox.n-html
 @V@/itcl/iwidgets3.0.0/demos/html/canvasprintbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/cprintbox.n-html
 @V@/itcl/iwidgets3.0.0/demos/html/canvasprintdialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/cprintdialog.n-html
@@ -245,61 +239,73 @@
 @V@/itcl/iwidgets3.0.0/demos/html/tabnotebook.n.html @V@/itcl/iwidgets3.0-0/demos/html/tabnotebook.n-html
 @V@/itcl/iwidgets3.0.0/demos/html/tabset.n.html @V@/itcl/iwidgets3.0-0/demos/html/tabset.n-html
 @V@/itcl/iwidgets3.0.0/demos/html/toolbar.n.html @V@/itcl/iwidgets3.0-0/demos/html/toolbar.n-html
-@V@/itcl/iwidgets3.0.0/demos/scrolledcanvas @V@/itcl/iwidgets3.0-0/demos/scrolcanvas
-@V@/itcl/iwidgets3.0.0/demos/scrolledframe @V@/itcl/iwidgets3.0-0/demos/scrolframe
-@V@/itcl/iwidgets3.0.0/demos/scrolledhtml @V@/itcl/iwidgets3.0-0/demos/scrolhtml
-@V@/itcl/iwidgets3.0.0/demos/scrolledlistbox @V@/itcl/iwidgets3.0-0/demos/scroldlistbox
-@V@/itcl/iwidgets3.0.0/demos/scrolledtext @V@/itcl/iwidgets3.0-0/demos/scroltext
-@V@/itcl/iwidgets3.0.0/demos/selectionbox @V@/itcl/iwidgets3.0-0/demos/selectbox
-@V@/itcl/iwidgets3.0.0/demos/selectiondialog @V@/itcl/iwidgets3.0-0/demos/selectdialog
-@V@/itcl/iwidgets3.0.0/doc/canvasprintbox.n @V@/itcl/iwidgets3.0-0/doc/cprintbox.n
-@V@/itcl/iwidgets3.0.0/doc/canvasprintdialog.n @V@/itcl/iwidgets3.0-0/doc/cprintdialog.n
-@V@/itcl/iwidgets3.0.0/doc/extfileselectionbox.n @V@/itcl/iwidgets3.0-0/doc/efselbox.n
-@V@/itcl/iwidgets3.0.0/doc/extfileselectiondialog.n @V@/itcl/iwidgets3.0-0/doc/efseldialog.n
-@V@/itcl/iwidgets3.0.0/doc/fileselectionbox.n @V@/itcl/iwidgets3.0-0/doc/fselectbox.n
-@V@/itcl/iwidgets3.0.0/doc/fileselectiondialog.n @V@/itcl/iwidgets3.0-0/doc/fselectdialog.n
 @V@/itcl/iwidgets3.0.0/doc/scopedobject.n.backup @V@/itcl/iwidgets3.0-0/doc/scopedobject.n-backup
-@V@/itcl/iwidgets3.0.0/doc/scrolledcanvas.n @V@/itcl/iwidgets3.0-0/doc/scrolcanvas.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledframe.n @V@/itcl/iwidgets3.0-0/doc/scrolframe.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledhtml.n @V@/itcl/iwidgets3.0-0/doc/scrolhtml.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledlistbox.n @V@/itcl/iwidgets3.0-0/doc/scrollistbox.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledtext.n @V@/itcl/iwidgets3.0-0/doc/scroltext.n
-@V@/itcl/iwidgets3.0.0/doc/selectionbox.n @V@/itcl/iwidgets3.0-0/doc/selectbox.n
-@V@/itcl/iwidgets3.0.0/doc/selectiondialog.n @V@/itcl/iwidgets3.0-0/doc/selectdialog.n
-@V@/itcl/iwidgets3.0.0/generic/canvasprintbox.itk @V@/itcl/iwidgets3.0-0/generic/cprintbox.itk
-@V@/itcl/iwidgets3.0.0/generic/canvasprintdialog.itk @V@/itcl/iwidgets3.0-0/generic/cprintdialog.itk
-@V@/itcl/iwidgets3.0.0/generic/extfileselectionbox.itk @V@/itcl/iwidgets3.0-0/generic/efselbox.itk
-@V@/itcl/iwidgets3.0.0/generic/extfileselectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/efseldialog.itk
-@V@/itcl/iwidgets3.0.0/generic/fileselectionbox.itk @V@/itcl/iwidgets3.0-0/generic/fselectbox.itk
-@V@/itcl/iwidgets3.0.0/generic/fileselectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/fselectdialog.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledcanvas.itk @V@/itcl/iwidgets3.0-0/generic/scrolcanvas.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledframe.itk @V@/itcl/iwidgets3.0-0/generic/scrolframe.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledhtml.itk @V@/itcl/iwidgets3.0-0/generic/scrolhtml.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledlistbox.itk @V@/itcl/iwidgets3.0-0/generic/scrollistbox.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledtext.itk @V@/itcl/iwidgets3.0-0/generic/scroltext.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledwidget.itk @V@/itcl/iwidgets3.0-0/generic/scrolwidget.itk
-@V@/itcl/iwidgets3.0.0/generic/selectionbox.itk @V@/itcl/iwidgets3.0-0/generic/selectbox.itk
-@V@/itcl/iwidgets3.0.0/generic/selectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/selectdialog.itk
-@V@/itcl/iwidgets3.0.0/tests/canvasprintbox.test @V@/itcl/iwidgets3.0-0/tests/cprintbox.test
-@V@/itcl/iwidgets3.0.0/tests/canvasprintdialog.test @V@/itcl/iwidgets3.0-0/tests/cprintdialog.test
-@V@/itcl/iwidgets3.0.0/tests/extfileselectionbox.test @V@/itcl/iwidgets3.0-0/tests/efselbox.test
-@V@/itcl/iwidgets3.0.0/tests/extfileselectiondialog.test @V@/itcl/iwidgets3.0-0/tests/efseldialog.test
-@V@/itcl/iwidgets3.0.0/tests/fileselectionbox.test @V@/itcl/iwidgets3.0-0/tests/fselectbox.test
-@V@/itcl/iwidgets3.0.0/tests/fileselectiondialog.test @V@/itcl/iwidgets3.0-0/tests/fselectdialog.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledcanvas.test @V@/itcl/iwidgets3.0-0/tests/scrolcanvas.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledframe.test @V@/itcl/iwidgets3.0-0/tests/scrolframe.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledhtml.test @V@/itcl/iwidgets3.0-0/tests/scrolhtml.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledlistbox.test @V@/itcl/iwidgets3.0-0/tests/scrollistbox.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledtext.test @V@/itcl/iwidgets3.0-0/tests/scroltext.test
-@V@/itcl/iwidgets3.0.0/tests/selectionbox.test @V@/itcl/iwidgets3.0-0/tests/selectbox.test
-@V@/itcl/iwidgets3.0.0/tests/selectiondialog.test @V@/itcl/iwidgets3.0-0/tests/selectdialog.test
 @V@/itcl/iwidgets3.0.0/unix/iwidgets.tcl.in @V@/itcl/iwidgets3.0-0/unix/iwidgets.t-in
 @V@/itcl/iwidgets3.0.0/unix/pkgIndex.tcl.in @V@/itcl/iwidgets3.0-0/unix/pkgIndex.t-in
+@V@/tix/tixConfig.sh.in @V@/tix/tixConfig.sh-in
+@V@/tix/docs/Release-4.1.0.html @V@/tix/docs/Rel4_10.html
+@V@/tix/docs/Release-4.1.0.txt @V@/tix/docs/Rel4_10.txt
+@V@/tix/docs/Release-4.1a2.html @V@/tix/docs/Rel4_1a2.html
+@V@/tix/docs/Release-4.1a2.txt @V@/tix/docs/Rel4_1a2.txt
+@V@/tix/docs/Release-4.1a3.html @V@/tix/docs/Rel4_1a3.html
+@V@/tix/docs/Release-4.1a3.txt @V@/tix/docs/Rel4_1a3.txt
+@V@/tix/docs/Release-4.1b1.html @V@/tix/docs/Rel4_1b1.html
+@V@/tix/docs/Release-4.1b1.txt @V@/tix/docs/Rel4_1b1.txt
+@V@/tix/docs/Release-4.1b2.html @V@/tix/docs/Rel4_1b2.html
+@V@/tix/docs/Release-4.1b2.txt @V@/tix/docs/Rel4_1b2.txt
+@V@/tix/unix/tk4.2/pkgIndex.tcl.in @V@/tix/unix/tk4.2/pkgIndex.t-in
+@V@/tix/unix/tk8.0/pkgIndex.tcl.in @V@/tix/unix/tk8.0/pkgIndex.t-in
+@V@/tix/unix/tk8.1/pkgIndex.tcl.in @V@/tix/unix/tk8.1/pkgIndex.t-in
 @V@/libgui/config.h.in @V@/libgui/config.h-in
-@V@/libgui/src/tkTableCell.c @V@/libgui/src/tkTabCell.c
-@V@/libgui/src/tkTableCmd.c @V@/libgui/src/tkTabCmd.c
-@V@/libgui/src/tkWinPrintCanvas.c @V@/libgui/src/tkWPrtCanvas.c
-@V@/libgui/src/tkWinPrintText.c @V@/libgui/src/tkWPrtText.c
+@V@/expect/Dbg_cf.h.in @V@/expect/Dbg_cf.h-in
+@V@/expect/expect_cf.h.in @V@/expect/expect_cf.h-in
+@V@/expect/example/beer.exp.out @V@/expect/example/beer_exp.out
+@V@/expect/example/chesslib++.c @V@/expect/example/chesslibxx.c
+@V@/expect/example/chesslib.c @V@/expect/example/chesslb.c
+@V@/dejagnu/contrib/test-g++ @V@/dejagnu/contrib/test-gxx
+@V@/dejagnu/doc/.cvsignore @V@/dejagnu/doc/_cvsignore
+@V@/dejagnu/example/calc/calc.h.in @V@/dejagnu/example/calc/calc.h-in
+@V@/itcl/iwidgets3.0.0/generic/canvasprintbox.itk @V@/itcl/iwidgets3.0-0/generic/cprintbox.itk
+@V@/itcl/iwidgets3.0.0/generic/canvasprintdialog.itk @V@/itcl/iwidgets3.0-0/generic/cprintdialog.itk
+@V@/itcl/iwidgets3.0.0/doc/canvasprintbox.n @V@/itcl/iwidgets3.0-0/doc/cprintbox.n
+@V@/itcl/iwidgets3.0.0/doc/canvasprintdialog.n @V@/itcl/iwidgets3.0-0/doc/cprintdialog.n
+@V@/itcl/iwidgets3.0.0/tests/canvasprintbox.test @V@/itcl/iwidgets3.0-0/tests/cprintbox.test
+@V@/itcl/iwidgets3.0.0/tests/canvasprintdialog.test @V@/itcl/iwidgets3.0-0/tests/cprintdialog.test
+@V@/expect/example/chesslib2.c @V@/expect/example/chesslb2.c
+@V@/tk/doc/ConfigWidg.3 @V@/tk/doc/CfgWidg.3
+@V@/tk/doc/ConfigWind.3 @V@/tk/doc/CfgWind.3
+@V@/bfd/cpu-ia64-opc.c @V@/bfd/cpuia64-opc.c
+@V@/bfd/cpu-m68hc11.c @V@/bfd/cm68hc11.c
+@V@/bfd/cpu-m68hc12.c @V@/bfd/cm68hc12.c
+@V@/sim/m68hc11/dv-m68hc11eepr.c @V@/sim/m68hc11/dv-eepr.c
+@V@/sim/m68hc11/dv-m68hc11sio.c @V@/sim/m68hc11/dv-sio.c
+@V@/sim/m68hc11/dv-m68hc11spi.c @V@/sim/m68hc11/dv-spi.c
+@V@/sim/m68hc11/dv-m68hc11tim.c @V@/sim/m68hc11/dv-tim.c
+@V@/bfd/efi-app-ia32.c @V@/bfd/efi-ia32-app.c
+@V@/bfd/efi-app-ia64.c @V@/bfd/efi-ia64-app.c
+@V@/bfd/elf32-m68hc11.c @V@/bfd/em68hc11.c
+@V@/bfd/elf32-m68hc12.c @V@/bfd/em68hc12.c
+@V@/bfd/elf32-m68k.c @V@/bfd/em68k.c
+@V@/tcl/doc/ExprLongObj.3 @V@/tcl/doc/ExprLObj.3
+@V@/expect/exp_main_sub.c @V@/expect/exp_m_sub.c
+@V@/expect/exp_main_tk.c @V@/expect/exp_m_tk.c
+@V@/expect/example/chesslibxx.c @V@/expect/example/chesslbxx.c
+@V@/itcl/iwidgets3.0.0/demos/extfileselectionbox @V@/itcl/iwidgets3.0-0/demos/efselbox
+@V@/itcl/iwidgets3.0.0/demos/extfileselectiondialog @V@/itcl/iwidgets3.0-0/demos/efseldialog
+@V@/itcl/iwidgets3.0.0/generic/extfileselectionbox.itk @V@/itcl/iwidgets3.0-0/generic/efselbox.itk
+@V@/itcl/iwidgets3.0.0/generic/extfileselectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/efseldialog.itk
+@V@/itcl/iwidgets3.0.0/doc/extfileselectionbox.n @V@/itcl/iwidgets3.0-0/doc/efselbox.n
+@V@/itcl/iwidgets3.0.0/doc/extfileselectiondialog.n @V@/itcl/iwidgets3.0-0/doc/efseldialog.n
+@V@/itcl/iwidgets3.0.0/tests/extfileselectionbox.test @V@/itcl/iwidgets3.0-0/tests/efselbox.test
+@V@/itcl/iwidgets3.0.0/tests/extfileselectiondialog.test @V@/itcl/iwidgets3.0-0/tests/efseldialog.test
+@V@/itcl/iwidgets3.0.0/demos/fileselectionbox @V@/itcl/iwidgets3.0-0/demos/fselectbox
+@V@/itcl/iwidgets3.0.0/demos/fileselectiondialog @V@/itcl/iwidgets3.0-0/demos/fselectdialog
+@V@/itcl/iwidgets3.0.0/generic/fileselectionbox.itk @V@/itcl/iwidgets3.0-0/generic/fselectbox.itk
+@V@/itcl/iwidgets3.0.0/generic/fileselectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/fselectdialog.itk
+@V@/itcl/iwidgets3.0.0/doc/fileselectionbox.n @V@/itcl/iwidgets3.0-0/doc/fselectbox.n
+@V@/itcl/iwidgets3.0.0/doc/fileselectiondialog.n @V@/itcl/iwidgets3.0-0/doc/fselectdialog.n
+@V@/itcl/iwidgets3.0.0/tests/fileselectionbox.test @V@/itcl/iwidgets3.0-0/tests/fselectbox.test
+@V@/itcl/iwidgets3.0.0/tests/fileselectiondialog.test @V@/itcl/iwidgets3.0-0/tests/fselectdialog.test
 @V@/opcodes/ChangeLog-9297 @V@/opcodes/ChangeLog.9297
 @V@/opcodes/ChangeLog-9899 @V@/opcodes/ChangeLog.9899
 @V@/opcodes/ia64-opc-a.c @V@/opcodes/ia64opca.c
@@ -312,106 +318,82 @@
 @V@/opcodes/ia64-opc.c @V@/opcodes/ia64-opc.c
 @V@/opcodes/m68hc11-dis.c @V@/opcodes/m68hc11dis.c
 @V@/opcodes/m68hc11-opc.c @V@/opcodes/m68hc11opc.c
-@V@/opcodes/openris-dis.c @V@/opcodes/orisc-dis.c
 @V@/opcodes/openrisc-asm.c @V@/opcodes/orisc-asm.c
 @V@/opcodes/openrisc-desc.c @V@/opcodes/orisc-desc.c
+@V@/opcodes/openris-dis.c @V@/opcodes/orisc-dis.c
 @V@/opcodes/openrisc-ibld.c @V@/opcodes/orisc-ibld.c
 @V@/opcodes/openrisc-opc.c @V@/opcodes/orisc-opc.c
 @V@/opcodes/openrisc-opc.h @V@/opcodes/orisc-opc.h
-@V@/readline/config.h.bot @V@/readline/config.h-bot
-@V@/readline/config.h.in @V@/readline/config.h-in
-@V@/sim/m68hc11/dv-m68hc11eepr.c @V@/sim/m68hc11/dv-eepr.c
-@V@/sim/m68hc11/dv-m68hc11sio.c @V@/sim/m68hc11/dv-sio.c
-@V@/sim/m68hc11/dv-m68hc11spi.c @V@/sim/m68hc11/dv-spi.c
-@V@/sim/m68hc11/dv-m68hc11tim.c @V@/sim/m68hc11/dv-tim.c
-@V@/sim/mips/dv-tx3904irc.c @V@/sim/mips/dv-tx3irc.c
-@V@/sim/mips/dv-tx3904sio.c @V@/sim/mips/dv-tx3sio.c
-@V@/sim/mips/dv-tx3904tmr.c @V@/sim/mips/dv-tx3tmr.c
-@V@/sim/mn10300/dv-mn103int.c @V@/sim/mn10300/dv-mn1int.c
-@V@/sim/mn10300/dv-mn103iop.c @V@/sim/mn10300/dv-mn1iop.c
-@V@/sim/mn10300/dv-mn103ser.c @V@/sim/mn10300/dv-mn1ser.c
-@V@/sim/mn10300/dv-mn103tim.c @V@/sim/mn10300/dv-mn1tim.c
-@V@/sim/ppc/.gdbinit @V@/sim/ppc/gdb.ini
-@V@/sim/ppc/corefile-n.h @V@/sim/ppc/corefle-n.h
-@V@/sim/ppc/idecode_branch.h @V@/sim/ppc/idec_branch.h
-@V@/sim/ppc/idecode_expression.h @V@/sim/ppc/idec_expression.h
-@V@/sim/ppc/idecode_fields.h @V@/sim/ppc/idec_fields.h
-@V@/sim/ppc/sim-endian-n.h @V@/sim/ppc/sim-endn.h
-@V@/sim/testsuite/d10v-elf/t-ae-ld-d.s @V@/sim/testsuite/d10v-elf/t-ld-d.s
-@V@/sim/testsuite/d10v-elf/t-ae-ld-i.s @V@/sim/testsuite/d10v-elf/t-ld-i.s
-@V@/sim/testsuite/d10v-elf/t-ae-ld-id.s @V@/sim/testsuite/d10v-elf/t-ld-id.s
-@V@/sim/testsuite/d10v-elf/t-ae-ld-im.s @V@/sim/testsuite/d10v-elf/t-ld-im.s
-@V@/sim/testsuite/d10v-elf/t-ae-ld-ip.s @V@/sim/testsuite/d10v-elf/t-ld-ip.s
-@V@/sim/testsuite/d10v-elf/t-ae-ld2w-d.s @V@/sim/testsuite/d10v-elf/t-ld2-d.s
-@V@/sim/testsuite/d10v-elf/t-ae-ld2w-i.s @V@/sim/testsuite/d10v-elf/t-ld2-i.s
-@V@/sim/testsuite/d10v-elf/t-ae-ld2w-id.s @V@/sim/testsuite/d10v-elf/t-ld2-id.s
-@V@/sim/testsuite/d10v-elf/t-ae-ld2w-im.s @V@/sim/testsuite/d10v-elf/t-ld2-im.s
-@V@/sim/testsuite/d10v-elf/t-ae-ld2w-ip.s @V@/sim/testsuite/d10v-elf/t-ld2-ip.s
-@V@/sim/testsuite/d10v-elf/t-ae-st-d.s @V@/sim/testsuite/d10v-elf/t-st-d.s
-@V@/sim/testsuite/d10v-elf/t-ae-st-i.s @V@/sim/testsuite/d10v-elf/t-st-i.s
-@V@/sim/testsuite/d10v-elf/t-ae-st-id.s @V@/sim/testsuite/d10v-elf/t-st-id.s
-@V@/sim/testsuite/d10v-elf/t-ae-st-im.s @V@/sim/testsuite/d10v-elf/t-st-im.s
-@V@/sim/testsuite/d10v-elf/t-ae-st-ip.s @V@/sim/testsuite/d10v-elf/t-st-ip.s
-@V@/sim/testsuite/d10v-elf/t-ae-st-is.s @V@/sim/testsuite/d10v-elf/t-st-is.s
-@V@/sim/testsuite/d10v-elf/t-ae-st2w-d.s @V@/sim/testsuite/d10v-elf/t-st2-d.s
-@V@/sim/testsuite/d10v-elf/t-ae-st2w-i.s @V@/sim/testsuite/d10v-elf/t-st2-i.s
-@V@/sim/testsuite/d10v-elf/t-ae-st2w-id.s @V@/sim/testsuite/d10v-elf/t-st2-id.s
-@V@/sim/testsuite/d10v-elf/t-ae-st2w-im.s @V@/sim/testsuite/d10v-elf/t-st2-im.s
-@V@/sim/testsuite/d10v-elf/t-ae-st2w-ip.s @V@/sim/testsuite/d10v-elf/t-st2-ip.s
-@V@/sim/testsuite/d10v-elf/t-ae-st2w-is.s @V@/sim/testsuite/d10v-elf/t-st2-is.s
-@V@/sim/testsuite/d30v-elf/ls-ld4bhu.S @V@/sim/testsuite/d30v-elf/ls-ld4bu.S
-@V@/tcl/cygwin/tclConfig.sh.in @V@/tcl/cygwin/tclConfig.sh-in
-@V@/tcl/doc/ExprLongObj.3 @V@/tcl/doc/ExprLObj.3
-@V@/tcl/mac/tclMacBOAAppInit.c @V@/tcl/mac/tclBOAAppInit.c
-@V@/tcl/mac/tclMacBOAMain.c @V@/tcl/mac/tclBOAMain.c
-@V@/tcl/mac/tclMacInit.c @V@/tcl/mac/tclInit.c
-@V@/tcl/mac/tclMacInterupt.c @V@/tcl/mac/tclInterupt.c
-@V@/tcl/mac/tclMacProjects.sea.hqx @V@/tcl/mac/tclMacProjects.shqx
+@V@/dejagnu/baseboards/mn10200-cygmon.exp @V@/dejagnu/baseboards/mn10200cygmon.exp
+@V@/dejagnu/baseboards/mn10200-sim.exp @V@/dejagnu/baseboards/mn10200sim.exp
+@V@/dejagnu/baseboards/mn10300-cygmon.exp @V@/dejagnu/baseboards/mn10300cygmon.exp
+@V@/dejagnu/baseboards/mn10300-sim.exp @V@/dejagnu/baseboards/mn10300sim.exp
 @V@/tcl/tests/namespace-old.test @V@/tcl/tests/namespace.otest
-@V@/tcl/unix/tclConfig.sh.in @V@/tcl/unix/tclConfig.sh-in
-@V@/tcl/unix/tclLoadAix.c @V@/tcl/unix/tclLdAix.c
-@V@/tcl/unix/tclLoadAout.c @V@/tcl/unix/tclLdAout.c
-@V@/tcl/unix/tclLoadDl.c @V@/tcl/unix/tclLdDl.c
-@V@/tcl/unix/tclLoadDld.c @V@/tcl/unix/tclLdDld.c
-@V@/tcl/unix/tclUnixFCmd.c @V@/tcl/unix/tclFCmd.c
-@V@/tcl/unix/tclUnixFile.c @V@/tcl/unix/tclFile.c
-@V@/tcl/unix/tclUnixTest.c @V@/tcl/unix/tclTest.c
-@V@/tcl/unix/tclUnixTime.c @V@/tcl/unix/tclTime.c
-@V@/tix/docs/Release-4.1.0.html @V@/tix/docs/Rel4_10.html
-@V@/tix/docs/Release-4.1.0.txt @V@/tix/docs/Rel4_10.txt
-@V@/tix/docs/Release-4.1a2.html @V@/tix/docs/Rel4_1a2.html
-@V@/tix/docs/Release-4.1a2.txt @V@/tix/docs/Rel4_1a2.txt
-@V@/tix/docs/Release-4.1a3.html @V@/tix/docs/Rel4_1a3.html
-@V@/tix/docs/Release-4.1a3.txt @V@/tix/docs/Rel4_1a3.txt
-@V@/tix/docs/Release-4.1b1.html @V@/tix/docs/Rel4_1b1.html
-@V@/tix/docs/Release-4.1b1.txt @V@/tix/docs/Rel4_1b1.txt
-@V@/tix/docs/Release-4.1b2.html @V@/tix/docs/Rel4_1b2.html
-@V@/tix/docs/Release-4.1b2.txt @V@/tix/docs/Rel4_1b2.txt
-@V@/tix/tixConfig.sh.in @V@/tix/tixConfig.sh-in
-@V@/tix/unix/tk4.2/pkgIndex.tcl.in @V@/tix/unix/tk4.2/pkgIndex.t-in
+@V@/tk/tests/option.file1 @V@/tk/tests/option1.file
+@V@/tk/tests/option.file2 @V@/tk/tests/option2.file
 @V@/tix/unix/tk8.0/pkgIndex.tcl.in @V@/tix/unix/tk8.0/pkgIndex.t-in
-@V@/tix/unix/tk8.0/pkgIndex.tcl.in @V@/tix/unix/tk8.0/pkgIndex.t-in
-@V@/tix/unix/tk8.1/pkgIndex.tcl.in @V@/tix/unix/tk8.1/pkgIndex.t-in
-@V@/tix/win/tkConsole41.c @V@/tix/win/tkCon41.c
-@V@/tix/win/tkConsole42.c @V@/tix/win/tkCon42.c
-@V@/tix/win/tkConsole80a1.c @V@/tix/win/tkCon80a1.c
-@V@/tix/win/tkConsole80b1.c @V@/tix/win/tkCon80b1.c
-@V@/tix/win/tkConsole81.c @V@/tix/win/tkCon81.c
-@V@/tk/doc/ConfigWidg.3 @V@/tk/doc/CfgWidg.3
-@V@/tk/doc/ConfigWind.3 @V@/tk/doc/CfgWind.3
-@V@/tk/doc/tk4.0.ps @V@/tk/doc/tk4-0.ps
+@V@/dejagnu/baseboards/powerpc-bug1.exp @V@/dejagnu/baseboards/powerpc1-bug.exp
+@V@/dejagnu/baseboards/powerpc-sim.exp @V@/dejagnu/baseboards/powerpcsim.exp
 @V@/tk/library/images/pwrdLogo100.gif @V@/tk/library/images/pwLogo100.gif
 @V@/tk/library/images/pwrdLogo150.gif @V@/tk/library/images/pwLogo150.gif
 @V@/tk/library/images/pwrdLogo175.gif @V@/tk/library/images/pwLogo175.gif
 @V@/tk/library/images/pwrdLogo200.gif @V@/tk/library/images/pwLogo200.gif
 @V@/tk/library/images/pwrdLogo75.gif @V@/tk/library/images/pwLogo75.gif
+@V@/itcl/iwidgets3.0.0/demos/scrolledcanvas @V@/itcl/iwidgets3.0-0/demos/scrolcanvas
+@V@/itcl/iwidgets3.0.0/demos/scrolledframe @V@/itcl/iwidgets3.0-0/demos/scrolframe
+@V@/itcl/iwidgets3.0.0/demos/scrolledhtml @V@/itcl/iwidgets3.0-0/demos/scrolhtml
+@V@/itcl/iwidgets3.0.0/demos/scrolledlistbox @V@/itcl/iwidgets3.0-0/demos/scroldlistbox
+@V@/itcl/iwidgets3.0.0/demos/scrolledtext @V@/itcl/iwidgets3.0-0/demos/scroltext
+@V@/itcl/iwidgets3.0.0/generic/scrolledcanvas.itk @V@/itcl/iwidgets3.0-0/generic/scrolcanvas.itk
+@V@/itcl/iwidgets3.0.0/generic/scrolledframe.itk @V@/itcl/iwidgets3.0-0/generic/scrolframe.itk
+@V@/itcl/iwidgets3.0.0/generic/scrolledhtml.itk @V@/itcl/iwidgets3.0-0/generic/scrolhtml.itk
+@V@/itcl/iwidgets3.0.0/generic/scrolledlistbox.itk @V@/itcl/iwidgets3.0-0/generic/scrollistbox.itk
+@V@/itcl/iwidgets3.0.0/generic/scrolledtext.itk @V@/itcl/iwidgets3.0-0/generic/scroltext.itk
+@V@/itcl/iwidgets3.0.0/generic/scrolledwidget.itk @V@/itcl/iwidgets3.0-0/generic/scrolwidget.itk
+@V@/itcl/iwidgets3.0.0/doc/scrolledcanvas.n @V@/itcl/iwidgets3.0-0/doc/scrolcanvas.n
+@V@/itcl/iwidgets3.0.0/doc/scrolledframe.n @V@/itcl/iwidgets3.0-0/doc/scrolframe.n
+@V@/itcl/iwidgets3.0.0/doc/scrolledhtml.n @V@/itcl/iwidgets3.0-0/doc/scrolhtml.n
+@V@/itcl/iwidgets3.0.0/doc/scrolledlistbox.n @V@/itcl/iwidgets3.0-0/doc/scrollistbox.n
+@V@/itcl/iwidgets3.0.0/doc/scrolledtext.n @V@/itcl/iwidgets3.0-0/doc/scroltext.n
+@V@/itcl/iwidgets3.0.0/tests/scrolledcanvas.test @V@/itcl/iwidgets3.0-0/tests/scrolcanvas.test
+@V@/itcl/iwidgets3.0.0/tests/scrolledframe.test @V@/itcl/iwidgets3.0-0/tests/scrolframe.test
+@V@/itcl/iwidgets3.0.0/tests/scrolledhtml.test @V@/itcl/iwidgets3.0-0/tests/scrolhtml.test
+@V@/itcl/iwidgets3.0.0/tests/scrolledlistbox.test @V@/itcl/iwidgets3.0-0/tests/scrollistbox.test
+@V@/itcl/iwidgets3.0.0/tests/scrolledtext.test @V@/itcl/iwidgets3.0-0/tests/scroltext.test
+@V@/itcl/iwidgets3.0.0/demos/selectionbox @V@/itcl/iwidgets3.0-0/demos/selectbox
+@V@/itcl/iwidgets3.0.0/demos/selectiondialog @V@/itcl/iwidgets3.0-0/demos/selectdialog
+@V@/itcl/iwidgets3.0.0/generic/selectionbox.itk @V@/itcl/iwidgets3.0-0/generic/selectbox.itk
+@V@/itcl/iwidgets3.0.0/generic/selectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/selectdialog.itk
+@V@/itcl/iwidgets3.0.0/doc/selectionbox.n @V@/itcl/iwidgets3.0-0/doc/selectbox.n
+@V@/itcl/iwidgets3.0.0/doc/selectiondialog.n @V@/itcl/iwidgets3.0-0/doc/selectdialog.n
+@V@/itcl/iwidgets3.0.0/tests/selectionbox.test @V@/itcl/iwidgets3.0-0/tests/selectbox.test
+@V@/itcl/iwidgets3.0.0/tests/selectiondialog.test @V@/itcl/iwidgets3.0-0/tests/selectdialog.test
+@V@/dejagnu/baseboards/sparclite-coff.exp @V@/dejagnu/baseboards/sl-coff.exp
+@V@/dejagnu/baseboards/sparclite-cygmon.exp @V@/dejagnu/baseboards/sl-cygmon.exp
+@V@/dejagnu/baseboards/sparclite-sim-le.exp @V@/dejagnu/baseboards/sl-sim-le.exp
+@V@/dejagnu/baseboards/sparclite-sim.exp @V@/dejagnu/baseboards/sl-sim.exp
+@V@/tcl/unix/tclLoadAix.c @V@/tcl/unix/tclLdAix.c
+@V@/tcl/unix/tclLoadAout.c @V@/tcl/unix/tclLdAout.c
+@V@/tcl/unix/tclLoadDl.c @V@/tcl/unix/tclLdDl.c
+@V@/tcl/unix/tclLoadDld.c @V@/tcl/unix/tclLdDld.c
+@V@/tcl/mac/tclMacBOAAppInit.c @V@/tcl/mac/tclBOAAppInit.c
+@V@/tcl/mac/tclMacBOAMain.c @V@/tcl/mac/tclBOAMain.c
+@V@/tcl/mac/tclMacInit.c @V@/tcl/mac/tclInit.c
+@V@/tcl/mac/tclMacInterupt.c @V@/tcl/mac/tclInterupt.c
+@V@/tcl/unix/tclUnixFCmd.c @V@/tcl/unix/tclFCmd.c
+@V@/tcl/unix/tclUnixFile.c @V@/tcl/unix/tclFile.c
+@V@/tcl/unix/tclUnixTest.c @V@/tcl/unix/tclTest.c
+@V@/tcl/unix/tclUnixTime.c @V@/tcl/unix/tclTime.c
+@V@/tix/win/tkConsole41.c @V@/tix/win/tkCon41.c
+@V@/tix/win/tkConsole42.c @V@/tix/win/tkCon42.c
+@V@/tix/win/tkConsole80a1.c @V@/tix/win/tkCon80a1.c
+@V@/tix/win/tkConsole80b1.c @V@/tix/win/tkCon80b1.c
+@V@/tix/win/tkConsole81.c @V@/tix/win/tkCon81.c
 @V@/tk/mac/tkMacMenu.c @V@/tk/mac/tkMenu.c
 @V@/tk/mac/tkMacMenubutton.c @V@/tk/mac/tkMenubutton.c
 @V@/tk/mac/tkMacMenus.c @V@/tk/mac/tkMenus.c
-@V@/tk/mac/tkMacProjects.sit.hqx @V@/tk/mac/tkMacProjects.shqx
-@V@/tk/tests/option.file1 @V@/tk/tests/option1.file
-@V@/tk/tests/option.file2 @V@/tk/tests/option2.file
-@V@/tk/unix/tkConfig.sh.in @V@/tk/unix/tkConfig.sh-in
+@V@/libgui/src/tkTableCell.c @V@/libgui/src/tkTabCell.c
+@V@/libgui/src/tkTableCmd.c @V@/libgui/src/tkTabCmd.c
 @V@/tk/unix/tkUnixFocus.c @V@/tk/unix/tkFocus.c
 @V@/tk/unix/tkUnixFont.c @V@/tk/unix/tkFont.c
 @V@/tk/unix/tkUnixMenu.c @V@/tk/unix/tkMenu.c
@@ -420,3 +402,15 @@
 @V@/tk/unix/tkUnixScrlbr.c @V@/tk/unix/tkScrlbr.c
 @V@/tk/unix/tkUnixSelect.c @V@/tk/unix/tkSelect.c
 @V@/tk/unix/tkUnixSend.c @V@/tk/unix/tkSend.c
+@V@/libgui/src/tkWinPrintCanvas.c @V@/libgui/src/tkWPrtCanvas.c
+@V@/libgui/src/tkWinPrintText.c @V@/libgui/src/tkWPrtText.c
+@V@/gdb/gdbtk/generic/ChangeLog-1997 @V@/gdb/gdbtk/generic/ChangeLog.97
+@V@/gdb/gdbtk/generic/ChangeLog-1998 @V@/gdb/gdbtk/generic/ChangeLog.98
+@V@/gdb/gdbtk/generic/ChangeLog-1999 @V@/gdb/gdbtk/generic/ChangeLog.99
+@V@/gdb/gdbtk/generic/ChangeLog-2000 @V@/gdb/gdbtk/generic/ChangeLog.000
+@V@/gdb/gdbtk/generic/ChangeLog-2001 @V@/gdb/gdbtk/generic/ChangeLog.001
+@V@/gdb/gdbtk/library/ChangeLog-1997 @V@/gdb/gdbtk/library/ChangeLog.97
+@V@/gdb/gdbtk/library/ChangeLog-1998 @V@/gdb/gdbtk/library/ChangeLog.98
+@V@/gdb/gdbtk/library/ChangeLog-1999 @V@/gdb/gdbtk/library/ChangeLog.99
+@V@/gdb/gdbtk/library/ChangeLog-2000 @V@/gdb/gdbtk/library/ChangeLog.000
+@V@/gdb/gdbtk/library/ChangeLog-2001 @V@/gdb/gdbtk/library/ChangeLog.001
diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h
index f040680..846401b 100644
--- a/gdb/config/h8500/tm-h8500.h
+++ b/gdb/config/h8500/tm-h8500.h
@@ -283,8 +283,8 @@
 extern CORE_ADDR h8500_read_fp (void);
 extern void h8500_write_fp (CORE_ADDR);
 
-extern CORE_ADDR h8500_read_pc (ptid_t);
-extern void h8500_write_pc (CORE_ADDR, ptid_t);
+extern CORE_ADDR h8500_read_pc (int);
+extern void h8500_write_pc (CORE_ADDR, int);
 
 #define TARGET_READ_SP() h8500_read_sp()
 #define TARGET_WRITE_SP(x) h8500_write_sp(x)
diff --git a/gdb/config/i386/nm-i386sol2.h b/gdb/config/i386/nm-i386sol2.h
index 0e6b3ef..68e890d 100644
--- a/gdb/config/i386/nm-i386sol2.h
+++ b/gdb/config/i386/nm-i386sol2.h
@@ -44,17 +44,17 @@
    step anyway.  */
 #define CANNOT_STEP_HW_WATCHPOINTS
 
-extern int procfs_stopped_by_watchpoint (ptid_t);
+extern int procfs_stopped_by_watchpoint (int);
 #define STOPPED_BY_WATCHPOINT(W) \
-  procfs_stopped_by_watchpoint(inferior_ptid)
+  procfs_stopped_by_watchpoint(inferior_pid)
 
 /* Use these macros for watchpoint insertion/deletion.  */
 /* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
 
-extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
+extern int procfs_set_watchpoint (int, CORE_ADDR, int, int, int);
 #define target_insert_watchpoint(ADDR, LEN, TYPE) \
-        procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 1)
+        procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 1)
 #define target_remove_watchpoint(ADDR, LEN, TYPE) \
-        procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0)
+        procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0)
 
 #endif /* NEW_PROC_API */
diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h
index 1ba216b..dcdbc03 100644
--- a/gdb/config/i386/nm-linux.h
+++ b/gdb/config/i386/nm-linux.h
@@ -90,8 +90,8 @@
 #undef PREPARE_TO_PROCEED
 #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
 
-extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose);
-#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose))
+extern void lin_lwp_attach_lwp (int pid, int verbose);
+#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose))
 
 #include <signal.h>
 
diff --git a/gdb/config/i386/nm-ptx4.h b/gdb/config/i386/nm-ptx4.h
index 32b76d2..2f0d2da 100644
--- a/gdb/config/i386/nm-ptx4.h
+++ b/gdb/config/i386/nm-ptx4.h
@@ -42,7 +42,7 @@
 
 #define CHILD_WAIT
 struct target_waitstatus;
-extern ptid_t child_wait (ptid_t, struct target_waitstatus *);
+extern int child_wait (int, struct target_waitstatus *);
 
 /*
  * ptx does attach as of ptx version 2.1.  Prior to that, the interface
diff --git a/gdb/config/i386/nm-symmetry.h b/gdb/config/i386/nm-symmetry.h
index a589a3d..da9ed81 100644
--- a/gdb/config/i386/nm-symmetry.h
+++ b/gdb/config/i386/nm-symmetry.h
@@ -32,7 +32,7 @@
 
 #ifdef _SEQUENT_
 #define CHILD_WAIT
-extern ptid_t child_wait (ptid_t, struct target_waitstatus *);
+extern int child_wait (int, struct target_waitstatus *);
 #endif
 
 /* This is the amount to subtract from u.u_ar0
diff --git a/gdb/config/i386/tm-cygwin.h b/gdb/config/i386/tm-cygwin.h
index 287b8e0..b66e3c7 100644
--- a/gdb/config/i386/tm-cygwin.h
+++ b/gdb/config/i386/tm-cygwin.h
@@ -38,7 +38,7 @@
 #define ADD_SHARED_SYMBOL_FILES dll_symbol_command
 
 struct target_ops;
-char *cygwin_pid_to_str (ptid_t ptid);
+char *cygwin_pid_to_str (int pid);
 void child_solib_add (char *, int, struct target_ops *);
 char *child_solib_loaded_library_pathname(int);
 void child_clear_solibs (void);
diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h
index 9248f18..8939d86 100644
--- a/gdb/config/i386/tm-i386.h
+++ b/gdb/config/i386/tm-i386.h
@@ -238,17 +238,23 @@
 /* Largest value REGISTER_VIRTUAL_SIZE can have.  */
 #define MAX_REGISTER_VIRTUAL_SIZE 16
 
-/* Return the GDB type object for the "standard" data type of data in
-   register REGNUM.  */
+/* Return the GDB type object for the "standard" data type of data in 
+   register N.  Perhaps si and di should go here, but potentially they
+   could be used for things other than address.  */
 
-#define REGISTER_VIRTUAL_TYPE(regnum) i386_register_virtual_type (regnum)
-extern struct type *i386_register_virtual_type (int regnum);
+#define REGISTER_VIRTUAL_TYPE(N)				\
+  (((N) == PC_REGNUM || (N) == FP_REGNUM || (N) == SP_REGNUM)	\
+   ? lookup_pointer_type (builtin_type_void)			\
+   : IS_FP_REGNUM(N) ? builtin_type_long_double			\
+   : IS_SSE_REGNUM(N) ? builtin_type_v4sf			\
+   : builtin_type_int)
 
-/* Return true iff register REGNUM's virtual format is different from
-   its raw format.  */
-
-#define REGISTER_CONVERTIBLE(regnum) i386_register_convertible (regnum)
-extern int i386_register_convertible (int regnum);
+/* REGISTER_CONVERTIBLE(N) is true iff register N's virtual format is
+   different from its raw format.  Note that this definition assumes
+   that the host supports IEEE 32-bit floats, since it doesn't say
+   that SSE registers need conversion.  Even if we can't find a
+   counterexample, this is still sloppy.  */
+#define REGISTER_CONVERTIBLE(n) (IS_FP_REGNUM (n))
 
 /* Convert data from raw format for register REGNUM in buffer FROM to
    virtual format with type TYPE in buffer TO.  */
@@ -330,10 +336,15 @@
   i386_frameless_function_invocation (frame)
 extern int i386_frameless_function_invocation (struct frame_info *frame);
 
-/* Return the saved program counter for FRAME.  */
+/* Saved Pc.  Get it from sigcontext if within sigtramp.  */
 
-#define FRAME_SAVED_PC(frame) i386_frame_saved_pc (frame)
-extern CORE_ADDR i386_frame_saved_pc (struct frame_info *frame);
+#define FRAME_SAVED_PC(FRAME) \
+  (((FRAME)->signal_handler_caller \
+    ? sigtramp_saved_pc (FRAME) \
+    : read_memory_unsigned_integer ((FRAME)->frame + 4, 4)) \
+   )
+
+extern CORE_ADDR sigtramp_saved_pc (struct frame_info *);
 
 #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
 
diff --git a/gdb/config/i386/tm-i386sco5.h b/gdb/config/i386/tm-i386sco5.h
index e4cb014..0fcf177 100644
--- a/gdb/config/i386/tm-i386sco5.h
+++ b/gdb/config/i386/tm-i386sco5.h
@@ -52,12 +52,12 @@
 #define HAVE_STEPPABLE_WATCHPOINT
 
 #define STOPPED_BY_WATCHPOINT(W)  \
-  i386_stopped_by_watchpoint (PIDGET (inferior_ptid))
+  i386_stopped_by_watchpoint (inferior_pid)
 
 #define target_insert_watchpoint(addr, len, type)  \
-  i386_insert_watchpoint (PIDGET (inferior_ptid), addr, len, type)
+  i386_insert_watchpoint (inferior_pid, addr, len, type)
 
 #define target_remove_watchpoint(addr, len, type)  \
-  i386_remove_watchpoint (PIDGET (inferior_ptid), addr, len)
+  i386_remove_watchpoint (inferior_pid, addr, len)
 
 #endif /* ifndef TM_I386SCO5_H */
diff --git a/gdb/config/i386/tm-i386sol2.h b/gdb/config/i386/tm-i386sol2.h
index bc2a5f8..50d869d 100644
--- a/gdb/config/i386/tm-i386sol2.h
+++ b/gdb/config/i386/tm-i386sol2.h
@@ -51,4 +51,11 @@
 
 #define FAULTED_USE_SIGINFO
 
+/* Macros to extract process id and thread id from a composite pid/tid.
+   Allocate lower 16 bits for process id, next 15 bits for thread id, and
+   one bit for a flag to indicate a user thread vs. a kernel thread.  */
+#define PIDGET(PID)		(((PID) & 0xffff))
+#define TIDGET(PID)		(((PID) & 0x7fffffff) >> 16)
+#define MERGEPID(PID, TID)	(((PID) & 0xffff) | ((TID) << 16))
+
 #endif /* ifndef TM_I386SOL2_H */
diff --git a/gdb/config/i386/tm-i386v.h b/gdb/config/i386/tm-i386v.h
index 57e3d8a..c451bf8 100644
--- a/gdb/config/i386/tm-i386v.h
+++ b/gdb/config/i386/tm-i386v.h
@@ -1,6 +1,6 @@
 /* Macro definitions for i386, Unix System V.
    Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1998, 1999,
-   2000, 2001 Free Software Foundation, Inc.
+   2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -81,4 +81,10 @@
 #undef  FRAME_NUM_ARGS
 #define FRAME_NUM_ARGS(fi) (-1)
 
+/* Forward decl's for prototypes */
+struct frame_info;
+struct frame_saved_regs;
+
+extern int i386_frame_num_args (struct frame_info *);
+
 #endif /* ifndef TM_I386V_H */
diff --git a/gdb/config/i386/tm-i386v42mp.h b/gdb/config/i386/tm-i386v42mp.h
index 5671e42..e6588e4 100644
--- a/gdb/config/i386/tm-i386v42mp.h
+++ b/gdb/config/i386/tm-i386v42mp.h
@@ -30,7 +30,6 @@
 
 #define UNIXWARE
 
-#if 0
 /* The following macros extract process and lwp/thread ids from a
    composite id.
 
@@ -61,33 +60,5 @@
 
 /* Return whether PID contains a user-space thread id. */
 #define ISTID(PID)              ((PID) & 0x40000000)
-#endif
-
-/* New definitions of the ptid stuff.  Due to the way the
-   code is structured in uw-thread.c, I'm overloading the thread id
-   and lwp id onto the lwp field.  The tid field is used to indicate
-   whether the lwp is a tid or not.  
-   
-   FIXME: Check that core file support is not broken.  (See original
-   #if 0'd comments above.)
-   FIXME: Restructure uw-thread.c so that the struct ptid fields
-   can be used as intended. */
-
-/* Return the process id stored in composite PID. */
-#define PIDGET(PID) (ptid_get_pid (PID))
-
-/* Return the thread or lwp id stored in composite PID. */
-#define TIDGET(PID) (ptid_get_lwp (PID))
-#define LIDGET(PID) TIDGET(PID)
-
-#define MERGEPID(PID, LID) (ptid_build ((PID), (LID), 0))
-#define MKLID(PID, LID) (ptid_build ((PID), (LID), 0))
-
-/* Construct a composite id from thread TID and the process portion of
-   composite PID. */
-#define MKTID(PID, TID) (ptid_build ((PID), (TID), 1))
-
-/* Return whether PID contains a user-space thread id. */
-#define ISTID(PID) (ptid_get_tid (PID))
 
 #endif /* ifndef TM_I386V42MP_H */
diff --git a/gdb/config/i386/xm-cygwin.h b/gdb/config/i386/xm-cygwin.h
index a1662d2..1e210c7 100644
--- a/gdb/config/i386/xm-cygwin.h
+++ b/gdb/config/i386/xm-cygwin.h
@@ -24,6 +24,11 @@
 
 #define GDBINIT_FILENAME "gdb.ini"
 
+#define SLASH_P(X) ((X)=='\\' || (X) == '/')
+#define ROOTED_P(X) ((SLASH_P((X)[0]))|| ((X)[1] ==':'))
+#define SLASH_CHAR '/'
+#define SLASH_STRING "/"
+
 /* Define this if source files use \r\n rather than just \n.  */
 #define CRLF_SOURCE_FILES
 
diff --git a/gdb/config/i386/xm-go32.h b/gdb/config/i386/xm-go32.h
index eed9207..79b8f27 100644
--- a/gdb/config/i386/xm-go32.h
+++ b/gdb/config/i386/xm-go32.h
@@ -24,8 +24,17 @@
 
 #define GDBINIT_FILENAME "gdb.ini"
 
+#define SLASH_P(X) ((X)=='\\' || (X) == '/')
+
+#define ROOTED_P(X) ((SLASH_P((X)[0])) || ((X)[0] && (X)[1] ==':'))
+
+#define SLASH_CHAR '/'
+#define SLASH_STRING "/"
+
 #define CRLF_SOURCE_FILES
 
 #define DIRNAME_SEPARATOR ';'
 
+#define HOST_I386
+
 #define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
diff --git a/gdb/config/i386/xm-linux.h b/gdb/config/i386/xm-linux.h
index 8dc48e2..36cf15c 100644
--- a/gdb/config/i386/xm-linux.h
+++ b/gdb/config/i386/xm-linux.h
@@ -22,6 +22,8 @@
 #ifndef XM_LINUX_H
 #define XM_LINUX_H
 
+#define HOST_I386
+
 #define HOST_BYTE_ORDER LITTLE_ENDIAN
 
 #define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
diff --git a/gdb/config/ia64/nm-linux.h b/gdb/config/ia64/nm-linux.h
index 3d55b36..232db3c 100644
--- a/gdb/config/ia64/nm-linux.h
+++ b/gdb/config/ia64/nm-linux.h
@@ -63,18 +63,17 @@
 #define HAVE_STEPPABLE_WATCHPOINT 1
 
 #define STOPPED_BY_WATCHPOINT(W) \
-  ia64_linux_stopped_by_watchpoint (inferior_ptid)
-extern CORE_ADDR ia64_linux_stopped_by_watchpoint (ptid_t ptid);
+  ia64_linux_stopped_by_watchpoint (inferior_pid)
+extern CORE_ADDR ia64_linux_stopped_by_watchpoint (int);
 
 #define target_insert_watchpoint(addr, len, type) \
-  ia64_linux_insert_watchpoint (inferior_ptid, addr, len, type)
-extern int ia64_linux_insert_watchpoint (ptid_t ptid, CORE_ADDR addr,
+  ia64_linux_insert_watchpoint (inferior_pid, addr, len, type)
+extern int ia64_linux_insert_watchpoint (int pid, CORE_ADDR addr,
                                          int len, int rw);
 
 #define target_remove_watchpoint(addr, len, type) \
-  ia64_linux_remove_watchpoint (inferior_ptid, addr, len)
-extern int ia64_linux_remove_watchpoint (ptid_t ptid, CORE_ADDR addr,
-                                         int len);
+  ia64_linux_remove_watchpoint (inferior_pid, addr, len)
+extern int ia64_linux_remove_watchpoint (int pid, CORE_ADDR addr, int len);
 
 /* FIXME: kettenis/2000-09-03: This should be moved to ../nm-linux.h
    once we have converted all Linux targets to use the new threads
@@ -84,8 +83,8 @@
 #undef PREPARE_TO_PROCEED
 #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
 
-extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose);
-#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose))
+extern void lin_lwp_attach_lwp (int pid, int verbose);
+#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose))
 
 #include <signal.h>
 
diff --git a/gdb/config/m68k/nm-hp300bsd.h b/gdb/config/m68k/nm-hp300bsd.h
index e0f7a11..2e1b69e 100644
--- a/gdb/config/m68k/nm-hp300bsd.h
+++ b/gdb/config/m68k/nm-hp300bsd.h
@@ -40,7 +40,7 @@
 /* U_REGS_OFFSET is the offset of the registers within the u area for
    ptrace purposes.  */
 #define U_REGS_OFFSET \
-  ptrace (PT_READ_U, PIDGET (inferior_ptid), \
+  ptrace (PT_READ_U, inferior_pid, \
 	  (PTRACE_ARG3_TYPE) \
 	   (offsetof (struct user, u_kproc.kp_proc.p_md.md_regs)), 0) \
     - USRSTACK
diff --git a/gdb/config/mips/irix6.mh b/gdb/config/mips/irix6.mh
deleted file mode 100644
index f2817a9..0000000
--- a/gdb/config/mips/irix6.mh
+++ /dev/null
@@ -1,8 +0,0 @@
-# Host: SGI Iris running irix 6.x
-XDEPFILES=
-XM_FILE= xm-irix6.h
-NAT_FILE= nm-irix6.h
-NATDEPFILES= fork-child.o solib.o irix5-nat.o corelow.o procfs.o \
-	proc-api.o proc-events.o proc-flags.o proc-why.o
-
-XM_CLIBS=-lbsd
diff --git a/gdb/config/mips/irix6.mt b/gdb/config/mips/irix6.mt
deleted file mode 100644
index c5c5cce..0000000
--- a/gdb/config/mips/irix6.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: MIPS SGI running Irix 6.x
-TDEPFILES= mips-tdep.o
-TM_FILE= tm-irix6.h
diff --git a/gdb/config/mips/nm-irix4.h b/gdb/config/mips/nm-irix4.h
index 9c02eb3..894d33f 100644
--- a/gdb/config/mips/nm-irix4.h
+++ b/gdb/config/mips/nm-irix4.h
@@ -51,17 +51,17 @@
    GDB to step over the watchpoint. */
 
 #define STOPPED_BY_WATCHPOINT(W) \
-  procfs_stopped_by_watchpoint(inferior_ptid)
-extern int procfs_stopped_by_watchpoint (ptid_t);
+  procfs_stopped_by_watchpoint(inferior_pid)
+extern int procfs_stopped_by_watchpoint (int);
 
 #define HAVE_NONSTEPPABLE_WATCHPOINT
 
 /* Use these macros for watchpoint insertion/deletion.  */
 /* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
 #define target_insert_watchpoint(ADDR, LEN, TYPE) \
-     procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 0)
+     procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 0)
 #define target_remove_watchpoint(ADDR, LEN, TYPE) \
-     procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0)
-extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
+     procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0)
+extern int procfs_set_watchpoint (int, CORE_ADDR, int, int, int);
 
 #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
diff --git a/gdb/config/mips/nm-irix5.h b/gdb/config/mips/nm-irix5.h
index bed3144..1b22e17 100644
--- a/gdb/config/mips/nm-irix5.h
+++ b/gdb/config/mips/nm-irix5.h
@@ -31,17 +31,17 @@
    GDB to step over the watchpoint. */
 
 #define STOPPED_BY_WATCHPOINT(W) \
-     procfs_stopped_by_watchpoint(inferior_ptid)
-extern int procfs_stopped_by_watchpoint (ptid_t);
+     procfs_stopped_by_watchpoint(inferior_pid)
+extern int procfs_stopped_by_watchpoint (int);
 
 #define HAVE_NONSTEPPABLE_WATCHPOINT
 
 /* Use these macros for watchpoint insertion/deletion.  */
 /* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
 #define target_insert_watchpoint(ADDR, LEN, TYPE) \
-     procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 0)
+     procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 0)
 #define target_remove_watchpoint(ADDR, LEN, TYPE) \
-     procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0)
-extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
+     procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0)
+extern int procfs_set_watchpoint (int, CORE_ADDR, int, int, int);
 
 #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
diff --git a/gdb/config/mips/nm-irix6.h b/gdb/config/mips/nm-irix6.h
deleted file mode 100644
index 301b629..0000000
--- a/gdb/config/mips/nm-irix6.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Definitions for native support of irix6.
-
-   Copyright 2001 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.  */
-
-#include "mips/nm-irix5.h"
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
deleted file mode 100644
index 2d90b2e..0000000
--- a/gdb/config/mips/tm-irix6.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Target machine description for SGI Iris under Irix 6.x, for GDB.
-   Copyright 2001
-   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.  */
-
-#include "mips/tm-bigmips.h"
-
-/* SGI's assembler doesn't grok dollar signs in identifiers.
-   So we use dots instead.  This item must be coordinated with G++. */
-#undef CPLUS_MARKER
-#define CPLUS_MARKER '.'
-
-/* Redefine register numbers for SGI. */
-
-#undef NUM_REGS
-#undef MIPS_REGISTER_NAMES
-#undef FP0_REGNUM
-#undef PC_REGNUM
-#undef HI_REGNUM
-#undef LO_REGNUM
-#undef CAUSE_REGNUM
-#undef BADVADDR_REGNUM
-#undef FCRCS_REGNUM
-#undef FCRIR_REGNUM
-#undef FP_REGNUM
-
-/* Number of machine registers */
-
-#define NUM_REGS 71
-
-/* Initializer for an array of names of registers.
-   There should be NUM_REGS strings in this initializer.  */
-
-#define MIPS_REGISTER_NAMES 	\
-    {	"zero",	"at",	"v0",	"v1",	"a0",	"a1",	"a2",	"a3", \
-	"a4",	"a5",	"a6",	"a7",	"t0",	"t1",	"t2",	"t3", \
-	"s0",	"s1",	"s2",	"s3",	"s4",	"s5",	"s6",	"s7", \
-	"t8",	"t9",	"k0",	"k1",	"gp",	"sp",	"s8",	"ra", \
-	"f0",   "f1",   "f2",   "f3",   "f4",   "f5",   "f6",   "f7", \
-	"f8",   "f9",   "f10",  "f11",  "f12",  "f13",  "f14",  "f15", \
-	"f16",  "f17",  "f18",  "f19",  "f20",  "f21",  "f22",  "f23",\
-	"f24",  "f25",  "f26",  "f27",  "f28",  "f29",  "f30",  "f31",\
-	"pc",	"cause", "bad",	"hi",	"lo",	"fsr",  "fir" \
-    }
-
-/* Register numbers of various important registers.
-   Note that some of these values are "real" register numbers,
-   and correspond to the general registers of the machine,
-   and some are "phony" register numbers which are too large
-   to be actual register numbers as far as the user is concerned
-   but do serve to get the desired values when passed to read_register.  */
-
-#define FP0_REGNUM 32		/* Floating point register 0 (single float) */
-#define PC_REGNUM 64		/* Contains program counter */
-#define CAUSE_REGNUM 65		/* describes last exception */
-#define BADVADDR_REGNUM 66	/* bad vaddr for addressing exception */
-#define HI_REGNUM 67		/* Multiple/divide temp */
-#define LO_REGNUM 68		/* ... */
-#define FCRCS_REGNUM 69		/* FP control/status */
-#define FCRIR_REGNUM 70		/* FP implementation/revision */
-#define FP_REGNUM 30		/* S8 register is the Frame Pointer */
-
-
-#undef  REGISTER_BYTES
-#define REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE)
-
-#undef  REGISTER_BYTE
-#define REGISTER_BYTE(N) \
-     (((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
-      ((N) < FP0_REGNUM + 32) ?     \
-      FP0_REGNUM * MIPS_REGSIZE + \
-      ((N) - FP0_REGNUM) * sizeof(double) : \
-      32 * sizeof(double) + ((N) - 32) * MIPS_REGSIZE)
-
-#undef  REGISTER_VIRTUAL_TYPE
-#define REGISTER_VIRTUAL_TYPE(N) \
-	(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \
-	 : ((N) == 32 /*SR*/) ? builtin_type_uint32 \
-	 : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
-	 : builtin_type_int)
-
-#undef  MIPS_LAST_ARG_REGNUM
-#define MIPS_LAST_ARG_REGNUM 11	/* N32 uses R4 through R11 for args */
-
-/* MIPS_STACK_ARGSIZE -- how many bytes does a pushed function arg take
-   up on the stack? For the n32 ABI, eight bytes are reserved for each
-   register. Like MIPS_SAVED_REGSIZE but different. */
-#define MIPS_DEFAULT_STACK_ARGSIZE 8
-
-/* N32 does not reserve home space for registers used to carry
-   parameters. */
-#define MIPS_REGS_HAVE_HOME_P 0
-
-/* Force N32 ABI as the default. */
-#define MIPS_DEFAULT_ABI MIPS_ABI_N32
-
-
-/* The signal handler trampoline is called _sigtramp.  */
-#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
-
-/* Offsets for register values in _sigtramp frame.
-   sigcontext is immediately above the _sigtramp frame on Irix.  */
-#undef SIGFRAME_BASE
-#define SIGFRAME_BASE		0
-
-/* Irix 5 saves a full 64 bits for each register.  We skip 2 * 4 to
-   get to the saved PC (the register mask and status register are both
-   32 bits) and then another 4 to get to the lower 32 bits.  We skip
-   the same 4 bytes, plus the 8 bytes for the PC to get to the
-   registers, and add another 4 to get to the lower 32 bits.  We skip
-   8 bytes per register.  */
-#undef SIGFRAME_PC_OFF
-#define SIGFRAME_PC_OFF		(SIGFRAME_BASE + 2 * 4 + 4)
-#undef SIGFRAME_REGSAVE_OFF
-#define SIGFRAME_REGSAVE_OFF	(SIGFRAME_BASE + 2 * 4 + 8 + 4)
-#undef SIGFRAME_FPREGSAVE_OFF
-#define SIGFRAME_FPREGSAVE_OFF	(SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4)
-#define SIGFRAME_REG_SIZE	8
-
-/* Select the disassembler */
-#undef TM_PRINT_INSN_MACH
-#define TM_PRINT_INSN_MACH bfd_mach_mips8000
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index a865e96..447c9e7 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -55,6 +55,11 @@
 
 #define DEFAULT_MIPS_TYPE "generic"
 
+/* Remove useless bits from an instruction address.  */
+
+#define ADDR_BITS_REMOVE(addr) mips_addr_bits_remove(addr)
+CORE_ADDR mips_addr_bits_remove (CORE_ADDR addr);
+
 /* Remove useless bits from the stack pointer.  */
 
 #define TARGET_READ_SP() ADDR_BITS_REMOVE (read_register (SP_REGNUM))
@@ -383,6 +388,15 @@
 #define CALL_DUMMY_ADDRESS() (mips_call_dummy_address ())
 extern CORE_ADDR mips_call_dummy_address (void);
 
+/* There's a mess in stack frame creation.  See comments in blockframe.c
+   near reference to INIT_FRAME_PC_FIRST.  */
+
+#define	INIT_FRAME_PC(fromleaf, prev)	/* nada */
+
+#define INIT_FRAME_PC_FIRST(fromleaf, prev) \
+   mips_init_frame_pc_first(fromleaf, prev)
+extern void mips_init_frame_pc_first (int, struct frame_info *);
+
 /* Special symbol found in blocks associated with routines.  We can hang
    mips_extra_func_info_t's off of this.  */
 
@@ -502,6 +516,3 @@
 /* MIPS sign extends addresses */
 #define POINTER_TO_ADDRESS(TYPE,BUF) (signed_pointer_to_address (TYPE, BUF))
 #define ADDRESS_TO_POINTER(TYPE,BUF,ADDR) (address_to_signed_pointer (TYPE, BUF, ADDR))
-
-/* Single step based on where the current instruction will take us.  */
-extern void mips_software_single_step (enum target_signal, int);
diff --git a/gdb/config/mips/xm-irix6.h b/gdb/config/mips/xm-irix6.h
deleted file mode 100644
index a8a4c68..0000000
--- a/gdb/config/mips/xm-irix6.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Definitions for irix6 hosting support.
-
-   Copyright 2001 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.  */
-
-#include "mips/xm-irix5.h"
diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h
index 5178015..33e22ba 100644
--- a/gdb/config/mn10300/tm-mn10300.h
+++ b/gdb/config/mn10300/tm-mn10300.h
@@ -43,10 +43,12 @@
 #define REGISTER_RAW_SIZE(REG) 4
 #endif
 
-#define D0_REGNUM 0
+#define MAX_REGISTER_VIRTUAL_SIZE 4
+
+#define REGISTER_BYTES (NUM_REGS * REGISTER_SIZE)
+
 #define D2_REGNUM 2
 #define D3_REGNUM 3
-#define A0_REGNUM 4
 #define A2_REGNUM 6
 #define A3_REGNUM 7
 #define SP_REGNUM 8
@@ -55,25 +57,113 @@
 #define PSW_REGNUM 11
 #define LIR_REGNUM 12
 #define LAR_REGNUM 13
-#define MDRQ_REGNUM 14
 #define E0_REGNUM 15
-#define MCRH_REGNUM 26
-#define MCRL_REGNUM 27
-#define MCVF_REGNUM 28
 
-enum movm_register_bits {
-  movm_exother_bit = 0x01,
-  movm_exreg1_bit  = 0x02,
-  movm_exreg0_bit  = 0x04,
-  movm_other_bit   = 0x08,
-  movm_a3_bit      = 0x10,
-  movm_a2_bit      = 0x20,
-  movm_d3_bit      = 0x40,
-  movm_d2_bit      = 0x80
-};
+/* Pseudo register that contains true address of executing stack frame */
+#define FP_REGNUM 31
 
+/* BREAKPOINT_FROM_PC uses the program counter value to determine the
+   breakpoint that should be used */
+extern breakpoint_from_pc_fn mn10300_breakpoint_from_pc;
+#define BREAKPOINT_FROM_PC(pcptr, lenptr) mn10300_breakpoint_from_pc (pcptr, lenptr)
+
+#define FUNCTION_START_OFFSET 0
+
+#define DECR_PC_AFTER_BREAK 0
+
+#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
+
+extern CORE_ADDR mn10300_saved_pc_after_call (struct frame_info *frame);
+#define SAVED_PC_AFTER_CALL(frame) \
+  mn10300_saved_pc_after_call (frame)
+
+struct frame_info;
+struct type;
+struct value;
+
+extern void mn10300_init_extra_frame_info (struct frame_info *);
+#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) mn10300_init_extra_frame_info (fi)
 #define INIT_FRAME_PC		/* Not necessary */
 
+#define FRAME_INIT_SAVED_REGS(fi)	/* handled by init_extra_frame_info */
+
+extern CORE_ADDR mn10300_frame_chain (struct frame_info *);
+#define FRAME_CHAIN(fi) mn10300_frame_chain (fi)
+#define FRAME_CHAIN_VALID(FP, FI)	generic_file_frame_chain_valid (FP, FI)
+
+extern CORE_ADDR mn10300_find_callers_reg (struct frame_info *, int);
+extern CORE_ADDR mn10300_frame_saved_pc (struct frame_info *);
+#define FRAME_SAVED_PC(FI) (mn10300_frame_saved_pc (FI))
+
+/* Extract from an array REGBUF containing the (raw) register state
+   a function return value of type TYPE, and copy that, in virtual format,
+   into VALBUF. */
+
+extern void mn10300_extract_return_value (struct type *type, char *regbuf,
+					  char *valbuf);
+#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
+  mn10300_extract_return_value (TYPE, REGBUF, VALBUF)
+
+CORE_ADDR mn10300_extract_struct_value_address (char *regbuf);
+#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+  mn10300_extract_struct_value_address (REGBUF)
+
+void mn10300_store_return_value (struct type *type, char *valbuf);
+#define STORE_RETURN_VALUE(TYPE, VALBUF) \
+  mn10300_store_return_value (TYPE, VALBUF)
+
+
+extern CORE_ADDR mn10300_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
+#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \
+  (mn10300_store_struct_return (STRUCT_ADDR, SP))
+
+extern CORE_ADDR mn10300_skip_prologue (CORE_ADDR);
+#define SKIP_PROLOGUE(pc) (mn10300_skip_prologue (pc))
+
+#define FRAME_ARGS_SKIP 0
+
+#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
+#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
+#define FRAME_NUM_ARGS(fi) (-1)
+
+extern void mn10300_pop_frame (struct frame_info *);
+#define POP_FRAME mn10300_pop_frame (get_current_frame ())
+
+#define USE_GENERIC_DUMMY_FRAMES 1
+#define CALL_DUMMY                   {0}
+#define CALL_DUMMY_START_OFFSET      (0)
+#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
+#define CALL_DUMMY_LOCATION          AT_ENTRY_POINT
+#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
+#define CALL_DUMMY_ADDRESS()         entry_point_address ()
+
+#define TARGET_READ_FP() read_sp ()
+
+extern CORE_ADDR mn10300_push_return_address (CORE_ADDR, CORE_ADDR);
+#define PUSH_RETURN_ADDRESS(PC, SP)  mn10300_push_return_address (PC, SP)
+
+#define PUSH_DUMMY_FRAME	generic_push_dummy_frame ()
+#define SAVE_DUMMY_FRAME_TOS(SP) generic_save_dummy_frame_tos (SP)
+
+extern CORE_ADDR
+mn10300_push_arguments (int, struct value **, CORE_ADDR,
+			int, CORE_ADDR);
+#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
+  (mn10300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
+
+#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
+
+#define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
+	(TYPE_LENGTH (TYPE) > 8)
+
+extern use_struct_convention_fn mn10300_use_struct_convention;
+#define USE_STRUCT_CONVENTION(GCC_P, TYPE) mn10300_use_struct_convention (GCC_P, TYPE)
+
+/* override the default get_saved_register function with
+   one that takes account of generic CALL_DUMMY frames */
+#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
+    generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
+
 /* Cons up virtual frame pointer for trace */
 extern void mn10300_virtual_frame_pointer (CORE_ADDR, long *, long *);
 #define TARGET_VIRTUAL_FRAME_POINTER(PC, REGP, OFFP) \
diff --git a/gdb/config/nm-linux.h b/gdb/config/nm-linux.h
index f1e785c..131fd50 100644
--- a/gdb/config/nm-linux.h
+++ b/gdb/config/nm-linux.h
@@ -41,7 +41,7 @@
 extern void linuxthreads_new_objfile (struct objfile *objfile);
 
 /* Method to print a human-readable thread description */
-extern char *linuxthreads_pid_to_str (ptid_t ptid);
+extern char *linuxthreads_pid_to_str (int pid);
 
 extern int linuxthreads_prepare_to_proceed (int step);
 #define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1)
@@ -49,6 +49,13 @@
 /* Defined to make stepping-over-breakpoints be thread-atomic.  */
 #define USE_THREAD_STEP_NEEDED 1
 
+/* Macros to extract process id and thread id from a composite pid/tid.
+   Allocate lower 19 bits for process id, next 12 bits for thread id, and
+   one bit for a flag to indicate a user thread vs. a kernel thread.  */
+#define PIDGET(PID)           (((PID) & 0xffff))
+#define TIDGET(PID)           (((PID) & 0x7fffffff) >> 16)
+#define MERGEPID(PID, TID)    (((PID) & 0xffff) | ((TID) << 16))
+
 /* Use elf_gregset_t and elf_fpregset_t, rather than
    gregset_t and fpregset_t.  */
 
diff --git a/gdb/config/nm-lynx.h b/gdb/config/nm-lynx.h
index 1cd2bd1..034d2a0 100644
--- a/gdb/config/nm-lynx.h
+++ b/gdb/config/nm-lynx.h
@@ -71,8 +71,7 @@
 
 #include "target.h"
 
-extern ptid_t child_wait (ptid_t ptid,
-                                struct target_waitstatus *status);
+extern int child_wait (int pid, struct target_waitstatus *status);
 
 /* Lynx needs a special definition of this so that we can
    print out the pid and thread number seperately.  */
@@ -80,6 +79,6 @@
 
 /* override child_pid_to_str in inftarg.c */
 #define CHILD_PID_TO_STR
-extern char *lynx_pid_to_str (ptid_t ptid);
+extern char *lynx_pid_to_str (int pid);
 
 #endif /* NM_LYNX_H */
diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h
index 4894a04..f03a52b 100644
--- a/gdb/config/pa/nm-hppah.h
+++ b/gdb/config/pa/nm-hppah.h
@@ -219,21 +219,21 @@
 
 /* Use these macros for watchpoint insertion/deletion.  */
 #define target_insert_watchpoint(addr, len, type) \
-        hppa_insert_hw_watchpoint (PIDGET (inferior_ptid), addr, (LONGEST)(len), type)
+        hppa_insert_hw_watchpoint (inferior_pid, addr, (LONGEST)(len), type)
 
 #define target_remove_watchpoint(addr, len, type) \
-        hppa_remove_hw_watchpoint (PIDGET (inferior_ptid), addr, (LONGEST)(len), type)
+        hppa_remove_hw_watchpoint (inferior_pid, addr, (LONGEST)(len), type)
 
 /* We call our k-thread processes "threads", rather
  * than processes.  So we need a new way to print
  * the string.  Code is in hppah-nat.c.
  */
 
-extern char *child_pid_to_str (ptid_t);
+extern char *child_pid_to_str (pid_t);
 
-#define target_tid_to_str( ptid ) \
-        hppa_tid_to_str( ptid )
-extern char *hppa_tid_to_str (ptid_t);
+#define target_tid_to_str( pid ) \
+        hppa_tid_to_str( pid )
+extern char *hppa_tid_to_str (pid_t);
 
 /* For this, ID can be either a process or thread ID, and the function
    will describe it appropriately, returning the description as a printable
@@ -244,7 +244,7 @@
  */
 #define target_pid_or_tid_to_str(ID) \
         hppa_pid_or_tid_to_str (ID)
-extern char *hppa_pid_or_tid_to_str (ptid_t);
+extern char *hppa_pid_or_tid_to_str (pid_t);
 
 /* This is used when handling events caused by a call to vfork().  On ptrace-
    based HP-UXs, when you resume the vforked child, the parent automagically
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index c3c320e..4067ed3 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -568,7 +568,7 @@
 #else /* defined PA_LEVEL_0 */
 
 /* This is the call dummy for a level 0 PA.  Level 0's don't have space
-   registers (or floating point?), so we skip all that inter-space call stuff,
+   registers (or floating point??), so we skip all that inter-space call stuff,
    and avoid touching the fp regs.
 
    call_dummy
@@ -767,12 +767,12 @@
 #endif
 
 #define TARGET_READ_PC(pid) target_read_pc (pid)
-extern CORE_ADDR target_read_pc (ptid_t);
+extern CORE_ADDR target_read_pc (int);
 
 #define TARGET_WRITE_PC(v,pid) target_write_pc (v,pid)
-extern void target_write_pc (CORE_ADDR, ptid_t);
+extern void target_write_pc (CORE_ADDR, int);
 
-#define TARGET_READ_FP() target_read_fp (PIDGET (inferior_ptid))
+#define TARGET_READ_FP() target_read_fp (inferior_pid)
 extern CORE_ADDR target_read_fp (int);
 
 /* For a number of horrible reasons we may have to adjust the location
diff --git a/gdb/config/powerpc/nm-linux.h b/gdb/config/powerpc/nm-linux.h
index f37c58c..b0e8a2b 100644
--- a/gdb/config/powerpc/nm-linux.h
+++ b/gdb/config/powerpc/nm-linux.h
@@ -45,8 +45,8 @@
 #undef PREPARE_TO_PROCEED
 #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
 
-extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose);
-#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose))
+extern void lin_lwp_attach_lwp (int pid, int verbose);
+#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose))
 
 #include <signal.h>
 
diff --git a/gdb/config/powerpc/ppc-eabi.mt b/gdb/config/powerpc/ppc-eabi.mt
index 2751e1d..a142c86 100644
--- a/gdb/config/powerpc/ppc-eabi.mt
+++ b/gdb/config/powerpc/ppc-eabi.mt
@@ -1,3 +1,3 @@
 # Target: PowerPC running eabi
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o
+TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o
 TM_FILE= tm-ppc-eabi.h
diff --git a/gdb/config/powerpc/ppc-sim.mt b/gdb/config/powerpc/ppc-sim.mt
index a647cad..a798d10 100644
--- a/gdb/config/powerpc/ppc-sim.mt
+++ b/gdb/config/powerpc/ppc-sim.mt
@@ -1,5 +1,5 @@
 # Target: PowerPC running eabi and including the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o
+TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o
 TM_FILE= tm-ppc-eabi.h
 
 SIM_OBS = remote-sim.o
diff --git a/gdb/config/powerpc/ppcle-eabi.mt b/gdb/config/powerpc/ppcle-eabi.mt
index 202c6b1..6de3f1d 100644
--- a/gdb/config/powerpc/ppcle-eabi.mt
+++ b/gdb/config/powerpc/ppcle-eabi.mt
@@ -1,3 +1,3 @@
 # Target: PowerPC running eabi in little endian mode
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o
+TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o
 TM_FILE= tm-ppcle-eabi.h
diff --git a/gdb/config/powerpc/ppcle-sim.mt b/gdb/config/powerpc/ppcle-sim.mt
index e3be0d8..401a809 100644
--- a/gdb/config/powerpc/ppcle-sim.mt
+++ b/gdb/config/powerpc/ppcle-sim.mt
@@ -1,5 +1,5 @@
 # Target: PowerPC running eabi in little endian mode under the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o
+TDEPFILES= ser-ocd.o rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o
 TM_FILE= tm-ppcle-eabi.h
 
 SIM_OBS = remote-sim.o
diff --git a/gdb/config/rs6000/nm-rs6000.h b/gdb/config/rs6000/nm-rs6000.h
index 441b381..e4ee51c 100644
--- a/gdb/config/rs6000/nm-rs6000.h
+++ b/gdb/config/rs6000/nm-rs6000.h
@@ -44,9 +44,9 @@
    and figure out where the shared libraries have got to.  */
 
 #define	SOLIB_ADD(a, b, c)	\
-  if (PIDGET (inferior_ptid))	\
+  if (inferior_pid)	\
     /* Attach to process.  */  \
-    xcoff_relocate_symtab (PIDGET (inferior_ptid)); \
+    xcoff_relocate_symtab (inferior_pid); \
   else		\
     /* Core file.  */ \
     xcoff_relocate_core (c);
diff --git a/gdb/config/sparc/nm-sun4sol2.h b/gdb/config/sparc/nm-sun4sol2.h
index adc8231..51b5471 100644
--- a/gdb/config/sparc/nm-sun4sol2.h
+++ b/gdb/config/sparc/nm-sun4sol2.h
@@ -53,17 +53,17 @@
    It will *NOT* be necessary for GDB to step over the watchpoint. */
 #define HAVE_CONTINUABLE_WATCHPOINT
 
-extern int procfs_stopped_by_watchpoint (ptid_t);
+extern int procfs_stopped_by_watchpoint (int);
 #define STOPPED_BY_WATCHPOINT(W) \
-  procfs_stopped_by_watchpoint(inferior_ptid)
+  procfs_stopped_by_watchpoint(inferior_pid)
 
 /* Use these macros for watchpoint insertion/deletion.  */
 /* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
 
-extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int);
+extern int procfs_set_watchpoint (int, CORE_ADDR, int, int, int);
 #define target_insert_watchpoint(ADDR, LEN, TYPE) \
-        procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 1)
+        procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 1)
 #define target_remove_watchpoint(ADDR, LEN, TYPE) \
-        procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0)
+        procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0)
 
 #endif /* NEW_PROC_API */
diff --git a/gdb/config/sparc/tm-sun4sol2.h b/gdb/config/sparc/tm-sun4sol2.h
index e3c59f6..7642fe3 100644
--- a/gdb/config/sparc/tm-sun4sol2.h
+++ b/gdb/config/sparc/tm-sun4sol2.h
@@ -19,7 +19,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
+#define GDB_MULTI_ARCH 2
 
 #include "sparc/tm-sparc.h"
 #include "tm-sysv4.h"
@@ -80,3 +80,8 @@
 
 /* Enable handling of shared libraries for a.out executables.  */
 #define HANDLE_SVR4_EXEC_EMULATORS
+
+/* Macros to extract process id and thread id from a composite pid/tid */
+#define PIDGET(PID)		(((PID) & 0xffff))
+#define TIDGET(PID)		(((PID) & 0x7fffffff) >> 16)
+#define MERGEPID(PID, TID)	(((PID) & 0xffff) | ((TID) << 16))
diff --git a/gdb/configure b/gdb/configure
index faec838..16e6a37 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -79,7 +79,6 @@
 program_transform_name=s,x,x,
 silent=
 site=
-sitefile=
 srcdir=
 target=NONE
 verbose=
@@ -194,7 +193,6 @@
   --help                  print this message
   --no-create             do not create output files
   --quiet, --silent       do not print \`checking...' messages
-  --site-file=FILE        use FILE as the site file
   --version               print the version of autoconf that created configure
 Directory and file names:
   --prefix=PREFIX         install architecture-independent files in PREFIX
@@ -365,11 +363,6 @@
   -site=* | --site=* | --sit=*)
     site="$ac_optarg" ;;
 
-  -site-file | --site-file | --site-fil | --site-fi | --site-f)
-    ac_prev=sitefile ;;
-  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
-    sitefile="$ac_optarg" ;;
-
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -535,16 +528,12 @@
 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
-  if test -z "$CONFIG_SITE"; then
-    if test "x$prefix" != xNONE; then
-      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-    else
-      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-    fi
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
   fi
-else
-  CONFIG_SITE="$sitefile"
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
@@ -585,7 +574,7 @@
 
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:578: checking whether to enable maintainer-specific portions of Makefiles" >&5
     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
   enableval="$enable_maintainer_mode"
@@ -611,7 +600,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:615: checking for $ac_word" >&5
+echo "configure:604: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -641,7 +630,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:645: checking for $ac_word" >&5
+echo "configure:634: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -692,7 +681,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:696: checking for $ac_word" >&5
+echo "configure:685: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -724,7 +713,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -735,12 +724,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 739 "configure"
+#line 728 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -766,12 +755,12 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:775: checking whether we are using GNU C" >&5
+echo "configure:764: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -780,7 +769,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -799,7 +788,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:792: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -831,7 +820,7 @@
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:835: checking how to run the C preprocessor" >&5
+echo "configure:824: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -846,13 +835,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 850 "configure"
+#line 839 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:845: \"$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
   :
@@ -863,13 +852,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 867 "configure"
+#line 856 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:862: \"$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
   :
@@ -880,13 +869,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 884 "configure"
+#line 873 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:879: \"$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
   :
@@ -911,9 +900,9 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:915: checking for AIX" >&5
+echo "configure:904: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 917 "configure"
+#line 906 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -935,7 +924,7 @@
 
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:939: checking for POSIXized ISC" >&5
+echo "configure:928: checking for POSIXized ISC" >&5
 if test -d /etc/conf/kconfig.d &&
   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
 then
@@ -959,7 +948,7 @@
 
 
 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:952: checking for ${CC-cc} option to accept ANSI C" >&5
 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -975,7 +964,7 @@
 do
   CC="$ac_save_CC $ac_arg"
   cat > conftest.$ac_ext <<EOF
-#line 979 "configure"
+#line 968 "configure"
 #include "confdefs.h"
 #include <stdarg.h>
 #include <stdio.h>
@@ -1012,7 +1001,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_prog_cc_stdc="$ac_arg"; break
 else
@@ -1083,7 +1072,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1087: checking host system type" >&5
+echo "configure:1076: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1104,7 +1093,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1108: checking target system type" >&5
+echo "configure:1097: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1122,7 +1111,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1126: checking build system type" >&5
+echo "configure:1115: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1147,7 +1136,7 @@
 
 ALL_LINGUAS=
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1151: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1140: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1176,7 +1165,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1180: checking for $ac_word" >&5
+echo "configure:1169: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1204,12 +1193,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1208: checking for ANSI C header files" >&5
+echo "configure:1197: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1213 "configure"
+#line 1202 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1217,7 +1206,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1210: \"$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*
@@ -1234,7 +1223,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1238 "configure"
+#line 1227 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1252,7 +1241,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1256 "configure"
+#line 1245 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1273,7 +1262,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1277 "configure"
+#line 1266 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1284,7 +1273,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1308,12 +1297,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1312: checking for working const" >&5
+echo "configure:1301: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1317 "configure"
+#line 1306 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1362,7 +1351,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1383,21 +1372,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1387: checking for inline" >&5
+echo "configure:1376: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1394 "configure"
+#line 1383 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1423,12 +1412,12 @@
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1427: checking for off_t" >&5
+echo "configure:1416: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1432 "configure"
+#line 1421 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1456,12 +1445,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1460: checking for size_t" >&5
+echo "configure:1449: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1465 "configure"
+#line 1454 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1491,19 +1480,19 @@
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1495: checking for working alloca.h" >&5
+echo "configure:1484: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1500 "configure"
+#line 1489 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -1524,12 +1513,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1528: checking for alloca" >&5
+echo "configure:1517: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1533 "configure"
+#line 1522 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1557,7 +1546,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -1589,12 +1578,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1593: checking whether alloca needs Cray hooks" >&5
+echo "configure:1582: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1598 "configure"
+#line 1587 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1619,12 +1608,12 @@
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1623: checking for $ac_func" >&5
+echo "configure:1612: 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 1628 "configure"
+#line 1617 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1647,7 +1636,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1640: \"$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
@@ -1674,7 +1663,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1678: checking stack direction for C alloca" >&5
+echo "configure:1667: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1682,7 +1671,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1686 "configure"
+#line 1675 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1701,7 +1690,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -1726,17 +1715,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1730: checking for $ac_hdr" >&5
+echo "configure:1719: 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 1735 "configure"
+#line 1724 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1729: \"$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*
@@ -1765,12 +1754,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1769: checking for $ac_func" >&5
+echo "configure:1758: 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 1774 "configure"
+#line 1763 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1793,7 +1782,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1786: \"$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
@@ -1818,7 +1807,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1822: checking for working mmap" >&5
+echo "configure:1811: 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
@@ -1826,7 +1815,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1830 "configure"
+#line 1819 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1966,7 +1955,7 @@
 }
 
 EOF
-if { (eval echo configure:1970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1959: \"$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
@@ -1994,17 +1983,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1998: checking for $ac_hdr" >&5
+echo "configure:1987: 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 2003 "configure"
+#line 1992 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1997: \"$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*
@@ -2034,12 +2023,12 @@
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2038: checking for $ac_func" >&5
+echo "configure:2027: 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 2043 "configure"
+#line 2032 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2062,7 +2051,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2055: \"$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
@@ -2091,12 +2080,12 @@
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2095: checking for $ac_func" >&5
+echo "configure:2084: 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 2100 "configure"
+#line 2089 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2119,7 +2108,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2112: \"$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
@@ -2153,19 +2142,19 @@
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2157: checking for LC_MESSAGES" >&5
+echo "configure:2146: checking for LC_MESSAGES" >&5
 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2162 "configure"
+#line 2151 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_val_LC_MESSAGES=yes
 else
@@ -2186,7 +2175,7 @@
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2190: checking whether NLS is requested" >&5
+echo "configure:2179: checking whether NLS is requested" >&5
         # Check whether --enable-nls or --disable-nls was given.
 if test "${enable_nls+set}" = set; then
   enableval="$enable_nls"
@@ -2206,7 +2195,7 @@
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2210: checking whether included gettext is requested" >&5
+echo "configure:2199: checking whether included gettext is requested" >&5
       # Check whether --with-included-gettext or --without-included-gettext was given.
 if test "${with_included_gettext+set}" = set; then
   withval="$with_included_gettext"
@@ -2225,17 +2214,17 @@
 
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2229: checking for libintl.h" >&5
+echo "configure:2218: checking for libintl.h" >&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 2234 "configure"
+#line 2223 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2228: \"$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*
@@ -2252,19 +2241,19 @@
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2256: checking for gettext in libc" >&5
+echo "configure:2245: checking for gettext in libc" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2261 "configure"
+#line 2250 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libc=yes
 else
@@ -2280,7 +2269,7 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2284: checking for bindtextdomain in -lintl" >&5
+echo "configure:2273: checking for bindtextdomain in -lintl" >&5
 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2288,7 +2277,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2292 "configure"
+#line 2281 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2299,7 +2288,7 @@
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2315,19 +2304,19 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2319: checking for gettext in libintl" >&5
+echo "configure:2308: checking for gettext in libintl" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2324 "configure"
+#line 2313 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libintl=yes
 else
@@ -2355,7 +2344,7 @@
 	      # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2359: checking for $ac_word" >&5
+echo "configure:2348: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2389,12 +2378,12 @@
 		for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2393: checking for $ac_func" >&5
+echo "configure:2382: 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 2398 "configure"
+#line 2387 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2417,7 +2406,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2410: \"$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
@@ -2444,7 +2433,7 @@
 		# Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2448: checking for $ac_word" >&5
+echo "configure:2437: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2480,7 +2469,7 @@
 		# Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2484: checking for $ac_word" >&5
+echo "configure:2473: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2512,7 +2501,7 @@
 fi
 
 		cat > conftest.$ac_ext <<EOF
-#line 2516 "configure"
+#line 2505 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2520,7 +2509,7 @@
 			       return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
@@ -2552,7 +2541,7 @@
         # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2556: checking for $ac_word" >&5
+echo "configure:2545: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2586,7 +2575,7 @@
         # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2590: checking for $ac_word" >&5
+echo "configure:2579: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2622,7 +2611,7 @@
         # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2626: checking for $ac_word" >&5
+echo "configure:2615: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2712,7 +2701,7 @@
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2716: checking for catalogs to be installed" >&5
+echo "configure:2705: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2740,17 +2729,17 @@
       if test "$CATOBJEXT" = ".cat"; then
 	 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2744: checking for linux/version.h" >&5
+echo "configure:2733: checking for linux/version.h" >&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 2749 "configure"
+#line 2738 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2743: \"$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*
@@ -2873,7 +2862,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2877: checking for $ac_word" >&5
+echo "configure:2866: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2914,7 +2903,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2918: checking for a BSD compatible install" >&5
+echo "configure:2907: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2975,7 +2964,7 @@
 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2979: checking for $ac_word" >&5
+echo "configure:2968: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3007,7 +2996,7 @@
 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3011: checking for $ac_word" >&5
+echo "configure:3000: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3039,7 +3028,7 @@
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3043: checking for $ac_word" >&5
+echo "configure:3032: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3074,7 +3063,7 @@
 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3078: checking for $ac_word" >&5
+echo "configure:3067: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3106,7 +3095,7 @@
 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
 set dummy ${ac_tool_prefix}windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3110: checking for $ac_word" >&5
+echo "configure:3099: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3140,7 +3129,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3144: checking for $ac_word" >&5
+echo "configure:3133: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3174,7 +3163,7 @@
 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
 set dummy ${ac_tool_prefix}mig; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3178: checking for $ac_word" >&5
+echo "configure:3167: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3225,12 +3214,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3229: checking return type of signal handlers" >&5
+echo "configure:3218: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3234 "configure"
+#line 3223 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3247,7 +3236,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3267,12 +3256,12 @@
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3271: checking for ANSI C header files" >&5
+echo "configure:3260: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3276 "configure"
+#line 3265 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3280,7 +3269,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3273: \"$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*
@@ -3297,7 +3286,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3301 "configure"
+#line 3290 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3315,7 +3304,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3319 "configure"
+#line 3308 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3336,7 +3325,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3340 "configure"
+#line 3329 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3347,7 +3336,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3391,17 +3380,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3395: checking for $ac_hdr" >&5
+echo "configure:3384: 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 3400 "configure"
+#line 3389 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3394: \"$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*
@@ -3428,12 +3417,12 @@
 done
 
 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3432: checking whether stat file-mode macros are broken" >&5
+echo "configure:3421: checking whether stat file-mode macros are broken" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3437 "configure"
+#line 3426 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -3485,12 +3474,12 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3489: checking for working const" >&5
+echo "configure:3478: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3494 "configure"
+#line 3483 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -3539,7 +3528,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -3563,12 +3552,12 @@
 for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3567: checking for $ac_func" >&5
+echo "configure:3556: 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 3572 "configure"
+#line 3561 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3591,7 +3580,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3584: \"$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
@@ -3616,12 +3605,12 @@
 done
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3620: checking for pid_t" >&5
+echo "configure:3609: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3625 "configure"
+#line 3614 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3650,17 +3639,17 @@
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:3654: checking for vfork.h" >&5
+echo "configure:3643: checking for vfork.h" >&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 3659 "configure"
+#line 3648 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3653: \"$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*
@@ -3685,18 +3674,18 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:3689: checking for working vfork" >&5
+echo "configure:3678: checking for working vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:3695: checking for vfork" >&5
+echo "configure:3684: checking for vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3700 "configure"
+#line 3689 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vfork(); below.  */
@@ -3719,7 +3708,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vfork=yes"
 else
@@ -3741,7 +3730,7 @@
 ac_cv_func_vfork_works=$ac_cv_func_vfork
 else
   cat > conftest.$ac_ext <<EOF
-#line 3745 "configure"
+#line 3734 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -3836,7 +3825,7 @@
   }
 }
 EOF
-if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_vfork_works=yes
 else
@@ -3861,19 +3850,19 @@
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3865: checking for working alloca.h" >&5
+echo "configure:3854: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3870 "configure"
+#line 3859 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -3894,12 +3883,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3898: checking for alloca" >&5
+echo "configure:3887: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3903 "configure"
+#line 3892 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -3927,7 +3916,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -3959,12 +3948,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3963: checking whether alloca needs Cray hooks" >&5
+echo "configure:3952: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3968 "configure"
+#line 3957 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -3989,12 +3978,12 @@
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3993: checking for $ac_func" >&5
+echo "configure:3982: 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 3998 "configure"
+#line 3987 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4017,7 +4006,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4010: \"$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
@@ -4044,7 +4033,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4048: checking stack direction for C alloca" >&5
+echo "configure:4037: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4052,7 +4041,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 4056 "configure"
+#line 4045 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -4071,7 +4060,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:4075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -4096,19 +4085,19 @@
 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:4100: checking for r_fs in struct reg" >&5
+echo "configure:4089: checking for r_fs in struct reg" >&5
 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4105 "configure"
+#line 4094 "configure"
 #include "confdefs.h"
 #include <machine/reg.h>
 int main() {
 struct reg r; r.r_fs;
 ; return 0; }
 EOF
-if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_struct_reg_r_fs=yes
 else
@@ -4128,19 +4117,19 @@
 
 fi
 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:4132: checking for r_gs in struct reg" >&5
+echo "configure:4121: checking for r_gs in struct reg" >&5
 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4137 "configure"
+#line 4126 "configure"
 #include "confdefs.h"
 #include <machine/reg.h>
 int main() {
 struct reg r; r.r_gs;
 ; return 0; }
 EOF
-if { (eval echo configure:4144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_struct_reg_r_gs=yes
 else
@@ -4162,19 +4151,19 @@
 
 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:4166: checking for PTRACE_GETREGS" >&5
+echo "configure:4155: checking for PTRACE_GETREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4171 "configure"
+#line 4160 "configure"
 #include "confdefs.h"
 #include <sys/ptrace.h>
 int main() {
 PTRACE_GETREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:4178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_ptrace_getregs=yes
 else
@@ -4196,19 +4185,19 @@
 
 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:4200: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:4189: checking for PTRACE_GETFPXREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4205 "configure"
+#line 4194 "configure"
 #include "confdefs.h"
 #include <sys/ptrace.h>
 int main() {
 PTRACE_GETFPXREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:4212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_ptrace_getfpxregs=yes
 else
@@ -4230,12 +4219,12 @@
 
 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:4234: checking for PT_GETDBREGS" >&5
+echo "configure:4223: checking for PT_GETDBREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4239 "configure"
+#line 4228 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/ptrace.h>
@@ -4243,7 +4232,7 @@
 PT_GETDBREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:4247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_pt_getdbregs=yes
 else
@@ -4265,7 +4254,7 @@
 
 
 echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
-echo "configure:4269: checking for socketpair in -lsocket" >&5
+echo "configure:4258: checking for socketpair in -lsocket" >&5
 ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4273,7 +4262,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4277 "configure"
+#line 4266 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4284,7 +4273,7 @@
 socketpair()
 ; return 0; }
 EOF
-if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4314,12 +4303,12 @@
 for ac_func in socketpair
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4318: checking for $ac_func" >&5
+echo "configure:4307: 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 4323 "configure"
+#line 4312 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4342,7 +4331,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4335: \"$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
@@ -4369,12 +4358,12 @@
 
 
 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4373: checking whether malloc must be declared" >&5
+echo "configure:4362: checking whether malloc must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4378 "configure"
+#line 4367 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4395,7 +4384,7 @@
 char *(*pfn) = (char *(*)) malloc
 ; return 0; }
 EOF
-if { (eval echo configure:4399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_malloc=no
 else
@@ -4416,12 +4405,12 @@
 fi
 
 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:4420: checking whether realloc must be declared" >&5
+echo "configure:4409: checking whether realloc must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4425 "configure"
+#line 4414 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4442,7 +4431,7 @@
 char *(*pfn) = (char *(*)) realloc
 ; return 0; }
 EOF
-if { (eval echo configure:4446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_realloc=no
 else
@@ -4463,12 +4452,12 @@
 fi
 
 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4467: checking whether free must be declared" >&5
+echo "configure:4456: checking whether free must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4472 "configure"
+#line 4461 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4489,7 +4478,7 @@
 char *(*pfn) = (char *(*)) free
 ; return 0; }
 EOF
-if { (eval echo configure:4493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_free=no
 else
@@ -4510,12 +4499,12 @@
 fi
 
 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:4514: checking whether strerror must be declared" >&5
+echo "configure:4503: checking whether strerror must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4519 "configure"
+#line 4508 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4536,7 +4525,7 @@
 char *(*pfn) = (char *(*)) strerror
 ; return 0; }
 EOF
-if { (eval echo configure:4540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strerror=no
 else
@@ -4557,12 +4546,12 @@
 fi
 
 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:4561: checking whether strdup must be declared" >&5
+echo "configure:4550: checking whether strdup must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4566 "configure"
+#line 4555 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4583,7 +4572,7 @@
 char *(*pfn) = (char *(*)) strdup
 ; return 0; }
 EOF
-if { (eval echo configure:4587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strdup=no
 else
@@ -4604,12 +4593,12 @@
 fi
 
 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4608: checking whether strstr must be declared" >&5
+echo "configure:4597: checking whether strstr must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4613 "configure"
+#line 4602 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4630,7 +4619,7 @@
 char *(*pfn) = (char *(*)) strstr
 ; return 0; }
 EOF
-if { (eval echo configure:4634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strstr=no
 else
@@ -4657,9 +4646,9 @@
 # could be expunged. --jsm 1999-03-22
 
 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:4661: checking for HPUX save_state structure" >&5
+echo "configure:4650: checking for HPUX save_state structure" >&5
 cat > conftest.$ac_ext <<EOF
-#line 4663 "configure"
+#line 4652 "configure"
 #include "confdefs.h"
 #include <machine/save_state.h>
 EOF
@@ -4674,7 +4663,7 @@
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 4678 "configure"
+#line 4667 "configure"
 #include "confdefs.h"
 #include <machine/save_state.h>
 EOF
@@ -4744,12 +4733,12 @@
 
 if test "$ac_cv_header_sys_procfs_h" = yes; then
   echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4748: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:4737: checking for pstatus_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4753 "configure"
+#line 4742 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -4758,7 +4747,7 @@
 pstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pstatus_t=yes
 else
@@ -4780,12 +4769,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
 
   echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4784: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:4773: checking for prrun_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4789 "configure"
+#line 4778 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -4794,7 +4783,7 @@
 prrun_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prrun_t=yes
 else
@@ -4816,12 +4805,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
 
   echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4820: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:4809: checking for gregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4825 "configure"
+#line 4814 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -4830,7 +4819,7 @@
 gregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_gregset_t=yes
 else
@@ -4852,12 +4841,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
 
   echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4856: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:4845: checking for fpregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4861 "configure"
+#line 4850 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -4866,7 +4855,7 @@
 fpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_fpregset_t=yes
 else
@@ -4888,12 +4877,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
 
   echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4892: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:4881: checking for prgregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4897 "configure"
+#line 4886 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -4902,7 +4891,7 @@
 prgregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prgregset_t=yes
 else
@@ -4924,12 +4913,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
 
   echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4928: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:4917: checking for prfpregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4933 "configure"
+#line 4922 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -4938,7 +4927,7 @@
 prfpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
 else
@@ -4960,12 +4949,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
 
   echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4964: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:4953: checking for prgregset32_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4969 "configure"
+#line 4958 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -4974,7 +4963,7 @@
 prgregset32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:4978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
 else
@@ -4996,12 +4985,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
 
   echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5000: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:4989: checking for prfpregset32_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5005 "configure"
+#line 4994 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5010,7 +4999,7 @@
 prfpregset32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
 else
@@ -5032,12 +5021,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
 
   echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5036: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:5025: checking for lwpid_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5041 "configure"
+#line 5030 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5046,7 +5035,7 @@
 lwpid_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_lwpid_t=yes
 else
@@ -5068,12 +5057,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
 
   echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5072: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:5061: checking for psaddr_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5077 "configure"
+#line 5066 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5082,7 +5071,7 @@
 psaddr_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_psaddr_t=yes
 else
@@ -5104,12 +5093,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
 
   echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5108: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:5097: checking for prsysent_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5113 "configure"
+#line 5102 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5118,7 +5107,7 @@
 prsysent_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prsysent_t=yes
 else
@@ -5140,12 +5129,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
 
   echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5144: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:5133: checking for pr_sigset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5149 "configure"
+#line 5138 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5154,7 +5143,7 @@
 pr_sigset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
 else
@@ -5176,12 +5165,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
 
   echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5180: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:5169: checking for pr_sigaction64_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5185 "configure"
+#line 5174 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5190,7 +5179,7 @@
 pr_sigaction64_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
 else
@@ -5212,12 +5201,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
 
   echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5216: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:5205: checking for pr_siginfo64_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5221 "configure"
+#line 5210 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5226,7 +5215,7 @@
 pr_siginfo64_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
 else
@@ -5253,7 +5242,7 @@
         
   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
     echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:5257: checking whether prfpregset_t type is broken" >&5
+echo "configure:5246: checking whether prfpregset_t type is broken" >&5
     if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5261,7 +5250,7 @@
   gdb_cv_prfpregset_t_broken=yes
 else
   cat > conftest.$ac_ext <<EOF
-#line 5265 "configure"
+#line 5254 "configure"
 #include "confdefs.h"
 #include <sys/procfs.h>
        int main ()
@@ -5271,7 +5260,7 @@
          return 0;
        }
 EOF
-if { (eval echo configure:5275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_prfpregset_t_broken=no
 else
@@ -5296,12 +5285,12 @@
 
   
   echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5300: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:5289: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5305 "configure"
+#line 5294 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 #include <sys/types.h>
@@ -5314,7 +5303,7 @@
   
 ; return 0; }
 EOF
-if { (eval echo configure:5318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_procfs_piocset=yes
 else
@@ -5338,19 +5327,19 @@
 if test ${host} = ${target} ; then
     
   echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5342: checking for member l_addr in struct link_map" >&5
+echo "configure:5331: checking for member l_addr in struct link_map" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5347 "configure"
+#line 5336 "configure"
 #include "confdefs.h"
 #include <link.h>
 int main() {
 struct link_map lm; (void) lm.l_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:5354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_link_map_with_l_members=yes
 else
@@ -5372,12 +5361,12 @@
 
     
   echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5376: checking for member lm_addr in struct link_map" >&5
+echo "configure:5365: checking for member lm_addr in struct link_map" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5381 "configure"
+#line 5370 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <link.h>
@@ -5385,7 +5374,7 @@
 struct link_map lm; (void) lm.lm_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:5389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_link_map_with_lm_members=yes
 else
@@ -5407,23 +5396,20 @@
 
     
   echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:5411: checking for member som_addr in struct so_map" >&5
+echo "configure:5400: checking for member som_addr in struct so_map" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5416 "configure"
+#line 5405 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
-#ifdef HAVE_NLIST_H
-#include <nlist.h>
-#endif
 #include <link.h>
 int main() {
 struct so_map lm; (void) lm.som_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:5427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_so_map_with_som_members=yes
 else
@@ -5445,12 +5431,12 @@
 
     
   echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:5449: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:5435: checking for struct link_map32 in sys/link.h" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5454 "configure"
+#line 5440 "configure"
 #include "confdefs.h"
 #define _SYSCALL32
 #include <sys/link.h>
@@ -5458,7 +5444,7 @@
 struct link_map32 l;
 ; return 0; }
 EOF
-if { (eval echo configure:5462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_link_map32=yes
 else
@@ -5480,7 +5466,7 @@
 fi
 
 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:5484: checking for main in -lm" >&5
+echo "configure:5470: checking for main in -lm" >&5
 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5488,14 +5474,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5492 "configure"
+#line 5478 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5524,7 +5510,7 @@
 
 
 echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:5528: checking for wctype in -lc" >&5
+echo "configure:5514: checking for wctype in -lc" >&5
 ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5532,7 +5518,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5536 "configure"
+#line 5522 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5543,7 +5529,7 @@
 wctype()
 ; return 0; }
 EOF
-if { (eval echo configure:5547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5562,7 +5548,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:5566: checking for wctype in -lw" >&5
+echo "configure:5552: checking for wctype in -lw" >&5
 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5570,7 +5556,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lw  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5574 "configure"
+#line 5560 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5581,7 +5567,7 @@
 wctype()
 ; return 0; }
 EOF
-if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5613,12 +5599,12 @@
 
 
 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:5617: checking for long long support in compiler" >&5
+echo "configure:5603: checking for long long support in compiler" >&5
 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5622 "configure"
+#line 5608 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -5628,7 +5614,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_c_long_long=yes
 else
@@ -5650,7 +5636,7 @@
 
 
 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:5654: checking for long long support in printf" >&5
+echo "configure:5640: checking for long long support in printf" >&5
 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5658,7 +5644,7 @@
   gdb_cv_printf_has_long_long=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 5662 "configure"
+#line 5648 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -5672,7 +5658,7 @@
   return (strcmp ("0x0123456789abcdef", buf));
 }
 EOF
-if { (eval echo configure:5676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_printf_has_long_long=yes
 else
@@ -5696,19 +5682,19 @@
 
 
 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:5700: checking for long double support in compiler" >&5
+echo "configure:5686: checking for long double support in compiler" >&5
 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5705 "configure"
+#line 5691 "configure"
 #include "confdefs.h"
 
 int main() {
 long double foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_long_double=yes
 else
@@ -5730,7 +5716,7 @@
 
 
 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:5734: checking for long double support in printf" >&5
+echo "configure:5720: checking for long double support in printf" >&5
 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5738,7 +5724,7 @@
   gdb_cv_printf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 5742 "configure"
+#line 5728 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -5748,7 +5734,7 @@
   return (strncmp ("3.14159", buf, 7));
 }
 EOF
-if { (eval echo configure:5752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_printf_has_long_double=yes
 else
@@ -5772,7 +5758,7 @@
 
 
 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:5776: checking for long double support in scanf" >&5
+echo "configure:5762: checking for long double support in scanf" >&5
 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5780,7 +5766,7 @@
   gdb_cv_scanf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 5784 "configure"
+#line 5770 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -5790,7 +5776,7 @@
   return !(f > 3.14159 && f < 3.14160);
 }
 EOF
-if { (eval echo configure:5794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_scanf_has_long_double=yes
 else
@@ -5816,17 +5802,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5820: checking for $ac_hdr" >&5
+echo "configure:5806: 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 5825 "configure"
+#line 5811 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5816: \"$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*
@@ -5855,12 +5841,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5859: checking for $ac_func" >&5
+echo "configure:5845: 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 5864 "configure"
+#line 5850 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5883,7 +5869,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5873: \"$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
@@ -5908,7 +5894,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:5912: checking for working mmap" >&5
+echo "configure:5898: 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
@@ -5916,7 +5902,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 5920 "configure"
+#line 5906 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6056,7 +6042,7 @@
 }
 
 EOF
-if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6046: \"$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
@@ -6085,7 +6071,7 @@
    case ${host_os} in
    hpux*)
       echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:6089: checking for HPUX/OSF thread support" >&5
+echo "configure:6075: checking for HPUX/OSF thread support" >&5
       if test -f /usr/include/dce/cma_config.h ; then
          if test "$GCC" = "yes" ; then
             echo "$ac_t""yes" 1>&6
@@ -6104,7 +6090,7 @@
       ;;
    solaris*)
       echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:6108: checking for Solaris thread debugging library" >&5
+echo "configure:6094: checking for Solaris thread debugging library" >&5
       if test -f /usr/lib/libthread_db.so.1 ; then
          echo "$ac_t""yes" 1>&6
          cat >> confdefs.h <<\EOF
@@ -6114,7 +6100,7 @@
          CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:6118: checking for dlopen in -ldl" >&5
+echo "configure:6104: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6122,7 +6108,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6126 "configure"
+#line 6112 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6133,7 +6119,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:6137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6165,17 +6151,17 @@
             # all symbols visible in the dynamic symbol table.
             hold_ldflags=$LDFLAGS
             echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:6169: checking for the ld -export-dynamic flag" >&5
+echo "configure:6155: checking for the ld -export-dynamic flag" >&5
             LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
             cat > conftest.$ac_ext <<EOF
-#line 6172 "configure"
+#line 6158 "configure"
 #include "confdefs.h"
 
 int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   found=yes
 else
@@ -6194,13 +6180,13 @@
 	 # Sun randomly tweaked the prototypes in <proc_service.h>
 	 # at one point.
 	 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:6198: checking if <proc_service.h> is old" >&5
+echo "configure:6184: checking if <proc_service.h> is old" >&5
 	 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	    cat > conftest.$ac_ext <<EOF
-#line 6204 "configure"
+#line 6190 "configure"
 #include "confdefs.h"
 
 		#include <proc_service.h>
@@ -6211,7 +6197,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_proc_service_is_old=no
 else
@@ -6288,8 +6274,6 @@
     ;;
   esac
 
-else
-  enable_gdbmi=yes
 fi
 
 case ${enable_gdbmi} in
@@ -6430,7 +6414,7 @@
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
     echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:6434: checking compiler warning flags" >&5
+echo "configure:6418: checking compiler warning flags" >&5
     # Separate out the -Werror flag as some files just cannot be
     # compiled with it enabled.
     for w in ${build_warnings}; do
@@ -6493,12 +6477,12 @@
 
 if test $want_included_regex = false; then
   echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6497: checking for GNU regex" >&5
+echo "configure:6481: checking for GNU regex" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6502 "configure"
+#line 6486 "configure"
 #include "confdefs.h"
 #include <gnu-versions.h>
 #include <sys/types.h>
@@ -6510,7 +6494,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_gnu_regex=yes
 else
@@ -6539,12 +6523,12 @@
 
 # In the Cygwin environment, we need some additional flags.
 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:6543: checking for cygwin" >&5
+echo "configure:6527: checking for cygwin" >&5
 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6548 "configure"
+#line 6532 "configure"
 #include "confdefs.h"
 
 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -6582,7 +6566,7 @@
 else
   TERM_LIB=
   echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:6586: checking for tgetent in -lncurses" >&5
+echo "configure:6570: checking for tgetent in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6590,7 +6574,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6594 "configure"
+#line 6578 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6601,7 +6585,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:6605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6620,7 +6604,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:6624: checking for tgetent in -lHcurses" >&5
+echo "configure:6608: checking for tgetent in -lHcurses" >&5
 ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6628,7 +6612,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lHcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6632 "configure"
+#line 6616 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6639,7 +6623,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:6643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6658,7 +6642,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:6662: checking for tgetent in -ltermlib" >&5
+echo "configure:6646: checking for tgetent in -ltermlib" >&5
 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6666,7 +6650,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ltermlib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6670 "configure"
+#line 6654 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6677,7 +6661,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:6681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6696,7 +6680,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:6700: checking for tgetent in -ltermcap" >&5
+echo "configure:6684: checking for tgetent in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6704,7 +6688,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6708 "configure"
+#line 6692 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6715,7 +6699,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6734,7 +6718,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:6738: checking for tgetent in -lcurses" >&5
+echo "configure:6722: checking for tgetent in -lcurses" >&5
 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6742,7 +6726,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6746 "configure"
+#line 6730 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6753,7 +6737,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:6757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6772,7 +6756,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:6776: checking for tgetent in -lterminfo" >&5
+echo "configure:6760: checking for tgetent in -lterminfo" >&5
 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6780,7 +6764,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lterminfo  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6784 "configure"
+#line 6768 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6791,7 +6775,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6949,7 +6933,7 @@
 fi
 
   echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:6953: checking for Tcl configuration" >&5
+echo "configure:6937: checking for Tcl configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7057,7 +7041,7 @@
 fi
 
   echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:7061: checking for Tk configuration" >&5
+echo "configure:7045: checking for Tk configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7153,7 +7137,7 @@
 
 no_tcl=true
 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:7157: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:7141: checking for Tcl private headers. dir=${configdir}" >&5
 # Check whether --with-tclinclude or --without-tclinclude was given.
 if test "${with_tclinclude+set}" = set; then
   withval="$with_tclinclude"
@@ -7219,17 +7203,17 @@
 if test x"${ac_cv_c_tclh}" = x ; then
    ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:7223: checking for tclInt.h" >&5
+echo "configure:7207: checking for tclInt.h" >&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 7228 "configure"
+#line 7212 "configure"
 #include "confdefs.h"
 #include <tclInt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7217: \"$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*
@@ -7289,7 +7273,7 @@
 #
 no_tk=true
 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:7293: checking for Tk private headers" >&5
+echo "configure:7277: checking for Tk private headers" >&5
 # Check whether --with-tkinclude or --without-tkinclude was given.
 if test "${with_tkinclude+set}" = set; then
   withval="$with_tkinclude"
@@ -7355,17 +7339,17 @@
 if test x"${ac_cv_c_tkh}" = x ; then
    ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:7359: checking for tk.h" >&5
+echo "configure:7343: checking for tk.h" >&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 7364 "configure"
+#line 7348 "configure"
 #include "confdefs.h"
 #include <tk.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7353: \"$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*
@@ -7411,7 +7395,7 @@
 
 	   
 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7415: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:7399: checking for Itcl private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_itclh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
     if test -f $i/generic/itcl.h ; then
@@ -7434,7 +7418,7 @@
 
 	   
 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7438: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:7422: checking for Itk private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_itkh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
     if test -f $i/generic/itk.h ; then
@@ -7457,7 +7441,7 @@
 
 	   
 echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7461: checking for Tix private headers. srcdir=${srcdir}" >&5
+echo "configure:7445: checking for Tix private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_tixh}" = x ; then
   for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
     if test -f $i/generic/tix.h ; then
@@ -7495,7 +7479,7 @@
 fi
 
   echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:7499: checking for Itcl configuration" >&5
+echo "configure:7483: checking for Itcl configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7607,7 +7591,7 @@
 fi
 
   echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:7611: checking for Itk configuration" >&5
+echo "configure:7595: checking for Itk configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7719,7 +7703,7 @@
 fi
 
   echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
-echo "configure:7723: checking for Tix configuration" >&5
+echo "configure:7707: checking for Tix configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7859,7 +7843,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:7863: checking for X" >&5
+echo "configure:7847: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -7921,12 +7905,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 7925 "configure"
+#line 7909 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7914: \"$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*
@@ -7995,14 +7979,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7999 "configure"
+#line 7983 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:8006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -8342,7 +8326,7 @@
 
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:8346: checking whether ln -s works" >&5
+echo "configure:8330: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8366,12 +8350,12 @@
 
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:8370: checking for Cygwin environment" >&5
+echo "configure:8354: checking for Cygwin environment" >&5
 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8375 "configure"
+#line 8359 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -8382,7 +8366,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:8386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -8399,19 +8383,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:8403: checking for mingw32 environment" >&5
+echo "configure:8387: checking for mingw32 environment" >&5
 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8408 "configure"
+#line 8392 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:8415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -8430,7 +8414,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:8434: checking for executable suffix" >&5
+echo "configure:8418: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8440,10 +8424,10 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:8444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:8428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
-      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+      *.c | *.o | *.obj) ;;
       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
       esac
     done
diff --git a/gdb/configure.host b/gdb/configure.host
index c7268fe..ff09bdc 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -18,7 +18,6 @@
 m88*)			gdb_host_cpu=m88k ;;
 powerpc*)		gdb_host_cpu=powerpc ;;
 sparc64)		gdb_host_cpu=sparc ;;
-s390*)			gdb_host_cpu=s390 ;;
 *)			gdb_host_cpu=$host_cpu ;;
 
 esac
@@ -116,7 +115,8 @@
 mips-sgi-irix3*)	gdb_host=irix3 ;;
 mips-sgi-irix4*)	gdb_host=irix4 ;;
 mips-sgi-irix5*)	gdb_host=irix5 ;;
-mips-sgi-irix6*)	gdb_host=irix6 ;;
+# Close enough for now.
+mips-sgi-irix6*)	gdb_host=irix5 ;;
 mips-sony-*)		gdb_host=news-mips ;;
 mips-*-mach3*)		gdb_host=mipsm3 ;;
 mips-*-sysv4*)		gdb_host=mipsv4 ;;
@@ -140,8 +140,6 @@
 rs6000-*-aix4*)		gdb_host=aix4 ;;
 rs6000-*-*)		gdb_host=rs6000 ;;
 
-s390*-*-*)		gdb_host=s390 ;;
-
 sparc-*-linux*)		gdb_host=linux ;;
 sparc-*-lynxos*)	gdb_host=sparclynx ;;
 sparc-*-netbsdelf*)	gdb_host=nbsdelf ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index 4368675..8bbcb18 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -341,9 +341,6 @@
   AC_MSG_CHECKING(for member som_addr in struct so_map)
   AC_CACHE_VAL(gdb_cv_have_struct_so_map_with_som_members,
     [AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef HAVE_NLIST_H
-#include <nlist.h>
-#endif
 #include <link.h>],
                     [struct so_map lm; (void) lm.som_addr;],
                     gdb_cv_have_struct_so_map_with_som_members=yes,
@@ -583,8 +580,7 @@
       AC_MSG_ERROR(Bad value for --enable-gdbmi: ${enableval})
     ;;
   esac
-],
-[enable_gdbmi=yes])
+])
 case ${enable_gdbmi} in
   "yes" )
     if test -d "${srcdir}/mi" ; then
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index b9f1d17..23f4069 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -23,7 +23,6 @@
 powerpc*)		gdb_target_cpu=powerpc ;;
 sparc*)			gdb_target_cpu=sparc ;;
 thumb*)			gdb_target_cpu=arm ;;
-s390*)			gdb_target_cpu=s390 ;;
 strongarm*)		gdb_target_cpu=arm ;;
 xscale*)		gdb_target_cpu=arm ;;
 v850*)			gdb_target_cpu=v850 ;;
@@ -208,7 +207,7 @@
 mips*-little-*)		gdb_target=littlemips ;;
 mips*-*-lnews*)		gdb_target=embedl ;;
 mips*-sgi-irix5*)	gdb_target=irix5 ;;
-mips*-sgi-irix6*)	gdb_target=irix6 ;;
+mips*-sgi-irix6*)	gdb_target=irix5 ;;
 mips*-sgi-*)		gdb_target=irix3 ;;
 mips*-sony-*)		gdb_target=bigmips ;;
 mips*-*-mach3*)		gdb_target=mipsm3 ;;
@@ -257,9 +256,6 @@
 rs6000-*-aix4*)		gdb_target=aix4 ;;
 rs6000-*-*)		gdb_target=rs6000 ;;
 
-s390-*-*)		gdb_target=s390 ;;
-s390x-*-*)		gdb_target=s390x ;;
-
 sh*-*-pe)		gdb_target=wince ;;
 sh-*-hms)		gdb_target=embed ;;
 sh-*-coff*)		gdb_target=embed ;;
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 5d8d3ce..127b891 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -77,7 +77,7 @@
 
 static int ignore (CORE_ADDR, char *);
 
-static int core_file_thread_alive (ptid_t tid);
+static int core_file_thread_alive (int tid);
 
 static void init_core_ops (void);
 
@@ -185,7 +185,7 @@
 
   if (core_bfd)
     {
-      inferior_ptid = null_ptid;	/* Avoid confusion from thread stuff */
+      inferior_pid = 0;		/* Avoid confusion from thread stuff */
 
       /* Clear out solib state while the bfd is still open. See
          comments in clear_solib in solib.c. */
@@ -242,13 +242,13 @@
 
   thread_id = atoi (bfd_section_name (abfd, asect) + 5);
 
-  add_thread (pid_to_ptid (thread_id));
+  add_thread (thread_id);
 
 /* Warning, Will Robinson, looking at BFD private data! */
 
   if (reg_sect != NULL
       && asect->filepos == reg_sect->filepos)	/* Did we find .reg? */
-    inferior_ptid = pid_to_ptid (thread_id);	/* Yes, make it current */
+    inferior_pid = thread_id;	/* Yes, make it current */
 }
 
 /* This routine opens and sets up the core file bfd.  */
@@ -384,10 +384,10 @@
    them to core_vec->core_read_registers, as the register set numbered
    WHICH.
 
-   If inferior_ptid is zero, do the single-threaded thing: look for a
-   section named NAME.  If inferior_ptid is non-zero, do the
+   If inferior_pid is zero, do the single-threaded thing: look for a
+   section named NAME.  If inferior_pid is non-zero, do the
    multi-threaded thing: look for a section named "NAME/PID", where
-   PID is the shortest ASCII decimal representation of inferior_ptid.
+   PID is the shortest ASCII decimal representation of inferior_pid.
 
    HUMAN_NAME is a human-readable name for the kind of registers the
    NAME section contains, for use in error messages.
@@ -406,8 +406,8 @@
   bfd_size_type size;
   char *contents;
 
-  if (PIDGET (inferior_ptid))
-    sprintf (section_name, "%s/%d", name, PIDGET (inferior_ptid));
+  if (inferior_pid)
+    sprintf (section_name, "%s/%d", name, inferior_pid);
   else
     strcpy (section_name, name);
 
@@ -485,7 +485,7 @@
    behaviour.
  */
 static int
-core_file_thread_alive (ptid_t tid)
+core_file_thread_alive (int tid)
 {
   return 1;
 }
diff --git a/gdb/cp-abi.h b/gdb/cp-abi.h
index bd5430d..059816a 100644
--- a/gdb/cp-abi.h
+++ b/gdb/cp-abi.h
@@ -25,12 +25,6 @@
 #ifndef CP_ABI_H_
 #define CP_ABI_H_ 1
 
-/* The functions here that attempt to determine what sort of thing a
-   mangled name refers to may well be revised in the future.  It would
-   certainly be cleaner to carry this information explicitly in GDB's
-   data structures than to derive it from the mangled name.  */
-
-
 /* Kinds of constructors.  All these values are guaranteed to be
    non-zero.  */
 enum ctor_kinds {
@@ -46,11 +40,6 @@
   complete_object_allocating_ctor
 };
 
-/* Return non-zero iff NAME is the mangled name of a constructor.
-   Actually, return an `enum ctor_kind' value describing what *kind*
-   of constructor it is.  */
-extern enum ctor_kinds is_constructor_name (const char *name);
-
 
 /* Kinds of destructors.  All these values are guaranteed to be
    non-zero.  */
@@ -68,68 +57,6 @@
   base_object_dtor
 };
   
-/* Return non-zero iff NAME is the mangled name of a destructor.
-   Actually, return an `enum dtor_kind' value describing what *kind*
-   of destructor it is.  */
-extern enum dtor_kinds is_destructor_name (const char *name);
-
-
-/* Return non-zero iff NAME is the mangled name of a vtable.  */
-extern int is_vtable_name (const char *name);
-
-
-/* Return non-zero iff NAME is the un-mangled name of an operator,
-   perhaps scoped within some class.  */
-extern int is_operator_name (const char *name);
-
-
-/* Return an object's virtual function as a value.
-
-   VALUEP is a pointer to a pointer to a value, holding the object
-   whose virtual function we want to invoke.  If the ABI requires a
-   virtual function's caller to adjust the `this' pointer by an amount
-   retrieved from the vtable before invoking the function (i.e., we're
-   not using "vtable thunks" to do the adjustment automatically), then
-   this function may set *VALUEP to point to a new object with an
-   appropriately tweaked address.
-
-   The J'th element of the overload set F is the virtual function of
-   *VALUEP we want to invoke.
-
-   TYPE is the base type of *VALUEP whose method we're invoking ---
-   this is the type containing F.  OFFSET is the offset of that base
-   type within *VALUEP.  */
-extern value_ptr value_virtual_fn_field (value_ptr *valuep,
-					 struct fn_field *f, int j,
-					 struct type *type, int offset);
-
-
-/* Try to find the run-time type of VALUE, using C++ run-time type
-   information.  Return the run-time type, or zero if we can't figure
-   it out.
-
-   If we do find the run-time type:
-   - Set *FULL to non-zero if VALUE already contains the complete
-     run-time object, not just some embedded base class of the object.
-   - Set *TOP and *USING_ENC to indicate where the enclosing object
-     starts relative to VALUE:
-     - If *USING_ENC is zero, then *TOP is the offset from the start
-       of the complete object to the start of the embedded subobject
-       VALUE represents.  In other words, the enclosing object starts
-       at VALUE_ADDR (VALUE) + VALUE_OFFSET (VALUE) +
-       VALUE_EMBEDDED_OFFSET (VALUE) + *TOP
-     - If *USING_ENC is non-zero, then *TOP is the offset from the
-       address of the complete object to the enclosing object stored
-       in VALUE.  In other words, the enclosing object starts at
-       VALUE_ADDR (VALUE) + VALUE_OFFSET (VALUE) + *TOP.
-     If VALUE's type and enclosing type are the same, then these two
-     cases are equivalent.
-
-   FULL, TOP, and USING_ENC can each be zero, in which case we don't
-   provide the corresponding piece of information.  */
-extern struct type *value_rtti_type (struct value *value,
-                                     int *full, int *top, int *using_enc);
-
 
 struct cp_abi_ops
 {
@@ -137,21 +64,66 @@
   const char *longname;
   const char *doc;
 
-  /* ABI-specific implementations for the functions declared above.  */
+  /* The functions here that attempt to determine what sort of thing a
+     mangled name refers to may well be revised in the future.  It
+     would certainly be cleaner to carry this information explicitly
+     in GDB's data structures than to derive it from the mangled name.  */
+
+  /* Return non-zero iff NAME is the mangled name of a constructor.
+     Actually, return an `enum ctor_kind' value describing what *kind*
+     of constructor it is.  */
   enum ctor_kinds (*is_constructor_name) (const char *name);
+
+  /* Return non-zero iff NAME is the mangled name of a destructor.
+     Actually, return an `enum dtor_kind' value describing what *kind*
+     of destructor it is.  */
   enum dtor_kinds (*is_destructor_name) (const char *name);
+
+  /* Return non-zero iff NAME is the mangled name of a vtable.  */
   int (*is_vtable_name) (const char *name);
+
+  /* Return non-zero iff NAME is the un-mangled name of an operator,
+     perhaps scoped within some class.  */
   int (*is_operator_name) (const char *name);
+
   value_ptr (*virtual_fn_field) (value_ptr * arg1p, struct fn_field * f,
 				 int j, struct type * type, int offset);
+
+  /* Find the real run-time type of a value using RTTI.
+   * V is a pointer to the value.
+   * A pointer to the struct type entry of the run-time type
+   * is returneed.
+   * FULL is a flag that is set only if the value V includes
+   * the entire contents of an object of the RTTI type.
+   * TOP is the offset to the top of the enclosing object of
+   * the real run-time type.  This offset may be for the embedded
+   * object, or for the enclosing object of V.
+   * USING_ENC is the flag that distinguishes the two cases.
+   * If it is 1, then the offset is for the enclosing object,
+   * otherwise for the embedded object.
+   *
+   */
+
   struct type *(*rtti_type) (value_ptr v, int *full, int *top,
 			     int *using_enc);
 };
 
 
 extern struct cp_abi_ops *cp_abis;
+
 extern int num_cp_abis;
+
 extern struct cp_abi_ops current_cp_abi;
+
+extern enum ctor_kinds is_constructor_name (const char *name);
+extern enum dtor_kinds is_destructor_name (const char *name);
+extern int is_vtable_name (const char *name);
+extern int is_operator_name (const char *name);
+extern value_ptr value_virtual_fn_field (value_ptr * arg1p,
+					 struct fn_field *f, int j,
+					 struct type *type, int offset);
+extern struct type *value_rtti_type (value_ptr v, int *full, int *top,
+				     int *using_enc);
 extern int register_cp_abi (struct cp_abi_ops abi);
 extern int switch_to_cp_abi (const char *short_name);
 
diff --git a/gdb/cxux-nat.c b/gdb/cxux-nat.c
index 742f89c..4fafc8e 100644
--- a/gdb/cxux-nat.c
+++ b/gdb/cxux-nat.c
@@ -80,7 +80,7 @@
   offset = (char *) &u.pt_r0 - (char *) &u;
   regaddr = offset;		/* byte offset to r0; */
 
-/*  offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
+/*  offset = ptrace (3, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
   for (regno = 0; regno < PC_REGNUM; regno++)
     {
       /*regaddr = register_addr (regno, offset); */
@@ -88,29 +88,29 @@
 
       for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
 	{
-	  *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
+	  *(int *) &buf[i] = ptrace (3, inferior_pid,
 				     (PTRACE_ARG3_TYPE) regaddr, 0);
 	  regaddr += sizeof (int);
 	}
       supply_register (regno, buf);
     }
   /* now load up registers 32-37; special pc registers */
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+  *(int *) &buf[0] = ptrace (3, inferior_pid,
 			     (PTRACE_ARG3_TYPE) PSR_OFFSET, 0);
   supply_register (PSR_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+  *(int *) &buf[0] = ptrace (3, inferior_pid,
 			     (PTRACE_ARG3_TYPE) FPSR_OFFSET, 0);
   supply_register (FPSR_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+  *(int *) &buf[0] = ptrace (3, inferior_pid,
 			     (PTRACE_ARG3_TYPE) FPCR_OFFSET, 0);
   supply_register (FPCR_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+  *(int *) &buf[0] = ptrace (3, inferior_pid,
 			     (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
   supply_register (SXIP_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+  *(int *) &buf[0] = ptrace (3, inferior_pid,
 			     (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
   supply_register (SNIP_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+  *(int *) &buf[0] = ptrace (3, inferior_pid,
 			     (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
   supply_register (SFIP_REGNUM, buf);
 
@@ -122,13 +122,13 @@
 	{
 	  X_REGISTER_RAW_TYPE xval;
 
-	  *(int *) &xval.w1 = ptrace (3, PIDGET (inferior_ptid),
+	  *(int *) &xval.w1 = ptrace (3, inferior_pid,
 				      (PTRACE_ARG3_TYPE) regaddr, 0);
-	  *(int *) &xval.w2 = ptrace (3, PIDGET (inferior_ptid),
+	  *(int *) &xval.w2 = ptrace (3, inferior_pid,
 				      (PTRACE_ARG3_TYPE) (regaddr + 4), 0);
-	  *(int *) &xval.w3 = ptrace (3, PIDGET (inferior_ptid),
+	  *(int *) &xval.w3 = ptrace (3, inferior_pid,
 				      (PTRACE_ARG3_TYPE) (regaddr + 8), 0);
-	  *(int *) &xval.w4 = ptrace (3, PIDGET (inferior_ptid),
+	  *(int *) &xval.w4 = ptrace (3, inferior_pid,
 				      (PTRACE_ARG3_TYPE) (regaddr + 12), 0);
 	  supply_register (regno, (void *) &xval);
 	}
@@ -161,7 +161,7 @@
 	{
 	  regaddr = offset + regno * sizeof (int);
 	  errno = 0;
-	  ptrace (6, PIDGET (inferior_ptid),
+	  ptrace (6, inferior_pid,
 		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
 	  if (errno != 0)
 	    {
@@ -170,22 +170,22 @@
 	    }
 	}
       else if (regno == PSR_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
+	ptrace (6, inferior_pid,
 		(PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
       else if (regno == FPSR_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
+	ptrace (6, inferior_pid,
 		(PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
       else if (regno == FPCR_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
+	ptrace (6, inferior_pid,
 		(PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
       else if (regno == SXIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
+	ptrace (6, inferior_pid,
 		(PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
       else if (regno == SNIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
+	ptrace (6, inferior_pid,
 		(PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
       else if (regno == SFIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
+	ptrace (6, inferior_pid,
 		(PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
       else if (target_is_m88110 && regno < NUM_REGS)
 	{
@@ -194,10 +194,10 @@
 	  read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
 			       sizeof (X_REGISTER_RAW_TYPE));
 	  regaddr = XREGADDR (regno);
-	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
-	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 4, xval.w2);
-	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 8, xval.w3);
-	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 12, xval.w4);
+	  ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, xval.w1);
+	  ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr + 4, xval.w2);
+	  ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr + 8, xval.w3);
+	  ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr + 12, xval.w4);
 	}
       else
 	printf_unfiltered ("Bad register number for store_inferior routine\n");
@@ -209,7 +209,7 @@
 	  /*      regaddr = register_addr (regno, offset); */
 	  errno = 0;
 	  regaddr = offset + regno * sizeof (int);
-	  ptrace (6, PIDGET (inferior_ptid),
+	  ptrace (6, inferior_pid,
 		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
 	  if (errno != 0)
 	    {
@@ -217,17 +217,17 @@
 	      perror_with_name (buf);
 	    }
 	}
-      ptrace (6, PIDGET (inferior_ptid),
+      ptrace (6, inferior_pid,
 	      (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
-      ptrace (6, PIDGET (inferior_ptid),
+      ptrace (6, inferior_pid,
 	      (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
-      ptrace (6, PIDGET (inferior_ptid),
+      ptrace (6, inferior_pid,
 	      (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
-      ptrace (6, PIDGET (inferior_ptid),
+      ptrace (6, inferior_pid,
 	      (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
-      ptrace (6, PIDGET (inferior_ptid),
+      ptrace (6, inferior_pid,
 	      (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
-      ptrace (6, PIDGET (inferior_ptid),
+      ptrace (6, inferior_pid,
 	      (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
       if (target_is_m88110)
 	{
@@ -238,10 +238,10 @@
 	      read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
 				   sizeof (X_REGISTER_RAW_TYPE));
 	      regaddr = XREGADDR (regno);
-	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
-	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 4), xval.w2);
-	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 8), xval.w3);
-	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 12), xval.w4);
+	      ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, xval.w1);
+	      ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) (regaddr + 4), xval.w2);
+	      ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) (regaddr + 8), xval.w3);
+	      ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) (regaddr + 12), xval.w4);
 	    }
 	}
     }
@@ -361,7 +361,7 @@
   struct objfile *objfile;
   char *path_name;
 
-  if (ptid_equal (inferior_ptid, null_ptid))
+  if (!inferior_pid)
     {
       warning ("The program has not yet been started.");
       return;
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 2a3c18b..5f9c644 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -96,11 +96,11 @@
 static int prologue_find_regs (unsigned short op, struct frame_info *fi,
 			       CORE_ADDR addr);
 
-static void d10v_frame_init_saved_regs (struct frame_info *);
+extern void d10v_frame_init_saved_regs (struct frame_info *);
 
 static void do_d10v_pop_frame (struct frame_info *fi);
 
-static int
+int
 d10v_frame_chain_valid (CORE_ADDR chain, struct frame_info *frame)
 {
   return ((chain) != 0 && (frame) != 0 && (frame)->pc > IMEM_START);
@@ -119,14 +119,14 @@
    The d10v returns anything less than 8 bytes in size in
    registers. */
 
-static int
+int
 d10v_use_struct_convention (int gcc_p, struct type *type)
 {
   return (TYPE_LENGTH (type) > 8);
 }
 
 
-static unsigned char *
+unsigned char *
 d10v_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
 {
   static unsigned char breakpoint[] =
@@ -193,20 +193,7 @@
   return register_names[reg_nr];
 }
 
-/* Access the DMAP/IMAP registers in a target independent way.
-
-   Divide the D10V's 64k data space into four 16k segments:
-   0x0000 -- 0x3fff, 0x4000 -- 0x7fff, 0x8000 -- 0xbfff, and 
-   0xc000 -- 0xffff.
-
-   On the TS2, the first two segments (0x0000 -- 0x3fff, 0x4000 --
-   0x7fff) always map to the on-chip data RAM, and the fourth always
-   maps to I/O space.  The third (0x8000 - 0xbfff) can be mapped into
-   unified memory or instruction memory, under the control of the
-   single DMAP register.
-
-   On the TS3, there are four DMAP registers, each of which controls
-   one of the segments.  */
+/* Access the DMAP/IMAP registers in a target independent way. */
 
 static unsigned long
 d10v_ts2_dmap_register (int reg_nr)
@@ -289,7 +276,7 @@
 /* Index within `registers' of the first byte of the space for
    register REG_NR.  */
 
-static int
+int
 d10v_register_byte (int reg_nr)
 {
   if (reg_nr < A0_REGNUM)
@@ -306,7 +293,7 @@
 /* Number of bytes of storage in the actual machine representation for
    register REG_NR.  */
 
-static int
+int
 d10v_register_raw_size (int reg_nr)
 {
   if (reg_nr < A0_REGNUM)
@@ -320,7 +307,7 @@
 /* Number of bytes of storage in the program's representation
    for register N.  */
 
-static int
+int
 d10v_register_virtual_size (int reg_nr)
 {
   return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (reg_nr));
@@ -329,7 +316,7 @@
 /* Return the GDB type object for the "standard" data type
    of data in register N.  */
 
-static struct type *
+struct type *
 d10v_register_virtual_type (int reg_nr)
 {
   if (reg_nr >= A0_REGNUM
@@ -343,13 +330,13 @@
 }
 
 /* convert $pc and $sp to/from virtual addresses */
-static int
+int
 d10v_register_convertible (int nr)
 {
   return ((nr) == PC_REGNUM || (nr) == SP_REGNUM);
 }
 
-static void
+void
 d10v_register_convert_to_virtual (int regnum, struct type *type, char *from,
 				  char *to)
 {
@@ -361,7 +348,7 @@
   store_unsigned_integer (to, TYPE_LENGTH (type), x);
 }
 
-static void
+void
 d10v_register_convert_to_raw (struct type *type, int regnum, char *from,
 			      char *to)
 {
@@ -373,38 +360,38 @@
 }
 
 
-static CORE_ADDR
+CORE_ADDR
 d10v_make_daddr (CORE_ADDR x)
 {
   return ((x) | DMEM_START);
 }
 
-static CORE_ADDR
+CORE_ADDR
 d10v_make_iaddr (CORE_ADDR x)
 {
   return (((x) << 2) | IMEM_START);
 }
 
-static int
+int
 d10v_daddr_p (CORE_ADDR x)
 {
   return (((x) & 0x3000000) == DMEM_START);
 }
 
-static int
+int
 d10v_iaddr_p (CORE_ADDR x)
 {
   return (((x) & 0x3000000) == IMEM_START);
 }
 
 
-static CORE_ADDR
+CORE_ADDR
 d10v_convert_iaddr_to_raw (CORE_ADDR x)
 {
   return (((x) >> 2) & 0xffff);
 }
 
-static CORE_ADDR
+CORE_ADDR
 d10v_convert_daddr_to_raw (CORE_ADDR x)
 {
   return ((x) & 0xffff);
@@ -416,7 +403,7 @@
    We store structs through a pointer passed in the first Argument
    register. */
 
-static void
+void
 d10v_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
 {
   write_register (ARG1_REGNUM, (addr));
@@ -427,7 +414,7 @@
 
    Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
 
-static void
+void
 d10v_store_return_value (struct type *type, char *valbuf)
 {
   write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
@@ -439,7 +426,7 @@
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 
-static CORE_ADDR
+CORE_ADDR
 d10v_extract_struct_value_address (char *regbuf)
 {
   return (extract_address ((regbuf) + REGISTER_BYTE (ARG1_REGNUM),
@@ -447,7 +434,7 @@
 	  | DMEM_START);
 }
 
-static CORE_ADDR
+CORE_ADDR
 d10v_frame_saved_pc (struct frame_info *frame)
 {
   return ((frame)->extra_info->return_pc);
@@ -457,7 +444,7 @@
    use frame->return_pc beause that is determined by reading R13 off
    the stack and that may not be written yet. */
 
-static CORE_ADDR
+CORE_ADDR
 d10v_saved_pc_after_call (struct frame_info *frame)
 {
   return ((read_register (LR_REGNUM) << 2)
@@ -467,7 +454,7 @@
 /* Discard from the stack the innermost frame, restoring all saved
    registers.  */
 
-static void
+void
 d10v_pop_frame (void)
 {
   generic_pop_current_frame (do_d10v_pop_frame);
@@ -546,7 +533,7 @@
   return 0;
 }
 
-static CORE_ADDR
+CORE_ADDR
 d10v_skip_prologue (CORE_ADDR pc)
 {
   unsigned long op;
@@ -614,7 +601,7 @@
    INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
  */
 
-static CORE_ADDR
+CORE_ADDR
 d10v_frame_chain (struct frame_info *fi)
 {
   d10v_frame_init_saved_regs (fi);
@@ -636,7 +623,7 @@
 				     REGISTER_RAW_SIZE (FP_REGNUM)))
     return (CORE_ADDR) 0;
 
-  return d10v_make_daddr (read_memory_unsigned_integer (fi->saved_regs[FP_REGNUM],
+  return D10V_MAKE_DADDR (read_memory_unsigned_integer (fi->saved_regs[FP_REGNUM],
 					    REGISTER_RAW_SIZE (FP_REGNUM)));
 }
 
@@ -713,7 +700,7 @@
    in the stack frame.  sp is even more special: the address we return
    for it IS the sp for the next frame. */
 
-static void
+void
 d10v_frame_init_saved_regs (struct frame_info *fi)
 {
   CORE_ADDR fp, pc;
@@ -780,7 +767,7 @@
   fi->extra_info->size = -next_addr;
 
   if (!(fp & 0xffff))
-    fp = d10v_make_daddr (read_register (SP_REGNUM));
+    fp = D10V_MAKE_DADDR (read_register (SP_REGNUM));
 
   for (i = 0; i < NUM_REGS - 1; i++)
     if (fi->saved_regs[i])
@@ -791,11 +778,11 @@
   if (fi->saved_regs[LR_REGNUM])
     {
       CORE_ADDR return_pc = read_memory_unsigned_integer (fi->saved_regs[LR_REGNUM], REGISTER_RAW_SIZE (LR_REGNUM));
-      fi->extra_info->return_pc = d10v_make_iaddr (return_pc);
+      fi->extra_info->return_pc = D10V_MAKE_IADDR (return_pc);
     }
   else
     {
-      fi->extra_info->return_pc = d10v_make_iaddr (read_register (LR_REGNUM));
+      fi->extra_info->return_pc = D10V_MAKE_IADDR (read_register (LR_REGNUM));
     }
 
   /* th SP is not normally (ever?) saved, but check anyway */
@@ -814,7 +801,7 @@
     }
 }
 
-static void
+void
 d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
   fi->extra_info = (struct frame_extra_info *)
@@ -843,7 +830,7 @@
   int a;
   printf_filtered ("PC=%04lx (0x%lx) PSW=%04lx RPT_S=%04lx RPT_E=%04lx RPT_C=%04lx\n",
 		   (long) read_register (PC_REGNUM),
-		   (long) d10v_make_iaddr (read_register (PC_REGNUM)),
+		   (long) D10V_MAKE_IADDR (read_register (PC_REGNUM)),
 		   (long) read_register (PSW_REGNUM),
 		   (long) read_register (24),
 		   (long) read_register (25),
@@ -897,64 +884,64 @@
   printf_filtered ("\n");
 }
 
-static CORE_ADDR
-d10v_read_pc (ptid_t ptid)
+CORE_ADDR
+d10v_read_pc (int pid)
 {
-  ptid_t save_ptid;
+  int save_pid;
   CORE_ADDR pc;
   CORE_ADDR retval;
 
-  save_ptid = inferior_ptid;
-  inferior_ptid = ptid;
+  save_pid = inferior_pid;
+  inferior_pid = pid;
   pc = (int) read_register (PC_REGNUM);
-  inferior_ptid = save_ptid;
-  retval = d10v_make_iaddr (pc);
+  inferior_pid = save_pid;
+  retval = D10V_MAKE_IADDR (pc);
   return retval;
 }
 
-static void
-d10v_write_pc (CORE_ADDR val, ptid_t ptid)
+void
+d10v_write_pc (CORE_ADDR val, int pid)
 {
-  ptid_t save_ptid;
+  int save_pid;
 
-  save_ptid = inferior_ptid;
-  inferior_ptid = ptid;
-  write_register (PC_REGNUM, d10v_convert_iaddr_to_raw (val));
-  inferior_ptid = save_ptid;
+  save_pid = inferior_pid;
+  inferior_pid = pid;
+  write_register (PC_REGNUM, D10V_CONVERT_IADDR_TO_RAW (val));
+  inferior_pid = save_pid;
 }
 
-static CORE_ADDR
+CORE_ADDR
 d10v_read_sp (void)
 {
-  return (d10v_make_daddr (read_register (SP_REGNUM)));
+  return (D10V_MAKE_DADDR (read_register (SP_REGNUM)));
 }
 
-static void
+void
 d10v_write_sp (CORE_ADDR val)
 {
-  write_register (SP_REGNUM, d10v_convert_daddr_to_raw (val));
+  write_register (SP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
 }
 
-static void
+void
 d10v_write_fp (CORE_ADDR val)
 {
-  write_register (FP_REGNUM, d10v_convert_daddr_to_raw (val));
+  write_register (FP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
 }
 
-static CORE_ADDR
+CORE_ADDR
 d10v_read_fp (void)
 {
-  return (d10v_make_daddr (read_register (FP_REGNUM)));
+  return (D10V_MAKE_DADDR (read_register (FP_REGNUM)));
 }
 
 /* Function: push_return_address (pc)
    Set up the return address for the inferior function call.
    Needed for targets where we don't actually execute a JSR/BSR instruction */
 
-static CORE_ADDR
+CORE_ADDR
 d10v_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
 {
-  write_register (LR_REGNUM, d10v_convert_iaddr_to_raw (CALL_DUMMY_ADDRESS ()));
+  write_register (LR_REGNUM, D10V_CONVERT_IADDR_TO_RAW (CALL_DUMMY_ADDRESS ()));
   return sp;
 }
 
@@ -995,7 +982,7 @@
 }
 
 
-static CORE_ADDR
+CORE_ADDR
 d10v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
 		     int struct_return, CORE_ADDR struct_addr)
 {
@@ -1021,12 +1008,12 @@
 	      && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC))
 	    {
 	      /* function pointer */
-	      val = d10v_convert_iaddr_to_raw (val);
+	      val = D10V_CONVERT_IADDR_TO_RAW (val);
 	    }
-	  else if (d10v_iaddr_p (val))
+	  else if (D10V_IADDR_P (val))
 	    {
 	      /* also function pointer! */
-	      val = d10v_convert_daddr_to_raw (val);
+	      val = D10V_CONVERT_DADDR_TO_RAW (val);
 	    }
 	  else
 	    {
@@ -1092,7 +1079,7 @@
 /* Given a return value in `regbuf' with a type `valtype', 
    extract and copy its value into `valbuf'.  */
 
-static void
+void
 d10v_extract_return_value (struct type *type, char regbuf[REGISTER_BYTES],
 			   char *valbuf)
 {
@@ -1106,7 +1093,7 @@
       int num;
       short snum;
       snum = extract_address (regbuf + REGISTER_BYTE (RET1_REGNUM), REGISTER_RAW_SIZE (RET1_REGNUM));
-      store_address (valbuf, 4, d10v_make_iaddr (snum));
+      store_address (valbuf, 4, D10V_MAKE_IADDR (snum));
     }
   else if (TYPE_CODE (type) == TYPE_CODE_PTR)
     {
@@ -1114,7 +1101,7 @@
       int num;
       short snum;
       snum = extract_address (regbuf + REGISTER_BYTE (RET1_REGNUM), REGISTER_RAW_SIZE (RET1_REGNUM));
-      store_address (valbuf, 4, d10v_make_daddr (snum));
+      store_address (valbuf, 4, D10V_MAKE_DADDR (snum));
     }
   else
     {
diff --git a/gdb/defs.h b/gdb/defs.h
index aa69216..72f5184 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -73,12 +73,9 @@
 
 #define GDB_MULTI_ARCH_PARTIAL 1
 
-/* The target is partially multi-arched. Both the multi-arch vector
-   and "tm.h" provide definitions. "tm.h" cannot override a definition
-   provided by the multi-arch vector.  It is detected as a compilation
-   error.
-
-   This setting is only useful during a multi-arch conversion. */
+/* The target is multi-arched.  The MULTI-ARCH vector provides all
+   definitions.  "tm.h" is included and may provide definitions of
+   non- multi-arch macros..  */
 
 #define GDB_MULTI_ARCH_TM 2
 
@@ -345,75 +342,11 @@
 
     /* Yes, this pains me, too.  But LynxOS didn't have SIG32, and now
        Linux does, and we can't disturb the numbering, since it's part
-       of the remote protocol.  Note that in some GDB's
-       TARGET_SIGNAL_REALTIME_32 is number 76.  */
+       of the protocol.  Note that in some GDB's TARGET_SIGNAL_REALTIME_32
+       is number 76.  */
     TARGET_SIGNAL_REALTIME_32,
-    /* Yet another pain, IRIX 6 has SIG64. */
+    /* Yet another pain, IRIX 6 has SIG64.  */
     TARGET_SIGNAL_REALTIME_64,
-    /* Yet another pain, Linux/MIPS might go up to 128. */
-    TARGET_SIGNAL_REALTIME_65,
-    TARGET_SIGNAL_REALTIME_66,
-    TARGET_SIGNAL_REALTIME_67,
-    TARGET_SIGNAL_REALTIME_68,
-    TARGET_SIGNAL_REALTIME_69,
-    TARGET_SIGNAL_REALTIME_70,
-    TARGET_SIGNAL_REALTIME_71,
-    TARGET_SIGNAL_REALTIME_72,
-    TARGET_SIGNAL_REALTIME_73,
-    TARGET_SIGNAL_REALTIME_74,
-    TARGET_SIGNAL_REALTIME_75,
-    TARGET_SIGNAL_REALTIME_76,
-    TARGET_SIGNAL_REALTIME_77,
-    TARGET_SIGNAL_REALTIME_78,
-    TARGET_SIGNAL_REALTIME_79,
-    TARGET_SIGNAL_REALTIME_80,
-    TARGET_SIGNAL_REALTIME_81,
-    TARGET_SIGNAL_REALTIME_82,
-    TARGET_SIGNAL_REALTIME_83,
-    TARGET_SIGNAL_REALTIME_84,
-    TARGET_SIGNAL_REALTIME_85,
-    TARGET_SIGNAL_REALTIME_86,
-    TARGET_SIGNAL_REALTIME_87,
-    TARGET_SIGNAL_REALTIME_88,
-    TARGET_SIGNAL_REALTIME_89,
-    TARGET_SIGNAL_REALTIME_90,
-    TARGET_SIGNAL_REALTIME_91,
-    TARGET_SIGNAL_REALTIME_92,
-    TARGET_SIGNAL_REALTIME_93,
-    TARGET_SIGNAL_REALTIME_94,
-    TARGET_SIGNAL_REALTIME_95,
-    TARGET_SIGNAL_REALTIME_96,
-    TARGET_SIGNAL_REALTIME_97,
-    TARGET_SIGNAL_REALTIME_98,
-    TARGET_SIGNAL_REALTIME_99,
-    TARGET_SIGNAL_REALTIME_100,
-    TARGET_SIGNAL_REALTIME_101,
-    TARGET_SIGNAL_REALTIME_102,
-    TARGET_SIGNAL_REALTIME_103,
-    TARGET_SIGNAL_REALTIME_104,
-    TARGET_SIGNAL_REALTIME_105,
-    TARGET_SIGNAL_REALTIME_106,
-    TARGET_SIGNAL_REALTIME_107,
-    TARGET_SIGNAL_REALTIME_108,
-    TARGET_SIGNAL_REALTIME_109,
-    TARGET_SIGNAL_REALTIME_110,
-    TARGET_SIGNAL_REALTIME_111,
-    TARGET_SIGNAL_REALTIME_112,
-    TARGET_SIGNAL_REALTIME_113,
-    TARGET_SIGNAL_REALTIME_114,
-    TARGET_SIGNAL_REALTIME_115,
-    TARGET_SIGNAL_REALTIME_116,
-    TARGET_SIGNAL_REALTIME_117,
-    TARGET_SIGNAL_REALTIME_118,
-    TARGET_SIGNAL_REALTIME_119,
-    TARGET_SIGNAL_REALTIME_120,
-    TARGET_SIGNAL_REALTIME_121,
-    TARGET_SIGNAL_REALTIME_122,
-    TARGET_SIGNAL_REALTIME_123,
-    TARGET_SIGNAL_REALTIME_124,
-    TARGET_SIGNAL_REALTIME_125,
-    TARGET_SIGNAL_REALTIME_126,
-    TARGET_SIGNAL_REALTIME_127,
 
 #if defined(MACH) || defined(__MACH__)
     /* Mach exceptions */
@@ -765,7 +698,7 @@
 
 /* From source.c */
 
-extern int openp (const char *, int, const char *, int, int, char **);
+extern int openp (char *, int, char *, int, int, char **);
 
 extern int source_full_path_of (char *, char **);
 
@@ -910,39 +843,6 @@
     /* Use the default setting which the user has specified.  */
     Val_pretty_default
   };
-
-/* The ptid struct is a collection of the various "ids" necessary
-   for identifying the inferior.  This consists of the process id
-   (pid), thread id (tid), and other fields necessary for uniquely
-   identifying the inferior process/thread being debugged.  When
-   manipulating ptids, the constructors, accessors, and predicate
-   declared in inferior.h should be used.  These are as follows:
-
-      ptid_build	- Make a new ptid from a pid, lwp, and tid.
-      pid_to_ptid	- Make a new ptid from just a pid.
-      ptid_get_pid	- Fetch the pid component of a ptid.
-      ptid_get_lwp	- Fetch the lwp component of a ptid.
-      ptid_get_tid	- Fetch the tid component of a ptid.
-      ptid_equal	- Test to see if two ptids are equal.
-
-   Please do NOT access the struct ptid members directly (except, of
-   course, in the implementation of the above ptid manipulation
-   functions).  */
-
-struct ptid
-  {
-    /* Process id */
-    int pid;
-
-    /* Lightweight process id */
-    long lwp;
-
-    /* Thread id */
-    long tid;
-  };
-
-typedef struct ptid ptid_t;
-
 
 
 /* Optional host machine definition.  Pure autoconf targets will not
@@ -987,7 +887,13 @@
 #include "fopen-same.h"
 #endif
 
+/* Microsoft C can't deal with const pointers */
+
+#ifdef _MSC_VER
+#define CONST_PTR
+#else
 #define CONST_PTR const
+#endif
 
 /* Defaults for system-wide constants (if not defined by xm.h, we fake it).
    FIXME: Assumes 2's complement arithmetic */
@@ -1153,6 +1059,11 @@
 #endif
 
 #ifdef HAVE_STDLIB_H
+#if defined(_MSC_VER) && !defined(__cplusplus)
+/* msvc defines these in stdlib.h for c code */
+#undef min
+#undef max
+#endif
 #include <stdlib.h>
 #endif
 #ifndef min
@@ -1326,6 +1237,19 @@
 extern DOUBLEST extract_floating (void *, int);
 extern void store_floating (void *, int, DOUBLEST);
 
+/* On some machines there are bits in addresses which are not really
+   part of the address, but are used by the kernel, the hardware, etc.
+   for special purposes.  ADDR_BITS_REMOVE takes out any such bits
+   so we get a "real" address such as one would find in a symbol
+   table.  This is used only for addresses of instructions, and even then
+   I'm not sure it's used in all contexts.  It exists to deal with there
+   being a few stray bits in the PC which would mislead us, not as some sort
+   of generic thing to handle alignment or segmentation (it's possible it
+   should be in TARGET_READ_PC instead). */
+#if !defined (ADDR_BITS_REMOVE)
+#define ADDR_BITS_REMOVE(addr) (addr)
+#endif /* No ADDR_BITS_REMOVE.  */
+
 /* From valops.c */
 
 extern CORE_ADDR push_bytes (CORE_ADDR, char *, int);
@@ -1378,8 +1302,7 @@
 extern void (*register_changed_hook) (int regno);
 extern void (*memory_changed_hook) (CORE_ADDR addr, int len);
 extern void (*context_hook) (int);
-extern ptid_t (*target_wait_hook) (ptid_t ptid,
-                                         struct target_waitstatus * status);
+extern int (*target_wait_hook) (int pid, struct target_waitstatus * status);
 
 extern void (*attach_hook) (void);
 extern void (*detach_hook) (void);
@@ -1407,24 +1330,43 @@
 #define DIRNAME_SEPARATOR ':'
 #endif
 
+#ifndef SLASH_P
+#if defined(__GO32__)||defined(_WIN32)
+#define SLASH_P(X) ((X)=='\\')
+#else
+#define SLASH_P(X) ((X)=='/')
+#endif
+#endif
+
+#ifndef SLASH_CHAR
+#if defined(__GO32__)||defined(_WIN32)
+#define SLASH_CHAR '\\'
+#else
+#define SLASH_CHAR '/'
+#endif
+#endif
+
 #ifndef SLASH_STRING
-#ifdef _WIN32
+#if defined(__GO32__)||defined(_WIN32)
 #define SLASH_STRING "\\"
 #else
 #define SLASH_STRING "/"
 #endif
 #endif
 
-/* Provide default definitions of PIDGET, TIDGET, and MERGEPID.
-   The name ``TIDGET'' is a historical accident.  Many uses of TIDGET
-   in the code actually refer to a lightweight process id, i.e,
-   something that can be considered a process id in its own right for
-   certain purposes.  */
+#ifndef ROOTED_P
+#define ROOTED_P(X) (SLASH_P((X)[0]))
+#endif
+
+/* On some systems, PIDGET is defined to extract the inferior pid from
+   an internal pid that has the thread id and pid in seperate bit
+   fields.  If not defined, then just use the entire internal pid as
+   the actual pid. */
 
 #ifndef PIDGET
-#define PIDGET(PTID) (ptid_get_pid (PTID))
-#define TIDGET(PTID) (ptid_get_lwp (PTID))
-#define MERGEPID(PID, TID) ptid_build (PID, TID, 0)
+#define PIDGET(PID) (PID)
+#define TIDGET(PID) 0
+#define MERGEPID(PID, TID) (PID)
 #endif
 
 /* Define well known filenos if the system does not define them.  */
diff --git a/gdb/dink32-rom.c b/gdb/dink32-rom.c
index f62e712..32e3279 100644
--- a/gdb/dink32-rom.c
+++ b/gdb/dink32-rom.c
@@ -99,13 +99,15 @@
 static void
 dink32_load (struct monitor_ops *monops, char *filename, int from_tty)
 {
+  extern int inferior_pid;
+
   generic_load (filename, from_tty);
 
   /* Finally, make the PC point at the start address */
   if (exec_bfd)
     write_pc (bfd_get_start_address (exec_bfd));
 
-  inferior_ptid = null_ptid;		/* No process now */
+  inferior_pid = 0;		/* No process now */
 }
 
 
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index ef38bc5..42b5517 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,63 +1,3 @@
-2001-07-04  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdb.texinfo (Mode Options): Mention the mi0 and mi1
-	interpreters.
-
-2001-06-15  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbint.texinfo (Target Architecture Definition): GDBARCH is a C
-	structure and not macros.
-	(Host Definition): Document that much of this chapter is obsolete.
-	(Target Architecture Definition): Update list of files that make
-	up a target architecture.
-	(Coding): Update.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbint.texinfo (Target Architecture Definition): Update
-	EXTRACT_STRUCT_VALUE_ADDRESS and EXTRACT_STRUCT_VALUE_ADDRESS_P.
-	The latter has been changed to a true predicate.
-
-2001-06-17  Eli Zaretskii  <eliz@is.elta.co.il>
-
-	* annotate.texi: Add @noindent where needed.  From Dmitry
-	Sivachenko <dima@Chg.RU>.
-	* gdb.texinfo: Indexing fix.  From Dmitry Sivachenko.
-
-2001-06-16  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdb.texinfo (Protocol): Fix typo.  Extra parenthesis.
-
-2001-06-14  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdb.texinfo (Remote Protocol): Document that the ``!'' packet
-	returns ``OK''.  Document that the ``R'' packet does not reply.
-
-2001-06-13  Michael Snyder  <msnyder@redhat.com>
-
-	* gdb.texinfo (Protocol): Add doc for new packet "qSymbol:".
-
-2001-06-13  Eli Zaretskii  <eliz@is.elta.co.il>
-
-	* gdb.texinfo (Signals): Clarify the default setting of signal
-	handling.
-
-2001-05-14  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbint.texinfo (CLEAR_DEFERRED_STORES): Delete stray @item
-	(FRAME_ARGS_ADDRESS_CORRECT): Ditto.
-
-2001-05-12  Andrew Cagney  <ac131313@redhat.com>
-
-	* Makefile.in (GDBvn.texi): Set GDBVN from ../version.in.
-
-2001-05-10  Eli Zaretskii  <eliz@is.elta.co.il>
-
-	* gdbint.texinfo (Clean Design and Portable Implementation):
-	Renamed from "Clean Design".
-	(Clean Design and Portable Implementation): Document portable
-	methods of handling file names, and the associated macros.
-
 2001-04-02  Eli Zaretskii  <eliz@is.elta.co.il>
 
 	* gdb.texinfo (Tracepoint Actions): Mention the "info scope"
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index d483330..52e9b1a 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -215,9 +215,9 @@
 refcard.ps : refcard.dvi
 	$(DVIPS) -t landscape -o $@ $?
 
-# File to record current GDB version number (copied from main dir version.in)
-GDBvn.texi : ${gdbdir}/version.in
-	echo "@set GDBVN `head -1 $(srcdir)/../version.in`" > ./GDBvn.new
+# File to record current GDB version number (copied from main dir Makefile.in)
+GDBvn.texi : ${gdbdir}/Makefile.in
+	echo "@set GDBVN `sed <$(srcdir)/../Makefile.in -n 's/^VERSION *= *//p'`" > ./GDBvn.new
 	mv GDBvn.new GDBvn.texi
 
 # Updated atomically
diff --git a/gdb/doc/annotate.texi b/gdb/doc/annotate.texi
index 0d7e117..2a5a8bc 100644
--- a/gdb/doc/annotate.texi
+++ b/gdb/doc/annotate.texi
@@ -158,7 +158,6 @@
 ^Z^Zvalue-history-end
 @end smallexample
 
-@noindent
 where @var{history-number} is the number it is getting in the value
 history, @var{history-string} is a string, such as @samp{$5 = }, which
 introduces the value to the user, @var{the-value} is the output
@@ -193,7 +192,6 @@
 ^Z^Zarg-end
 @end smallexample
 
-@noindent
 where @var{argument-name} is the name of the argument,
 @var{separator-string} is text which separates the name from the value
 for the user's benefit (such as @samp{=}), and @var{value-flags} and
@@ -216,7 +214,6 @@
 ^Z^Zfield-end
 @end smallexample
 
-@noindent
 where @var{field-name} is the name of the field, @var{separator-string}
 is text which separates the name from the value for the user's benefit
 (such as @samp{=}), and @var{value-flags} and @var{the-value} have the
@@ -228,7 +225,6 @@
 ^Z^Zarray-section-begin @var{array-index} @var{value-flags}
 @end smallexample
 
-@noindent
 where @var{array-index} is the index of the first element being
 annotated and @var{value-flags} has the same meaning as in a
 @code{value-history-begin} annotation.  This is followed by any number
@@ -284,7 +280,6 @@
 @var{level-string}
 @end smallexample
 
-@noindent
 where @var{level} is the number of the frame (0 is the innermost frame,
 and other frames have positive numbers), @var{address} is the address of
 the code executing in that frame, and @var{level-string} is a string
@@ -433,7 +428,6 @@
 ^Z^Zdisplay-end
 @end smallexample
 
-@noindent
 where @var{number} is the number of the display, @var{number-separator}
 is intended to separate the number from what follows for the user,
 @var{format} includes information such as the size, format, or other
@@ -556,7 +550,6 @@
 ^Z^Zbreakpoints-table
 @end smallexample
 
-@noindent
 where @var{header-entry} has the same syntax as an entry (see below) but
 instead of containing data, it contains strings which are intended to
 convey the meaning of each field to the user.  This is followed by any
@@ -670,7 +663,6 @@
 @var{end-text}
 @end smallexample
 
-@noindent
 where @var{name} is the name of the signal, such as @code{SIGILL} or
 @code{SIGSEGV}, and @var{string} is the explanation of the signal, such
 as @code{Illegal Instruction} or @code{Segmentation fault}.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index ea9dd2d..11a959a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -1045,12 +1045,9 @@
 @cindex @code{--interpreter}
 Use the interpreter @var{interp} for interface with the controlling
 program or device.  This option is meant to be set by programs which
-communicate with @value{GDBN} using it as a back end.
-
-@samp{--interpreter=mi} (or @samp{--interpreter=mi1}) causes
-@value{GDBN} to use the @dfn{gdb/mi interface} (@pxref{GDB/MI, , The
-@sc{gdb/mi} Interface}). The older @sc{gdb/mi} interface, included in
-@value{GDBN} version 5.0 can be selected with @samp{--interpreter=mi0}.
+communicate with @value{GDBN} using it as a back end.  For example,
+@samp{--interpreter=mi} causes @value{GDBN} to use the @dfn{gdbmi
+interface} (@pxref{GDB/MI, , The @sc{gdb/mi} Interface}).
 
 @item -write
 @cindex @code{--write}
@@ -3457,9 +3454,8 @@
 signal.
 
 @cindex handling signals
-Normally, @value{GDBN} is set up to let the non-erroneous signals like
-@code{SIGALRM} be silently passed to your program
-(so as not to interfere with their role in the program's functioning)
+Normally, @value{GDBN} is set up to ignore non-erroneous signals like @code{SIGALRM}
+(so as not to interfere with their role in the functioning of your program)
 but to stop your program immediately whenever an error signal happens.
 You can change these settings with the @code{handle} command.
 
@@ -3477,7 +3473,7 @@
 @item handle @var{signal} @var{keywords}@dots{}
 Change the way @value{GDBN} handles signal @var{signal}.  @var{signal}
 can be the number of a signal or its name (with or without the
-@samp{SIG} at the beginning); a list of signal numbers of the form
+@samp{SIG} at the beginning); a list of signal numberss of the form
 @samp{@var{low}-@var{high}}; or the word @samp{all}, meaning all the
 known signals.  The @var{keywords} say what change to make.
 @end table
@@ -3523,11 +3519,6 @@
 command with @code{pass} or @code{nopass} to control whether your
 program sees that signal when you continue.
 
-The default is set to @code{nostop}, @code{noprint}, @code{pass} for
-non-erroneous signals such as @code{SIGALRM}, @code{SIGWINCH} and
-@code{SIGCHLD}, and to @code{stop}, @code{print}, @code{pass} for the
-erroneous signals.
-
 You can also use the @code{signal} command to prevent your program from
 seeing a signal, or cause it to see a signal it normally would not see,
 or to give it any signal at any time.  For example, if your program stopped
@@ -7323,10 +7314,9 @@
 @code{<=}, and @code{>=} on sets as an error.
 @end quotation
 
-
+@cindex Modula-2 built-ins
 @node Built-In Func/Proc
 @subsubsection Built-in functions and procedures
-@cindex Modula-2 built-ins
 
 Modula-2 also makes available several built-in procedures and functions.
 In describing these, the following metavariables are used:
@@ -9782,16 +9772,17 @@
 @tab Request
 @tab Description
 
-@item extended mode
+@item extended ops
 @tab @code{!}
 @tab
-Enable extended mode.  In extended mode, the remote server is made
-persistent.  The @samp{R} packet is used to restart the program being
-debugged.
+Use the extended remote protocol.  Sticky---only needs to be set once.
+The extended remote protocol supports the @samp{R} packet.
 @item
-@tab reply @samp{OK}
+@tab reply @samp{}
 @tab
-The remote target both supports and has enabled extended mode.
+Stubs that support the extended remote protocol return @samp{} which,
+unfortunately, is identical to the response returned by stubs that do not
+support protocol extensions.
 
 @item last signal
 @tab @code{?}
@@ -10084,13 +10075,9 @@
 @item remote restart
 @tab @code{R}@var{XX}
 @tab
-Restart the program being debugged.  @var{XX}, while needed, is ignored.
-This packet is only available in extended mode.
-@item
-@tab
-no reply
-@tab
-The @samp{R} packet has no reply.
+Restart the remote server.  @var{XX} while needed has no clear
+definition.  FIXME: @emph{An example interaction explaining how this
+packet is used in extended-remote mode is needed}.
 
 @item step
 @tab @code{s}@var{addr}
@@ -10414,52 +10401,6 @@
 @tab
 When @samp{q}@samp{Rcmd} is not recognized.
 
-@item symbol lookup
-@tab @code{qSymbol::}
-@tab
-Notify the target that @value{GDBN} is prepared to serve symbol lookup
-requests.  Accept requests from the target for the values of symbols.
-@item
-@tab
-@tab
-@item
-@tab reply @code{OK}
-@tab
-The target does not need to look up any (more) symbols.
-@item
-@tab reply @code{qSymbol:}@var{sym_name}
-@tab
-The target requests the value of symbol @var{sym_name} (hex encoded).  
-@value{GDBN} may provide the value by using the 
-@code{qSymbol:}@var{sym_value}:@var{sym_name}
-message, described below.
-
-@item symbol value
-@tab @code{qSymbol:}@var{sym_value}:@var{sym_name}
-@tab
-Set the value of SYM_NAME to SYM_VALUE.
-@item
-@tab
-@tab
-@var{sym_name} (hex encoded) is the name of a symbol whose value
-the target has previously requested.
-@item
-@tab
-@tab
-@var{sym_value} (hex) is the value for symbol @var{sym_name}.
-If @value{GDBN} cannot supply a value for @var{sym_name}, then this
-field will be empty.
-@item
-@tab reply @code{OK}
-@tab
-The target does not need to look up any (more) symbols.
-@item
-@tab reply @code{qSymbol:}@var{sym_name}
-@tab
-The target requests the value of a new symbol @var{sym_name} (hex encoded).
-@value{GDBN} will continue to supply the values of symbols (if available),
-until the target ceases to request them.
-
 @end multitable
 
 The following @samp{g}/@samp{G} packets have previously been defined.
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index f772be5..77db258 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -1886,11 +1886,6 @@
 
 @chapter Host Definition
 
-@emph{Maintainer's note: In theory, new targets no longer need to use
-the host framework described below.  Instead it should be possible to
-handle everything using autoconf.  Patches eliminating this framework
-welcome.}
-
 With the advent of Autoconf, it's rarely necessary to have host
 definition machinery anymore.
 
@@ -2204,9 +2199,8 @@
 machine-language programs @value{GDBN} can work with, and how it works
 with them.
 
-The target architecture object is implemented as the C structure
-@code{struct gdbarch *}.  The structure, and its methods, are generated
-using the Bourn shell script @file{gdbarch.sh}.
+At present, the target architecture definition consists of a number of C
+macros.
 
 @section Registers and Memory
 
@@ -2390,11 +2384,6 @@
 @cindex register data formats, converting
 @cindex @code{struct value}, converting register contents to
 
-@emph{Maintainer's note: The way GDB manipulates registers is undergoing
-significant change.  Many of the macros and functions refered to in the
-sections below are likely to be made obsolete.  See the file @file{TODO}
-for more up-to-date information.}
-
 Some architectures use one representation for a value when it lives in a
 register, but use a different representation when it lives in memory.
 In @value{GDBN}'s terminology, the @dfn{raw} representation is the one used in
@@ -2678,7 +2667,7 @@
 @value{GDBN} will assume that all registers may be written.
 
 @item DO_DEFERRED_STORES
-@itemx CLEAR_DEFERRED_STORES
+@itemx CLEAR_DEFERRED_STORES@item
 @findex CLEAR_DEFERRED_STORES
 @findex DO_DEFERRED_STORES
 Define this to execute any deferred stores of registers into the inferior,
@@ -2774,13 +2763,12 @@
  
 @item EXTRACT_STRUCT_VALUE_ADDRESS(@var{regbuf})
 @findex EXTRACT_STRUCT_VALUE_ADDRESS
-When defined, extract from the array @var{regbuf} (containing the raw
-register state) the @code{CORE_ADDR} at which a function should return
-its structure value.
+When @code{EXTRACT_STRUCT_VALUE_ADDRESS_P} is non-zero, this is used to extract
+from an array @var{regbuf} (containing the raw register state) the
+address in which a function should return its structure value, as a
+@code{CORE_ADDR} (or an expression that can be used as one).
 
-If not defined, @code{EXTRACT_RETURN_VALUE} is used.
-
-@item EXTRACT_STRUCT_VALUE_ADDRESS_P()
+@item EXTRACT_STRUCT_VALUE_ADDRESS_P
 @findex EXTRACT_STRUCT_VALUE_ADDRESS_P
 Predicate for @code{EXTRACT_STRUCT_VALUE_ADDRESS}.
 
@@ -2803,7 +2791,7 @@
 represented by @var{fi} does not have a stack frame associated with it.
 Otherwise return 0.
 
-@item FRAME_ARGS_ADDRESS_CORRECT
+@item FRAME_ARGS_ADDRESS_CORRECT@item
 @findex FRAME_ARGS_ADDRESS_CORRECT
 See @file{stack.c}.
 
@@ -3464,7 +3452,7 @@
 @section Adding a New Target
 
 @cindex adding a target
-The following files add a target to @value{GDBN}:
+The following files define a target to @value{GDBN}:
 
 @table @file
 @vindex TDEPFILES
@@ -3479,6 +3467,11 @@
 but these are now deprecated, replaced by autoconf, and may go away in
 future versions of @value{GDBN}.
 
+@item gdb/config/@var{arch}/tm-@var{ttt}.h
+(@file{tm.h} is a link to this file, created by @code{configure}).  Contains
+macro definitions about the target machine's registers, stack frame
+format and instructions.
+
 @item gdb/@var{ttt}-tdep.c
 Contains any miscellaneous code required for this target machine.  On
 some machines it doesn't exist at all.  Sometimes the macros in
@@ -3487,28 +3480,15 @@
 function.  This is vastly preferable, since it is easier to understand
 and debug.
 
-@item gdb/@var{arch}-tdep.c
-@itemx gdb/@var{arch}-tdep.h
-This often exists to describe the basic layout of the target machine's
-processor chip (registers, stack, etc.).  If used, it is included by
-@file{@var{ttt}-tdep.h}.  It can be shared among many targets that use
-the same processor.
-
-@item gdb/config/@var{arch}/tm-@var{ttt}.h
-(@file{tm.h} is a link to this file, created by @code{configure}).  Contains
-macro definitions about the target machine's registers, stack frame
-format and instructions.
-
-New targets do not need this file and should not create it.
-
 @item gdb/config/@var{arch}/tm-@var{arch}.h
 This often exists to describe the basic layout of the target machine's
 processor chip (registers, stack, etc.).  If used, it is included by
 @file{tm-@var{ttt}.h}.  It can be shared among many targets that use the
 same processor.
 
-New targets do not need this file and should not create it.
-
+@item gdb/@var{arch}-tdep.c
+Similarly, there are often common subroutines that are shared by all
+target machines that use this particular architecture.
 @end table
 
 If you are adding a new operating system for an existing CPU chip, add a
@@ -4058,112 +4038,20 @@
 
 @value{GDBN} follows the GNU coding standards, as described in
 @file{etc/standards.texi}.  This file is also available for anonymous
-FTP from GNU archive sites.  @value{GDBN} takes a strict interpretation
-of the standard; in general, when the GNU standard recommends a practice
-but does not require it, @value{GDBN} requires it.
+FTP from GNU archive sites.  @value{GDBN} takes a strict interpretation of the
+standard; in general, when the GNU standard recommends a practice but
+does not require it, @value{GDBN} requires it.
 
 @value{GDBN} follows an additional set of coding standards specific to
 @value{GDBN}, as described in the following sections.
 
-
-@subsection ISO-C
-
-@value{GDBN} assumes an ISO-C compliant compiler.
-
-@value{GDBN} does not assume an ISO-C or POSIX compliant C library.
-
-
-@subsection Memory Management
-
-@value{GDBN} does not use the functions @code{malloc}, @code{realloc},
-@code{calloc}, @code{free} and @code{asprintf}.
-
-@value{GDBN} uses the functions @code{xmalloc}, @code{xrealloc} and
-@code{xcalloc} when allocating memory.  Unlike @code{malloc} et.al.@:
-these functions do not return when the memory pool is empty.  Instead,
-they unwind the stack using cleanups.  These functions return
-@code{NULL} when requested to allocate a chunk of memory of size zero.
-
-@emph{Pragmatics: By using these functions, the need to check every
-memory allocation is removed.  These functions provide portable
-behavior.}
-
-@value{GDBN} does not use the function @code{free}.
-
-@value{GDBN} uses the function @code{xfree} to return memory to the
-memory pool.  Consistent with ISO-C, this function ignores a request to
-free a @code{NULL} pointer.
-
-@emph{Pragmatics: On some systems @code{free} fails when passed a
-@code{NULL} pointer.}
-
-@value{GDBN} can use the non-portable function @code{alloca} for the
-allocation of small temporary values (such as strings).
-
-@emph{Pragmatics: This function is very non-portable.  Some systems
-restrict the memory being allocated to no more than a few kilobytes.}
-
-@value{GDBN} uses the string function @code{xstrdup} and the print
-function @code{xasprintf}.
-
-@emph{Pragmatics: @code{asprintf} and @code{strdup} can fail.  Print
-functions such as @code{sprintf} are very prone to buffer overflow
-errors.}
-
-
-@subsection Compiler Warnings
 @cindex compiler warnings
-
-With few exceptions, developers should include the configuration option
-@samp{--enable-gdb-build-warnings=,-Werror} when building @value{GDBN}.
-The exceptions are listed in the file @file{gdb/MAINTAINERS}.
-
-This option causes @value{GDBN} (when built using GCC) to be compiled
-with a carefully selected list of compiler warning flags.  Any warnings
-from those flags being treated as errors.
-
-The current list of warning flags includes:
-
-@table @samp
-@item -Wimplicit
-Since @value{GDBN} coding standard requires all functions to be declared
-using a prototype, the flag has the side effect of ensuring that
-prototyped functions are always visible with out resorting to
-@samp{-Wstrict-prototypes}.
-
-@item -Wreturn-type
-Such code often appears to work except on instruction set architectures
-that use register windows.
-
-@item -Wcomment
-
-@item -Wtrigraphs
-
-@item -Wformat
-Since @value{GDBN} uses the @code{format printf} attribute on all
-@code{printf} like functions this checks not just @code{printf} calls
-but also calls to functions such as @code{fprintf_unfiltered}.
-
-@item -Wparentheses
-This warning includes uses of the assignment operator within an
-@code{if} statement.
-
-@item -Wpointer-arith
-
-@item -Wuninitialized
-@end table
-
-@emph{Pragmatics: Due to the way that @value{GDBN} is implemented most
-functions have unused parameters.  Consequently the warning
-@samp{-Wunused-parameter} is precluded from the list.  The macro
-@code{ATTRIBUTE_UNUSED} is not used as it leads to false negatives ---
-it is not an error to have @code{ATTRIBUTE_UNUSED} on a parameter that
-is being used.  The options @samp{-Wall} and @samp{-Wunused} are also
-precluded because they both include @samp{-Wunused-parameter}.}
-
-@emph{Pragmatics: @value{GDBN} has not simply accepted the warnings
-enabled by @samp{-Wall -Werror -W...}.  Instead it is selecting warnings
-when and where their benefits can be demonstrated.}
+You can configure with @samp{--enable-build-warnings} or
+@samp{--enable-gdb-build-warnings} to get GCC to check on a number of
+these rules.  @value{GDBN} sources ought not to engender any complaints,
+unless they are caused by bogus host systems.  (The exact set of enabled
+warnings is currently @samp{-Wimplicit -Wreturn-type -Wcomment
+-Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized}.
 
 @subsection Formatting
 
@@ -4171,54 +4059,28 @@
 The standard GNU recommendations for formatting must be followed
 strictly.
 
-A function declaration should not have its name in column zero.  A
-function definition should have its name in column zero.
+Note that while in a definition, the function's name must be in column
+zero; in a function declaration, the name must be on the same line as
+the return type.
 
-@example
-/* Declaration */
-static void foo (void);
-/* Definition */
-void
-foo (void)
-@{
-@}
-@end example
-
-@emph{Pragmatics: This simplifies scripting.  Function definitions can
-be found using @samp{^function-name}.}
-
-There must be a space between a function or macro name and the opening
-parenthesis of its argument list (except for macro definitions, as
-required by C).  There must not be a space after an open paren/bracket
-or before a close paren/bracket.
+In addition, there must be a space between a function or macro name and
+the opening parenthesis of its argument list (except for macro
+definitions, as required by C).  There must not be a space after an open
+paren/bracket or before a close paren/bracket.
 
 While additional whitespace is generally helpful for reading, do not use
 more than one blank line to separate blocks, and avoid adding whitespace
-after the end of a program line (as of 1/99, some 600 lines had
-whitespace after the semicolon).  Excess whitespace causes difficulties
-for @code{diff} and @code{patch} utilities.
-
-Pointers are declared using the traditional K&R C style:
-
-@example
-void *foo;
-@end example
-
-@noindent
-and not:
-
-@example
-void * foo;
-void* foo;
-@end example
+after the end of a program line (as of 1/99, some 600 lines had whitespace
+after the semicolon).  Excess whitespace causes difficulties for
+@code{diff} and @code{patch} utilities.
 
 @subsection Comments
 
 @cindex comment formatting
 The standard GNU requirements on comments must be followed strictly.
 
-Block comments must appear in the following form, with no @code{/*}- or
-@code{*/}-only lines, and no leading @code{*}:
+Block comments must appear in the following form, with no @samp{/*}- or
+@samp{*/}-only lines, and no leading @samp{*}:
 
 @example
 /* Wait for control to return from inferior to debugger.  If inferior
@@ -4255,101 +4117,23 @@
 However, use functions with moderation.  A thousand one-line functions
 are just as hard to understand as a single thousand-line function.
 
-@emph{Macros are bad, M'kay.}
-
-@cindex types
-
-Declarations like @samp{struct foo *} should be used in preference to
-declarations like @samp{typedef struct foo @{ @dots{} @} *foo_ptr}.
-
-
 @subsection Function Prototypes
-@cindex function prototypes
 
-Prototypes must be used when both @emph{declaring} and @emph{defining}
-a function.  Prototypes for @value{GDBN} functions must include both the
-argument type and name, with the name matching that used in the actual
-function definition.
+@cindex function prototypes
+Prototypes must be used to @emph{declare} functions, and may be used
+to @emph{define} them.  Prototypes for @value{GDBN} functions must
+include both the argument type and name, with the name matching that
+used in the actual function definition.
 
 All external functions should have a declaration in a header file that
 callers include, except for @code{_initialize_*} functions, which must
 be external so that @file{init.c} construction works, but shouldn't be
 visible to random source files.
 
-Where a source file needs a forward declaration of a static function,
-that declaration must appear in a block near the top of the source file.
+All static functions must be declared in a block near the top of the
+source file.
 
-
-@subsection Internal Error Recovery
-
-During its execution, @value{GDBN} can encounter two types of errors.
-User errors and internal errors.  User errors include not only a user
-entering an incorrect command but also problems arising from corrupt
-object files and system errors when interacting with the target.
-Internal errors include situtations where @value{GDBN} has detected, at
-run time, a corrupt or erroneous situtation.
-
-When reporting an internal error, @value{GDBN} uses
-@code{internal_error} and @code{gdb_assert}.
-
-@value{GDBN} must not call @code{abort} or @code{assert}.
-
-@emph{Pragmatics: There is no @code{internal_warning} function.  Either
-the code detected a user error, recovered from it and issued a
-@code{warning} or the code failed to correctly recover from the user
-error and issued an @code{internal_error}.}
-
-@subsection File Names
-
-Any file used when building the core of @value{GDBN} must be in lower
-case. Any file used when building the core of @value{GDBN} must be 8.3
-unique.  These requirements apply to both source and generated files.
-
-@emph{Pragmatics: The core of @value{GDBN} must be buildable on many
-platforms including DJGPP and MacOS/HFS.  Every time an unfriendly file
-is introduced to the build process both @file{Makefile.in} and
-@file{configure.in} need to be modified accordingly.  Compare the
-convoluted conversion process needed to transform @file{COPYING} into
-@file{copying.c} with the conversion needed to transform
-@file{version.in} into @file{version.c}.}
-
-Any file non 8.3 compliant file (that is not used when building the core
-of @value{GDBN}) must be added to @file{gdb/config/djgpp/fnchange.lst}.
-
-@emph{Pragmatics: This is clearly a compromise.}
-
-When @value{GDBN} has a local version of a system header file (ex
-@file{string.h}) the file name based on the POSIX header prefixed with
-@file{gdb_} (@file{gdb_string.h}).
-
-For other files @samp{-} is used as the separator.
-
-
-@subsection Include Files
-
-All @file{.c} files should include @file{defs.h} first.
-
-All @file{.c} files should explicitly include the headers for any
-declarations they refer to.  They should not rely on files being
-included indirectly.
-
-With the exception of the global definitions supplied by @file{defs.h},
-a header file should explictily include the header declaring any
-@code{typedefs} et.al.@: it refers to.
-
-@code{extern} declarations should never appear in @code{.c} files.
-
-All include files should be wrapped in:
-
-@example
-#ifndef INCLUDE_FILE_NAME_H
-#define INCLUDE_FILE_NAME_H
-header body
-#endif
-@end example
-
-
-@subsection Clean Design and Portable Implementation
+@subsection Clean Design
 
 @cindex design
 In addition to getting the syntax right, there's the little question of
@@ -4392,68 +4176,48 @@
 with regard to this feature.
 
 Adding code that handles specific architectures, operating systems,
-target interfaces, or hosts, is not acceptable in generic code.
+target interfaces, or hosts, is not acceptable in generic code.  If a
+hook is needed at that point, invent a generic hook and define it for
+your configuration, with something like:
 
-@cindex portable file name handling
-@cindex file names, portability
-One particularly notorious area where system dependencies tend to
-creep in is handling of file names.  The mainline @value{GDBN} code
-assumes Posix semantics of file names: absolute file names begin with
-a forward slash @file{/}, slashes are used to separate leading
-directories, case-sensitive file names.  These assumptions are not
-necessarily true on non-Posix systems such as MS-Windows.  To avoid
-system-dependent code where you need to take apart or construct a file
-name, use the following portable macros:
+@example
+#ifdef	WRANGLE_SIGNALS
+   WRANGLE_SIGNALS (signo);
+#endif
+@end example
 
-@table @code
-@findex HAVE_DOS_BASED_FILE_SYSTEM
-@item HAVE_DOS_BASED_FILE_SYSTEM
-This preprocessing symbol is defined to a non-zero value on hosts
-whose filesystems belong to the MS-DOS/MS-Windows family.  Use this
-symbol to write conditional code which should only be compiled for
-such hosts.
+In your host, target, or native configuration file, as appropriate,
+define @code{WRANGLE_SIGNALS} to do the machine-dependent thing.  Take a
+bit of care in defining the hook, so that it can be used by other ports
+in the future, if they need a hook in the same place.
 
-@findex IS_DIR_SEPARATOR
-@item IS_DIR_SEPARATOR (@var{c}
-Evaluates to a non-zero value if @var{c} is a directory separator
-character.  On Unix and GNU/Linux systems, only a slash @file{/} is
-such a character, but on Windows, both @file{/} and @file{\} will
-pass.
+If the hook is not defined, the code should do whatever ``most'' machines
+want.  Using @code{#ifdef}, as above, is the preferred way to do this,
+but sometimes that gets convoluted, in which case use
 
-@findex IS_ABSOLUTE_PATH
-@item IS_ABSOLUTE_PATH (@var{file})
-Evaluates to a non-zero value if @var{file} is an absolute file name.
-For Unix and GNU/Linux hosts, a name which begins with a slash
-@file{/} is absolute.  On DOS and Windows, @file{d:/foo} and
-@file{x:\bar} are also absolute file names.
+@example
+#ifndef SPECIAL_FOO_HANDLING
+#define SPECIAL_FOO_HANDLING(pc, sp) (0)
+#endif
+@end example
 
-@findex FILENAME_CMP
-@item FILENAME_CMP (@var{f1}, @var{f2})
-Calls a function which compares file names @var{f1} and @var{f2} as
-appropriate for the underlying host filesystem.  For Posix systems,
-this simply calls @code{strcmp}; on case-insensitive filesystems it
-will call @code{strcasecmp} instead.
+@noindent
+where the macro is used or in an appropriate header file.
 
-@findex DIRNAME_SEPARATOR
-@item DIRNAME_SEPARATOR
-Evaluates to a character which separates directories in
-@code{PATH}-style lists, typically held in environment variables.
-This character is @samp{:} on Unix, @samp{;} on DOS and Windows.
-
-@findex SLASH_STRING
-@item SLASH_STRING
-This evaluates to a constant string you should use to produce an
-absolute filename from leading directories and the file's basename.
-@code{SLASH_STRING} is @code{"/"} on most systems, but might be
-@code{"\\"} for some Windows-based ports.
-@end table
-
-In addition to using these macros, be sure to use portable library
-functions whenever possible.  For example, to extract a directory or a
-basename part from a file name, use the @code{dirname} and
-@code{basename} library functions (available in @code{libiberty} for
-platforms which don't provide them), instead of searching for a slash
-with @code{strrchr}.
+Whether to include a @dfn{small} hook, a hook around the exact pieces of
+code which are system-dependent, or whether to replace a whole function
+with a hook, depends on the case.  A good example of this dilemma can be
+found in @code{get_saved_register}.  All machines that @value{GDBN} 2.8 ran on
+just needed the @code{FRAME_FIND_SAVED_REGS} hook to find the saved
+registers.  Then the SPARC and Pyramid came along, and
+@code{HAVE_REGISTER_WINDOWS} and @code{REGISTER_IN_WINDOW_P} were
+introduced.  Then the 29k and 88k required the @code{GET_SAVED_REGISTER}
+hook.  The first three are examples of small hooks; the latter replaces
+a whole function.  In this specific case, it is useful to have both
+kinds; it would be a bad idea to replace all the uses of the small hooks
+with @code{GET_SAVED_REGISTER}, since that would result in much
+duplicated code.  Other times, duplicating a few lines of code here or
+there is much cleaner than introducing a large number of small hooks.
 
 Another way to generalize @value{GDBN} along a particular interface is with an
 attribute struct.  For example, @value{GDBN} has been generalized to handle
@@ -4478,11 +4242,7 @@
 file would (hooks, @code{#if defined}, etc.), and machines which are
 radically different don't need to use @file{infptrace.c} at all.
 
-All debugging code must be controllable using the @samp{set debug
-@var{module}} command.  Do not use @code{printf} to print trace
-messages.  Use @code{fprintf_unfiltered(gdb_stdlog, ...}.  Do not use
-@code{#ifdef DEBUG}.
-
+Don't put debugging @code{printf}s in the code.
 
 @node Porting GDB
 
diff --git a/gdb/dve3900-rom.c b/gdb/dve3900-rom.c
index feb8e12..1239d16 100644
--- a/gdb/dve3900-rom.c
+++ b/gdb/dve3900-rom.c
@@ -927,7 +927,7 @@
   if (exec_bfd)
     write_pc (bfd_get_start_address (exec_bfd));
 
-  inferior_ptid = null_ptid;		/* No process now */
+  inferior_pid = 0;		/* No process now */
 
   /* This is necessary because many things were based on the PC at the
      time that we attached to the monitor, which is no longer valid
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index a3ca771..17e0701 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -194,7 +194,6 @@
     unsigned int offset;
     unsigned int abbrev;
     char *name;
-    int has_pc_info;
     CORE_ADDR lowpc;
     CORE_ADDR highpc;
     struct dwarf_block *locdesc;
@@ -587,7 +586,7 @@
 static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int);
 
 static char *read_partial_die (struct partial_die_info *,
-			       bfd *, char *,
+			       bfd *, char *, int *,
 			       const struct comp_unit_head *);
 
 static char *read_full_die (struct die_info **, bfd *, char *,
@@ -728,8 +727,7 @@
 static void read_subroutine_type (struct die_info *, struct objfile *,
 				  const struct comp_unit_head *);
 
-static struct die_info *read_comp_unit (char *, bfd *,
-                                        const struct comp_unit_head *);
+struct die_info *read_comp_unit (char *, bfd *, const struct comp_unit_head *);
 
 static void free_die_list (struct die_info *);
 
@@ -758,19 +756,19 @@
 struct die_info *copy_die (struct die_info *);
 #endif
 
-static struct die_info *sibling_die (struct die_info *);
+struct die_info *sibling_die (struct die_info *);
 
-static void dump_die (struct die_info *);
+void dump_die (struct die_info *);
 
-static void dump_die_list (struct die_info *);
+void dump_die_list (struct die_info *);
 
-static void store_in_ref_table (unsigned int, struct die_info *);
+void store_in_ref_table (unsigned int, struct die_info *);
 
 static void dwarf2_empty_hash_tables (void);
 
 static unsigned int dwarf2_get_ref_die_offset (struct attribute *);
 
-static struct die_info *follow_die_ref (unsigned int);
+struct die_info *follow_die_ref (unsigned int);
 
 static struct type *dwarf2_fundamental_type (struct objfile *, int);
 
@@ -972,6 +970,7 @@
   struct partial_die_info comp_unit_die;
   struct partial_symtab *pst;
   struct cleanup *back_to;
+  int comp_unit_has_pc_info;
   CORE_ADDR lowpc, highpc;
 
   info_ptr = dwarf_info_buffer;
@@ -980,20 +979,8 @@
   obstack_init (&dwarf2_tmp_obstack);
   back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL);
 
-  /* Since the objects we're extracting from dwarf_info_buffer vary in
-     length, only the individual functions to extract them (like
-     read_comp_unit_head and read_partial_die) can really know whether
-     the buffer is large enough to hold another complete object.
-
-     At the moment, they don't actually check that.  If
-     dwarf_info_buffer holds just one extra byte after the last
-     compilation unit's dies, then read_comp_unit_head will happily
-     read off the end of the buffer.  read_partial_die is similarly
-     casual.  Those functions should be fixed.
-
-     For this loop condition, simply checking whether there's any data
-     left at all should be sufficient.  */
-  while (info_ptr < dwarf_info_buffer + dwarf_info_size)
+  while ((unsigned int) (info_ptr - dwarf_info_buffer)
+	 + ((info_ptr - dwarf_info_buffer) % 4) < dwarf_info_size)
     {
       struct comp_unit_head cu_header;
       beg_of_comp_unit = info_ptr;
@@ -1025,7 +1012,7 @@
 
       /* Read the compilation unit die */
       info_ptr = read_partial_die (&comp_unit_die, abfd, info_ptr,
-				   &cu_header);
+				   &comp_unit_has_pc_info, &cu_header);
 
       /* Set the language we're debugging */
       set_cu_language (comp_unit_die.language);
@@ -1060,7 +1047,7 @@
 
 	  /* If the compilation unit didn't have an explicit address range,
 	     then use the information extracted from its child dies.  */
-	  if (! comp_unit_die.has_pc_info)
+	  if (!comp_unit_has_pc_info)
 	    {
 	      comp_unit_die.lowpc = lowpc;
 	      comp_unit_die.highpc = highpc;
@@ -1103,20 +1090,22 @@
      back to that level. */
 
   int nesting_level = 1;
+  int has_pc_info;
 
   *lowpc = ((CORE_ADDR) -1);
   *highpc = ((CORE_ADDR) 0);
 
   while (nesting_level)
     {
-      info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu_header);
+      info_ptr = read_partial_die (&pdi, abfd, info_ptr,
+				   &has_pc_info, cu_header);
 
       if (pdi.name)
 	{
 	  switch (pdi.tag)
 	    {
 	    case DW_TAG_subprogram:
-	      if (pdi.has_pc_info)
+	      if (has_pc_info)
 		{
 		  if (pdi.lowpc < *lowpc)
 		    {
@@ -2910,7 +2899,7 @@
 
 /* Read a whole compilation unit into a linked list of dies.  */
 
-static struct die_info *
+struct die_info *
 read_comp_unit (char *info_ptr, bfd *abfd,
 		const struct comp_unit_head *cu_header)
 {
@@ -3134,7 +3123,8 @@
 
 static char *
 read_partial_die (struct partial_die_info *part_die, bfd *abfd,
-		  char *info_ptr, const struct comp_unit_head *cu_header)
+		  char *info_ptr, int *has_pc_info,
+		  const struct comp_unit_head *cu_header)
 {
   unsigned int abbrev_number, bytes_read, i;
   struct abbrev_info *abbrev;
@@ -3145,6 +3135,7 @@
   int has_high_pc_attr = 0;
 
   *part_die = zeroed_partial_die;
+  *has_pc_info = 0;
   abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
   info_ptr += bytes_read;
   if (!abbrev_number)
@@ -3230,7 +3221,7 @@
       int dummy;
 
       spec_ptr = dwarf_info_buffer + dwarf2_get_ref_die_offset (&spec_attr);
-      read_partial_die (&spec_die, abfd, spec_ptr, cu_header);
+      read_partial_die (&spec_die, abfd, spec_ptr, &dummy, cu_header);
       if (spec_die.name)
 	{
 	  part_die->name = spec_die.name;
@@ -3253,7 +3244,7 @@
       && part_die->lowpc < part_die->highpc
       && (part_die->lowpc != 0
 	  || (bfd_get_file_flags (abfd) & HAS_RELOC)))
-    part_die->has_pc_info = 1;
+    *has_pc_info = 1;
   return info_ptr;
 }
 
@@ -3730,9 +3721,6 @@
     case DW_LANG_Mips_Assembler:
       cu_language = language_asm;
       break;
-    case DW_LANG_Java:
-      cu_language = language_java;
-      break;
     case DW_LANG_Ada83:
     case DW_LANG_Cobol74:
     case DW_LANG_Cobol85:
@@ -4725,7 +4713,7 @@
 
 /* Return sibling of die, NULL if no sibling.  */
 
-static struct die_info *
+struct die_info *
 sibling_die (struct die_info *die)
 {
   int nesting_level = 0;
@@ -5511,7 +5499,7 @@
 }
 #endif
 
-static void
+void
 dump_die (struct die_info *die)
 {
   unsigned int i;
@@ -5573,7 +5561,7 @@
     }
 }
 
-static void
+void
 dump_die_list (struct die_info *die)
 {
   while (die)
@@ -5583,7 +5571,7 @@
     }
 }
 
-static void
+void
 store_in_ref_table (unsigned int offset, struct die_info *die)
 {
   int h;
@@ -5625,7 +5613,7 @@
   return result;
 }
 
-static struct die_info *
+struct die_info *
 follow_die_ref (unsigned int offset)
 {
   struct die_info *die;
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 4394e5a..71e383d 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -76,7 +76,7 @@
 
 static void elf_symtab_read (struct objfile *, int);
 
-static void free_elfinfo (PTR);
+static void free_elfinfo (void *);
 
 static struct minimal_symbol *record_minimal_symbol_and_info (char *,
 							      CORE_ADDR,
@@ -88,7 +88,7 @@
 							      struct objfile
 							      *);
 
-static void elf_locate_sections (bfd *, asection *, PTR);
+static void elf_locate_sections (bfd *, asection *, void *);
 
 /* We are called once per section from elf_symfile_read.  We
    need to examine each section we are passed, check to see
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index de148c6..1c19b83 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -89,7 +89,7 @@
 }
 
 
-/* Start an inferior Unix child process and sets inferior_ptid to its pid.
+/* Start an inferior Unix child process and sets inferior_pid to its pid.
    EXEC_FILE is the file to run.
    ALLARGS is a string containing the arguments to the program.
    ENV is the environment vector to pass.  SHELL_FILE is the shell file,
@@ -355,7 +355,7 @@
 
   init_thread_list ();
 
-  inferior_ptid = pid_to_ptid (pid);	/* Needed for wait_for_inferior stuff below */
+  inferior_pid = pid;		/* Needed for wait_for_inferior stuff below */
 
   /* Now that we have a child process, make it our target, and
      initialize anything target-vector-specific that needs initializing.  */
@@ -462,7 +462,7 @@
 	sleep (debug_fork);
 
       /* The child (i.e., the cloned debugger) must now attach to
-         CHILD_PID.  inferior_ptid is presently set to the parent process
+         CHILD_PID.  inferior_pid is presently set to the parent process
          of the fork, while CHILD_PID should be the child process of the
          fork.
 
@@ -471,10 +471,10 @@
        */
       read (handoff_semaphore[SEM_LISTEN], &listen_value, sizeof (listen_value));
 
-      /* Note that we DON'T want to actually detach from inferior_ptid,
+      /* Note that we DON'T want to actually detach from inferior_pid,
          because that would allow it to run free.  The original
          debugger wants to retain control of the process.  So, we
-         just reset inferior_ptid to CHILD_PID, and then ensure that all
+         just reset inferior_pid to CHILD_PID, and then ensure that all
          breakpoints are really set in CHILD_PID.
        */
       target_mourn_inferior ();
diff --git a/gdb/frame.c b/gdb/frame.c
index ea59eba..206955f 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -23,7 +23,7 @@
 #include "frame.h"
 #include "target.h"
 #include "value.h"
-#include "inferior.h"	/* for inferior_ptid */
+#include "inferior.h"	/* for inferior_pid */
 #include "regcache.h"
 
 /* FIND_SAVED_REGISTER ()
diff --git a/gdb/gdb-events.c b/gdb/gdb-events.c
index d118108..ff76640 100644
--- a/gdb/gdb-events.c
+++ b/gdb/gdb-events.c
@@ -1,5 +1,5 @@
 /* User Interface Events.
-   Copyright 1999, 2001 Free Software Foundation, Inc.
+   Copyright 1999, 2000 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions.
 
@@ -81,36 +81,6 @@
   current_event_hooks->breakpoint_modify (b);
 }
 
-void
-tracepoint_create_event (int number)
-{
-  if (gdb_events_debug)
-    fprintf_unfiltered (gdb_stdlog, "tracepoint_create_event\n");
-  if (!current_event_hooks->tracepoint_create)
-    return;
-  current_event_hooks->tracepoint_create (number);
-}
-
-void
-tracepoint_delete_event (int number)
-{
-  if (gdb_events_debug)
-    fprintf_unfiltered (gdb_stdlog, "tracepoint_delete_event\n");
-  if (!current_event_hooks->tracepoint_delete)
-    return;
-  current_event_hooks->tracepoint_delete (number);
-}
-
-void
-tracepoint_modify_event (int number)
-{
-  if (gdb_events_debug)
-    fprintf_unfiltered (gdb_stdlog, "tracepoint_modify_event\n");
-  if (!current_event_hooks->tracepoint_modify)
-    return;
-  current_event_hooks->tracepoint_modify (number);
-}
-
 #endif
 
 #if WITH_GDB_EVENTS
@@ -131,9 +101,6 @@
   breakpoint_create,
   breakpoint_delete,
   breakpoint_modify,
-  tracepoint_create,
-  tracepoint_delete,
-  tracepoint_modify,
   nr_gdb_events
 };
 
@@ -152,21 +119,6 @@
     int b;
   };
 
-struct tracepoint_create
-  {
-    int number;
-  };
-
-struct tracepoint_delete
-  {
-    int number;
-  };
-
-struct tracepoint_modify
-  {
-    int number;
-  };
-
 struct event
   {
     enum gdb_event type;
@@ -176,9 +128,6 @@
 	struct breakpoint_create breakpoint_create;
 	struct breakpoint_delete breakpoint_delete;
 	struct breakpoint_modify breakpoint_modify;
-	struct tracepoint_create tracepoint_create;
-	struct tracepoint_delete tracepoint_delete;
-	struct tracepoint_modify tracepoint_modify;
       }
     data;
   };
@@ -222,33 +171,6 @@
   append (event);
 }
 
-static void
-queue_tracepoint_create (int number)
-{
-  struct event *event = XMALLOC (struct event);
-  event->type = tracepoint_create;
-  event->data.tracepoint_create.number = number;
-  append (event);
-}
-
-static void
-queue_tracepoint_delete (int number)
-{
-  struct event *event = XMALLOC (struct event);
-  event->type = tracepoint_delete;
-  event->data.tracepoint_delete.number = number;
-  append (event);
-}
-
-static void
-queue_tracepoint_modify (int number)
-{
-  struct event *event = XMALLOC (struct event);
-  event->type = tracepoint_modify;
-  event->data.tracepoint_modify.number = number;
-  append (event);
-}
-
 void
 gdb_events_deliver (struct gdb_events *vector)
 {
@@ -282,18 +204,6 @@
 	  vector->breakpoint_modify
 	    (event->data.breakpoint_modify.b);
 	  break;
-	case tracepoint_create:
-	  vector->tracepoint_create
-	    (event->data.tracepoint_create.number);
-	  break;
-	case tracepoint_delete:
-	  vector->tracepoint_delete
-	    (event->data.tracepoint_delete.number);
-	  break;
-	case tracepoint_modify:
-	  vector->tracepoint_modify
-	    (event->data.tracepoint_modify.number);
-	  break;
 	}
       delivering_events = event->next;
       xfree (event);
@@ -309,9 +219,6 @@
   queue_event_hooks.breakpoint_create = queue_breakpoint_create;
   queue_event_hooks.breakpoint_delete = queue_breakpoint_delete;
   queue_event_hooks.breakpoint_modify = queue_breakpoint_modify;
-  queue_event_hooks.tracepoint_create = queue_tracepoint_create;
-  queue_event_hooks.tracepoint_delete = queue_tracepoint_delete;
-  queue_event_hooks.tracepoint_modify = queue_tracepoint_modify;
 #endif
 
   c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,
diff --git a/gdb/gdb-events.h b/gdb/gdb-events.h
index 7d0d86f..65450e8 100644
--- a/gdb/gdb-events.h
+++ b/gdb/gdb-events.h
@@ -1,5 +1,5 @@
 /* User Interface Events.
-   Copyright 1999, 2001 Free Software Foundation, Inc.
+   Copyright 1999, 2000 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions.
 
@@ -54,9 +54,6 @@
 typedef void (gdb_events_breakpoint_create_ftype) (int b);
 typedef void (gdb_events_breakpoint_delete_ftype) (int b);
 typedef void (gdb_events_breakpoint_modify_ftype) (int b);
-typedef void (gdb_events_tracepoint_create_ftype) (int number);
-typedef void (gdb_events_tracepoint_delete_ftype) (int number);
-typedef void (gdb_events_tracepoint_modify_ftype) (int number);
 
 
 /* gdb-events: object. */
@@ -66,9 +63,6 @@
     gdb_events_breakpoint_create_ftype *breakpoint_create;
     gdb_events_breakpoint_delete_ftype *breakpoint_delete;
     gdb_events_breakpoint_modify_ftype *breakpoint_modify;
-    gdb_events_tracepoint_create_ftype *tracepoint_create;
-    gdb_events_tracepoint_delete_ftype *tracepoint_delete;
-    gdb_events_tracepoint_modify_ftype *tracepoint_modify;
   };
 
 
@@ -78,9 +72,6 @@
 extern void breakpoint_create_event (int b);
 extern void breakpoint_delete_event (int b);
 extern void breakpoint_modify_event (int b);
-extern void tracepoint_create_event (int number);
-extern void tracepoint_delete_event (int number);
-extern void tracepoint_modify_event (int number);
 
 
 /* When GDB_EVENTS are not being used, completly disable them. */
@@ -89,9 +80,6 @@
 #define breakpoint_create_event(b) 0
 #define breakpoint_delete_event(b) 0
 #define breakpoint_modify_event(b) 0
-#define tracepoint_create_event(number) 0
-#define tracepoint_delete_event(number) 0
-#define tracepoint_modify_event(number) 0
 #endif
 
 /* Install custom gdb-events hooks. */
diff --git a/gdb/gdb-events.sh b/gdb/gdb-events.sh
index d4713ec..fd488cc 100755
--- a/gdb/gdb-events.sh
+++ b/gdb/gdb-events.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # User Interface Events.
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1999, 2000 Free Software Foundation, Inc.
 #
 # Contributed by Cygnus Solutions.
 #
@@ -61,9 +61,6 @@
 f:void:breakpoint_create:int b:b
 f:void:breakpoint_delete:int b:b
 f:void:breakpoint_modify:int b:b
-f:void:tracepoint_create:int number:number
-f:void:tracepoint_delete:int number:number
-f:void:tracepoint_modify:int number:number
 #*:void:annotate_starting_hook:void
 #*:void:annotate_stopped_hook:void
 #*:void:annotate_signalled_hook:void
@@ -112,7 +109,7 @@
 {
   cat <<EOF
 /* User Interface Events.
-   Copyright 1999, 2001 Free Software Foundation, Inc.
+   Copyright 1999 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions.
 
@@ -277,15 +274,12 @@
 echo "#endif"
 exec 1>&2
 #../move-if-change new-gdb-events.h gdb-events.h
-if test -r gdb-events.h
+if ! test -r gdb-events.h
 then
-  diff -c gdb-events.h new-gdb-events.h
-  if [ $? = 1 ]
-  then
-    echo "gdb-events.h changed? cp new-gdb-events.h gdb-events.h" 1>&2
-  fi
-else
   echo "File missing? mv new-gdb-events.h gdb-events.h" 1>&2
+elif ! diff -c gdb-events.h new-gdb-events.h
+then
+  echo "gdb-events.h changed? cp new-gdb-events.h gdb-events.h" 1>&2
 fi
 
 
@@ -333,34 +327,30 @@
   case "${class}" in
     "*" ) continue ;;
     "?" )
-cat <<EOF
-
-int
-${function}_event_p (${formal})
-{
-  return current_event_hooks->${function};
-}
-
-${returntype}
-${function}_event (${formal})
-{
-  return current_events->${function} (${actual});
-}
-EOF
+	echo ""
+	echo "int"
+	echo "${function}_event_p (${formal})"
+	echo "{"
+	echo "  return current_event_hooks->${function};"
+	echo "}"
+	echo ""
+	echo "${returntype}"
+	echo "${function}_event (${formal})"
+	echo "{"
+	echo "  return current_events->${function} (${actual});"
+	echo "}"
 	;;
      "f" )
-cat <<EOF
-
-void
-${function}_event (${formal})
-{
-  if (gdb_events_debug)
-    fprintf_unfiltered (gdb_stdlog, "${function}_event\n");
-  if (!current_event_hooks->${function})
-    return;
-  current_event_hooks->${function} (${actual});
-}
-EOF
+	echo ""
+	echo "void"
+	echo "${function}_event (${formal})"
+	echo "{"
+	echo "  if (gdb_events_debug)"
+	echo "    fprintf_unfiltered (gdb_stdlog, \"${function}_event\\n\");"
+	echo "  if (!current_event_hooks->${function})"
+	echo "    return;"
+	echo "  current_event_hooks->${function} (${actual});"
+	echo "}"
 	;;
   esac
 done
@@ -478,7 +468,7 @@
       echo "{"
       echo "  struct event *event = XMALLOC (struct event);"
       echo "  event->type = ${function};"
-      for arg in `echo ${actual} | tr '[,]' '[:]' | tr -d '[ ]'`; do
+      for arg in `echo ${actual} | tr '[,]' '[ ]'`; do
         echo "  event->data.${function}.${arg} = ${arg};"
       done
       echo "  append (event);"
@@ -498,7 +488,7 @@
     {
       struct event *event = delivering_events;
       delivering_events = event->next;
-      xfree (event);
+      free (event);
     }
   /* Process any pending events.  Because one of the deliveries could
      bail out we move everything off of the pending queue onto an
@@ -520,7 +510,7 @@
       echo "          vector->${function}"
       sep="            ("
       ass=""
-      for arg in `echo ${actual} | tr '[,]' '[:]' | tr -d '[ ]'`; do
+      for arg in `echo ${actual} | tr '[,]' '[ ]'`; do
         ass="${ass}${sep}event->data.${function}.${arg}"
 	sep=",
              "
@@ -533,7 +523,7 @@
 cat <<EOF
         }
       delivering_events = event->next;
-      xfree (event);
+      free (event);
     }
 }
 EOF
@@ -583,13 +573,10 @@
     -e 's/\(	\)*        /\1	/g'
 mv tmp-gdb-events.c new-gdb-events.c
 # Move if changed?
-if test -r gdb-events.c
+if ! test -r gdb-events.c
 then
-  diff -c gdb-events.c new-gdb-events.c
-  if [ $? = 1 ]
-  then
-    echo "gdb-events.c changed? cp new-gdb-events.c gdb-events.c" 1>&2
-  fi
-else
   echo "File missing? mv new-gdb-events.c gdb-events.c" 1>&2
+elif ! diff -c gdb-events.c new-gdb-events.c
+then
+  echo "gdb-events.c changed? cp new-gdb-events.c gdb-events.c" 1>&2
 fi
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index bac36c2..d84e41d 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -176,8 +176,6 @@
   gdbarch_do_registers_info_ftype *do_registers_info;
   gdbarch_register_sim_regno_ftype *register_sim_regno;
   gdbarch_register_bytes_ok_ftype *register_bytes_ok;
-  gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
-  gdbarch_cannot_store_register_ftype *cannot_store_register;
   int use_generic_dummy_frames;
   int call_dummy_location;
   gdbarch_call_dummy_address_ftype *call_dummy_address;
@@ -192,8 +190,6 @@
   int call_dummy_stack_adjust_p;
   int call_dummy_stack_adjust;
   gdbarch_fix_call_dummy_ftype *fix_call_dummy;
-  gdbarch_init_frame_pc_first_ftype *init_frame_pc_first;
-  gdbarch_init_frame_pc_ftype *init_frame_pc;
   int believe_pcc_promotion;
   int believe_pcc_promotion_type;
   gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
@@ -251,7 +247,6 @@
   const struct floatformat * double_format;
   const struct floatformat * long_double_format;
   gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
-  gdbarch_addr_bits_remove_ftype *addr_bits_remove;
   gdbarch_software_single_step_ftype *software_single_step;
 };
 
@@ -332,10 +327,6 @@
   0,
   0,
   0,
-  0,
-  0,
-  0,
-  0,
   generic_get_saved_register,
   0,
   0,
@@ -391,21 +382,11 @@
   0,
   0,
   0,
-  0,
   /* startup_gdbarch() */
 };
 
 struct gdbarch *current_gdbarch = &startup_gdbarch;
 
-/* Do any initialization needed for a non-multiarch configuration
-   after the _initialize_MODULE functions have been run.  */
-void
-initialize_non_multiarch ()
-{
-  alloc_gdbarch_data (&startup_gdbarch);
-  init_gdbarch_data (&startup_gdbarch);
-}
-
 
 /* Create a new ``struct gdbarch'' based on information provided by
    ``struct gdbarch_info''. */
@@ -459,8 +440,6 @@
   gdbarch->max_register_virtual_size = -1;
   gdbarch->do_registers_info = do_registers_info;
   gdbarch->register_sim_regno = default_register_sim_regno;
-  gdbarch->cannot_fetch_register = cannot_register_not;
-  gdbarch->cannot_store_register = cannot_register_not;
   gdbarch->use_generic_dummy_frames = -1;
   gdbarch->call_dummy_start_offset = -1;
   gdbarch->call_dummy_breakpoint_offset = -1;
@@ -470,8 +449,6 @@
   gdbarch->call_dummy_words = legacy_call_dummy_words;
   gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
   gdbarch->call_dummy_stack_adjust_p = -1;
-  gdbarch->init_frame_pc_first = init_frame_pc_noop;
-  gdbarch->init_frame_pc = init_frame_pc_default;
   gdbarch->coerce_float_to_double = default_coerce_float_to_double;
   gdbarch->register_convertible = generic_register_convertible_not;
   gdbarch->pointer_to_address = unsigned_pointer_to_address;
@@ -488,8 +465,7 @@
   gdbarch->frame_args_skip = -1;
   gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
   gdbarch->extra_stack_alignment_needed = 1;
-  gdbarch->convert_from_func_ptr_addr = core_addr_identity;
-  gdbarch->addr_bits_remove = core_addr_identity;
+  gdbarch->convert_from_func_ptr_addr = default_convert_from_func_ptr_addr;
   /* gdbarch_alloc() */
 
   return gdbarch;
@@ -608,8 +584,6 @@
   /* Skip verify of do_registers_info, invalid_p == 0 */
   /* Skip verify of register_sim_regno, invalid_p == 0 */
   /* Skip verify of register_bytes_ok, has predicate */
-  /* Skip verify of cannot_fetch_register, invalid_p == 0 */
-  /* Skip verify of cannot_store_register, invalid_p == 0 */
   if ((GDB_MULTI_ARCH >= 1)
       && (gdbarch->use_generic_dummy_frames == -1))
     internal_error (__FILE__, __LINE__,
@@ -660,8 +634,6 @@
       && (gdbarch->fix_call_dummy == 0))
     internal_error (__FILE__, __LINE__,
                     "gdbarch: verify_gdbarch: fix_call_dummy invalid");
-  /* Skip verify of init_frame_pc_first, invalid_p == 0 */
-  /* Skip verify of init_frame_pc, invalid_p == 0 */
   /* Skip verify of coerce_float_to_double, invalid_p == 0 */
   if ((GDB_MULTI_ARCH >= 1)
       && (gdbarch->get_saved_register == 0))
@@ -709,7 +681,10 @@
       && (gdbarch->store_return_value == 0))
     internal_error (__FILE__, __LINE__,
                     "gdbarch: verify_gdbarch: store_return_value invalid");
-  /* Skip verify of extract_struct_value_address, has predicate */
+  if ((GDB_MULTI_ARCH >= 2)
+      && (gdbarch->extract_struct_value_address == 0))
+    internal_error (__FILE__, __LINE__,
+                    "gdbarch: verify_gdbarch: extract_struct_value_address invalid");
   if ((GDB_MULTI_ARCH >= 2)
       && (gdbarch->use_struct_convention == 0))
     internal_error (__FILE__, __LINE__,
@@ -788,7 +763,6 @@
   if (gdbarch->long_double_format == 0)
     gdbarch->long_double_format = &floatformat_unknown;
   /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
-  /* Skip verify of addr_bits_remove, invalid_p == 0 */
   /* Skip verify of software_single_step, has predicate */
 }
 
@@ -875,15 +849,15 @@
 #ifdef TARGET_READ_PC
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
-                      "TARGET_READ_PC(ptid)",
-                      XSTRING (TARGET_READ_PC (ptid)));
+                      "TARGET_READ_PC(pid)",
+                      XSTRING (TARGET_READ_PC (pid)));
 #endif
 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
   /* Macro might contain `[{}]' when not multi-arch */
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
-                      "TARGET_WRITE_PC(val, ptid)",
-                      XSTRING (TARGET_WRITE_PC (val, ptid)));
+                      "TARGET_WRITE_PC(val, pid)",
+                      XSTRING (TARGET_WRITE_PC (val, pid)));
 #endif
 #ifdef TARGET_READ_FP
   fprintf_unfiltered (file,
@@ -1050,18 +1024,6 @@
                       "REGISTER_BYTES_OK(nr_bytes)",
                       XSTRING (REGISTER_BYTES_OK (nr_bytes)));
 #endif
-#ifdef CANNOT_FETCH_REGISTER
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "CANNOT_FETCH_REGISTER(regnum)",
-                      XSTRING (CANNOT_FETCH_REGISTER (regnum)));
-#endif
-#ifdef CANNOT_STORE_REGISTER
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "CANNOT_STORE_REGISTER(regnum)",
-                      XSTRING (CANNOT_STORE_REGISTER (regnum)));
-#endif
 #ifdef USE_GENERIC_DUMMY_FRAMES
   fprintf_unfiltered (file,
                       "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
@@ -1136,20 +1098,6 @@
                       "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
                       XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
 #endif
-#if defined (INIT_FRAME_PC_FIRST) && GDB_MULTI_ARCH
-  /* Macro might contain `[{}]' when not multi-arch */
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "INIT_FRAME_PC_FIRST(fromleaf, prev)",
-                      XSTRING (INIT_FRAME_PC_FIRST (fromleaf, prev)));
-#endif
-#if defined (INIT_FRAME_PC) && GDB_MULTI_ARCH
-  /* Macro might contain `[{}]' when not multi-arch */
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "INIT_FRAME_PC(fromleaf, prev)",
-                      XSTRING (INIT_FRAME_PC (fromleaf, prev)));
-#endif
 #ifdef BELIEVE_PCC_PROMOTION
   fprintf_unfiltered (file,
                       "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
@@ -1497,12 +1445,6 @@
                       "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
                       XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
 #endif
-#ifdef ADDR_BITS_REMOVE
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "ADDR_BITS_REMOVE(addr)",
-                      XSTRING (ADDR_BITS_REMOVE (addr)));
-#endif
 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
   /* Macro might contain `[{}]' when not multi-arch */
   fprintf_unfiltered (file,
@@ -1777,20 +1719,6 @@
                         (long) current_gdbarch->register_bytes_ok
                         /*REGISTER_BYTES_OK ()*/);
 #endif
-#ifdef CANNOT_FETCH_REGISTER
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
-                        (long) current_gdbarch->cannot_fetch_register
-                        /*CANNOT_FETCH_REGISTER ()*/);
-#endif
-#ifdef CANNOT_STORE_REGISTER
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
-                        (long) current_gdbarch->cannot_store_register
-                        /*CANNOT_STORE_REGISTER ()*/);
-#endif
 #ifdef USE_GENERIC_DUMMY_FRAMES
   fprintf_unfiltered (file,
                       "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
@@ -1870,20 +1798,6 @@
                         (long) current_gdbarch->fix_call_dummy
                         /*FIX_CALL_DUMMY ()*/);
 #endif
-#ifdef INIT_FRAME_PC_FIRST
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
-                        (long) current_gdbarch->init_frame_pc_first
-                        /*INIT_FRAME_PC_FIRST ()*/);
-#endif
-#ifdef INIT_FRAME_PC
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
-                        (long) current_gdbarch->init_frame_pc
-                        /*INIT_FRAME_PC ()*/);
-#endif
 #ifdef BELIEVE_PCC_PROMOTION
   fprintf_unfiltered (file,
                       "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
@@ -2263,13 +2177,6 @@
                         (long) current_gdbarch->convert_from_func_ptr_addr
                         /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
 #endif
-#ifdef ADDR_BITS_REMOVE
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
-                        (long) current_gdbarch->addr_bits_remove
-                        /*ADDR_BITS_REMOVE ()*/);
-#endif
 #ifdef SOFTWARE_SINGLE_STEP
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
@@ -2485,14 +2392,14 @@
 }
 
 CORE_ADDR
-gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
+gdbarch_read_pc (struct gdbarch *gdbarch, int pid)
 {
   if (gdbarch->read_pc == 0)
     internal_error (__FILE__, __LINE__,
                     "gdbarch: gdbarch_read_pc invalid");
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
-  return gdbarch->read_pc (ptid);
+  return gdbarch->read_pc (pid);
 }
 
 void
@@ -2503,14 +2410,14 @@
 }
 
 void
-gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
+gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid)
 {
   if (gdbarch->write_pc == 0)
     internal_error (__FILE__, __LINE__,
                     "gdbarch: gdbarch_write_pc invalid");
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
-  gdbarch->write_pc (val, ptid);
+  gdbarch->write_pc (val, pid);
 }
 
 void
@@ -3089,42 +2996,6 @@
 }
 
 int
-gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
-{
-  if (gdbarch->cannot_fetch_register == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_cannot_fetch_register invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
-  return gdbarch->cannot_fetch_register (regnum);
-}
-
-void
-set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
-                                   gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
-{
-  gdbarch->cannot_fetch_register = cannot_fetch_register;
-}
-
-int
-gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
-{
-  if (gdbarch->cannot_store_register == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_cannot_store_register invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
-  return gdbarch->cannot_store_register (regnum);
-}
-
-void
-set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
-                                   gdbarch_cannot_store_register_ftype cannot_store_register)
-{
-  gdbarch->cannot_store_register = cannot_store_register;
-}
-
-int
 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
 {
   if (gdbarch->use_generic_dummy_frames == -1)
@@ -3372,42 +3243,6 @@
   gdbarch->fix_call_dummy = fix_call_dummy;
 }
 
-void
-gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
-{
-  if (gdbarch->init_frame_pc_first == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_init_frame_pc_first invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc_first called\n");
-  gdbarch->init_frame_pc_first (fromleaf, prev);
-}
-
-void
-set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch,
-                                 gdbarch_init_frame_pc_first_ftype init_frame_pc_first)
-{
-  gdbarch->init_frame_pc_first = init_frame_pc_first;
-}
-
-void
-gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
-{
-  if (gdbarch->init_frame_pc == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_init_frame_pc invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n");
-  gdbarch->init_frame_pc (fromleaf, prev);
-}
-
-void
-set_gdbarch_init_frame_pc (struct gdbarch *gdbarch,
-                           gdbarch_init_frame_pc_ftype init_frame_pc)
-{
-  gdbarch->init_frame_pc = init_frame_pc;
-}
-
 int
 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
 {
@@ -3852,12 +3687,6 @@
   gdbarch->store_return_value = store_return_value;
 }
 
-int
-gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
-{
-  return gdbarch->extract_struct_value_address != 0;
-}
-
 CORE_ADDR
 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
 {
@@ -4438,24 +4267,6 @@
   gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
 }
 
-CORE_ADDR
-gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
-{
-  if (gdbarch->addr_bits_remove == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_addr_bits_remove invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
-  return gdbarch->addr_bits_remove (addr);
-}
-
-void
-set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
-                              gdbarch_addr_bits_remove_ftype addr_bits_remove)
-{
-  gdbarch->addr_bits_remove = addr_bits_remove;
-}
-
 int
 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
 {
@@ -4833,41 +4644,57 @@
   struct gdbarch_list **list;
   struct gdbarch_registration *rego;
 
-  /* Fill in missing parts of the INFO struct using a number of
-     sources: ``set ...''; INFOabfd supplied; existing target.  */
-
-  /* ``(gdb) set architecture ...'' */
-  if (info.bfd_arch_info == NULL
-      && !TARGET_ARCHITECTURE_AUTO)
-    info.bfd_arch_info = TARGET_ARCHITECTURE;
-  if (info.bfd_arch_info == NULL
-      && info.abfd != NULL
-      && bfd_get_arch (info.abfd) != bfd_arch_unknown
-      && bfd_get_arch (info.abfd) != bfd_arch_obscure)
-    info.bfd_arch_info = bfd_get_arch_info (info.abfd);
+  /* Fill in any missing bits. Most important is the bfd_architecture
+     which is used to select the target architecture. */
+  if (info.bfd_architecture == bfd_arch_unknown)
+    {
+      if (info.bfd_arch_info != NULL)
+	info.bfd_architecture = info.bfd_arch_info->arch;
+      else if (info.abfd != NULL)
+	info.bfd_architecture = bfd_get_arch (info.abfd);
+      /* FIXME - should query BFD for its default architecture. */
+      else
+	info.bfd_architecture = current_gdbarch->bfd_arch_info->arch;
+    }
   if (info.bfd_arch_info == NULL)
-    info.bfd_arch_info = TARGET_ARCHITECTURE;
-
-  /* ``(gdb) set byte-order ...'' */
-  if (info.byte_order == 0
-      && !TARGET_BYTE_ORDER_AUTO)
-    info.byte_order = TARGET_BYTE_ORDER;
-  /* From the INFO struct. */
-  if (info.byte_order == 0
-      && info.abfd != NULL)
-    info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
-		       : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
-		       : 0);
-  /* From the current target. */
+    {
+      if (target_architecture_auto && info.abfd != NULL)
+	info.bfd_arch_info = bfd_get_arch_info (info.abfd);
+      else
+	info.bfd_arch_info = current_gdbarch->bfd_arch_info;
+    }
   if (info.byte_order == 0)
-    info.byte_order = TARGET_BYTE_ORDER;
+    {
+      if (target_byte_order_auto && info.abfd != NULL)
+	info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
+			   : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
+			   : 0);
+      else
+	info.byte_order = current_gdbarch->byte_order;
+      /* FIXME - should query BFD for its default byte-order. */
+    }
+  /* A default for abfd? */
 
-  /* Must have found some sort of architecture. */
-  gdb_assert (info.bfd_arch_info != NULL);
+  /* Find the target that knows about this architecture. */
+  for (rego = gdbarch_registry;
+       rego != NULL;
+       rego = rego->next)
+    if (rego->bfd_architecture == info.bfd_architecture)
+      break;
+  if (rego == NULL)
+    {
+      if (gdbarch_debug)
+	fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
+      return 0;
+    }
 
   if (gdbarch_debug)
     {
       fprintf_unfiltered (gdb_stdlog,
+			  "gdbarch_update: info.bfd_architecture %d (%s)\n",
+			  info.bfd_architecture,
+			  bfd_lookup_arch (info.bfd_architecture, 0)->printable_name);
+      fprintf_unfiltered (gdb_stdlog,
 			  "gdbarch_update: info.bfd_arch_info %s\n",
 			  (info.bfd_arch_info != NULL
 			   ? info.bfd_arch_info->printable_name
@@ -4886,19 +4713,6 @@
 			  (long) info.tdep_info);
     }
 
-  /* Find the target that knows about this architecture. */
-  for (rego = gdbarch_registry;
-       rego != NULL;
-       rego = rego->next)
-    if (rego->bfd_architecture == info.bfd_arch_info->arch)
-      break;
-  if (rego == NULL)
-    {
-      if (gdbarch_debug)
-	fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
-      return 0;
-    }
-
   /* Ask the target for a replacement architecture. */
   new_gdbarch = rego->init (info, rego->arches);
 
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 0ace44b..548d5a0 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -57,18 +57,11 @@
 #endif
 #endif
 
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE)
-#error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file."
-#endif
-
 
 /* The following are pre-initialized by GDBARCH. */
 
 extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbarch);
 /* set_gdbarch_bfd_arch_info() - not applicable - pre-initialized. */
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE)
-#error "Non multi-arch definition of TARGET_ARCHITECTURE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ARCHITECTURE)
 #define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch))
@@ -77,9 +70,6 @@
 
 extern int gdbarch_byte_order (struct gdbarch *gdbarch);
 /* set_gdbarch_byte_order() - not applicable - pre-initialized. */
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER)
-#error "Non multi-arch definition of TARGET_BYTE_ORDER"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BYTE_ORDER)
 #define TARGET_BYTE_ORDER (gdbarch_byte_order (current_gdbarch))
@@ -102,9 +92,6 @@
 
 extern int gdbarch_short_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT)
-#error "Non multi-arch definition of TARGET_SHORT_BIT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_SHORT_BIT)
 #define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch))
@@ -120,9 +107,6 @@
 
 extern int gdbarch_int_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT)
-#error "Non multi-arch definition of TARGET_INT_BIT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_INT_BIT)
 #define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch))
@@ -138,9 +122,6 @@
 
 extern int gdbarch_long_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT)
-#error "Non multi-arch definition of TARGET_LONG_BIT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_BIT)
 #define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch))
@@ -157,9 +138,6 @@
 
 extern int gdbarch_long_long_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT)
-#error "Non multi-arch definition of TARGET_LONG_LONG_BIT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_LONG_BIT)
 #define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch))
@@ -175,9 +153,6 @@
 
 extern int gdbarch_float_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT)
-#error "Non multi-arch definition of TARGET_FLOAT_BIT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_BIT)
 #define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch))
@@ -193,9 +168,6 @@
 
 extern int gdbarch_double_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT)
-#error "Non multi-arch definition of TARGET_DOUBLE_BIT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_BIT)
 #define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch))
@@ -211,9 +183,6 @@
 
 extern int gdbarch_long_double_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_double_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT)
-#error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_BIT)
 #define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch))
@@ -237,9 +206,6 @@
 
 extern int gdbarch_ptr_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT)
-#error "Non multi-arch definition of TARGET_PTR_BIT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PTR_BIT)
 #define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch))
@@ -255,9 +221,6 @@
 
 extern int gdbarch_addr_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT)
-#error "Non multi-arch definition of TARGET_ADDR_BIT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ADDR_BIT)
 #define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch))
@@ -273,9 +236,6 @@
 
 extern int gdbarch_bfd_vma_bit (struct gdbarch *gdbarch);
 extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT)
-#error "Non multi-arch definition of TARGET_BFD_VMA_BIT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BFD_VMA_BIT)
 #define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch))
@@ -289,9 +249,6 @@
 
 extern int gdbarch_ieee_float (struct gdbarch *gdbarch);
 extern void set_gdbarch_ieee_float (struct gdbarch *gdbarch, int ieee_float);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IEEE_FLOAT)
-#error "Non multi-arch definition of IEEE_FLOAT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IEEE_FLOAT)
 #define IEEE_FLOAT (gdbarch_ieee_float (current_gdbarch))
@@ -300,35 +257,29 @@
 
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC)
-#define TARGET_READ_PC(ptid) (generic_target_read_pc (ptid))
+#define TARGET_READ_PC(pid) (generic_target_read_pc (pid))
 #endif
 
-typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid);
-extern CORE_ADDR gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid);
+typedef CORE_ADDR (gdbarch_read_pc_ftype) (int pid);
+extern CORE_ADDR gdbarch_read_pc (struct gdbarch *gdbarch, int pid);
 extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype *read_pc);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC)
-#error "Non multi-arch definition of TARGET_READ_PC"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC)
-#define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid))
+#define TARGET_READ_PC(pid) (gdbarch_read_pc (current_gdbarch, pid))
 #endif
 #endif
 
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_PC)
-#define TARGET_WRITE_PC(val, ptid) (generic_target_write_pc (val, ptid))
+#define TARGET_WRITE_PC(val, pid) (generic_target_write_pc (val, pid))
 #endif
 
-typedef void (gdbarch_write_pc_ftype) (CORE_ADDR val, ptid_t ptid);
-extern void gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid);
+typedef void (gdbarch_write_pc_ftype) (CORE_ADDR val, int pid);
+extern void gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, int pid);
 extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftype *write_pc);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC)
-#error "Non multi-arch definition of TARGET_WRITE_PC"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_PC)
-#define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid))
+#define TARGET_WRITE_PC(val, pid) (gdbarch_write_pc (current_gdbarch, val, pid))
 #endif
 #endif
 
@@ -340,9 +291,6 @@
 typedef CORE_ADDR (gdbarch_read_fp_ftype) (void);
 extern CORE_ADDR gdbarch_read_fp (struct gdbarch *gdbarch);
 extern void set_gdbarch_read_fp (struct gdbarch *gdbarch, gdbarch_read_fp_ftype *read_fp);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_FP)
-#error "Non multi-arch definition of TARGET_READ_FP"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_FP)
 #define TARGET_READ_FP() (gdbarch_read_fp (current_gdbarch))
@@ -357,9 +305,6 @@
 typedef void (gdbarch_write_fp_ftype) (CORE_ADDR val);
 extern void gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val);
 extern void set_gdbarch_write_fp (struct gdbarch *gdbarch, gdbarch_write_fp_ftype *write_fp);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_FP)
-#error "Non multi-arch definition of TARGET_WRITE_FP"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_FP)
 #define TARGET_WRITE_FP(val) (gdbarch_write_fp (current_gdbarch, val))
@@ -374,9 +319,6 @@
 typedef CORE_ADDR (gdbarch_read_sp_ftype) (void);
 extern CORE_ADDR gdbarch_read_sp (struct gdbarch *gdbarch);
 extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype *read_sp);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP)
-#error "Non multi-arch definition of TARGET_READ_SP"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP)
 #define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch))
@@ -391,9 +333,6 @@
 typedef void (gdbarch_write_sp_ftype) (CORE_ADDR val);
 extern void gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
 extern void set_gdbarch_write_sp (struct gdbarch *gdbarch, gdbarch_write_sp_ftype *write_sp);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_SP)
-#error "Non multi-arch definition of TARGET_WRITE_SP"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_SP)
 #define TARGET_WRITE_SP(val) (gdbarch_write_sp (current_gdbarch, val))
@@ -414,9 +353,6 @@
 
 extern int gdbarch_num_regs (struct gdbarch *gdbarch);
 extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS)
-#error "Non multi-arch definition of NUM_REGS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_REGS)
 #define NUM_REGS (gdbarch_num_regs (current_gdbarch))
@@ -435,9 +371,6 @@
 
 extern int gdbarch_num_pseudo_regs (struct gdbarch *gdbarch);
 extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo_regs);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS)
-#error "Non multi-arch definition of NUM_PSEUDO_REGS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_PSEUDO_REGS)
 #define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch))
@@ -446,9 +379,6 @@
 
 extern int gdbarch_sp_regnum (struct gdbarch *gdbarch);
 extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM)
-#error "Non multi-arch definition of SP_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SP_REGNUM)
 #define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch))
@@ -457,9 +387,6 @@
 
 extern int gdbarch_fp_regnum (struct gdbarch *gdbarch);
 extern void set_gdbarch_fp_regnum (struct gdbarch *gdbarch, int fp_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP_REGNUM)
-#error "Non multi-arch definition of FP_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP_REGNUM)
 #define FP_REGNUM (gdbarch_fp_regnum (current_gdbarch))
@@ -468,9 +395,6 @@
 
 extern int gdbarch_pc_regnum (struct gdbarch *gdbarch);
 extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM)
-#error "Non multi-arch definition of PC_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_REGNUM)
 #define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch))
@@ -484,9 +408,6 @@
 
 extern int gdbarch_fp0_regnum (struct gdbarch *gdbarch);
 extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM)
-#error "Non multi-arch definition of FP0_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP0_REGNUM)
 #define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
@@ -500,9 +421,6 @@
 
 extern int gdbarch_npc_regnum (struct gdbarch *gdbarch);
 extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM)
-#error "Non multi-arch definition of NPC_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NPC_REGNUM)
 #define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch))
@@ -516,9 +434,6 @@
 
 extern int gdbarch_nnpc_regnum (struct gdbarch *gdbarch);
 extern void set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch, int nnpc_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NNPC_REGNUM)
-#error "Non multi-arch definition of NNPC_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NNPC_REGNUM)
 #define NNPC_REGNUM (gdbarch_nnpc_regnum (current_gdbarch))
@@ -535,9 +450,6 @@
 typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr);
 extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr);
 extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM)
-#error "Non multi-arch definition of STAB_REG_TO_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STAB_REG_TO_REGNUM)
 #define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
@@ -554,9 +466,6 @@
 typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr);
 extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr);
 extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM)
-#error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ECOFF_REG_TO_REGNUM)
 #define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
@@ -573,9 +482,6 @@
 typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr);
 extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr);
 extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM)
-#error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF_REG_TO_REGNUM)
 #define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
@@ -594,9 +500,6 @@
 typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr);
 extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr);
 extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM)
-#error "Non multi-arch definition of SDB_REG_TO_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SDB_REG_TO_REGNUM)
 #define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
@@ -611,9 +514,6 @@
 typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr);
 extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr);
 extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM)
-#error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_REG_TO_REGNUM)
 #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
@@ -628,9 +528,6 @@
 typedef char * (gdbarch_register_name_ftype) (int regnr);
 extern char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
 extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
-#error "Non multi-arch definition of REGISTER_NAME"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_NAME)
 #define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
@@ -639,9 +536,6 @@
 
 extern int gdbarch_register_size (struct gdbarch *gdbarch);
 extern void set_gdbarch_register_size (struct gdbarch *gdbarch, int register_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIZE)
-#error "Non multi-arch definition of REGISTER_SIZE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIZE)
 #define REGISTER_SIZE (gdbarch_register_size (current_gdbarch))
@@ -650,9 +544,6 @@
 
 extern int gdbarch_register_bytes (struct gdbarch *gdbarch);
 extern void set_gdbarch_register_bytes (struct gdbarch *gdbarch, int register_bytes);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES)
-#error "Non multi-arch definition of REGISTER_BYTES"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES)
 #define REGISTER_BYTES (gdbarch_register_bytes (current_gdbarch))
@@ -662,9 +553,6 @@
 typedef int (gdbarch_register_byte_ftype) (int reg_nr);
 extern int gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr);
 extern void set_gdbarch_register_byte (struct gdbarch *gdbarch, gdbarch_register_byte_ftype *register_byte);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE)
-#error "Non multi-arch definition of REGISTER_BYTE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE)
 #define REGISTER_BYTE(reg_nr) (gdbarch_register_byte (current_gdbarch, reg_nr))
@@ -674,9 +562,6 @@
 typedef int (gdbarch_register_raw_size_ftype) (int reg_nr);
 extern int gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
 extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_register_raw_size_ftype *register_raw_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE)
-#error "Non multi-arch definition of REGISTER_RAW_SIZE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE)
 #define REGISTER_RAW_SIZE(reg_nr) (gdbarch_register_raw_size (current_gdbarch, reg_nr))
@@ -685,9 +570,6 @@
 
 extern int gdbarch_max_register_raw_size (struct gdbarch *gdbarch);
 extern void set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch, int max_register_raw_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_RAW_SIZE)
-#error "Non multi-arch definition of MAX_REGISTER_RAW_SIZE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_RAW_SIZE)
 #define MAX_REGISTER_RAW_SIZE (gdbarch_max_register_raw_size (current_gdbarch))
@@ -697,9 +579,6 @@
 typedef int (gdbarch_register_virtual_size_ftype) (int reg_nr);
 extern int gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
 extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_register_virtual_size_ftype *register_virtual_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
-#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE)
 #define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_register_virtual_size (current_gdbarch, reg_nr))
@@ -708,9 +587,6 @@
 
 extern int gdbarch_max_register_virtual_size (struct gdbarch *gdbarch);
 extern void set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch, int max_register_virtual_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MAX_REGISTER_VIRTUAL_SIZE)
-#error "Non multi-arch definition of MAX_REGISTER_VIRTUAL_SIZE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MAX_REGISTER_VIRTUAL_SIZE)
 #define MAX_REGISTER_VIRTUAL_SIZE (gdbarch_max_register_virtual_size (current_gdbarch))
@@ -720,9 +596,6 @@
 typedef struct type * (gdbarch_register_virtual_type_ftype) (int reg_nr);
 extern struct type * gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
 extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_register_virtual_type_ftype *register_virtual_type);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
-#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE)
 #define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_register_virtual_type (current_gdbarch, reg_nr))
@@ -737,9 +610,6 @@
 typedef void (gdbarch_do_registers_info_ftype) (int reg_nr, int fpregs);
 extern void gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
 extern void set_gdbarch_do_registers_info (struct gdbarch *gdbarch, gdbarch_do_registers_info_ftype *do_registers_info);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO)
-#error "Non multi-arch definition of DO_REGISTERS_INFO"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO)
 #define DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_do_registers_info (current_gdbarch, reg_nr, fpregs))
@@ -757,9 +627,6 @@
 typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
 extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr);
 extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
-#error "Non multi-arch definition of REGISTER_SIM_REGNO"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIM_REGNO)
 #define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
@@ -779,9 +646,6 @@
 #endif
 
 extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
-#error "Non multi-arch definition of REGISTER_BYTES_OK"
-#endif
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
 #define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
 #endif
@@ -794,54 +658,14 @@
 typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
 extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
 extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
-#error "Non multi-arch definition of REGISTER_BYTES_OK"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK)
 #define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
 #endif
 #endif
 
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
-#define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum))
-#endif
-
-typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
-extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
-extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
-#error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_FETCH_REGISTER)
-#define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
-#endif
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
-#define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum))
-#endif
-
-typedef int (gdbarch_cannot_store_register_ftype) (int regnum);
-extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum);
-extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
-#error "Non multi-arch definition of CANNOT_STORE_REGISTER"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STORE_REGISTER)
-#define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
-#endif
-#endif
-
 extern int gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch);
 extern void set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch, int use_generic_dummy_frames);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_GENERIC_DUMMY_FRAMES)
-#error "Non multi-arch definition of USE_GENERIC_DUMMY_FRAMES"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (USE_GENERIC_DUMMY_FRAMES)
 #define USE_GENERIC_DUMMY_FRAMES (gdbarch_use_generic_dummy_frames (current_gdbarch))
@@ -850,9 +674,6 @@
 
 extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LOCATION)
-#error "Non multi-arch definition of CALL_DUMMY_LOCATION"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LOCATION)
 #define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
@@ -862,9 +683,6 @@
 typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void);
 extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS)
-#error "Non multi-arch definition of CALL_DUMMY_ADDRESS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_ADDRESS)
 #define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch))
@@ -873,9 +691,6 @@
 
 extern CORE_ADDR gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_start_offset);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_START_OFFSET)
-#error "Non multi-arch definition of CALL_DUMMY_START_OFFSET"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_START_OFFSET)
 #define CALL_DUMMY_START_OFFSET (gdbarch_call_dummy_start_offset (current_gdbarch))
@@ -884,9 +699,6 @@
 
 extern CORE_ADDR gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_breakpoint_offset);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET)
-#error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET)
 #define CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_call_dummy_breakpoint_offset (current_gdbarch))
@@ -895,9 +707,6 @@
 
 extern int gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, int call_dummy_breakpoint_offset_p);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET_P)
-#error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET_P"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET_P)
 #define CALL_DUMMY_BREAKPOINT_OFFSET_P (gdbarch_call_dummy_breakpoint_offset_p (current_gdbarch))
@@ -906,9 +715,6 @@
 
 extern int gdbarch_call_dummy_length (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, int call_dummy_length);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LENGTH)
-#error "Non multi-arch definition of CALL_DUMMY_LENGTH"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_LENGTH)
 #define CALL_DUMMY_LENGTH (gdbarch_call_dummy_length (current_gdbarch))
@@ -918,9 +724,6 @@
 typedef int (gdbarch_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
 extern int gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
 extern void set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_CALL_DUMMY)
-#error "Non multi-arch definition of PC_IN_CALL_DUMMY"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_CALL_DUMMY)
 #define PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
@@ -929,9 +732,6 @@
 
 extern int gdbarch_call_dummy_p (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, int call_dummy_p);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_P)
-#error "Non multi-arch definition of CALL_DUMMY_P"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_P)
 #define CALL_DUMMY_P (gdbarch_call_dummy_p (current_gdbarch))
@@ -945,9 +745,6 @@
 
 extern LONGEST * gdbarch_call_dummy_words (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, LONGEST * call_dummy_words);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_WORDS)
-#error "Non multi-arch definition of CALL_DUMMY_WORDS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_WORDS)
 #define CALL_DUMMY_WORDS (gdbarch_call_dummy_words (current_gdbarch))
@@ -961,9 +758,6 @@
 
 extern int gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch);
 extern void set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, int sizeof_call_dummy_words);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIZEOF_CALL_DUMMY_WORDS)
-#error "Non multi-arch definition of SIZEOF_CALL_DUMMY_WORDS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIZEOF_CALL_DUMMY_WORDS)
 #define SIZEOF_CALL_DUMMY_WORDS (gdbarch_sizeof_call_dummy_words (current_gdbarch))
@@ -972,9 +766,6 @@
 
 extern int gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch, int call_dummy_stack_adjust_p);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_STACK_ADJUST_P)
-#error "Non multi-arch definition of CALL_DUMMY_STACK_ADJUST_P"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_STACK_ADJUST_P)
 #define CALL_DUMMY_STACK_ADJUST_P (gdbarch_call_dummy_stack_adjust_p (current_gdbarch))
@@ -983,9 +774,6 @@
 
 extern int gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch, int call_dummy_stack_adjust);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_STACK_ADJUST)
-#error "Non multi-arch definition of CALL_DUMMY_STACK_ADJUST"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_STACK_ADJUST)
 #define CALL_DUMMY_STACK_ADJUST (gdbarch_call_dummy_stack_adjust (current_gdbarch))
@@ -995,54 +783,14 @@
 typedef void (gdbarch_fix_call_dummy_ftype) (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p);
 extern void gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p);
 extern void set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_fix_call_dummy_ftype *fix_call_dummy);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FIX_CALL_DUMMY)
-#error "Non multi-arch definition of FIX_CALL_DUMMY"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FIX_CALL_DUMMY)
 #define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (gdbarch_fix_call_dummy (current_gdbarch, dummy, pc, fun, nargs, args, type, gcc_p))
 #endif
 #endif
 
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (INIT_FRAME_PC_FIRST)
-#define INIT_FRAME_PC_FIRST(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev))
-#endif
-
-typedef void (gdbarch_init_frame_pc_first_ftype) (int fromleaf, struct frame_info *prev);
-extern void gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
-extern void set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_init_frame_pc_first_ftype *init_frame_pc_first);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_FRAME_PC_FIRST)
-#error "Non multi-arch definition of INIT_FRAME_PC_FIRST"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_FRAME_PC_FIRST)
-#define INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_init_frame_pc_first (current_gdbarch, fromleaf, prev))
-#endif
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (INIT_FRAME_PC)
-#define INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_default (fromleaf, prev))
-#endif
-
-typedef void (gdbarch_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev);
-extern void gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev);
-extern void set_gdbarch_init_frame_pc (struct gdbarch *gdbarch, gdbarch_init_frame_pc_ftype *init_frame_pc);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_FRAME_PC)
-#error "Non multi-arch definition of INIT_FRAME_PC"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_FRAME_PC)
-#define INIT_FRAME_PC(fromleaf, prev) (gdbarch_init_frame_pc (current_gdbarch, fromleaf, prev))
-#endif
-#endif
-
 extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
 extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION)
-#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION)
 #define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
@@ -1051,9 +799,6 @@
 
 extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
 extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
-#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION_TYPE)
 #define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
@@ -1068,9 +813,6 @@
 typedef int (gdbarch_coerce_float_to_double_ftype) (struct type *formal, struct type *actual);
 extern int gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual);
 extern void set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, gdbarch_coerce_float_to_double_ftype *coerce_float_to_double);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COERCE_FLOAT_TO_DOUBLE)
-#error "Non multi-arch definition of COERCE_FLOAT_TO_DOUBLE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COERCE_FLOAT_TO_DOUBLE)
 #define COERCE_FLOAT_TO_DOUBLE(formal, actual) (gdbarch_coerce_float_to_double (current_gdbarch, formal, actual))
@@ -1080,9 +822,6 @@
 typedef void (gdbarch_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
 extern void gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
 extern void set_gdbarch_get_saved_register (struct gdbarch *gdbarch, gdbarch_get_saved_register_ftype *get_saved_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER)
-#error "Non multi-arch definition of GET_SAVED_REGISTER"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER)
 #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval))
@@ -1097,9 +836,6 @@
 typedef int (gdbarch_register_convertible_ftype) (int nr);
 extern int gdbarch_register_convertible (struct gdbarch *gdbarch, int nr);
 extern void set_gdbarch_register_convertible (struct gdbarch *gdbarch, gdbarch_register_convertible_ftype *register_convertible);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERTIBLE)
-#error "Non multi-arch definition of REGISTER_CONVERTIBLE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERTIBLE)
 #define REGISTER_CONVERTIBLE(nr) (gdbarch_register_convertible (current_gdbarch, nr))
@@ -1114,9 +850,6 @@
 typedef void (gdbarch_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
 extern void gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
 extern void set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_VIRTUAL)
-#error "Non multi-arch definition of REGISTER_CONVERT_TO_VIRTUAL"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_VIRTUAL)
 #define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
@@ -1131,9 +864,6 @@
 typedef void (gdbarch_register_convert_to_raw_ftype) (struct type *type, int regnum, char *from, char *to);
 extern void gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
 extern void set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_register_convert_to_raw_ftype *register_convert_to_raw);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_RAW)
-#error "Non multi-arch definition of REGISTER_CONVERT_TO_RAW"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_RAW)
 #define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
@@ -1152,9 +882,6 @@
 typedef void (gdbarch_fetch_pseudo_register_ftype) (int regnum);
 extern void gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum);
 extern void set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_PSEUDO_REGISTER)
-#error "Non multi-arch definition of FETCH_PSEUDO_REGISTER"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_PSEUDO_REGISTER)
 #define FETCH_PSEUDO_REGISTER(regnum) (gdbarch_fetch_pseudo_register (current_gdbarch, regnum))
@@ -1173,9 +900,6 @@
 typedef void (gdbarch_store_pseudo_register_ftype) (int regnum);
 extern void gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum);
 extern void set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch, gdbarch_store_pseudo_register_ftype *store_pseudo_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_PSEUDO_REGISTER)
-#error "Non multi-arch definition of STORE_PSEUDO_REGISTER"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_PSEUDO_REGISTER)
 #define STORE_PSEUDO_REGISTER(regnum) (gdbarch_store_pseudo_register (current_gdbarch, regnum))
@@ -1190,9 +914,6 @@
 typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, void *buf);
 extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
 extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
-#error "Non multi-arch definition of POINTER_TO_ADDRESS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POINTER_TO_ADDRESS)
 #define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
@@ -1207,9 +928,6 @@
 typedef void (gdbarch_address_to_pointer_ftype) (struct type *type, void *buf, CORE_ADDR addr);
 extern void gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr);
 extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_address_to_pointer_ftype *address_to_pointer);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
-#error "Non multi-arch definition of ADDRESS_TO_POINTER"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_TO_POINTER)
 #define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
@@ -1224,9 +942,6 @@
 typedef int (gdbarch_return_value_on_stack_ftype) (struct type *type);
 extern int gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type);
 extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_return_value_on_stack_ftype *return_value_on_stack);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK)
-#error "Non multi-arch definition of RETURN_VALUE_ON_STACK"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (RETURN_VALUE_ON_STACK)
 #define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
@@ -1236,9 +951,6 @@
 typedef void (gdbarch_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
 extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
 extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
-#error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE)
 #define EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regbuf, valbuf))
@@ -1248,9 +960,6 @@
 typedef CORE_ADDR (gdbarch_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
 extern CORE_ADDR gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
 extern void set_gdbarch_push_arguments (struct gdbarch *gdbarch, gdbarch_push_arguments_ftype *push_arguments);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_ARGUMENTS)
-#error "Non multi-arch definition of PUSH_ARGUMENTS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_ARGUMENTS)
 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
@@ -1260,9 +969,6 @@
 typedef void (gdbarch_push_dummy_frame_ftype) (void);
 extern void gdbarch_push_dummy_frame (struct gdbarch *gdbarch);
 extern void set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_push_dummy_frame_ftype *push_dummy_frame);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_DUMMY_FRAME)
-#error "Non multi-arch definition of PUSH_DUMMY_FRAME"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_DUMMY_FRAME)
 #define PUSH_DUMMY_FRAME (gdbarch_push_dummy_frame (current_gdbarch))
@@ -1272,9 +978,6 @@
 typedef CORE_ADDR (gdbarch_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
 extern CORE_ADDR gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
 extern void set_gdbarch_push_return_address (struct gdbarch *gdbarch, gdbarch_push_return_address_ftype *push_return_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS)
-#error "Non multi-arch definition of PUSH_RETURN_ADDRESS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS)
 #define PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_push_return_address (current_gdbarch, pc, sp))
@@ -1284,9 +987,6 @@
 typedef void (gdbarch_pop_frame_ftype) (void);
 extern void gdbarch_pop_frame (struct gdbarch *gdbarch);
 extern void set_gdbarch_pop_frame (struct gdbarch *gdbarch, gdbarch_pop_frame_ftype *pop_frame);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POP_FRAME)
-#error "Non multi-arch definition of POP_FRAME"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POP_FRAME)
 #define POP_FRAME (gdbarch_pop_frame (current_gdbarch))
@@ -1303,9 +1003,6 @@
 typedef CORE_ADDR (gdbarch_d10v_make_daddr_ftype) (CORE_ADDR x);
 extern CORE_ADDR gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x);
 extern void set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, gdbarch_d10v_make_daddr_ftype *d10v_make_daddr);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_MAKE_DADDR)
-#error "Non multi-arch definition of D10V_MAKE_DADDR"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_MAKE_DADDR)
 #define D10V_MAKE_DADDR(x) (gdbarch_d10v_make_daddr (current_gdbarch, x))
@@ -1320,9 +1017,6 @@
 typedef CORE_ADDR (gdbarch_d10v_make_iaddr_ftype) (CORE_ADDR x);
 extern CORE_ADDR gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x);
 extern void set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_MAKE_IADDR)
-#error "Non multi-arch definition of D10V_MAKE_IADDR"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_MAKE_IADDR)
 #define D10V_MAKE_IADDR(x) (gdbarch_d10v_make_iaddr (current_gdbarch, x))
@@ -1337,9 +1031,6 @@
 typedef int (gdbarch_d10v_daddr_p_ftype) (CORE_ADDR x);
 extern int gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x);
 extern void set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, gdbarch_d10v_daddr_p_ftype *d10v_daddr_p);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_DADDR_P)
-#error "Non multi-arch definition of D10V_DADDR_P"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_DADDR_P)
 #define D10V_DADDR_P(x) (gdbarch_d10v_daddr_p (current_gdbarch, x))
@@ -1354,9 +1045,6 @@
 typedef int (gdbarch_d10v_iaddr_p_ftype) (CORE_ADDR x);
 extern int gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x);
 extern void set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_IADDR_P)
-#error "Non multi-arch definition of D10V_IADDR_P"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_IADDR_P)
 #define D10V_IADDR_P(x) (gdbarch_d10v_iaddr_p (current_gdbarch, x))
@@ -1371,9 +1059,6 @@
 typedef CORE_ADDR (gdbarch_d10v_convert_daddr_to_raw_ftype) (CORE_ADDR x);
 extern CORE_ADDR gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x);
 extern void set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_CONVERT_DADDR_TO_RAW)
-#error "Non multi-arch definition of D10V_CONVERT_DADDR_TO_RAW"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_CONVERT_DADDR_TO_RAW)
 #define D10V_CONVERT_DADDR_TO_RAW(x) (gdbarch_d10v_convert_daddr_to_raw (current_gdbarch, x))
@@ -1388,9 +1073,6 @@
 typedef CORE_ADDR (gdbarch_d10v_convert_iaddr_to_raw_ftype) (CORE_ADDR x);
 extern CORE_ADDR gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x);
 extern void set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_CONVERT_IADDR_TO_RAW)
-#error "Non multi-arch definition of D10V_CONVERT_IADDR_TO_RAW"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_CONVERT_IADDR_TO_RAW)
 #define D10V_CONVERT_IADDR_TO_RAW(x) (gdbarch_d10v_convert_iaddr_to_raw (current_gdbarch, x))
@@ -1400,9 +1082,6 @@
 typedef void (gdbarch_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp);
 extern void gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp);
 extern void set_gdbarch_store_struct_return (struct gdbarch *gdbarch, gdbarch_store_struct_return_ftype *store_struct_return);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_STRUCT_RETURN)
-#error "Non multi-arch definition of STORE_STRUCT_RETURN"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_STRUCT_RETURN)
 #define STORE_STRUCT_RETURN(addr, sp) (gdbarch_store_struct_return (current_gdbarch, addr, sp))
@@ -1412,46 +1091,15 @@
 typedef void (gdbarch_store_return_value_ftype) (struct type *type, char *valbuf);
 extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
 extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
-#error "Non multi-arch definition of STORE_RETURN_VALUE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_RETURN_VALUE)
 #define STORE_RETURN_VALUE(type, valbuf) (gdbarch_store_return_value (current_gdbarch, type, valbuf))
 #endif
 #endif
 
-#if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-/* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
-#if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
-#endif
-
-extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-#define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
-#endif
-
 typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (char *regbuf);
 extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
 extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
 #define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_extract_struct_value_address (current_gdbarch, regbuf))
@@ -1461,9 +1109,6 @@
 typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
 extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
 extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
-#error "Non multi-arch definition of USE_STRUCT_CONVENTION"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (USE_STRUCT_CONVENTION)
 #define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
@@ -1473,9 +1118,6 @@
 typedef void (gdbarch_frame_init_saved_regs_ftype) (struct frame_info *frame);
 extern void gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame);
 extern void set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_INIT_SAVED_REGS)
-#error "Non multi-arch definition of FRAME_INIT_SAVED_REGS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_INIT_SAVED_REGS)
 #define FRAME_INIT_SAVED_REGS(frame) (gdbarch_frame_init_saved_regs (current_gdbarch, frame))
@@ -1485,9 +1127,6 @@
 typedef void (gdbarch_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame);
 extern void gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame);
 extern void set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_init_extra_frame_info_ftype *init_extra_frame_info);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO)
-#error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO)
 #define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_init_extra_frame_info (current_gdbarch, fromleaf, frame))
@@ -1497,9 +1136,6 @@
 typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
 extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
 extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
-#error "Non multi-arch definition of SKIP_PROLOGUE"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_PROLOGUE)
 #define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
@@ -1514,9 +1150,6 @@
 typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip);
 extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip);
 extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
-#error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PROLOGUE_FRAMELESS_P)
 #define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
@@ -1526,9 +1159,6 @@
 typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
 extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
 extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
-#error "Non multi-arch definition of INNER_THAN"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INNER_THAN)
 #define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
@@ -1543,9 +1173,6 @@
 typedef unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
 extern unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
 extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
-#error "Non multi-arch definition of BREAKPOINT_FROM_PC"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BREAKPOINT_FROM_PC)
 #define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
@@ -1560,9 +1187,6 @@
 typedef int (gdbarch_memory_insert_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
 extern int gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
 extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
-#error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_INSERT_BREAKPOINT)
 #define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache))
@@ -1577,9 +1201,6 @@
 typedef int (gdbarch_memory_remove_breakpoint_ftype) (CORE_ADDR addr, char *contents_cache);
 extern int gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache);
 extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
-#error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_REMOVE_BREAKPOINT)
 #define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache))
@@ -1588,9 +1209,6 @@
 
 extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch);
 extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK)
-#error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DECR_PC_AFTER_BREAK)
 #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
@@ -1605,9 +1223,6 @@
 typedef int (gdbarch_prepare_to_proceed_ftype) (int select_it);
 extern int gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it);
 extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_prepare_to_proceed_ftype *prepare_to_proceed);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED)
-#error "Non multi-arch definition of PREPARE_TO_PROCEED"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PREPARE_TO_PROCEED)
 #define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it))
@@ -1616,9 +1231,6 @@
 
 extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch);
 extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
-#error "Non multi-arch definition of FUNCTION_START_OFFSET"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FUNCTION_START_OFFSET)
 #define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
@@ -1633,9 +1245,6 @@
 typedef void (gdbarch_remote_translate_xfer_address_ftype) (CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
 extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
 extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REMOTE_TRANSLATE_XFER_ADDRESS)
-#error "Non multi-arch definition of REMOTE_TRANSLATE_XFER_ADDRESS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REMOTE_TRANSLATE_XFER_ADDRESS)
 #define REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len) (gdbarch_remote_translate_xfer_address (current_gdbarch, gdb_addr, gdb_len, rem_addr, rem_len))
@@ -1644,9 +1253,6 @@
 
 extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch);
 extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
-#error "Non multi-arch definition of FRAME_ARGS_SKIP"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_SKIP)
 #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
@@ -1661,9 +1267,6 @@
 typedef int (gdbarch_frameless_function_invocation_ftype) (struct frame_info *fi);
 extern int gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
 extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_frameless_function_invocation_ftype *frameless_function_invocation);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
-#error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAMELESS_FUNCTION_INVOCATION)
 #define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
@@ -1673,9 +1276,6 @@
 typedef CORE_ADDR (gdbarch_frame_chain_ftype) (struct frame_info *frame);
 extern CORE_ADDR gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame);
 extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chain_ftype *frame_chain);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN)
-#error "Non multi-arch definition of FRAME_CHAIN"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN)
 #define FRAME_CHAIN(frame) (gdbarch_frame_chain (current_gdbarch, frame))
@@ -1685,9 +1285,6 @@
 typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
 extern int gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe);
 extern void set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_frame_chain_valid_ftype *frame_chain_valid);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID)
-#error "Non multi-arch definition of FRAME_CHAIN_VALID"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID)
 #define FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_frame_chain_valid (current_gdbarch, chain, thisframe))
@@ -1697,9 +1294,6 @@
 typedef CORE_ADDR (gdbarch_frame_saved_pc_ftype) (struct frame_info *fi);
 extern CORE_ADDR gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi);
 extern void set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_frame_saved_pc_ftype *frame_saved_pc);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_SAVED_PC)
-#error "Non multi-arch definition of FRAME_SAVED_PC"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_SAVED_PC)
 #define FRAME_SAVED_PC(fi) (gdbarch_frame_saved_pc (current_gdbarch, fi))
@@ -1709,9 +1303,6 @@
 typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi);
 extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
 extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
-#error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_ADDRESS)
 #define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
@@ -1721,9 +1312,6 @@
 typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi);
 extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
 extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
-#error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_LOCALS_ADDRESS)
 #define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
@@ -1733,9 +1321,6 @@
 typedef CORE_ADDR (gdbarch_saved_pc_after_call_ftype) (struct frame_info *frame);
 extern CORE_ADDR gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame);
 extern void set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_saved_pc_after_call_ftype *saved_pc_after_call);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVED_PC_AFTER_CALL)
-#error "Non multi-arch definition of SAVED_PC_AFTER_CALL"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVED_PC_AFTER_CALL)
 #define SAVED_PC_AFTER_CALL(frame) (gdbarch_saved_pc_after_call (current_gdbarch, frame))
@@ -1745,9 +1330,6 @@
 typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
 extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame);
 extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
-#error "Non multi-arch definition of FRAME_NUM_ARGS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS)
 #define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame))
@@ -1767,9 +1349,6 @@
 #endif
 
 extern int gdbarch_stack_align_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN_P)
-#error "Non multi-arch definition of STACK_ALIGN"
-#endif
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN_P)
 #define STACK_ALIGN_P() (gdbarch_stack_align_p (current_gdbarch))
 #endif
@@ -1782,9 +1361,6 @@
 typedef CORE_ADDR (gdbarch_stack_align_ftype) (CORE_ADDR sp);
 extern CORE_ADDR gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp);
 extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_align_ftype *stack_align);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN)
-#error "Non multi-arch definition of STACK_ALIGN"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN)
 #define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp))
@@ -1798,9 +1374,6 @@
 
 extern int gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch);
 extern void set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch, int extra_stack_alignment_needed);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRA_STACK_ALIGNMENT_NEEDED)
-#error "Non multi-arch definition of EXTRA_STACK_ALIGNMENT_NEEDED"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRA_STACK_ALIGNMENT_NEEDED)
 #define EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_extra_stack_alignment_needed (current_gdbarch))
@@ -1820,9 +1393,6 @@
 #endif
 
 extern int gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR_P)
-#error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
-#endif
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR_P)
 #define REG_STRUCT_HAS_ADDR_P() (gdbarch_reg_struct_has_addr_p (current_gdbarch))
 #endif
@@ -1835,9 +1405,6 @@
 typedef int (gdbarch_reg_struct_has_addr_ftype) (int gcc_p, struct type *type);
 extern int gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type);
 extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR)
-#error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR)
 #define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
@@ -1857,9 +1424,6 @@
 #endif
 
 extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P)
-#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
-#endif
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P)
 #define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch))
 #endif
@@ -1872,9 +1436,6 @@
 typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
 extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
 extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS)
-#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS)
 #define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
@@ -1883,9 +1444,6 @@
 
 extern int gdbarch_parm_boundary (struct gdbarch *gdbarch);
 extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
-#error "Non multi-arch definition of PARM_BOUNDARY"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PARM_BOUNDARY)
 #define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
@@ -1899,9 +1457,6 @@
 
 extern const struct floatformat * gdbarch_float_format (struct gdbarch *gdbarch);
 extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floatformat * float_format);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
-#error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_FORMAT)
 #define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
@@ -1915,9 +1470,6 @@
 
 extern const struct floatformat * gdbarch_double_format (struct gdbarch *gdbarch);
 extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct floatformat * double_format);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
-#error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_FORMAT)
 #define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
@@ -1931,9 +1483,6 @@
 
 extern const struct floatformat * gdbarch_long_double_format (struct gdbarch *gdbarch);
 extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat * long_double_format);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT)
-#error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_FORMAT)
 #define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
@@ -1942,48 +1491,18 @@
 
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR)
-#define CONVERT_FROM_FUNC_PTR_ADDR(addr) (core_addr_identity (addr))
+#define CONVERT_FROM_FUNC_PTR_ADDR(addr) (default_convert_from_func_ptr_addr (addr))
 #endif
 
 typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr);
 extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr);
 extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
-#error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_FROM_FUNC_PTR_ADDR)
 #define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
 #endif
 #endif
 
-/* On some machines there are bits in addresses which are not really
-   part of the address, but are used by the kernel, the hardware, etc.
-   for special purposes.  ADDR_BITS_REMOVE takes out any such bits so
-   we get a "real" address such as one would find in a symbol table.
-   This is used only for addresses of instructions, and even then I'm
-   not sure it's used in all contexts.  It exists to deal with there
-   being a few stray bits in the PC which would mislead us, not as some
-   sort of generic thing to handle alignment or segmentation (it's
-   possible it should be in TARGET_READ_PC instead). */
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (ADDR_BITS_REMOVE)
-#define ADDR_BITS_REMOVE(addr) (core_addr_identity (addr))
-#endif
-
-typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr);
-extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr);
-extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
-#error "Non multi-arch definition of ADDR_BITS_REMOVE"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDR_BITS_REMOVE)
-#define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
-#endif
-#endif
-
 /* FIXME/cagney/2001-01-18: This should be split in two.  A target method that indicates if
    the target needs software single step.  An ISA method to implement it.
   
@@ -2006,9 +1525,6 @@
 #endif
 
 extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP_P)
-#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
-#endif
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P)
 #define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch))
 #endif
@@ -2021,9 +1537,6 @@
 typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p);
 extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p);
 extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
-#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
-#endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP)
 #define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
@@ -2094,6 +1607,9 @@
 
 struct gdbarch_info
 {
+  /* Use default: bfd_arch_unknown (ZERO). */
+  enum bfd_architecture bfd_architecture;
+
   /* Use default: NULL (ZERO). */
   const struct bfd_arch_info *bfd_arch_info;
 
@@ -2147,12 +1663,16 @@
 extern void gdbarch_free (struct gdbarch *);
 
 
-/* Helper function. Force an update of the current architecture.
+/* Helper function. Force an update of the current architecture.  Used
+   by legacy targets that have added their own target specific
+   architecture manipulation commands.
 
-   The actual architecture selected is determined by INFO, ``(gdb) set
-   architecture'' et.al., the existing architecture and BFD's default
-   architecture.  INFO should be initialized to zero and then selected
-   fields should be updated.
+   The INFO parameter shall be fully initialized (``memset (&INFO,
+   sizeof (info), 0)'' set relevant fields) before gdbarch_update_p()
+   is called.  gdbarch_update_p() shall initialize any ``default''
+   fields using information obtained from the previous architecture or
+   INFO.ABFD (if specified) before calling the corresponding
+   architectures INIT function.
 
    Returns non-zero if the update succeeds */
 
@@ -2299,6 +1819,17 @@
 #define GDB_TARGET_IS_D10V (TARGET_ARCHITECTURE->arch == bfd_arch_d10v)
 
 
+/* Fallback definition for EXTRACT_STRUCT_VALUE_ADDRESS */
+#ifndef EXTRACT_STRUCT_VALUE_ADDRESS
+#define EXTRACT_STRUCT_VALUE_ADDRESS_P (0)
+#define EXTRACT_STRUCT_VALUE_ADDRESS(X) (internal_error (__FILE__, __LINE__, "gdbarch: EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
+#else
+#ifndef EXTRACT_STRUCT_VALUE_ADDRESS_P
+#define EXTRACT_STRUCT_VALUE_ADDRESS_P (1)
+#endif
+#endif
+
+
 /* Set the dynamic target-system-dependent parameters (architecture,
    byte-order, ...) using information found in the BFD */
 
@@ -2310,10 +1841,6 @@
 
 extern void initialize_current_architecture (void);
 
-/* For non-multiarched targets, do any initialization of the default
-   gdbarch object necessary after the _initialize_MODULE functions
-   have run.  */
-extern void initialize_non_multiarch ();
 
 /* gdbarch trace variable */
 extern int gdbarch_debug;
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index fa20610..7517e41 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -85,7 +85,7 @@
 	    case "${invalid_p}" in
 		0 ) valid_p=1 ;;
 		"" )
-		    if [ -n "${predefault}" ]
+		    if [ "${predefault}" ]
 		    then
 			#invalid_p="gdbarch->${function} == ${predefault}"
 			valid_p="gdbarch->${function} != ${predefault}"
@@ -104,10 +104,10 @@
 	    # always a valid definition of MEMBER as this again
 	    # ensures consistency.
 
-	    if [ -n "${postdefault}" ]
+	    if [ "${postdefault}" != "" ]
 	    then
 		fallbackdefault="${postdefault}"
-	    elif [ -n "${predefault}" ]
+	    elif [ "${predefault}" != "" ]
 	    then
 		fallbackdefault="${predefault}"
 	    else
@@ -120,7 +120,7 @@
 	    break
 	fi
     done
-    if [ -n "${class}" ]
+    if [ "${class}" ]
     then
 	true
     else
@@ -131,8 +131,8 @@
 
 fallback_default_p ()
 {
-    [ -n "${postdefault}" -a "x${invalid_p}" != "x0" ] \
-	|| [ -n "${predefault}" -a "x${invalid_p}" = "x0" ]
+    [ "${postdefault}" != "" -a "${invalid_p}" != "0" ] \
+	|| [ "${predefault}" != "" -a "${invalid_p}" = "0" ]
 }
 
 class_is_variable_p ()
@@ -248,19 +248,17 @@
 
     predefault ) : ;;
 
-	# An initial value to assign to MEMBER of the freshly
-	# malloc()ed gdbarch object.  After initialization, the
-	# freshly malloc()ed object is passed to the target
-	# architecture code for further updates.
+	# A initial value to assign to MEMBER of the freshly
+	# malloc()ed gdbarch object.  After the gdbarch object has
+	# been initialized using PREDEFAULT, it is passed to the
+	# target code for further updates.
 
 	# If PREDEFAULT is empty, zero is used.
 
-	# A non-empty PREDEFAULT, an empty POSTDEFAULT and a zero
-	# INVALID_P are specified, PREDEFAULT will be used as the
-	# default for the non- multi-arch target.
-
-	# A zero PREDEFAULT function will force the fallback to call
-	# internal_error().
+	# When POSTDEFAULT is empty, a non-empty PREDEFAULT and a zero
+	# INVALID_P will be used as default values when when
+	# multi-arch is disabled.  Specify a zero PREDEFAULT function
+	# to make that fallback call internal_error().
 
 	# Variable declarations can refer to ``gdbarch'' which will
 	# contain the current architecture.  Care should be taken.
@@ -268,8 +266,9 @@
     postdefault ) : ;;
 
 	# A value to assign to MEMBER of the new gdbarch object should
-	# the target architecture code fail to change the PREDEFAULT
-	# value.
+	# the target code fail to change the PREDEFAULT value.  Also
+	# use POSTDEFAULT as the fallback value for the non-
+	# multi-arch case.
 
 	# If POSTDEFAULT is empty, no post update is performed.
 
@@ -277,11 +276,6 @@
 	# INVALID_P will be used to determine if MEMBER should be
 	# changed to POSTDEFAULT.
 
-	# If a non-empty POSTDEFAULT and a zero INVALID_P are
-	# specified, POSTDEFAULT will be used as the default for the
-	# non- multi-arch target (regardless of the value of
-	# PREDEFAULT).
-
 	# You cannot specify both a zero INVALID_P and a POSTDEFAULT.
 
 	# Variable declarations can refer to ``gdbarch'' which will
@@ -382,8 +376,8 @@
 #
 v::IEEE_FLOAT:int:ieee_float::::0:0::0:::
 #
-f::TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid::0:generic_target_read_pc::0
-f::TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, ptid_t ptid:val, ptid::0:generic_target_write_pc::0
+f::TARGET_READ_PC:CORE_ADDR:read_pc:int pid:pid::0:generic_target_read_pc::0
+f::TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, int pid:val, pid::0:generic_target_write_pc::0
 f::TARGET_READ_FP:CORE_ADDR:read_fp:void:::0:generic_target_read_fp::0
 f::TARGET_WRITE_FP:void:write_fp:CORE_ADDR val:val::0:generic_target_write_fp::0
 f::TARGET_READ_SP:CORE_ADDR:read_sp:void:::0:generic_target_read_sp::0
@@ -429,8 +423,6 @@
 # also include/...-sim.h.
 f:2:REGISTER_SIM_REGNO:int:register_sim_regno:int reg_nr:reg_nr:::default_register_sim_regno::0
 F:2:REGISTER_BYTES_OK:int:register_bytes_ok:long nr_bytes:nr_bytes::0:0
-f:2:CANNOT_FETCH_REGISTER:int:cannot_fetch_register:int regnum:regnum:::cannot_register_not::0
-f:2:CANNOT_STORE_REGISTER:int:cannot_store_register:int regnum:regnum:::cannot_register_not::0
 #
 v:1:USE_GENERIC_DUMMY_FRAMES:int:use_generic_dummy_frames::::0:-1
 v:2:CALL_DUMMY_LOCATION:int:call_dummy_location::::0:0
@@ -446,8 +438,6 @@
 v:1:CALL_DUMMY_STACK_ADJUST_P:int:call_dummy_stack_adjust_p::::0:-1:::0x%08lx
 v:2:CALL_DUMMY_STACK_ADJUST:int:call_dummy_stack_adjust::::0:::gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0:0x%08lx::CALL_DUMMY_STACK_ADJUST_P
 f:2:FIX_CALL_DUMMY:void:fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p:::0
-f:2:INIT_FRAME_PC_FIRST:void:init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev:::init_frame_pc_noop::0
-f:2:INIT_FRAME_PC:void:init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev:::init_frame_pc_default::0
 #
 v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
 v:2:BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
@@ -486,7 +476,7 @@
 #
 f:2:STORE_STRUCT_RETURN:void:store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
 f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, char *valbuf:type, valbuf:::0
-F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:char *regbuf:regbuf:::0
+f:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:char *regbuf:regbuf:::0
 f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::0
 #
 f:2:FRAME_INIT_SAVED_REGS:void:frame_init_saved_regs:struct frame_info *frame:frame::0:0
@@ -523,17 +513,7 @@
 v:2:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (gdbarch)
 v:2:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (gdbarch)
 v:2:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::&floatformat_unknown
-f:2:CONVERT_FROM_FUNC_PTR_ADDR:CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr:addr:::core_addr_identity::0
-# On some machines there are bits in addresses which are not really
-# part of the address, but are used by the kernel, the hardware, etc.
-# for special purposes.  ADDR_BITS_REMOVE takes out any such bits so
-# we get a "real" address such as one would find in a symbol table.
-# This is used only for addresses of instructions, and even then I'm
-# not sure it's used in all contexts.  It exists to deal with there
-# being a few stray bits in the PC which would mislead us, not as some
-# sort of generic thing to handle alignment or segmentation (it's
-# possible it should be in TARGET_READ_PC instead).
-f:2:ADDR_BITS_REMOVE:CORE_ADDR:addr_bits_remove:CORE_ADDR addr:addr:::core_addr_identity::0
+f:2:CONVERT_FROM_FUNC_PTR_ADDR:CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr:addr:::default_convert_from_func_ptr_addr::0
 # FIXME/cagney/2001-01-18: This should be split in two.  A target method that indicates if
 # the target needs software single step.  An ISA method to implement it.
 #
@@ -569,7 +549,7 @@
 	kill $$
 	exit 1
     fi
-    if [ "x${invalid_p}" = "x0" -a -n "${postdefault}" ]
+    if [ "${invalid_p}" = "0" -a "${postdefault}" != "" ]
     then
 	echo "Error: postdefault is useless when invalid_p=0" 1>&2
 	kill $$
@@ -653,10 +633,6 @@
 #error "FRAME_FIND_SAVED_REGS: replaced by FRAME_INIT_SAVED_REGS"
 #endif
 #endif
-
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PURE) && defined (GDB_TM_FILE)
-#error "GDB_TM_FILE: Pure multi-arch targets do not have a tm.h file."
-#endif
 EOF
 
 # function typedef's
@@ -670,9 +646,6 @@
 	printf "\n"
 	printf "extern ${returntype} gdbarch_${function} (struct gdbarch *gdbarch);\n"
 	printf "/* set_gdbarch_${function}() - not applicable - pre-initialized. */\n"
-	printf "#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (${macro})\n"
-	printf "#error \"Non multi-arch definition of ${macro}\"\n"
-	printf "#endif\n"
 	printf "#if GDB_MULTI_ARCH\n"
 	printf "#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (${macro})\n"
 	printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
@@ -687,7 +660,7 @@
 printf "/* The following are initialized by the target dependent code. */\n"
 function_list | while do_read
 do
-    if [ -n "${comment}" ]
+    if [ "${comment}" ]
     then
 	echo "${comment}" | sed \
 	    -e '2 s,#,/*,' \
@@ -719,9 +692,6 @@
 	    printf "#endif\n"
 	    printf "\n"
 	    printf "extern int gdbarch_${function}_p (struct gdbarch *gdbarch);\n"
-	    printf "#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (${macro}_P)\n"
-	    printf "#error \"Non multi-arch definition of ${macro}\"\n"
-	    printf "#endif\n"
 	    printf "#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (${macro}_P)\n"
 	    printf "#define ${macro}_P() (gdbarch_${function}_p (current_gdbarch))\n"
 	    printf "#endif\n"
@@ -741,9 +711,6 @@
 	printf "\n"
 	printf "extern ${returntype} gdbarch_${function} (struct gdbarch *gdbarch);\n"
 	printf "extern void set_gdbarch_${function} (struct gdbarch *gdbarch, ${returntype} ${function});\n"
-	printf "#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (${macro})\n"
-	printf "#error \"Non multi-arch definition of ${macro}\"\n"
-	printf "#endif\n"
 	printf "#if GDB_MULTI_ARCH\n"
 	printf "#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (${macro})\n"
 	printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
@@ -758,7 +725,7 @@
 	    printf "\n"
 	    printf "/* Default (function) for non- multi-arch platforms. */\n"
 	    printf "#if (!GDB_MULTI_ARCH) && !defined (${macro})\n"
-	    if [ "x${fallbackdefault}" = "x0" ]
+	    if [ "${fallbackdefault}" = "0" ]
 	    then
 		printf "#define ${macro}(${actual}) (internal_error (__FILE__, __LINE__, \"${macro}\"), 0)\n"
 	    else
@@ -769,7 +736,7 @@
 	    printf "#endif\n"
 	fi
 	printf "\n"
-	if [ "x${formal}" = "xvoid" ] && class_is_multiarch_p
+	if [ "${formal}" = "void" ] && class_is_multiarch_p
 	then
 	    printf "typedef ${returntype} (gdbarch_${function}_ftype) (struct gdbarch *gdbarch);\n"
 	elif class_is_multiarch_p
@@ -778,7 +745,7 @@
 	else
 	    printf "typedef ${returntype} (gdbarch_${function}_ftype) (${formal});\n"
 	fi
-	if [ "x${formal}" = "xvoid" ]
+	if [ "${formal}" = "void" ]
 	then
 	  printf "extern ${returntype} gdbarch_${function} (struct gdbarch *gdbarch);\n"
 	else
@@ -787,15 +754,12 @@
 	printf "extern void set_gdbarch_${function} (struct gdbarch *gdbarch, gdbarch_${function}_ftype *${function});\n"
 	if class_is_multiarch_p ; then :
 	else
-	    printf "#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (${macro})\n"
-	    printf "#error \"Non multi-arch definition of ${macro}\"\n"
-	    printf "#endif\n"
 	    printf "#if GDB_MULTI_ARCH\n"
 	    printf "#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (${macro})\n"
-	    if [ "x${actual}" = "x" ]
+	    if [ "${actual}" = "" ]
 	    then
 		printf "#define ${macro}() (gdbarch_${function} (current_gdbarch))\n"
-	    elif [ "x${actual}" = "x-" ]
+	    elif [ "${actual}" = "-" ]
 	    then
 		printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
 	    else
@@ -874,6 +838,9 @@
 
 struct gdbarch_info
 {
+  /* Use default: bfd_arch_unknown (ZERO). */
+  enum bfd_architecture bfd_architecture;
+
   /* Use default: NULL (ZERO). */
   const struct bfd_arch_info *bfd_arch_info;
 
@@ -927,12 +894,16 @@
 extern void gdbarch_free (struct gdbarch *);
 
 
-/* Helper function. Force an update of the current architecture.
+/* Helper function. Force an update of the current architecture.  Used
+   by legacy targets that have added their own target specific
+   architecture manipulation commands.
 
-   The actual architecture selected is determined by INFO, \`\`(gdb) set
-   architecture'' et.al., the existing architecture and BFD's default
-   architecture.  INFO should be initialized to zero and then selected
-   fields should be updated.
+   The INFO parameter shall be fully initialized (\`\`memset (&INFO,
+   sizeof (info), 0)'' set relevant fields) before gdbarch_update_p()
+   is called.  gdbarch_update_p() shall initialize any \`\`default''
+   fields using information obtained from the previous architecture or
+   INFO.ABFD (if specified) before calling the corresponding
+   architectures INIT function.
 
    Returns non-zero if the update succeeds */
 
@@ -1079,6 +1050,17 @@
 #define GDB_TARGET_IS_D10V (TARGET_ARCHITECTURE->arch == bfd_arch_d10v)
 
 
+/* Fallback definition for EXTRACT_STRUCT_VALUE_ADDRESS */
+#ifndef EXTRACT_STRUCT_VALUE_ADDRESS
+#define EXTRACT_STRUCT_VALUE_ADDRESS_P (0)
+#define EXTRACT_STRUCT_VALUE_ADDRESS(X) (internal_error (__FILE__, __LINE__, "gdbarch: EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
+#else
+#ifndef EXTRACT_STRUCT_VALUE_ADDRESS_P
+#define EXTRACT_STRUCT_VALUE_ADDRESS_P (1)
+#endif
+#endif
+
+
 /* Set the dynamic target-system-dependent parameters (architecture,
    byte-order, ...) using information found in the BFD */
 
@@ -1090,10 +1072,6 @@
 
 extern void initialize_current_architecture (void);
 
-/* For non-multiarched targets, do any initialization of the default
-   gdbarch object necessary after the _initialize_MODULE functions
-   have run.  */
-extern void initialize_non_multiarch ();
 
 /* gdbarch trace variable */
 extern int gdbarch_debug;
@@ -1275,15 +1253,6 @@
 };
 
 struct gdbarch *current_gdbarch = &startup_gdbarch;
-
-/* Do any initialization needed for a non-multiarch configuration
-   after the _initialize_MODULE functions have been run.  */
-void
-initialize_non_multiarch ()
-{
-  alloc_gdbarch_data (&startup_gdbarch);
-  init_gdbarch_data (&startup_gdbarch);
-}
 EOF
 
 # Create a new gdbarch struct
@@ -1320,7 +1289,7 @@
 do
     if class_is_function_p || class_is_variable_p
     then
-	if [ -n "${predefault}" -a "x${predefault}" != "x0" ]
+	if [ "${predefault}" != "" -a "${predefault}" != "0" ]
 	then
 	  printf "  gdbarch->${function} = ${predefault};\n"
 	fi
@@ -1377,32 +1346,32 @@
 do
     if class_is_function_p || class_is_variable_p
     then
-	if [ "x${invalid_p}" = "x0" ]
+	if [ "${invalid_p}" = "0" ]
 	then
 	    printf "  /* Skip verify of ${function}, invalid_p == 0 */\n"
 	elif class_is_predicate_p
 	then
 	    printf "  /* Skip verify of ${function}, has predicate */\n"
 	# FIXME: See do_read for potential simplification
- 	elif [ -n "${invalid_p}" -a -n "${postdefault}" ]
+ 	elif [ "${invalid_p}" -a "${postdefault}" ]
 	then
 	    printf "  if (${invalid_p})\n"
 	    printf "    gdbarch->${function} = ${postdefault};\n"
-	elif [ -n "${predefault}" -a -n "${postdefault}" ]
+	elif [ "${predefault}" -a "${postdefault}" ]
 	then
 	    printf "  if (gdbarch->${function} == ${predefault})\n"
 	    printf "    gdbarch->${function} = ${postdefault};\n"
-	elif [ -n "${postdefault}" ]
+	elif [ "${postdefault}" ]
 	then
 	    printf "  if (gdbarch->${function} == 0)\n"
 	    printf "    gdbarch->${function} = ${postdefault};\n"
-	elif [ -n "${invalid_p}" ]
+	elif [ "${invalid_p}" ]
 	then
 	    printf "  if ((GDB_MULTI_ARCH >= ${level})\n"
 	    printf "      && (${invalid_p}))\n"
 	    printf "    internal_error (__FILE__, __LINE__,\n"
 	    printf "                    \"gdbarch: verify_gdbarch: ${function} invalid\");\n"
-	elif [ -n "${predefault}" ]
+	elif [ "${predefault}" ]
 	then
 	    printf "  if ((GDB_MULTI_ARCH >= ${level})\n"
 	    printf "      && (gdbarch->${function} == ${predefault}))\n"
@@ -1438,7 +1407,7 @@
 do
     # multiarch functions don't have macros.
     class_is_multiarch_p && continue
-    if [ "x${returntype}" = "xvoid" ]
+    if [ "${returntype}" = "void" ]
     then
 	printf "#if defined (${macro}) && GDB_MULTI_ARCH\n"
 	printf "  /* Macro might contain \`[{}]' when not multi-arch */\n"
@@ -1469,13 +1438,13 @@
 	continue
     fi
     printf "#ifdef ${macro}\n"
-    if [ "x${print_p}" = "x()" ]
+    if [ "${print_p}" = "()" ]
     then
         printf "  gdbarch_dump_${function} (current_gdbarch);\n"
-    elif [ "x${print_p}" = "x0" ]
+    elif [ "${print_p}" = "0" ]
     then
         printf "  /* skip print of ${macro}, print_p == 0. */\n"
-    elif [ -n "${print_p}" ]
+    elif [ "${print_p}" ]
     then
         printf "  if (${print_p})\n"
 	printf "    fprintf_unfiltered (file,\n"
@@ -1522,7 +1491,7 @@
 	printf "int\n"
 	printf "gdbarch_${function}_p (struct gdbarch *gdbarch)\n"
 	printf "{\n"
-	if [ -n "${valid_p}" ]
+	if [ "${valid_p}" ]
 	then
 	    printf "  return ${valid_p};\n"
 	else
@@ -1534,7 +1503,7 @@
     then
 	printf "\n"
 	printf "${returntype}\n"
-	if [ "x${formal}" = "xvoid" ]
+	if [ "${formal}" = "void" ]
 	then
 	  printf "gdbarch_${function} (struct gdbarch *gdbarch)\n"
 	else
@@ -1546,7 +1515,7 @@
 	printf "                    \"gdbarch: gdbarch_${function} invalid\");\n"
 	printf "  if (gdbarch_debug >= 2)\n"
 	printf "    fprintf_unfiltered (gdb_stdlog, \"gdbarch_${function} called\\\\n\");\n"
-	if [ "x${actual}" = "x-" -o "x${actual}" = "x" ]
+	if [ "${actual}" = "-" -o "${actual}" = "" ]
 	then
 	    if class_is_multiarch_p
 	    then
@@ -1562,7 +1531,7 @@
 		params="${actual}"
 	    fi
         fi
-       	if [ "x${returntype}" = "xvoid" ]
+       	if [ "${returntype}" = "void" ]
 	then
 	  printf "  gdbarch->${function} (${params});\n"
 	else
@@ -1582,15 +1551,15 @@
 	printf "${returntype}\n"
 	printf "gdbarch_${function} (struct gdbarch *gdbarch)\n"
 	printf "{\n"
-	if [ "x${invalid_p}" = "x0" ]
+	if [ "${invalid_p}" = "0" ]
 	then
 	    printf "  /* Skip verify of ${function}, invalid_p == 0 */\n"
-	elif [ -n "${invalid_p}" ]
+	elif [ "${invalid_p}" ]
 	then
 	  printf "  if (${invalid_p})\n"
 	  printf "    internal_error (__FILE__, __LINE__,\n"
 	  printf "                    \"gdbarch: gdbarch_${function} invalid\");\n"
-	elif [ -n "${predefault}" ]
+	elif [ "${predefault}" ]
 	then
 	  printf "  if (gdbarch->${function} == ${predefault})\n"
 	  printf "    internal_error (__FILE__, __LINE__,\n"
@@ -1976,64 +1945,42 @@
   struct gdbarch_list **list;
   struct gdbarch_registration *rego;
 
-  /* Fill in missing parts of the INFO struct using a number of
-     sources: \`\`set ...''; INFOabfd supplied; existing target.  */
-
-  /* \`\`(gdb) set architecture ...'' */
-  if (info.bfd_arch_info == NULL
-      && !TARGET_ARCHITECTURE_AUTO)
-    info.bfd_arch_info = TARGET_ARCHITECTURE;
-  if (info.bfd_arch_info == NULL
-      && info.abfd != NULL
-      && bfd_get_arch (info.abfd) != bfd_arch_unknown
-      && bfd_get_arch (info.abfd) != bfd_arch_obscure)
-    info.bfd_arch_info = bfd_get_arch_info (info.abfd);
-  if (info.bfd_arch_info == NULL)
-    info.bfd_arch_info = TARGET_ARCHITECTURE;
-
-  /* \`\`(gdb) set byte-order ...'' */
-  if (info.byte_order == 0
-      && !TARGET_BYTE_ORDER_AUTO)
-    info.byte_order = TARGET_BYTE_ORDER;
-  /* From the INFO struct. */
-  if (info.byte_order == 0
-      && info.abfd != NULL)
-    info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
-		       : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
-		       : 0);
-  /* From the current target. */
-  if (info.byte_order == 0)
-    info.byte_order = TARGET_BYTE_ORDER;
-
-  /* Must have found some sort of architecture. */
-  gdb_assert (info.bfd_arch_info != NULL);
-
-  if (gdbarch_debug)
+  /* Fill in any missing bits. Most important is the bfd_architecture
+     which is used to select the target architecture. */
+  if (info.bfd_architecture == bfd_arch_unknown)
     {
-      fprintf_unfiltered (gdb_stdlog,
-			  "gdbarch_update: info.bfd_arch_info %s\n",
-			  (info.bfd_arch_info != NULL
-			   ? info.bfd_arch_info->printable_name
-			   : "(null)"));
-      fprintf_unfiltered (gdb_stdlog,
-			  "gdbarch_update: info.byte_order %d (%s)\n",
-			  info.byte_order,
-			  (info.byte_order == BIG_ENDIAN ? "big"
-			   : info.byte_order == LITTLE_ENDIAN ? "little"
-			   : "default"));
-      fprintf_unfiltered (gdb_stdlog,
-			  "gdbarch_update: info.abfd 0x%lx\n",
-			  (long) info.abfd);
-      fprintf_unfiltered (gdb_stdlog,
-			  "gdbarch_update: info.tdep_info 0x%lx\n",
-			  (long) info.tdep_info);
+      if (info.bfd_arch_info != NULL)
+	info.bfd_architecture = info.bfd_arch_info->arch;
+      else if (info.abfd != NULL)
+	info.bfd_architecture = bfd_get_arch (info.abfd);
+      /* FIXME - should query BFD for its default architecture. */
+      else
+	info.bfd_architecture = current_gdbarch->bfd_arch_info->arch;
     }
+  if (info.bfd_arch_info == NULL)
+    {
+      if (target_architecture_auto && info.abfd != NULL)
+	info.bfd_arch_info = bfd_get_arch_info (info.abfd);
+      else
+	info.bfd_arch_info = current_gdbarch->bfd_arch_info;
+    }
+  if (info.byte_order == 0)
+    {
+      if (target_byte_order_auto && info.abfd != NULL)
+	info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
+			   : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
+			   : 0);
+      else
+	info.byte_order = current_gdbarch->byte_order;
+      /* FIXME - should query BFD for its default byte-order. */
+    }
+  /* A default for abfd? */
 
   /* Find the target that knows about this architecture. */
   for (rego = gdbarch_registry;
        rego != NULL;
        rego = rego->next)
-    if (rego->bfd_architecture == info.bfd_arch_info->arch)
+    if (rego->bfd_architecture == info.bfd_architecture)
       break;
   if (rego == NULL)
     {
@@ -2042,6 +1989,31 @@
       return 0;
     }
 
+  if (gdbarch_debug)
+    {
+      fprintf_unfiltered (gdb_stdlog,
+			  "gdbarch_update: info.bfd_architecture %d (%s)\\n",
+			  info.bfd_architecture,
+			  bfd_lookup_arch (info.bfd_architecture, 0)->printable_name);
+      fprintf_unfiltered (gdb_stdlog,
+			  "gdbarch_update: info.bfd_arch_info %s\\n",
+			  (info.bfd_arch_info != NULL
+			   ? info.bfd_arch_info->printable_name
+			   : "(null)"));
+      fprintf_unfiltered (gdb_stdlog,
+			  "gdbarch_update: info.byte_order %d (%s)\\n",
+			  info.byte_order,
+			  (info.byte_order == BIG_ENDIAN ? "big"
+			   : info.byte_order == LITTLE_ENDIAN ? "little"
+			   : "default"));
+      fprintf_unfiltered (gdb_stdlog,
+			  "gdbarch_update: info.abfd 0x%lx\\n",
+			  (long) info.abfd);
+      fprintf_unfiltered (gdb_stdlog,
+			  "gdbarch_update: info.tdep_info 0x%lx\\n",
+			  (long) info.tdep_info);
+    }
+
   /* Ask the target for a replacement architecture. */
   new_gdbarch = rego->init (info, rego->arches);
 
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index da89b36..5eec828 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -31,7 +31,7 @@
 struct thread_info
 {
   struct thread_info *next;
-  ptid_t ptid;			/* "Actual process id";
+  int pid;			/* "Actual process id";
 				    In fact, this may be overloaded with 
 				    kernel thread id, etc.  */
   int num;			/* Convenient handle (GDB thread id) */
@@ -44,9 +44,6 @@
   CORE_ADDR step_range_start;
   CORE_ADDR step_range_end;
   CORE_ADDR step_frame_address;
-  CORE_ADDR step_sp;
-  int current_line;
-  struct symtab *current_symtab;
   int trap_expected;
   int handling_longjmp;
   int another_trap;
@@ -76,32 +73,29 @@
 /* Add a thread to the thread list.
    Note that add_thread now returns the handle of the new thread,
    so that the caller may initialize the private thread data.  */
-extern struct thread_info *add_thread (ptid_t ptid);
+extern struct thread_info *add_thread (int pid);
 
 /* Delete an existing thread list entry.  */
-extern void delete_thread (ptid_t);
-
-/* Delete a step_resume_breakpoint from the thread database. */
-extern void delete_step_resume_breakpoint (void *);
+extern void delete_thread (int);
 
 /* Translate the integer thread id (GDB's homegrown id, not the system's)
    into a "pid" (which may be overloaded with extra thread information).  */
-extern ptid_t thread_id_to_pid (int);
+extern int thread_id_to_pid (int);
 
 /* Translate a 'pid' (which may be overloaded with extra thread information) 
    into the integer thread id (GDB's homegrown id, not the system's).  */
-extern int pid_to_thread_id (ptid_t ptid);
+extern int pid_to_thread_id (int pid);
 
 /* Boolean test for an already-known pid (which may be overloaded with
    extra thread information).  */
-extern int in_thread_list (ptid_t ptid);
+extern int in_thread_list (int pid);
 
 /* Boolean test for an already-known thread id (GDB's homegrown id, 
    not the system's).  */
 extern int valid_thread_id (int thread);
 
 /* Search function to lookup a thread by 'pid'.  */
-extern struct thread_info *find_thread_pid (ptid_t ptid);
+extern struct thread_info *find_thread_pid (int pid);
 
 /* Iterator function to call a user-provided callback function
    once for each known thread.  */
@@ -109,7 +103,7 @@
 extern struct thread_info *iterate_over_threads (thread_callback_func, void *);
 
 /* infrun context switch: save the debugger state for the given thread.  */
-extern void save_infrun_state (ptid_t ptid,
+extern void save_infrun_state (int       pid,
 			       CORE_ADDR prev_pc,
 			       CORE_ADDR prev_func_start,
 			       char     *prev_func_name,
@@ -123,14 +117,11 @@
 			       int       another_trap,
 			       int       stepping_through_solib_after_catch,
 			       bpstat    stepping_through_solib_catchpoints,
-			       int       stepping_through_sigtramp,
-			       int       current_line,
-			       struct symtab *current_symtab,
-			       CORE_ADDR step_sp);
+			       int       stepping_through_sigtramp);
 
 /* infrun context switch: load the debugger state previously saved
    for the given thread.  */
-extern void load_infrun_state (ptid_t ptid,
+extern void load_infrun_state (int        pid,
 			       CORE_ADDR *prev_pc,
 			       CORE_ADDR *prev_func_start,
 			       char     **prev_func_name,
@@ -144,10 +135,7 @@
 			       int       *another_trap,
 			       int       *stepping_through_solib_affter_catch,
 			       bpstat    *stepping_through_solib_catchpoints,
-			       int       *stepping_through_sigtramp,
-			       int       *current_line,
-			       struct symtab **current_symtab,
-			       CORE_ADDR *step_sp);
+			       int       *stepping_through_sigtramp);
 
 /* Commands with a prefix of `thread'.  */
 extern struct cmd_list_element *thread_cmd_list;
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index f2fed5f..ee191cd 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -74,7 +74,6 @@
 struct type *builtin_type_v4hi;
 struct type *builtin_type_v2si;
 struct type *builtin_type_ptr;
-struct type *builtin_type_void_func_ptr;
 struct type *builtin_type_CORE_ADDR;
 struct type *builtin_type_bfd_vma;
 
@@ -2929,36 +2928,10 @@
     = init_simd_type ("__builtin_v2si", builtin_type_int32, "f", 2);
 
   /* Pointer/Address types. */
-
-  /* NOTE: on some targets, addresses and pointers are not necessarily
-     the same --- for example, on the D10V, pointers are 16 bits long,
-     but addresses are 32 bits long.  See doc/gdbint.texinfo,
-     ``Pointers Are Not Always Addresses''.
-
-     The upshot is:
-     - gdb's `struct type' always describes the target's
-       representation.
-     - gdb's `struct value' objects should always hold values in
-       target form.
-     - gdb's CORE_ADDR values are addresses in the unified virtual
-       address space that the assembler and linker work with.  Thus,
-       since target_read_memory takes a CORE_ADDR as an argument, it
-       can access any memory on the target, even if the processor has
-       separate code and data address spaces.
-
-     So, for example:
-     - If v is a value holding a D10V code pointer, its contents are
-       in target form: a big-endian address left-shifted two bits.
-     - If p is a D10V pointer type, TYPE_LENGTH (p) == 2, just as
-       sizeof (void *) == 2 on the target.
-
-     In this context, builtin_type_CORE_ADDR is a bit odd: it's a
-     target type for a value the target will never see.  It's only
-     used to hold the values of (typeless) linker symbols, which are
-     indeed in the unified virtual address space.  */
+  /* NOTE: At present there is no way of differentiating between at
+     target address and the target C language pointer type type even
+     though the two can be different (cf d10v) */
   builtin_type_ptr = make_pointer_type (builtin_type_void, NULL);
-  builtin_type_void_func_ptr
-    = lookup_pointer_type (lookup_function_type (builtin_type_void));
   builtin_type_CORE_ADDR =
     init_type (TYPE_CODE_INT, TARGET_ADDR_BIT / 8,
 	       TYPE_FLAG_UNSIGNED,
@@ -3012,7 +2985,6 @@
   register_gdbarch_swap (&builtin_type_v4hi, sizeof (struct type *), NULL);
   register_gdbarch_swap (&builtin_type_v2si, sizeof (struct type *), NULL);
   REGISTER_GDBARCH_SWAP (builtin_type_ptr);
-  REGISTER_GDBARCH_SWAP (builtin_type_void_func_ptr);
   REGISTER_GDBARCH_SWAP (builtin_type_CORE_ADDR);
   REGISTER_GDBARCH_SWAP (builtin_type_bfd_vma);
   register_gdbarch_swap (NULL, 0, build_gdbtypes);
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 981dbec..f5f9f1a 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -849,16 +849,6 @@
 /* (C) Language pointer type. Some target platforms use an implicitly
    {sign,zero} -extended 32 bit C language pointer on a 64 bit ISA. */
 extern struct type *builtin_type_ptr;
-
-/* (C) Language `pointer to function returning void' type.  Since
-   ANSI, C standards have explicitly said that pointers to functions
-   and pointers to data are not interconvertible --- that is, you
-   can't cast a function pointer to void * and back, and expect to get
-   the same value.  However, all function pointer types are
-   interconvertible, so void (*) () can server as a generic function
-   pointer.  */
-extern struct type *builtin_type_void_func_ptr;
-
 /* The target CPU's address type.  This is the ISA address size. */
 extern struct type *builtin_type_CORE_ADDR;
 /* The symbol table address type.  Some object file formats have a 32
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 0e584e9..7feac1c 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -24,7 +24,6 @@
    Boston, MA 02111-1307, USA.
  */
 
-#include <ctype.h>
 #include <errno.h>
 #include <limits.h>
 #include <setjmp.h>
@@ -1065,7 +1064,7 @@
 	    (last ? last->next : inf->threads) = thread;
 	    last = thread;
 	    proc_debug (thread, "new thread: %d", threads[i]);
-	    add_thread (pid_to_ptid (thread->tid));	/* Tell GDB's generic thread code.  */
+	    add_thread (thread->tid);	/* Tell GDB's generic thread code.  */
 	  }
       }
 
@@ -1409,8 +1408,8 @@
 struct inf *waiting_inf;
 
 /* Wait for something to happen in the inferior, returning what in STATUS. */
-static ptid_t
-gnu_wait (ptid_t tid, struct target_waitstatus *status)
+static int
+gnu_wait (int tid, struct target_waitstatus *status)
 {
   struct msg
     {
@@ -1441,7 +1440,7 @@
 
   waiting_inf = inf;
 
-  inf_debug (inf, "waiting for: %d", PIDGET (tid));
+  inf_debug (inf, "waiting for: %d", tid);
 
 rewait:
   if (proc_wait_pid != inf->pid && !inf->no_wait)
@@ -1577,20 +1576,20 @@
 
   thread = inf->wait.thread;
   if (thread)
-    tid = pid_to_ptid (thread->tid);
+    tid = thread->tid;
   else
-    thread = inf_tid_to_thread (inf, PIDGET (tid));
+    thread = inf_tid_to_thread (inf, tid);
 
   if (!thread || thread->port == MACH_PORT_NULL)
     {
       /* TID is dead; try and find a new thread.  */
       if (inf_update_procs (inf) && inf->threads)
-	tid = pid_to_ptid (inf->threads->tid); /* The first available thread.  */
+	tid = inf->threads->tid; /* The first available thread.  */
       else
-	tid = inferior_ptid;	/* let wait_for_inferior handle exit case */
+	tid = inferior_pid;	/* let wait_for_inferior handle exit case */
     }
 
-  if (thread && PIDGET (tid) >= 0 && status->kind != TARGET_WAITKIND_SPURIOUS
+  if (thread && tid >= 0 && status->kind != TARGET_WAITKIND_SPURIOUS
       && inf->pause_sc == 0 && thread->pause_sc == 0)
     /* If something actually happened to THREAD, make sure we
        suspend it.  */
@@ -1599,7 +1598,7 @@
       inf_update_suspends (inf);
     }
 
-  inf_debug (inf, "returning tid = %d, status = %s (%d)", PIDGET (tid),
+  inf_debug (inf, "returning tid = %d, status = %s (%d)", tid,
 	     status->kind == TARGET_WAITKIND_EXITED ? "EXITED"
 	     : status->kind == TARGET_WAITKIND_STOPPED ? "STOPPED"
 	     : status->kind == TARGET_WAITKIND_SIGNALLED ? "SIGNALLED"
@@ -1926,12 +1925,12 @@
    in multiple events returned by wait).
  */
 static void
-gnu_resume (ptid_t tid, int step, enum target_signal sig)
+gnu_resume (int tid, int step, enum target_signal sig)
 {
   struct proc *step_thread = 0;
   struct inf *inf = current_inferior;
 
-  inf_debug (inf, "tid = %d, step = %d, sig = %d", PIDGET (tid), step, sig);
+  inf_debug (inf, "tid = %d, step = %d, sig = %d", tid, step, sig);
 
   inf_validate_procinfo (inf);
 
@@ -1959,17 +1958,17 @@
 
   inf_update_procs (inf);
 
-  if (PIDGET (tid) < 0)
+  if (tid < 0)
     /* Allow all threads to run, except perhaps single-stepping one.  */
     {
-      inf_debug (inf, "running all threads; tid = %d", PIDGET (inferior_ptid));
-      tid = inferior_ptid;	/* What to step. */
+      inf_debug (inf, "running all threads; tid = %d", inferior_pid);
+      tid = inferior_pid;	/* What to step. */
       inf_set_threads_resume_sc (inf, 0, 1);
     }
   else
     /* Just allow a single thread to run.  */
     {
-      struct proc *thread = inf_tid_to_thread (inf, PIDGET (tid));
+      struct proc *thread = inf_tid_to_thread (inf, tid);
       if (!thread)
 	error ("Can't run single thread id %d: no such thread!");
       inf_debug (inf, "running one thread: %d/%d", inf->pid, thread->tid);
@@ -1978,9 +1977,9 @@
 
   if (step)
     {
-      step_thread = inf_tid_to_thread (inf, PIDGET (tid));
+      step_thread = inf_tid_to_thread (inf, tid);
       if (!step_thread)
-	warning ("Can't step thread id %d: no such thread.", PIDGET (tid));
+	warning ("Can't step thread id %d: no such thread.", tid);
       else
 	inf_debug (inf, "stepping thread: %d/%d", inf->pid, step_thread->tid);
     }
@@ -2067,7 +2066,7 @@
     /* Now let the child run again, knowing that it will stop immediately
        because of the ptrace. */
     inf_resume (inf);
-    inferior_ptid = pid_to_ptid (inf_pick_first_thread ());
+    inferior_pid = inf_pick_first_thread ();
 
     startup_inferior (inf->pending_execs);
   }
@@ -2138,7 +2137,7 @@
   inf_attach (inf, pid);
   inf_update_procs (inf);
 
-  inferior_ptid = pid_to_ptid (inf_pick_first_thread ());
+  inferior_pid = inf_pick_first_thread ();
 
   attach_flag = 1;
   push_target (&gnu_ops);
@@ -2183,7 +2182,7 @@
 
   inf_detach (current_inferior);
 
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 
   unpush_target (&gnu_ops);	/* Pop out of handling an inferior */
 }
@@ -2223,7 +2222,7 @@
 }
 
 static char *
-gnu_pid_to_exec_file (int pid)
+gnu_pid_to_exec_file (void)
 {
   error ("to_pid_to_exec_file target function not implemented");
   return NULL;
@@ -2231,10 +2230,10 @@
 
 
 static int
-gnu_thread_alive (ptid_t tid)
+gnu_thread_alive (int tid)
 {
   inf_update_procs (current_inferior);
-  return !!inf_tid_to_thread (current_inferior, PIDGET (tid));
+  return !!inf_tid_to_thread (current_inferior, tid);
 }
 
 
@@ -2477,15 +2476,14 @@
     sprintf (tid_str, "process %d", proc->inf->pid);
   else
     sprintf (tid_str, "thread %d.%d",
-	     proc->inf->pid, pid_to_thread_id (MERGEPID (proc->tid, 0)));
+	     proc->inf->pid, pid_to_thread_id (proc->tid));
   return tid_str;
 }
 
 static char *
-gnu_pid_to_str (ptid_t ptid)
+gnu_pid_to_str (int tid)
 {
   struct inf *inf = current_inferior;
-  int tid = PIDGET (ptid);
   struct proc *thread = inf_tid_to_thread (inf, tid);
 
   if (thread)
@@ -2655,7 +2653,7 @@
 cur_thread (void)
 {
   struct inf *inf = cur_inf ();
-  struct proc *thread = inf_tid_to_thread (inf, PIDGET (inferior_ptid));
+  struct proc *thread = inf_tid_to_thread (inf, inferior_pid);
   if (!thread)
     error ("No current thread.");
   return thread;
@@ -2837,7 +2835,7 @@
     inf->signal_thread = 0;
   else
     {
-      int tid = PIDGET (thread_id_to_pid (atoi (args)));
+      int tid = thread_id_to_pid (atoi (args));
       if (tid < 0)
 	error ("Thread ID %s not known.  Use the \"info threads\" command to\n"
 	       "see the IDs of currently known threads.", args);
diff --git a/gdb/gnu-regex.c b/gdb/gnu-regex.c
index 89e532e..6acdcf2 100644
--- a/gdb/gnu-regex.c
+++ b/gdb/gnu-regex.c
@@ -1590,8 +1590,21 @@
 /* This is not an arbitrary limit: the arguments which represent offsets
    into the pattern are two bytes long.  So if 2^16 bytes turns out to
    be too small, many things would have to change.  */
-#define MAX_BUF_SIZE (1L << 16)
-#define REALLOC(p,s) realloc ((p), (s))
+/* Any other compiler which, like MSC, has allocation limit below 2^16
+   bytes will have to use approach similar to what was done below for
+   MSC and drop MAX_BUF_SIZE a bit.  Otherwise you may end up
+   reallocating to 0 bytes.  Such thing is not going to work too well.
+   You have been warned!!  */
+#if defined _MSC_VER  && !defined WIN32
+/* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
+   The REALLOC define eliminates a flurry of conversion warnings,
+   but is not required. */
+# define MAX_BUF_SIZE  65500L
+# define REALLOC(p,s) realloc ((p), (size_t) (s))
+#else
+# define MAX_BUF_SIZE (1L << 16)
+# define REALLOC(p,s) realloc ((p), (s))
+#endif
 
 /* Extend the buffer by twice its current size via realloc and
    reset the pointers that pointed into the old block to point to the
diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c
index 8c46219..ad73165 100644
--- a/gdb/gnu-v2-abi.c
+++ b/gdb/gnu-v2-abi.c
@@ -22,6 +22,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
+#include "gdb_regex.h"
 #include "gdb_string.h"
 #include "symtab.h"
 #include "gdbtypes.h"
@@ -111,6 +112,7 @@
   if (TYPE_TARGET_TYPE (context) != type1)
     {
       value_ptr tmp = value_cast (context, value_addr (arg1));
+      VALUE_POINTED_TO_OFFSET (tmp) = 0;
       arg1 = value_ind (tmp);
       type1 = check_typedef (VALUE_TYPE (arg1));
     }
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
deleted file mode 100644
index d9da17c..0000000
--- a/gdb/gnu-v3-abi.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/* Abstraction of GNU v3 abi.
-   Contributed by Jim Blandy <jimb@redhat.com>
-   Copyright 2001 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.  */
-
-#include "defs.h"
-#include "value.h"
-#include "cp-abi.h"
-#include "demangle.h"
-#include "gdb_assert.h"
-
-static struct cp_abi_ops gnu_v3_abi_ops;
-
-static int
-gnuv3_is_vtable_name (const char *name)
-{
-  return strncmp (name, "_ZTV", 4) == 0;
-}
-
-static int
-gnuv3_is_operator_name (const char *name)
-{
-  return strncmp (name, "operator", 8) == 0;
-}
-
-
-/* To help us find the components of a vtable, we build ourselves a
-   GDB type object representing the vtable structure.  Following the
-   V3 ABI, it goes something like this:
-
-   struct gdb_gnu_v3_abi_vtable {
-
-     / * An array of virtual call and virtual base offsets.  The real
-         length of this array depends on the class hierarchy; we use
-         negative subscripts to access the elements.  Yucky, but
-         better than the alternatives.  * /
-     ptrdiff_t vcall_and_vbase_offsets[0];
-
-     / * The offset from a virtual pointer referring to this table
-         to the top of the complete object.  * /
-     ptrdiff_t offset_to_top;
-
-     / * The type_info pointer for this class.  This is really a
-         std::type_info *, but GDB doesn't really look at the
-         type_info object itself, so we don't bother to get the type
-         exactly right.  * /
-     void *type_info;
-
-     / * Virtual table pointers in objects point here.  * /
-
-     / * Virtual function pointers.  Like the vcall/vbase array, the
-         real length of this table depends on the class hierarchy.  * /
-     void (*virtual_functions[0]) ();
-
-   };
-
-   The catch, of course, is that the exact layout of this table
-   depends on the ABI --- word size, endianness, alignment, etc.  So
-   the GDB type object is actually a per-architecture kind of thing.
-
-   vtable_type_gdbarch_data is a gdbarch per-architecture data pointer
-   which refers to the struct type * for this structure, laid out
-   appropriately for the architecture.  */
-static struct gdbarch_data *vtable_type_gdbarch_data;
-
-
-/* Human-readable names for the numbers of the fields above.  */
-enum {
-  vtable_field_vcall_and_vbase_offsets,
-  vtable_field_offset_to_top,
-  vtable_field_type_info,
-  vtable_field_virtual_functions
-};
-
-
-/* Return a GDB type representing `struct gdb_gnu_v3_abi_vtable',
-   described above, laid out appropriately for ARCH.
-
-   We use this function as the gdbarch per-architecture data
-   initialization function.  We assume that the gdbarch framework
-   calls the per-architecture data initialization functions after it
-   sets current_gdbarch to the new architecture.  */
-static void *
-build_gdb_vtable_type (struct gdbarch *arch)
-{
-  struct type *t;
-  struct field *field_list, *field;
-  int offset;
-
-  struct type *void_ptr_type
-    = lookup_pointer_type (builtin_type_void);
-  struct type *ptr_to_void_fn_type
-    = lookup_pointer_type (lookup_function_type (builtin_type_void));
-
-  /* ARCH can't give us the true ptrdiff_t type, so we guess.  */
-  struct type *ptrdiff_type
-    = init_type (TYPE_CODE_INT, TARGET_PTR_BIT / TARGET_CHAR_BIT, 0,
-                 "ptrdiff_t", 0);
-
-  /* We assume no padding is necessary, since GDB doesn't know
-     anything about alignment at the moment.  If this assumption bites
-     us, we should add a gdbarch method which, given a type, returns
-     the alignment that type requires, and then use that here.  */
-
-  /* Build the field list.  */
-  field_list = xmalloc (sizeof (struct field [4]));
-  memset (field_list, 0, sizeof (struct field [4]));
-  field = &field_list[0];
-  offset = 0;
-
-  /* ptrdiff_t vcall_and_vbase_offsets[0]; */
-  FIELD_NAME (*field) = "vcall_and_vbase_offsets";
-  FIELD_TYPE (*field)
-    = create_array_type (0, ptrdiff_type,
-                         create_range_type (0, builtin_type_int, 0, -1));
-  FIELD_BITPOS (*field) = offset * TARGET_CHAR_BIT;
-  offset += TYPE_LENGTH (FIELD_TYPE (*field));
-  field++;
-
-  /* ptrdiff_t offset_to_top; */
-  FIELD_NAME (*field) = "offset_to_top";
-  FIELD_TYPE (*field) = ptrdiff_type;
-  FIELD_BITPOS (*field) = offset * TARGET_CHAR_BIT;
-  offset += TYPE_LENGTH (FIELD_TYPE (*field));
-  field++;
-
-  /* void *type_info; */
-  FIELD_NAME (*field) = "type_info";
-  FIELD_TYPE (*field) = void_ptr_type;
-  FIELD_BITPOS (*field) = offset * TARGET_CHAR_BIT;
-  offset += TYPE_LENGTH (FIELD_TYPE (*field));
-  field++;
-
-  /* void (*virtual_functions[0]) (); */
-  FIELD_NAME (*field) = "virtual_functions";
-  FIELD_TYPE (*field)
-    = create_array_type (0, ptr_to_void_fn_type,
-                         create_range_type (0, builtin_type_int, 0, -1));
-  FIELD_BITPOS (*field) = offset * TARGET_CHAR_BIT;
-  offset += TYPE_LENGTH (FIELD_TYPE (*field));
-  field++;
-
-  /* We assumed in the allocation above that there were four fields.  */
-  gdb_assert (field == (field_list + 4));
-
-  t = init_type (TYPE_CODE_STRUCT, offset, 0, 0, 0);
-  TYPE_NFIELDS (t) = field - field_list;
-  TYPE_FIELDS (t) = field_list;
-  TYPE_TAG_NAME (t) = "gdb_gnu_v3_abi_vtable";
-
-  return t;
-}
-
-
-/* Return the offset from the start of the imaginary `struct
-   gdb_gnu_v3_abi_vtable' object to the vtable's "address point"
-   (i.e., where objects' virtual table pointers point).  */
-static int
-vtable_address_point_offset ()
-{
-  struct type *vtable_type = gdbarch_data (vtable_type_gdbarch_data);
-
-  return (TYPE_FIELD_BITPOS (vtable_type, vtable_field_virtual_functions)
-          / TARGET_CHAR_BIT);
-}
-
-
-static struct type *
-gnuv3_rtti_type (struct value *value,
-                 int *full_p, int *top_p, int *using_enc_p)
-{
-  struct type *vtable_type = gdbarch_data (vtable_type_gdbarch_data);
-  struct type *value_type = check_typedef (VALUE_TYPE (value));
-  CORE_ADDR vtable_address;
-  struct value *vtable;
-  struct minimal_symbol *vtable_symbol;
-  const char *vtable_symbol_name;
-  const char *class_name;
-  struct symbol *class_symbol;
-  struct type *run_time_type;
-  LONGEST offset_to_top;
-
-  /* We only have RTTI for class objects.  */
-  if (TYPE_CODE (value_type) != TYPE_CODE_CLASS)
-    return NULL;
-
-  /* If we can't find the virtual table pointer for value_type, we
-     can't find the RTTI.  */
-  fill_in_vptr_fieldno (value_type);
-  if (TYPE_VPTR_FIELDNO (value_type) == -1)
-    return NULL;
-
-  /* Fetch VALUE's virtual table pointer, and tweak it to point at
-     an instance of our imaginary gdb_gnu_v3_abi_vtable structure.   */
-  vtable_address
-    = value_as_pointer (value_field (value, TYPE_VPTR_FIELDNO (value_type)));
-  vtable = value_at_lazy (vtable_type,
-                          vtable_address - vtable_address_point_offset (),
-                          VALUE_BFD_SECTION (value));
-  
-  /* Find the linker symbol for this vtable.  */
-  vtable_symbol
-    = lookup_minimal_symbol_by_pc (VALUE_ADDRESS (vtable)
-                                   + VALUE_OFFSET (vtable)
-                                   + VALUE_EMBEDDED_OFFSET (vtable));
-  if (! vtable_symbol)
-    return NULL;
-  
-  /* The symbol's demangled name should be something like "vtable for
-     CLASS", where CLASS is the name of the run-time type of VALUE.
-     If we didn't like this approach, we could instead look in the
-     type_info object itself to get the class name.  But this way
-     should work just as well, and doesn't read target memory.  */
-  vtable_symbol_name = SYMBOL_DEMANGLED_NAME (vtable_symbol);
-  if (strncmp (vtable_symbol_name, "vtable for ", 11))
-    error ("can't find linker symbol for virtual table for `%s' value",
-           TYPE_NAME (value_type));
-  class_name = vtable_symbol_name + 11;
-
-  /* Try to look up the class name as a type name.  */
-  class_symbol = lookup_symbol (class_name, 0, STRUCT_NAMESPACE, 0, 0);
-  if (! class_symbol)
-    error ("can't find class named `%s', as given by C++ RTTI", class_name);
-
-  /* Make sure the type symbol is sane.  (An earlier version of this
-     code would find constructor functions, who have the same name as
-     the class.)  */
-  if (SYMBOL_CLASS (class_symbol) != LOC_TYPEDEF
-      || TYPE_CODE (SYMBOL_TYPE (class_symbol)) != TYPE_CODE_CLASS)
-    error ("C++ RTTI gives a class name of `%s', but that isn't a type name",
-           class_name);
-
-  /* This is the object's run-time type!  */
-  run_time_type = SYMBOL_TYPE (class_symbol);
-
-  /* Get the offset from VALUE to the top of the complete object.
-     NOTE: this is the reverse of the meaning of *TOP_P.  */
-  offset_to_top
-    = value_as_long (value_field (vtable, vtable_field_offset_to_top));
-
-  if (full_p)
-    *full_p = (- offset_to_top == VALUE_EMBEDDED_OFFSET (value)
-               && (TYPE_LENGTH (VALUE_ENCLOSING_TYPE (value))
-                   >= TYPE_LENGTH (run_time_type)));
-  if (top_p)
-    *top_p = - offset_to_top;
-  if (using_enc_p)
-    *using_enc_p = 0;
-
-  return run_time_type;
-}
-
-
-static struct value *
-gnuv3_virtual_fn_field (struct value **value_p,
-                        struct fn_field *f, int j,
-			struct type *type, int offset)
-{
-  struct type *vtable_type = gdbarch_data (vtable_type_gdbarch_data);
-  struct value *value = *value_p;
-  struct type *value_type = check_typedef (VALUE_TYPE (value));
-  struct type *vfn_base;
-  CORE_ADDR vtable_address;
-  struct value *vtable;
-  struct value *vfn;
-
-  /* Some simple sanity checks.  */
-  if (TYPE_CODE (value_type) != TYPE_CODE_CLASS)
-    error ("Only classes can have virtual functions.");
-
-  /* Find the base class that defines this virtual function.  */
-  vfn_base = TYPE_FN_FIELD_FCONTEXT (f, j);
-  if (! vfn_base)
-    /* In programs compiled with G++ version 1, the debug info doesn't
-       say which base class defined the virtual function.  We'll guess
-       it's the same base class that has our vtable; this is wrong for
-       multiple inheritance, but it's better than nothing.  */
-    vfn_base = TYPE_VPTR_BASETYPE (type);
-
-  /* This type may have been defined before its virtual function table
-     was.  If so, fill in the virtual function table entry for the
-     type now.  */
-  if (TYPE_VPTR_FIELDNO (vfn_base) < 0)
-    fill_in_vptr_fieldno (vfn_base);
-
-  /* Now that we know which base class is defining our virtual
-     function, cast our value to that baseclass.  This takes care of
-     any necessary `this' adjustments.  */
-  if (vfn_base != value_type)
-    /* It would be nicer to simply cast the value to the appropriate
-       base class (and I think that is supposed to be legal), but
-       value_cast only does the right magic when casting pointers.  */
-    value = value_ind (value_cast (vfn_base, value_addr (value)));
-
-  /* Now value is an object of the appropriate base type.  Fetch its
-     virtual table.  */
-  vtable_address
-    = value_as_pointer (value_field (value, TYPE_VPTR_FIELDNO (vfn_base)));
-  vtable = value_at_lazy (vtable_type,
-                          vtable_address - vtable_address_point_offset (),
-                          VALUE_BFD_SECTION (value));
-
-  /* Fetch the appropriate function pointer from the vtable.  */
-  vfn = value_subscript (value_field (vtable, vtable_field_virtual_functions),
-                         value_from_longest (builtin_type_int,
-                                             TYPE_FN_FIELD_VOFFSET (f, j)));
-
-  /* Cast the function pointer to the appropriate type.  */
-  vfn = value_cast (lookup_pointer_type (TYPE_FN_FIELD_TYPE (f, j)),
-                    vfn);
-
-  return vfn;
-}
-
-
-static void
-init_gnuv3_ops (void)
-{
-  vtable_type_gdbarch_data = register_gdbarch_data (build_gdb_vtable_type, 0);
-
-  gnu_v3_abi_ops.shortname = "gnu-v3";
-  gnu_v3_abi_ops.longname = "GNU G++ Version 3 ABI";
-  gnu_v3_abi_ops.doc = "G++ Version 3 ABI";
-  gnu_v3_abi_ops.is_destructor_name = is_gnu_v3_mangled_dtor;
-  gnu_v3_abi_ops.is_constructor_name = is_gnu_v3_mangled_ctor;
-  gnu_v3_abi_ops.is_vtable_name = gnuv3_is_vtable_name;
-  gnu_v3_abi_ops.is_operator_name = gnuv3_is_operator_name;
-  gnu_v3_abi_ops.rtti_type = gnuv3_rtti_type;
-  gnu_v3_abi_ops.virtual_fn_field = gnuv3_virtual_fn_field;
-}
-
-
-void
-_initialize_gnu_v3_abi (void)
-{
-  init_gnuv3_ops ();
-
-  register_cp_abi (gnu_v3_abi_ops);
-}
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index d7647e9..98eb7f2 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -164,10 +164,8 @@
 static void go32_close (int quitting);
 static void go32_attach (char *args, int from_tty);
 static void go32_detach (char *args, int from_tty);
-static void go32_resume (ptid_t ptid, int step,
-                         enum target_signal siggnal);
-static ptid_t go32_wait (ptid_t ptid,
-                               struct target_waitstatus *status);
+static void go32_resume (int pid, int step, enum target_signal siggnal);
+static int go32_wait (int pid, struct target_waitstatus *status);
 static void go32_fetch_registers (int regno);
 static void store_register (int regno);
 static void go32_store_registers (int regno);
@@ -317,7 +315,7 @@
 static int resume_signal = -1;
 
 static void
-go32_resume (ptid_t ptid, int step, enum target_signal siggnal)
+go32_resume (int pid, int step, enum target_signal siggnal)
 {
   int i;
 
@@ -340,8 +338,8 @@
 
 static char child_cwd[FILENAME_MAX];
 
-static ptid_t
-go32_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+go32_wait (int pid, struct target_waitstatus *status)
 {
   int i;
   unsigned char saved_opcode;
@@ -455,7 +453,7 @@
 	    }
 	}
     }
-  return pid_to_ptid (SOME_PID);
+  return SOME_PID;
 }
 
 static void
@@ -560,7 +558,7 @@
 {
   normal_stop ();
   cleanup_client ();
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
   prog_has_started = 0;
 }
 
@@ -634,7 +632,7 @@
   save_npx ();
 #endif
 
-  inferior_ptid = pid_to_ptid (SOME_PID);
+  inferior_pid = SOME_PID;
   push_target (&go32_ops);
   clear_proceed_status ();
   insert_breakpoints ();
diff --git a/gdb/h8500-tdep.c b/gdb/h8500-tdep.c
index 33cd1f3..f0226b5 100644
--- a/gdb/h8500-tdep.c
+++ b/gdb/h8500-tdep.c
@@ -586,13 +586,13 @@
 }
 
 CORE_ADDR
-h8500_read_pc (ptid_t ptid)
+h8500_read_pc (int pid)
 {
   return read_register (PC_REGNUM);
 }
 
 void
-h8500_write_pc (CORE_ADDR v, ptid_t ptid)
+h8500_write_pc (CORE_ADDR v, int pid)
 {
   write_register (PC_REGNUM, v);
 }
diff --git a/gdb/hp-symtab-read.c b/gdb/hp-symtab-read.c
index 9898cfc..397ea5c 100644
--- a/gdb/hp-symtab-read.c
+++ b/gdb/hp-symtab-read.c
@@ -530,7 +530,7 @@
   if (!typep.dntti.immediate)
     {
       error ("error in hpread_type_translate\n.");
-      return FT_VOID;
+      return;
     }
 
   switch (typep.dntti.type)
@@ -1780,7 +1780,7 @@
 	      /* Enums -- will be handled by other code that takes care
 	         of DNTT_TYPE_ENUM; here we see only DNTT_TYPE_MEMENUM so
 	         it's not clear we could have handled them here at all. */
-	      /* FUNC_TEMPLATE: is handled by other code (?). */
+	      /* FUNC_TEMPLATE: is handled by other code (??). */
 	      /* MEMACCESS: modified access for inherited member. Not
 	         sure what to do with this, ignoriing it at present. */
 
@@ -1863,8 +1863,7 @@
 	{
 	  /* neither field nor genfield ?? is this possible?? */
 	  /* pai:: FIXME walk to the next -- how? */
-	  warning ("Internal error: unexpected DNTT kind %d encountered as field of struct",
-		   fieldp->dblock.kind);
+	  warning ("Internal error: unexpected DNTT kind %d encountered as field of struct");
 	  warning ("Skipping remaining fields of struct");
 	  break;		/* get out of loop of fields */
 	}
@@ -2200,7 +2199,7 @@
 	(!dn_bufp->darray.arrayisbytes && !dn_bufp->darray.elemisbytes)))
     {
       warning ("error in hpread_array_type.\n");
-      return NULL;
+      return;
     }
   else if (dn_bufp->darray.arraylength == 0x7fffffff)
     {
@@ -2303,17 +2302,14 @@
 
   /* First see if it's a simple builtin type.  */
   if (hp_type.dntti.immediate)
-    {
-      /* If this is a template argument, the argument number is
-       * encoded in the bitlength. All other cases, just return
-       * GDB's representation of this fundamental type.
-       */
-      if (hp_type.dntti.type == HP_TYPE_TEMPLATE_ARG)
-	return hpread_get_nth_template_arg (objfile, hp_type.dntti.bitlength);
-      else
-	return lookup_fundamental_type (objfile,
-					hpread_type_translate (hp_type));
-    }
+    /* If this is a template argument, the argument number is
+     * encoded in the bitlength. All other cases, just return
+     * GDB's representation of this fundamental type.
+     */
+    if (hp_type.dntti.type == HP_TYPE_TEMPLATE_ARG)
+      return hpread_get_nth_template_arg (objfile, hp_type.dntti.bitlength);
+    else
+      return lookup_fundamental_type (objfile, hpread_type_translate (hp_type));
 
   /* Not a builtin type.  We'll have to read it in.  */
   if (hp_type.dnttp.index < LNTT_SYMCOUNT (objfile))
@@ -2429,7 +2425,7 @@
 	else
 	  {
 	    complain (&hpread_type_lookup_complaint);
-	    return NULL;
+	    return;
 	  }
 
 	if (dn_bufp->dblock.kind == DNTT_TYPE_STRUCT)
diff --git a/gdb/hp300ux-nat.c b/gdb/hp300ux-nat.c
index ecb8a35..26aa80f 100644
--- a/gdb/hp300ux-nat.c
+++ b/gdb/hp300ux-nat.c
@@ -74,8 +74,8 @@
 
 #define INFERIOR_AR0(u)							\
   ((ptrace								\
-    (PT_RUAREA, PIDGET (inferior_ptid),					\
-     (PTRACE_ARG3_TYPE) ((char *) &u.u_ar0 - (char *) &u), 0, 0))	\
+    (PT_RUAREA, inferior_pid,						\
+     (PTRACE_ARG3_TYPE) ((char *) &u.u_ar0 - (char *) &u), 0, 0))		\
    - kernel_u_addr)
 
 static void
@@ -92,8 +92,8 @@
       ps_val;
       int regval;
 
-      ps_val.i = (ptrace (PT_RUAREA, PIDGET (inferior_ptid),
-                          (PTRACE_ARG3_TYPE) regaddr, 0, 0));
+      ps_val.i = (ptrace (PT_RUAREA, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
+			  0, 0));
       regval = ps_val.s[0];
       supply_register (regno, (char *) &regval);
     }
@@ -105,7 +105,7 @@
 
       for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
 	{
-	  *(int *) &buf[i] = ptrace (PT_RUAREA, PIDGET (inferior_ptid),
+	  *(int *) &buf[i] = ptrace (PT_RUAREA, inferior_pid,
 				     (PTRACE_ARG3_TYPE) regaddr, 0, 0);
 	  regaddr += sizeof (int);
 	}
@@ -118,8 +118,7 @@
 store_inferior_register_1 (int regno, unsigned int regaddr, int val)
 {
   errno = 0;
-  ptrace (PT_WUAREA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr,
-          val, 0);
+  ptrace (PT_WUAREA, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, val, 0);
 #if 0
   /* HP-UX randomly sets errno to non-zero for regno == 25.
      However, the value is correctly written, so ignore errno. */
@@ -147,8 +146,8 @@
 	}
       ps_val;
 
-      ps_val.i = (ptrace (PT_RUAREA, PIDGET (inferior_ptid),
-                          (PTRACE_ARG3_TYPE) regaddr, 0, 0));
+      ps_val.i = (ptrace (PT_RUAREA, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
+			  0, 0));
       ps_val.s[0] = (read_register (regno));
       store_inferior_register_1 (regno, regaddr, ps_val.i);
     }
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 1c28e87..855fcb3 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1397,7 +1397,7 @@
      We also need a number of horrid hacks to deal with lossage in the
      PC queue registers (apparently they're not valid when the in syscall
      bit is set).  */
-  pc = target_read_pc (inferior_ptid);
+  pc = target_read_pc (inferior_pid);
   int_buffer = read_register (FLAGS_REGNUM);
   if (int_buffer & 0x2)
     {
@@ -1631,7 +1631,7 @@
          any other choice?  Is there *any* way to do this stuff with
          ptrace() or some equivalent?).  */
       resume (1, 0);
-      target_wait (inferior_ptid, &w);
+      target_wait (inferior_pid, &w);
 
       if (w.kind == TARGET_WAITKIND_SIGNALLED)
 	{
@@ -2076,9 +2076,9 @@
 	   such that it points to the PC value written immediately above
 	   (ie the call dummy).  */
         resume (1, 0);
-        target_wait (inferior_ptid, &w);
+        target_wait (inferior_pid, &w);
         resume (1, 0);
-        target_wait (inferior_ptid, &w);
+        target_wait (inferior_pid, &w);
 
 	/* Restore the two instructions at the old PC locations.  */
         *((int *) buf) = inst1;
@@ -2162,7 +2162,7 @@
          stub rather than the export stub or real function for lazy binding
          to work correctly
 
-         If we are using the gcc PLT call routine, then we need to
+         /* If we are using the gcc PLT call routine, then we need to
          get the import stub for the target function.  */
       if (using_gcc_plt_call && som_solib_get_got_by_pc (fun))
 	{
@@ -2370,7 +2370,7 @@
   if (flags & 2)
     return pc;
 #ifndef GDB_TARGET_IS_PA_ELF
-  else if (som_solib_get_got_by_pc (target_read_pc (inferior_ptid)))
+  else if (som_solib_get_got_by_pc (target_read_pc (inferior_pid)))
     return pc;
 #endif
   else
@@ -2404,26 +2404,26 @@
    bits.  */
 
 CORE_ADDR
-target_read_pc (ptid_t ptid)
+target_read_pc (int pid)
 {
-  int flags = read_register_pid (FLAGS_REGNUM, ptid);
+  int flags = read_register_pid (FLAGS_REGNUM, pid);
 
   /* The following test does not belong here.  It is OS-specific, and belongs
      in native code.  */
   /* Test SS_INSYSCALL */
   if (flags & 2)
-    return read_register_pid (31, ptid) & ~0x3;
+    return read_register_pid (31, pid) & ~0x3;
 
-  return read_register_pid (PC_REGNUM, ptid) & ~0x3;
+  return read_register_pid (PC_REGNUM, pid) & ~0x3;
 }
 
 /* Write out the PC.  If currently in a syscall, then also write the new
    PC value into %r31.  */
 
 void
-target_write_pc (CORE_ADDR v, ptid_t ptid)
+target_write_pc (CORE_ADDR v, int pid)
 {
-  int flags = read_register_pid (FLAGS_REGNUM, ptid);
+  int flags = read_register_pid (FLAGS_REGNUM, pid);
 
   /* The following test does not belong here.  It is OS-specific, and belongs
      in native code.  */
@@ -2431,10 +2431,10 @@
      privilege bits set correctly.  */
   /* Test SS_INSYSCALL */
   if (flags & 2)
-    write_register_pid (31, v | 0x3, ptid);
+    write_register_pid (31, v | 0x3, pid);
 
-  write_register_pid (PC_REGNUM, v, ptid);
-  write_register_pid (NPC_REGNUM, v + 4, ptid);
+  write_register_pid (PC_REGNUM, v, pid);
+  write_register_pid (NPC_REGNUM, v + 4, pid);
 }
 
 /* return the alignment of a type in bytes. Structures have the maximum
@@ -2645,7 +2645,7 @@
   for (i = start; i < 2; i++)
     {
       errno = 0;
-      raw_val[i] = call_ptrace (PT_RUREGS, PIDGET (inferior_ptid),
+      raw_val[i] = call_ptrace (PT_RUREGS, inferior_pid,
 				(PTRACE_ARG3_TYPE) regaddr, 0);
       if (errno != 0)
 	{
@@ -4026,7 +4026,7 @@
 	    }
 	}
 
-      /* Quit if we hit any kind of branch the previous iteration. */
+      /* Quit if we hit any kind of branch the previous iteration.
       if (final_iteration)
 	break;
 
@@ -4108,7 +4108,7 @@
     }
 
   anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
-  store_unsigned_integer (buf, 4, PIDGET (inferior_ptid)); /* FIXME 32x64? */
+  store_unsigned_integer (buf, 4, inferior_pid);	/* FIXME 32x64? */
   if (target_write_memory (anaddr, buf, 4))	/* FIXME 32x64? */
     {
       warning ("Unable to write __d_pid");
@@ -4250,7 +4250,7 @@
       if (!eh_notify_callback_addr)
 	{
 	  /* We can get here either if there is no plabel in the export list
-	     for the main image, or if something strange happened (?) */
+	     for the main image, or if something strange happened (??) */
 	  warning ("Couldn't find a plabel (indirect function label) for the exception callback.");
 	  warning ("GDB will not be able to intercept exception events.");
 	  return 0;
@@ -4378,7 +4378,7 @@
   if (enable)
     {
       /* Ensure that __d_pid is set up correctly -- end.c code checks this. :-( */
-      if (PIDGET (inferior_ptid) > 0)
+      if (inferior_pid > 0)
 	{
 	  if (setup_d_pid_in_inferior ())
 	    return (struct symtab_and_line *) -1;
@@ -4594,17 +4594,14 @@
    putting the BPT instruction in and taking it out.
 
    Note that this implementation is potentially redundant now that
-   default_prepare_to_proceed() has been added.
-
-   FIXME This may not support switching threads after Ctrl-C
-   correctly. The default implementation does support this. */
+   default_prepare_to_proceed() has been added.  */
 int
 hppa_prepare_to_proceed (void)
 {
   pid_t old_thread;
   pid_t current_thread;
 
-  old_thread = hppa_switched_threads (PIDGET (inferior_ptid));
+  old_thread = hppa_switched_threads (inferior_pid);
   if (old_thread != 0)
     {
       /* Switched over from "old_thread".  Try to do
@@ -4615,8 +4612,8 @@
 
       /* Yuk, shouldn't use global to specify current
          thread.  But that's how gdb does it. */
-      current_thread = PIDGET (inferior_ptid);
-      inferior_ptid = pid_to_ptid (old_thread);
+      current_thread = inferior_pid;
+      inferior_pid = old_thread;
 
       new_pc = read_pc ();
       if (new_pc != old_pc	/* If at same pc, no need */
@@ -4628,14 +4625,14 @@
 	  registers_changed ();
 #if 0
 	  printf ("---> PREPARE_TO_PROCEED (was %d, now %d)!\n",
-		  current_thread, PIDGET (inferior_ptid));
+		  current_thread, inferior_pid);
 #endif
 
 	  return 1;
 	}
 
       /* Otherwise switch back to the user-chosen thread. */
-      inferior_ptid = pid_to_ptid (current_thread);
+      inferior_pid = current_thread;
       new_pc = read_pc ();	/* Re-prime register cache */
     }
 
diff --git a/gdb/hppab-nat.c b/gdb/hppab-nat.c
index 51dde60..e812807 100644
--- a/gdb/hppab-nat.c
+++ b/gdb/hppab-nat.c
@@ -44,7 +44,7 @@
 /* U_REGS_OFFSET is the offset of the registers within the u area.  */
 #if !defined (U_REGS_OFFSET)
 #define U_REGS_OFFSET \
-  ptrace (PT_READ_U, PIDGET (inferior_ptid), \
+  ptrace (PT_READ_U, inferior_pid, \
           (PTRACE_ARG3_TYPE) (offsetof (struct user, u_ar0)), 0) \
     - KERNEL_U_ADDR
 #endif
@@ -67,7 +67,7 @@
   for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
     {
       errno = 0;
-      *(int *) &buf[i] = ptrace (PT_RUREGS, PIDGET (inferior_ptid),
+      *(int *) &buf[i] = ptrace (PT_RUREGS, inferior_pid,
 				 (PTRACE_ARG3_TYPE) regaddr, 0);
       regaddr += sizeof (int);
       if (errno != 0)
@@ -119,7 +119,7 @@
       if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
 	{
 	  scratch = *(int *) &registers[REGISTER_BYTE (regno)] | 0x3;
-	  ptrace (PT_WUREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr,
+	  ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
 		  scratch);
 	  if (errno != 0)
 	    {
@@ -133,8 +133,7 @@
 	for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
 	  {
 	    errno = 0;
-	    ptrace (PT_WUREGS, PIDGET (inferior_ptid),
-	            (PTRACE_ARG3_TYPE) regaddr,
+	    ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
 		    *(int *) &registers[REGISTER_BYTE (regno) + i]);
 	    if (errno != 0)
 	      {
@@ -210,5 +209,5 @@
   pt_args[1] <<= 12;
 
   /* Do it.  */
-  return ptrace (PT_PROT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) pt_args, 0);
+  return ptrace (PT_PROT, inferior_pid, (PTRACE_ARG3_TYPE) pt_args, 0);
 }
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index c5c431d..e89648b 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -126,8 +126,7 @@
 	  /* Set the priv level (stored in the low two bits of the PC.  */
 	  temp |= 0x3;
 
-	  ttrace_write_reg_64 (PIDGET (inferior_ptid), (CORE_ADDR)addr,
-	                       (CORE_ADDR)&temp);
+	  ttrace_write_reg_64 (inferior_pid, (CORE_ADDR)addr, (CORE_ADDR)&temp);
 
 	  /* If we fail to write the PC, give a true error instead of
 	     just a warning.  */
@@ -152,8 +151,7 @@
       for (i = 0; i < len; i += sizeof (int))
 	{
 	  errno = 0;
-	  call_ptrace (PT_WUREGS, PIDGET (inferior_ptid),
-	               (PTRACE_ARG3_TYPE) addr + i,
+	  call_ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) addr + i,
 		       *(int *) &registers[REGISTER_BYTE (regno) + i]);
 	  if (errno != 0)
 	    {
@@ -236,7 +234,7 @@
       /* Copy an int from the U area to buf.  Fill the least
          significant end if len != raw_size.  */
       * (int *) &buf[offset + i] =
-	  call_ptrace (PT_RUREGS, PIDGET (inferior_ptid),
+	  call_ptrace (PT_RUREGS, inferior_pid,
 		       (PTRACE_ARG3_TYPE) addr + i, 0);
       if (errno != 0)
 	{
@@ -299,15 +297,14 @@
 	{
 	  /* Need part of initial word -- fetch it.  */
 	  buffer[0] = call_ptrace (addr < text_end ? PT_RIUSER : PT_RDUSER,
-				   PIDGET (inferior_ptid),
-				   (PTRACE_ARG3_TYPE) addr, 0);
+				   inferior_pid, (PTRACE_ARG3_TYPE) addr, 0);
 	}
 
       if (count > 1)		/* FIXME, avoid if even boundary */
 	{
 	  buffer[count - 1]
 	    = call_ptrace (addr < text_end ? PT_RIUSER : PT_RDUSER,
-			   PIDGET (inferior_ptid),
+			   inferior_pid,
 			   (PTRACE_ARG3_TYPE) (addr
 					       + (count - 1) * sizeof (int)),
 			   0);
@@ -329,7 +326,7 @@
 	  errno = 0;
 	  pt_request = (addr < text_end) ? PT_WIUSER : PT_WDUSER;
 	  pt_status = call_ptrace (pt_request,
-				   PIDGET (inferior_ptid),
+				   inferior_pid,
 				   (PTRACE_ARG3_TYPE) addr,
 				   buffer[i]);
 
@@ -341,7 +338,7 @@
 	      errno = 0;
 	      pt_request = (pt_request == PT_WIUSER) ? PT_WDUSER : PT_WIUSER;
 	      pt_status = call_ptrace (pt_request,
-				       PIDGET (inferior_ptid),
+				       inferior_pid,
 				       (PTRACE_ARG3_TYPE) addr,
 				       buffer[i]);
 
@@ -361,8 +358,7 @@
 	{
 	  errno = 0;
 	  buffer[i] = call_ptrace (addr < text_end ? PT_RIUSER : PT_RDUSER,
-				   PIDGET (inferior_ptid),
-				   (PTRACE_ARG3_TYPE) addr, 0);
+				   inferior_pid, (PTRACE_ARG3_TYPE) addr, 0);
 	  if (errno)
 	    {
 	      xfree (buffer);
@@ -393,7 +389,7 @@
      At this point, the clone has attached to the child.  Because of
      the SIGSTOP, we must now deliver a SIGCONT to the child, or it
      won't behave properly. */
-  status = kill (PIDGET (inferior_ptid), SIGCONT);
+  status = kill (inferior_pid, SIGCONT);
 }
 
 
@@ -437,11 +433,10 @@
 /* Format a process id, given PID.  Be sure to terminate
    this with a null--it's going to be printed via a "%s".  */
 char *
-child_pid_to_str (ptid_t ptid)
+child_pid_to_str (pid_t pid)
 {
   /* Static because address returned */
   static char buf[30];
-  pid_t pid = PIDGET (ptid);
 
   /* Extra NULLs for paranoia's sake */
   sprintf (buf, "process %d\0\0\0\0", pid);
@@ -455,13 +450,10 @@
    Note: This is a core-gdb tid, not the actual system tid.
    See infttrace.c for details.  */
 char *
-hppa_tid_to_str (ptid_t ptid)
+hppa_tid_to_str (pid_t tid)
 {
   /* Static because address returned */
   static char buf[30];
-  /* This seems strange, but when I did the ptid conversion, it looked
-     as though a pid was always being passed.  - Kevin Buettner  */
-  pid_t tid = PIDGET (ptid);
 
   /* Extra NULLs for paranoia's sake */
   sprintf (buf, "system thread %d\0\0\0\0", tid);
@@ -634,7 +626,7 @@
 }
 
 char *
-hppa_pid_or_tid_to_str (ptid_t id)
+hppa_pid_or_tid_to_str (pid_t id)
 {
   /* In the ptrace world, there are only processes. */
   return child_pid_to_str (id);
@@ -822,9 +814,9 @@
 }
 
 void
-child_post_startup_inferior (ptid_t ptid)
+child_post_startup_inferior (int pid)
 {
-  require_notification_of_events (PIDGET (ptid));
+  require_notification_of_events (pid);
 }
 
 void
@@ -1048,7 +1040,7 @@
   char four_chars[4];
   int name_index;
   int i;
-  ptid_t saved_inferior_ptid;
+  int saved_inferior_pid;
   boolean done;
 
 #ifdef PT_GET_PROCESS_PATHNAME
@@ -1070,19 +1062,19 @@
   name_index = 0;
   done = 0;
 
-  /* On the chance that pid != inferior_ptid, set inferior_ptid
-     to pid, so that (grrrr!) implicit uses of inferior_ptid get
+  /* On the chance that pid != inferior_pid, set inferior_pid
+     to pid, so that (grrrr!) implicit uses of inferior_pid get
      the right id.  */
 
-  saved_inferior_ptid = inferior_ptid;
-  inferior_ptid = pid_to_ptid (pid);
+  saved_inferior_pid = inferior_pid;
+  inferior_pid = pid;
 
   /* Try to grab a null-terminated string. */
   while (!done)
     {
       if (target_read_memory (top_of_stack, four_chars, 4) != 0)
 	{
-	  inferior_ptid = saved_inferior_ptid;
+	  inferior_pid = saved_inferior_pid;
 	  return NULL;
 	}
       for (i = 0; i < 4; i++)
@@ -1097,11 +1089,11 @@
 
   if (exec_file_buffer[0] == '\0')
     {
-      inferior_ptid = saved_inferior_ptid;
+      inferior_pid = saved_inferior_pid;
       return NULL;
     }
 
-  inferior_ptid = saved_inferior_ptid;
+  inferior_pid = saved_inferior_pid;
   return exec_file_buffer;
 }
 
@@ -1132,7 +1124,7 @@
    return "TRUE".  */
 
 int
-child_thread_alive (ptid_t ptid)
+child_thread_alive (int pid)
 {
   return 1;
 }
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index 8401995..d7172eb 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -57,18 +57,61 @@
 
 static int hpux_thread_active = 0;
 
-static ptid_t main_ptid;		/* Real process ID */
+static int main_pid;		/* Real process ID */
 
 static CORE_ADDR P_cma__g_known_threads;
 static CORE_ADDR P_cma__g_current_thread;
 
-static void hpux_thread_resume (ptid_t ptid, int step,
-                                enum target_signal signo);
+static struct cleanup *save_inferior_pid (void);
+
+static void restore_inferior_pid (int pid);
+
+static void hpux_thread_resume (int pid, int step, enum target_signal signo);
 
 static void init_hpux_thread_ops (void);
 
 static struct target_ops hpux_thread_ops;
 
+/*
+
+   LOCAL FUNCTION
+
+   save_inferior_pid - Save inferior_pid on the cleanup list
+   restore_inferior_pid - Restore inferior_pid from the cleanup list
+
+   SYNOPSIS
+
+   struct cleanup *save_inferior_pid ()
+   void restore_inferior_pid (int pid)
+
+   DESCRIPTION
+
+   These two functions act in unison to restore inferior_pid in
+   case of an error.
+
+   NOTES
+
+   inferior_pid is a global variable that needs to be changed by many of
+   these routines before calling functions in procfs.c.  In order to
+   guarantee that inferior_pid gets restored (in case of errors), you
+   need to call save_inferior_pid before changing it.  At the end of the
+   function, you should invoke do_cleanups to restore it.
+
+ */
+
+
+static struct cleanup *
+save_inferior_pid (void)
+{
+  return make_cleanup (restore_inferior_pid, inferior_pid);
+}
+
+static void
+restore_inferior_pid (int pid)
+{
+  inferior_pid = pid;
+}
+
 static int find_active_thread (void);
 
 static int cached_thread;
@@ -90,8 +133,7 @@
 
   read_memory (tcb_ptr, (char *) &tcb, sizeof tcb);
 
-  return (cma_thread_get_unique (&tcb.prolog.client_thread) << 16) 
-         | PIDGET (main_ptid);
+  return (cma_thread_get_unique (&tcb.prolog.client_thread) << 16) | main_pid;
 }
 
 static cma__t_int_tcb *find_tcb (int thread);
@@ -172,14 +214,13 @@
    for procfs.  */
 
 static void
-hpux_thread_resume (ptid_t ptid, int step, enum target_signal signo)
+hpux_thread_resume (int pid, int step, enum target_signal signo)
 {
   struct cleanup *old_chain;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  ptid = main_ptid;
-  inferior_ptid = main_ptid;
+  pid = inferior_pid = main_pid;
 
 #if 0
   if (pid != -1)
@@ -190,7 +231,7 @@
     }
 #endif
 
-  child_ops.to_resume (ptid, step, signo);
+  child_ops.to_resume (pid, step, signo);
 
   cached_thread = 0;
   cached_active_thread = 0;
@@ -201,20 +242,20 @@
 /* Wait for any threads to stop.  We may have to convert PID from a thread id
    to a LWP id, and vice versa on the way out.  */
 
-static ptid_t
-hpux_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+static int
+hpux_thread_wait (int pid, struct target_waitstatus *ourstatus)
 {
-  ptid_t rtnval;
+  int rtnval;
   struct cleanup *old_chain;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  inferior_ptid = main_ptid;
+  inferior_pid = main_pid;
 
-  if (!ptid_equal (ptid, minus_one_ptid))
-    ptid = main_ptid;
+  if (pid != -1)
+    pid = main_pid;
 
-  rtnval = child_ops.to_wait (ptid, ourstatus);
+  rtnval = child_ops.to_wait (pid, ourstatus);
 
   rtnval = find_active_thread ();
 
@@ -257,11 +298,11 @@
   int i;
   int first_regno, last_regno;
 
-  tcb_ptr = find_tcb (PIDGET (inferior_ptid));
+  tcb_ptr = find_tcb (inferior_pid);
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  inferior_ptid = main_ptid;
+  inferior_pid = main_pid;
 
   if (tcb_ptr->state == cma__c_state_running)
     {
@@ -319,11 +360,11 @@
   int i;
   int first_regno, last_regno;
 
-  tcb_ptr = find_tcb (PIDGET (inferior_ptid));
+  tcb_ptr = find_tcb (inferior_pid);
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  inferior_ptid = main_ptid;
+  inferior_pid = main_pid;
 
   if (tcb_ptr->state == cma__c_state_running)
     {
@@ -400,9 +441,9 @@
   int retval;
   struct cleanup *old_chain;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  inferior_ptid = main_ptid;
+  inferior_pid = main_pid;
 
   retval = 
     child_ops.to_xfer_memory (memaddr, myaddr, len, dowrite, attribs, target);
@@ -427,9 +468,9 @@
 }
 
 static void
-hpux_thread_notice_signals (ptid_t ptid)
+hpux_thread_notice_signals (int pid)
 {
-  child_ops.to_notice_signals (ptid);
+  child_ops.to_notice_signals (pid);
 }
 
 /* Fork an inferior process, and start debugging it with /proc.  */
@@ -441,13 +482,13 @@
 
   if (hpux_thread_active)
     {
-      main_ptid = inferior_ptid;
+      main_pid = inferior_pid;
 
       push_target (&hpux_thread_ops);
 
-      inferior_ptid = find_active_thread ();
+      inferior_pid = find_active_thread ();
 
-      add_thread (inferior_ptid);
+      add_thread (inferior_pid);
     }
 }
 
@@ -513,7 +554,7 @@
 }
 
 static int
-hpux_thread_alive (ptid_t ptid)
+hpux_thread_alive (int pid)
 {
   return 1;
 }
@@ -527,10 +568,9 @@
 /* Convert a pid to printable form. */
 
 char *
-hpux_pid_to_str (ptid_t ptid)
+hpux_pid_to_str (int pid)
 {
   static char buf[100];
-  int pid = PIDGET (ptid);
 
   sprintf (buf, "Thread %d", pid >> 16);
 
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 94d9ab3..114e4ce 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -61,6 +61,17 @@
 /* Prototypes for local functions.  */
 static void dummy_sse_values (void);
 
+/* On Linux, threads are implemented as pseudo-processes, in which
+   case we may be tracing more than one process at a time.  In that
+   case, inferior_pid will contain the main process ID and the
+   individual thread (process) ID mashed together.  These macros are
+   used to separate them out.  These definitions should be overridden
+   if thread support is included.  */
+
+#if !defined (PIDGET)	/* Default definition for PIDGET/TIDGET.  */
+#define PIDGET(PID)	PID
+#define TIDGET(PID)	0
+#endif
 
 
 /* The register sets used in Linux ELF core-dumps are identical to the
@@ -187,8 +198,8 @@
     }
 
   /* Overload thread id onto process id */
-  if ((tid = TIDGET (inferior_ptid)) == 0)
-    tid = PIDGET (inferior_ptid);	/* no thread id, just use process id */
+  if ((tid = TIDGET (inferior_pid)) == 0)
+    tid = inferior_pid;		/* no thread id, just use process id */
 
   offset = U_REGS_OFFSET;
 
@@ -250,8 +261,8 @@
     }
 
   /* Overload thread id onto process id */
-  if ((tid = TIDGET (inferior_ptid)) == 0)
-    tid = PIDGET (inferior_ptid);	/* no thread id, just use process id */
+  if ((tid = TIDGET (inferior_pid)) == 0)
+    tid = inferior_pid;		/* no thread id, just use process id */
 
   offset = U_REGS_OFFSET;
 
@@ -586,8 +597,8 @@
     }
 
   /* Linux LWP ID's are process ID's.  */
-  if ((tid = TIDGET (inferior_ptid)) == 0)
-    tid = PIDGET (inferior_ptid);		/* Not a threaded program.  */
+  if ((tid = TIDGET (inferior_pid)) == 0)
+    tid = inferior_pid;		/* Not a threaded program.  */
 
   /* Use the PTRACE_GETFPXREGS request whenever possible, since it
      transfers more registers in one system call, and we'll cache the
@@ -652,8 +663,8 @@
     }
 
   /* Linux LWP ID's are process ID's.  */
-  if ((tid = TIDGET (inferior_ptid)) == 0)
-    tid = PIDGET (inferior_ptid);	/* Not a threaded program.  */
+  if ((tid = TIDGET (inferior_pid)) == 0)
+    tid = inferior_pid;		/* Not a threaded program.  */
 
   /* Use the PTRACE_SETFPXREGS requests whenever possible, since it
      transfers more registers in one system call.  But remember that
@@ -699,7 +710,7 @@
   /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
      multi-threaded processes here.  For now, pretend there is just
      one thread.  */
-  tid = PIDGET (inferior_ptid);
+  tid = PIDGET (inferior_pid);
 
   /* FIXME: kettenis/2001-03-27: Calling perror_with_name if the
      ptrace call fails breaks debugging remote targets.  The correct
@@ -727,7 +738,7 @@
   /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
      multi-threaded processes here.  For now, pretend there is just
      one thread.  */
-  tid = PIDGET (inferior_ptid);
+  tid = PIDGET (inferior_pid);
 
   errno = 0;
   ptrace (PT_WRITE_U, tid,
@@ -868,21 +879,19 @@
    If SIGNAL is nonzero, give it that signal.  */
 
 void
-child_resume (ptid_t ptid, int step, enum target_signal signal)
+child_resume (int pid, int step, enum target_signal signal)
 {
-  int pid = PIDGET (ptid);
-
   int request = PTRACE_CONT;
 
   if (pid == -1)
     /* Resume all threads.  */
     /* I think this only gets used in the non-threaded case, where "resume
-       all threads" and "resume inferior_ptid" are the same.  */
-    pid = PIDGET (inferior_ptid);
+       all threads" and "resume inferior_pid" are the same.  */
+    pid = inferior_pid;
 
   if (step)
     {
-      CORE_ADDR pc = read_pc_pid (pid_to_ptid (pid));
+      CORE_ADDR pc = read_pc_pid (pid);
       unsigned char buf[LINUX_SYSCALL_LEN];
 
       request = PTRACE_SINGLESTEP;
@@ -899,8 +908,7 @@
       if (read_memory_nobpt (pc, (char *) buf, LINUX_SYSCALL_LEN) == 0
 	  && memcmp (buf, linux_syscall, LINUX_SYSCALL_LEN) == 0)
 	{
-	  int syscall = read_register_pid (LINUX_SYSCALL_REGNUM,
-	                                   pid_to_ptid (pid));
+	  int syscall = read_register_pid (LINUX_SYSCALL_REGNUM, pid);
 
 	  /* Then check the system call number.  */
 	  if (syscall == SYS_sigreturn || syscall == SYS_rt_sigreturn)
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 0e3e340..7477266 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -378,23 +378,6 @@
   return frameless_look_for_prologue (frame);
 }
 
-/* Return the saved program counter for FRAME.  */
-
-CORE_ADDR
-i386_frame_saved_pc (struct frame_info *frame)
-{
-  /* FIXME: kettenis/2001-05-09: Conditionalizing the next bit of code
-     on SIGCONTEXT_PC_OFFSET and I386V4_SIGTRAMP_SAVED_PC should be
-     considered a temporary hack.  I plan to come up with something
-     better when we go multi-arch.  */
-#if defined (SIGCONTEXT_PC_OFFSET) || defined (I386V4_SIGTRAMP_SAVED_PC)
-  if (frame->signal_handler_caller)
-    return sigtramp_saved_pc (frame);
-#endif
-
-  return read_memory_unsigned_integer (frame->frame + 4, 4);
-}
-
 /* Immediately after a function call, return the saved pc.  */
 
 CORE_ADDR
@@ -922,37 +905,6 @@
 }
 
 
-/* Return the GDB type object for the "standard" data type of data in
-   register REGNUM.  Perhaps %esi and %edi should go here, but
-   potentially they could be used for things other than address.  */
-
-struct type *
-i386_register_virtual_type (int regnum)
-{
-  if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
-    return lookup_pointer_type (builtin_type_void);
-
-  if (IS_FP_REGNUM (regnum))
-    return builtin_type_long_double;
-
-  if (IS_SSE_REGNUM (regnum))
-    return builtin_type_v4sf;
-
-  return builtin_type_int;
-}
-
-/* Return true iff register REGNUM's virtual format is different from
-   its raw format.  Note that this definition assumes that the host
-   supports IEEE 32-bit floats, since it doesn't say that SSE
-   registers need conversion.  Even if we can't find a counterexample,
-   this is still sloppy.  */
-
-int
-i386_register_convertible (int regnum)
-{
-  return IS_FP_REGNUM (regnum);
-}
-
 /* Convert data from raw format for register REGNUM in buffer FROM to
    virtual format with type TYPE in buffer TO.  In principle both
    formats are identical except that the virtual format has two extra
diff --git a/gdb/i386aix-nat.c b/gdb/i386aix-nat.c
index 2d8d7b9..4fef032 100644
--- a/gdb/i386aix-nat.c
+++ b/gdb/i386aix-nat.c
@@ -190,13 +190,12 @@
   struct env387 fps_fixed;
   int i;
 
-  if (! ptid_equal (inferior_ptid, null_ptid))
+  if (inferior_pid)
     {
       char buf[10];
       unsigned short status;
 
-      ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf,
-              offsetof (struct env387, status));
+      ptrace (PT_READ_FPR, inferior_pid, buf, offsetof (struct env387, status));
       memcpy (&status, buf, sizeof (status));
       fpsaved = status;
     }
@@ -212,13 +211,13 @@
       return;
     }
 
-  if (! ptid_equal (inferior_ptid, null_ptid))
+  if (inferior_pid)
     {
       int offset;
       for (offset = 0; offset < sizeof (fps); offset += 10)
 	{
 	  char buf[10];
-	  ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf, offset);
+	  ptrace (PT_READ_FPR, inferior_pid, buf, offset);
 	  memcpy ((char *) &fps.control + offset, buf,
 		  MIN (10, sizeof (fps) - offset));
 	}
@@ -235,10 +234,10 @@
 {
   char buf[MAX_REGISTER_RAW_SIZE];
   if (regno < FP0_REGNUM)
-    *(int *) buf = ptrace (PT_READ_GPR, PIDGET (inferior_ptid),
+    *(int *) buf = ptrace (PT_READ_GPR, inferior_pid,
 			   PT_REG (regmap[regno]), 0, 0);
   else
-    ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf,
+    ptrace (PT_READ_FPR, inferior_pid, buf,
 	    (regno - FP0_REGNUM) * 10 + offsetof (struct env387, regs));
   supply_register (regno, buf);
 }
@@ -260,11 +259,10 @@
   char buf[80];
   errno = 0;
   if (regno < FP0_REGNUM)
-    ptrace (PT_WRITE_GPR, PIDGET (inferior_ptid), PT_REG (regmap[regno]),
+    ptrace (PT_WRITE_GPR, inferior_pid, PT_REG (regmap[regno]),
 	    *(int *) &registers[REGISTER_BYTE (regno)], 0);
   else
-    ptrace (PT_WRITE_FPR, PIDGET (inferior_ptid),
-            &registers[REGISTER_BYTE (regno)],
+    ptrace (PT_WRITE_FPR, inferior_pid, &registers[REGISTER_BYTE (regno)],
 	    (regno - FP0_REGNUM) * 10 + offsetof (struct env387, regs));
 
   if (errno != 0)
diff --git a/gdb/i386b-nat.c b/gdb/i386b-nat.c
index be8fd45..dcfd626 100644
--- a/gdb/i386b-nat.c
+++ b/gdb/i386b-nat.c
@@ -35,8 +35,7 @@
 {
   struct reg inferior_registers;
 
-  ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-          (PTRACE_ARG3_TYPE) & inferior_registers, 0);
+  ptrace (PT_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) & inferior_registers, 0);
   memcpy (&registers[REGISTER_BYTE (0)], &inferior_registers, 4 * NUM_REGS);
   registers_fetched ();
 }
@@ -47,8 +46,7 @@
   struct reg inferior_registers;
 
   memcpy (&inferior_registers, &registers[REGISTER_BYTE (0)], 4 * NUM_REGS);
-  ptrace (PT_SETREGS, PIDGET (inferior_ptid),
-          (PTRACE_ARG3_TYPE) & inferior_registers, 0);
+  ptrace (PT_SETREGS, inferior_pid, (PTRACE_ARG3_TYPE) & inferior_registers, 0);
 }
 
 struct md_core
@@ -247,9 +245,10 @@
   unsigned int rounded_size;
   /*extern int corechan; */
   int skip;
+  extern int inferior_pid;
 
   uaddr = (char *) &U_FPSTATE (u) - (char *) &u;
-  if (! ptid_equal (inferior_ptid, null_ptid))
+  if (inferior_pid)
     {
       int *ip;
 
@@ -261,8 +260,7 @@
       ip = (int *) buf;
       for (i = 0; i < rounded_size; i++)
 	{
-	  *ip++ = ptrace (PT_READ_U, PIDGET (inferior_ptid),
-	                  (caddr_t) rounded_addr, 0);
+	  *ip++ = ptrace (PT_READ_U, inferior_pid, (caddr_t) rounded_addr, 0);
 	  rounded_addr += sizeof (int);
 	}
     }
diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c
index c903837..3fdda7b 100644
--- a/gdb/i386bsd-nat.c
+++ b/gdb/i386bsd-nat.c
@@ -166,8 +166,7 @@
 {
   gregset_t gregs;
 
-  if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+  if (ptrace (PT_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
     perror_with_name ("Couldn't get registers");
 
   supply_gregset (&gregs);
@@ -176,7 +175,7 @@
     {
       fpregset_t fpregs;
 
-      if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+      if (ptrace (PT_GETFPREGS, inferior_pid,
 		  (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
 	perror_with_name ("Couldn't get floating point status");
 
@@ -192,26 +191,25 @@
 {
   gregset_t gregs;
 
-  if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+  if (ptrace (PT_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
     perror_with_name ("Couldn't get registers");
 
   fill_gregset (&gregs, regno);
 
-  if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
+  if (ptrace (PT_SETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &gregs, 0) == -1)
     perror_with_name ("Couldn't write registers");
 
   if (regno == -1 || regno >= FP0_REGNUM)
     {
       fpregset_t fpregs;
 
-      if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+      if (ptrace (PT_GETFPREGS, inferior_pid,
 		  (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
 	perror_with_name ("Couldn't get floating point status");
 
       fill_fpregset (&fpregs, regno);
   
-      if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+      if (ptrace (PT_SETFPREGS, inferior_pid,
 		  (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
 	perror_with_name ("Couldn't write floating point status");
     }
@@ -233,8 +231,7 @@
 {
   struct dbreg dbregs;
 
-  if (ptrace (PT_GETDBREGS, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) &dbregs, 0) == -1)
+  if (ptrace (PT_GETDBREGS, inferior_pid, (PTRACE_ARG3_TYPE) &dbregs, 0) == -1)
     perror_with_name ("Couldn't get debug registers");
 
   /* For some mysterious reason, some of the reserved bits in the
@@ -244,8 +241,7 @@
 
   DBREG_DRX ((&dbregs), regnum) = value;
 
-  if (ptrace (PT_SETDBREGS, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) &dbregs, 0) == -1)
+  if (ptrace (PT_SETDBREGS, inferior_pid, (PTRACE_ARG3_TYPE) &dbregs, 0) == -1)
     perror_with_name ("Couldn't write debug registers");
 }
 
@@ -281,8 +277,7 @@
      way to fix this is to add the hardware breakpoint and watchpoint
      stuff to the target vectore.  For now, just return zero if the
      ptrace call fails.  */
-  if (ptrace (PT_GETDBREGS, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) & dbregs, 0) == -1)
+  if (ptrace (PT_GETDBREGS, inferior_pid, (PTRACE_ARG3_TYPE) &dbregs, 0) == -1)
 #if 0
     perror_with_name ("Couldn't read debug registers");
 #else
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index da5ef0e..e51a725 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -132,10 +132,10 @@
   /* Make sure we know about new threads.  */
   inf_update_procs (current_inferior);
 
-  thread = inf_tid_to_thread (current_inferior, PIDGET (inferior_ptid));
+  thread = inf_tid_to_thread (current_inferior, inferior_pid);
   if (!thread)
     error ("Can't fetch registers from thread %d: No such thread",
-	   PIDGET (inferior_ptid));
+	   inferior_pid);
 
   if (regno < NUM_GREGS || regno == -1)
     {
@@ -256,10 +256,10 @@
   /* Make sure we know about new threads.  */
   inf_update_procs (current_inferior);
 
-  thread = inf_tid_to_thread (current_inferior, PIDGET (inferior_ptid));
+  thread = inf_tid_to_thread (current_inferior, inferior_pid);
   if (!thread)
     error ("Couldn't store registers into thread %d: No such thread",
-	   PIDGET (inferior_ptid));
+	   inferior_pid);
 
   if (regno < NUM_GREGS || regno == -1)
     {
diff --git a/gdb/i386mach-nat.c b/gdb/i386mach-nat.c
index 6d4980b..1dfa7a5 100644
--- a/gdb/i386mach-nat.c
+++ b/gdb/i386mach-nat.c
@@ -49,9 +49,9 @@
 
   registers_fetched ();
 
-  ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers);
-  ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_GETFPREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers);
 
   memcpy (registers, &inferior_registers, sizeof inferior_registers);
@@ -88,26 +88,23 @@
        instruction that moves eax into ebp gets single-stepped.  */
     {
       int stack = inferior_registers.r_reg[SP_REGNUM];
-      int stuff = ptrace (PTRACE_PEEKDATA, PIDGET (inferior_ptid),
+      int stuff = ptrace (PTRACE_PEEKDATA, inferior_pid,
 			  (PTRACE_ARG3_TYPE) stack);
       int reg = inferior_registers.r_reg[EAX];
       inferior_registers.r_reg[EAX] =
 	inferior_registers.r_reg[FP_REGNUM];
-      ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
+      ptrace (PTRACE_SETREGS, inferior_pid,
 	      (PTRACE_ARG3_TYPE) & inferior_registers);
-      ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) stack, 0xc589);
-      ptrace (PTRACE_SINGLESTEP, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) stack, 0);
+      ptrace (PTRACE_POKEDATA, inferior_pid, (PTRACE_ARG3_TYPE) stack, 0xc589);
+      ptrace (PTRACE_SINGLESTEP, inferior_pid, (PTRACE_ARG3_TYPE) stack, 0);
       wait (0);
-      ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) stack, stuff);
+      ptrace (PTRACE_POKEDATA, inferior_pid, (PTRACE_ARG3_TYPE) stack, stuff);
       inferior_registers.r_reg[EAX] = reg;
     }
 #endif
-  ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_SETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers);
-  ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_SETFPREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers);
 }
 
diff --git a/gdb/i386nbsd-nat.c b/gdb/i386nbsd-nat.c
index d8537fa..2fa83e1 100644
--- a/gdb/i386nbsd-nat.c
+++ b/gdb/i386nbsd-nat.c
@@ -57,9 +57,9 @@
   struct reg inferior_registers;
   struct env387 inferior_fpregisters;
 
-  ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PT_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) &inferior_registers, 0);
-  ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+  ptrace (PT_GETFPREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) &inferior_fpregisters, 0);
 
   RF ( 0, inferior_registers.r_eax);
@@ -142,9 +142,9 @@
   RS (FDOFF_REGNUM,   inferior_fpregisters.operand);
   RS (FOP_REGNUM,     inferior_fpregisters.opcode);
   
-  ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+  ptrace (PT_SETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) &inferior_registers, 0);
-  ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+  ptrace (PT_SETFPREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) &inferior_fpregisters, 0);
 }
 
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 71cb030c..e221b0c 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -27,7 +27,6 @@
 #include "gdbcore.h"
 #include "floatformat.h"
 #include "regcache.h"
-#include "gdb_assert.h"
 
 
 /* FIXME: Eliminate the next two functions when we have the time to
@@ -161,25 +160,22 @@
 print_i387_value (char *raw)
 {
   DOUBLEST value;
-  int len = TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT;
-  char *tmp = alloca (len);
 
-  /* This code only works on targets where ... */
-  gdb_assert (TARGET_LONG_DOUBLE_FORMAT == &floatformat_i387_ext);
+  /* Avoid call to floatformat_to_doublest if possible to preserve as
+     much information as possible.  */
 
-  /* Take care of the padding.  FP reg is 80 bits.  The same value in
-     memory is 96 bits.  */
-  gdb_assert (FPU_REG_RAW_SIZE < len);
-  memcpy (&tmp, raw, FPU_REG_RAW_SIZE);
-  memset (&tmp + FPU_REG_RAW_SIZE, 0, len - FPU_REG_RAW_SIZE);
-  
-  /* Extract the value as a DOUBLEST.  */
-  /* Use extract_floating() rather than floatformat_to_doublest().
-     The latter is lossy in nature.  Once GDB gets a host/target
-     independent and non-lossy FP it will become possible to bypass
-     extract_floating() and call floatformat*() directly.  Note also
-     the assumptions about TARGET_LONG_DOUBLE above.  */
-  value = extract_floating (tmp, len);
+#ifdef HAVE_LONG_DOUBLE
+  if (sizeof (value) == sizeof (long double)
+      && HOST_LONG_DOUBLE_FORMAT == &floatformat_i387_ext)
+    {
+      /* Copy straight over, but take care of the padding.  */
+      memcpy (&value, raw, FPU_REG_RAW_SIZE);
+      memset ((char *) &value + FPU_REG_RAW_SIZE, 0,
+	      sizeof (value) - FPU_REG_RAW_SIZE);
+    }
+  else
+#endif
+    floatformat_to_doublest (&floatformat_i387_ext, raw, &value);
 
   /* We try to print 19 digits.  The last digit may or may not contain
      garbage, but we'd better print one too many.  We need enough room
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index 338adbe..1a000ea 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -474,28 +474,28 @@
 #define IA64_PSR_DD (1UL << 39)
 
 static void
-enable_watchpoints_in_psr (ptid_t ptid)
+enable_watchpoints_in_psr (int pid)
 {
   CORE_ADDR psr;
 
-  psr = read_register_pid (IA64_PSR_REGNUM, ptid);
+  psr = read_register_pid (IA64_PSR_REGNUM, pid);
   if (!(psr & IA64_PSR_DB))
     {
       psr |= IA64_PSR_DB;	/* Set the db bit - this enables hardware
 			           watchpoints and breakpoints. */
-      write_register_pid (IA64_PSR_REGNUM, psr, ptid);
+      write_register_pid (IA64_PSR_REGNUM, psr, pid);
     }
 }
 
 static long
-fetch_debug_register (ptid_t ptid, int idx)
+fetch_debug_register (int pid, int idx)
 {
   long val;
   int tid;
 
-  tid = TIDGET (ptid);
+  tid = TIDGET(pid);
   if (tid == 0)
-    tid = PIDGET (ptid);
+    tid = pid;
 
   val = ptrace (PT_READ_U, tid, (PTRACE_ARG3_TYPE) (PT_DBR + 8 * idx), 0);
 
@@ -503,33 +503,33 @@
 }
 
 static void
-store_debug_register (ptid_t ptid, int idx, long val)
+store_debug_register (int pid, int idx, long val)
 {
   int tid;
 
-  tid = TIDGET (ptid);
+  tid = TIDGET(pid);
   if (tid == 0)
-    tid = PIDGET (ptid);
+    tid = pid;
 
   (void) ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) (PT_DBR + 8 * idx), val);
 }
 
 static void
-fetch_debug_register_pair (ptid_t ptid, int idx, long *dbr_addr, long *dbr_mask)
+fetch_debug_register_pair (int pid, int idx, long *dbr_addr, long *dbr_mask)
 {
   if (dbr_addr)
-    *dbr_addr = fetch_debug_register (ptid, 2 * idx);
+    *dbr_addr = fetch_debug_register (pid, 2 * idx);
   if (dbr_mask)
-    *dbr_mask = fetch_debug_register (ptid, 2 * idx + 1);
+    *dbr_mask = fetch_debug_register (pid, 2 * idx + 1);
 }
 
 static void
-store_debug_register_pair (ptid_t ptid, int idx, long *dbr_addr, long *dbr_mask)
+store_debug_register_pair (int pid, int idx, long *dbr_addr, long *dbr_mask)
 {
   if (dbr_addr)
-    store_debug_register (ptid, 2 * idx, *dbr_addr);
+    store_debug_register (pid, 2 * idx, *dbr_addr);
   if (dbr_mask)
-    store_debug_register (ptid, 2 * idx + 1, *dbr_mask);
+    store_debug_register (pid, 2 * idx + 1, *dbr_mask);
 }
 
 static int
@@ -546,7 +546,7 @@
 }
 
 int
-ia64_linux_insert_watchpoint (ptid_t ptid, CORE_ADDR addr, int len, int rw)
+ia64_linux_insert_watchpoint (int pid, CORE_ADDR addr, int len, int rw)
 {
   int idx;
   long dbr_addr, dbr_mask;
@@ -557,7 +557,7 @@
 
   for (idx = 0; idx < max_watchpoints; idx++)
     {
-      fetch_debug_register_pair (ptid, idx, NULL, &dbr_mask);
+      fetch_debug_register_pair (pid, idx, NULL, &dbr_mask);
       if ((dbr_mask & (0x3UL << 62)) == 0)
 	{
 	  /* Exit loop if both r and w bits clear */
@@ -586,14 +586,14 @@
       return -1;
     }
 
-  store_debug_register_pair (ptid, idx, &dbr_addr, &dbr_mask);
-  enable_watchpoints_in_psr (ptid);
+  store_debug_register_pair (pid, idx, &dbr_addr, &dbr_mask);
+  enable_watchpoints_in_psr (pid);
 
   return 0;
 }
 
 int
-ia64_linux_remove_watchpoint (ptid_t ptid, CORE_ADDR addr, int len)
+ia64_linux_remove_watchpoint (int pid, CORE_ADDR addr, int len)
 {
   int idx;
   long dbr_addr, dbr_mask;
@@ -604,12 +604,12 @@
 
   for (idx = 0; idx < max_watchpoints; idx++)
     {
-      fetch_debug_register_pair (ptid, idx, &dbr_addr, &dbr_mask);
+      fetch_debug_register_pair (pid, idx, &dbr_addr, &dbr_mask);
       if ((dbr_mask & (0x3UL << 62)) && addr == (CORE_ADDR) dbr_addr)
 	{
 	  dbr_addr = 0;
 	  dbr_mask = 0;
-	  store_debug_register_pair (ptid, idx, &dbr_addr, &dbr_mask);
+	  store_debug_register_pair (pid, idx, &dbr_addr, &dbr_mask);
 	  return 0;
 	}
     }
@@ -617,15 +617,15 @@
 }
 
 CORE_ADDR
-ia64_linux_stopped_by_watchpoint (ptid_t ptid)
+ia64_linux_stopped_by_watchpoint (int pid)
 {
   CORE_ADDR psr;
   int tid;
   struct siginfo siginfo;
 
-  tid = TIDGET(ptid);
+  tid = TIDGET(pid);
   if (tid == 0)
-    tid = PIDGET (ptid);
+    tid = pid;
   
   errno = 0;
   ptrace (PTRACE_GETSIGINFO, tid, (PTRACE_ARG3_TYPE) 0, &siginfo);
@@ -633,10 +633,10 @@
   if (errno != 0 || (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
     return 0;
 
-  psr = read_register_pid (IA64_PSR_REGNUM, ptid);
+  psr = read_register_pid (IA64_PSR_REGNUM, pid);
   psr |= IA64_PSR_DD;	/* Set the dd bit - this will disable the watchpoint
                            for the next instruction */
-  write_register_pid (IA64_PSR_REGNUM, psr, ptid);
+  write_register_pid (IA64_PSR_REGNUM, psr, pid);
 
   return (CORE_ADDR) siginfo.si_addr;
 }
diff --git a/gdb/ia64-linux-tdep.c b/gdb/ia64-linux-tdep.c
index 97f8814..87c6af4 100644
--- a/gdb/ia64-linux-tdep.c
+++ b/gdb/ia64-linux-tdep.c
@@ -31,7 +31,7 @@
 #define GATE_AREA_END   0xa000000000010000LL
 
 /* Offset to sigcontext structure from frame of handler */
-#define IA64_LINUX_SIGCONTEXT_OFFSET 192
+#define IA64_LINUX_SIGCONTEXT_OFFSET 160
 
 int
 ia64_linux_in_sigtramp (CORE_ADDR pc, char *func_name)
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index cc2d0f2..dca7ba1 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -612,27 +612,27 @@
 }
 
 CORE_ADDR
-ia64_read_pc (ptid_t ptid)
+ia64_read_pc (int pid)
 {
-  CORE_ADDR psr_value = read_register_pid (IA64_PSR_REGNUM, ptid);
-  CORE_ADDR pc_value   = read_register_pid (IA64_IP_REGNUM, ptid);
+  CORE_ADDR psr_value = read_register_pid (IA64_PSR_REGNUM, pid);
+  CORE_ADDR pc_value   = read_register_pid (IA64_IP_REGNUM, pid);
   int slot_num = (psr_value >> 41) & 3;
 
   return pc_value | (slot_num * SLOT_MULTIPLIER);
 }
 
 void
-ia64_write_pc (CORE_ADDR new_pc, ptid_t ptid)
+ia64_write_pc (CORE_ADDR new_pc, int pid)
 {
   int slot_num = (int) (new_pc & 0xf) / SLOT_MULTIPLIER;
-  CORE_ADDR psr_value = read_register_pid (IA64_PSR_REGNUM, ptid);
+  CORE_ADDR psr_value = read_register_pid (IA64_PSR_REGNUM, pid);
   psr_value &= ~(3LL << 41);
   psr_value |= (CORE_ADDR)(slot_num & 0x3) << 41;
 
   new_pc &= ~0xfLL;
 
-  write_register_pid (IA64_PSR_REGNUM, psr_value, ptid);
-  write_register_pid (IA64_IP_REGNUM, new_pc, ptid);
+  write_register_pid (IA64_PSR_REGNUM, psr_value, pid);
+  write_register_pid (IA64_IP_REGNUM, new_pc, pid);
 }
 
 #define IS_NaT_COLLECTION_ADDR(addr) ((((addr) >> 3) & 0x3f) == 0x3f)
@@ -717,69 +717,6 @@
     }
 }
 
-/* Limit the number of skipped non-prologue instructions since examining
-   of the prologue is expensive.  */
-static int max_skip_non_prologue_insns = 10;
-
-/* Given PC representing the starting address of a function, and
-   LIM_PC which is the (sloppy) limit to which to scan when looking
-   for a prologue, attempt to further refine this limit by using
-   the line data in the symbol table.  If successful, a better guess
-   on where the prologue ends is returned, otherwise the previous
-   value of lim_pc is returned.  TRUST_LIMIT is a pointer to a flag
-   which will be set to indicate whether the returned limit may be
-   used with no further scanning in the event that the function is
-   frameless.  */
-
-static CORE_ADDR
-refine_prologue_limit (CORE_ADDR pc, CORE_ADDR lim_pc, int *trust_limit)
-{
-  struct symtab_and_line prologue_sal;
-  CORE_ADDR start_pc = pc;
-
-  /* Start off not trusting the limit.  */
-  *trust_limit = 0;
-
-  prologue_sal = find_pc_line (pc, 0);
-  if (prologue_sal.line != 0)
-    {
-      int i;
-      CORE_ADDR addr = prologue_sal.end;
-
-      /* Handle the case in which compiler's optimizer/scheduler
-         has moved instructions into the prologue.  We scan ahead
-	 in the function looking for address ranges whose corresponding
-	 line number is less than or equal to the first one that we
-	 found for the function.  (It can be less than when the
-	 scheduler puts a body instruction before the first prologue
-	 instruction.)  */
-      for (i = 2 * max_skip_non_prologue_insns; 
-           i > 0 && (lim_pc == 0 || addr < lim_pc);
-	   i--)
-        {
-	  struct symtab_and_line sal;
-
-	  sal = find_pc_line (addr, 0);
-	  if (sal.line == 0)
-	    break;
-	  if (sal.line <= prologue_sal.line 
-	      && sal.symtab == prologue_sal.symtab)
-	    {
-	      prologue_sal = sal;
-	    }
-	  addr = sal.end;
-	}
-
-      if (lim_pc == 0 || prologue_sal.end < lim_pc)
-	{
-	  lim_pc = prologue_sal.end;
-	  if (start_pc == get_pc_function_start (lim_pc))
-	    *trust_limit = 1;
-	}
-    }
-  return lim_pc;
-}
-
 #define isScratch(_regnum_) ((_regnum_) == 2 || (_regnum_) == 3 \
   || (8 <= (_regnum_) && (_regnum_) <= 11) \
   || (14 <= (_regnum_) && (_regnum_) <= 31))
@@ -807,7 +744,6 @@
   CORE_ADDR spill_addr = 0;
   char instores[8];
   char infpstores[8];
-  int trust_limit;
 
   memset (instores, 0, sizeof instores);
   memset (infpstores, 0, sizeof infpstores);
@@ -824,8 +760,6 @@
       && frame->extra_info->after_prologue <= lim_pc)
     return frame->extra_info->after_prologue;
 
-  lim_pc = refine_prologue_limit (pc, lim_pc, &trust_limit);
-
   /* Must start with an alloc instruction */
   next_pc = fetch_instruction (pc, &it, &instr);
   if (pc < lim_pc && next_pc 
@@ -845,11 +779,7 @@
       pc = next_pc;
     }
   else
-    {
-      pc = lim_pc;	/* Frameless: We're done early.  */
-      if (trust_limit)
-	last_prologue_pc = lim_pc;
-    }
+    pc = lim_pc;	/* We're done early */
 
   /* Loop, looking for prologue instructions, keeping track of
      where preserved registers were spilled. */
@@ -1534,17 +1464,14 @@
 	}
       break;
     case TYPE_CODE_ARRAY:
-      return
-	is_float_or_hfa_type_recurse (check_typedef (TYPE_TARGET_TYPE (t)),
-				      etp);
+      return is_float_or_hfa_type_recurse (TYPE_TARGET_TYPE (t), etp);
       break;
     case TYPE_CODE_STRUCT:
       {
 	int i;
 
 	for (i = 0; i < TYPE_NFIELDS (t); i++)
-	  if (!is_float_or_hfa_type_recurse
-	      (check_typedef (TYPE_FIELD_TYPE (t, i)), etp))
+	  if (!is_float_or_hfa_type_recurse (TYPE_FIELD_TYPE (t, i), etp))
 	    return 0;
 	return 1;
       }
@@ -1568,40 +1495,6 @@
 }
 
 
-/* Return 1 if the alignment of T is such that the next even slot
-   should be used.  Return 0, if the next available slot should
-   be used.  (See section 8.5.1 of the IA-64 Software Conventions
-   and Runtime manual.)  */
-
-static int
-slot_alignment_is_next_even (struct type *t)
-{
-  switch (TYPE_CODE (t))
-    {
-    case TYPE_CODE_INT:
-    case TYPE_CODE_FLT:
-      if (TYPE_LENGTH (t) > 8)
-	return 1;
-      else
-	return 0;
-    case TYPE_CODE_ARRAY:
-      return
-	slot_alignment_is_next_even (check_typedef (TYPE_TARGET_TYPE (t)));
-    case TYPE_CODE_STRUCT:
-      {
-	int i;
-
-	for (i = 0; i < TYPE_NFIELDS (t); i++)
-	  if (slot_alignment_is_next_even
-	      (check_typedef (TYPE_FIELD_TYPE (t, i))))
-	    return 1;
-	return 0;
-      }
-    default:
-      return 0;
-    }
-}
-
 /* Attempt to find (and return) the global pointer for the given
    function.
 
@@ -1769,7 +1662,9 @@
       type = check_typedef (VALUE_TYPE (arg));
       len = TYPE_LENGTH (type);
 
-      if ((nslots & 1) && slot_alignment_is_next_even (type))
+      /* FIXME: This is crude and it is wrong (IMO), but it matches
+         what gcc does, I think. */
+      if (len > 8 && (nslots & 1))
 	nslots++;
 
       if (TYPE_CODE (type) == TYPE_CODE_FUNC)
@@ -1844,11 +1739,8 @@
 	}
 
       /* Normal slots */
-
-      /* Skip odd slot if necessary...  */
-      if ((slotnum & 1) && slot_alignment_is_next_even (type))
+      if (len > 8 && (slotnum & 1))
 	slotnum++;
-
       argoffset = 0;
       while (len > 0)
 	{
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 3f8572e..32a5954 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -36,7 +36,6 @@
 #include "language.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "completer.h"
 #ifdef UI_OUT
 #include "ui-out.h"
 #endif
@@ -132,7 +131,7 @@
    being debugged it should be nonzero (currently 3 is used) for remote
    debugging.  */
 
-ptid_t inferior_ptid;
+int inferior_pid;
 
 /* Last signal that the inferior received (why it stopped).  */
 
@@ -259,7 +258,7 @@
 
   dont_repeat ();
 
-  if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
+  if (inferior_pid != 0 && target_has_execution)
     {
       if (from_tty
 	  && !query ("The program being debugged has been started already.\n\
@@ -1468,11 +1467,12 @@
 {
   register int i;
   int numregs = NUM_REGS + NUM_PSEUDO_REGS;
-  char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
-  char *virtual_buffer = (char*) alloca (MAX_REGISTER_VIRTUAL_SIZE);
 
   for (i = 0; i < numregs; i++)
     {
+      char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
+      char *virtual_buffer = (char*) alloca (MAX_REGISTER_VIRTUAL_SIZE);
+
       /* Decide between printing all regs, nonfloat regs, or specific reg.  */
       if (regnum == -1)
 	{
@@ -1690,7 +1690,7 @@
   exec_file = (char *) get_exec_file (0);
   if (!exec_file)
     {
-      exec_file = target_pid_to_exec_file (PIDGET (inferior_ptid));
+      exec_file = target_pid_to_exec_file (inferior_pid);
       if (exec_file)
 	{
 	  /* It's possible we don't have a full path, but rather just a
@@ -1720,7 +1720,7 @@
 
   /* Take any necessary post-attaching actions for this platform.
    */
-  target_post_attach (PIDGET (inferior_ptid));
+  target_post_attach (inferior_pid);
 
   normal_stop ();
 
@@ -1795,8 +1795,8 @@
 {
   struct cmd_list_element *c;
 
-  c = add_com ("tty", class_run, tty_command,
-	       "Set terminal for future runs of program being debugged.");
+  c= add_com ("tty", class_run, tty_command,
+	      "Set terminal for future runs of program being debugged.");
   c->completer = filename_completer;
 
   c = add_set_cmd ("args", class_run, var_string_noescape,
@@ -1900,30 +1900,25 @@
 Argument N means do this N times (or till program stops for another reason).");
   add_com_alias ("s", "step", class_run, 1);
 
-  c = add_com ("until", class_run, until_command,
-	       "Execute until the program reaches a source line greater than the current\n\
+  add_com ("until", class_run, until_command,
+	   "Execute until the program reaches a source line greater than the current\n\
 or a specified line or address or function (same args as break command).\n\
 Execution will also stop upon exit from the current stack frame.");
-  c->completer = location_completer;
   add_com_alias ("u", "until", class_run, 1);
 
-  c = add_com ("jump", class_run, jump_command,
-	       "Continue program being debugged at specified line or address.\n\
+  add_com ("jump", class_run, jump_command,
+	   "Continue program being debugged at specified line or address.\n\
 Give as argument either LINENUM or *ADDR, where ADDR is an expression\n\
 for an address to start at.");
-  c->completer = location_completer;
 
   if (xdb_commands)
-    {
-      c = add_com ("go", class_run, go_command,
-		   "Usage: go <location>\n\
+    add_com ("go", class_run, go_command,
+	     "Usage: go <location>\n\
 Continue program being debugged, stopping at specified line or \n\
 address.\n\
 Give as argument either LINENUM or *ADDR, where ADDR is an \n\
 expression for an address to start at.\n\
 This command is a combination of tbreak and jump.");
-      c->completer = location_completer;
-    }
 
   if (xdb_commands)
     add_com_alias ("g", "go", class_run, 1);
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 502d3ef..b41e941 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -51,38 +51,6 @@
 					    *inf_status, int regno,
 					    LONGEST val);
 
-/* The -1 ptid, often used to indicate either an error condition
-   or a "don't care" condition, i.e, "run all threads."  */
-extern ptid_t minus_one_ptid;
-
-/* The null or zero ptid, often used to indicate no process. */
-extern ptid_t null_ptid;
-
-/* Attempt to find and return an existing ptid with the given PID, LWP,
-   and TID components.  If none exists, create a new one and return
-   that.  */
-ptid_t ptid_build (int pid, long lwp, long tid);
-
-/* Find/Create a ptid from just a pid. */
-ptid_t pid_to_ptid (int pid);
-
-/* Fetch the pid (process id) component from a ptid. */
-int ptid_get_pid (ptid_t ptid);
-
-/* Fetch the lwp (lightweight process) component from a ptid. */
-long ptid_get_lwp (ptid_t ptid);
-
-/* Fetch the tid (thread id) component from a ptid. */
-long ptid_get_tid (ptid_t ptid);
-
-/* Compare two ptids to see if they are equal */
-extern int ptid_equal (ptid_t p1, ptid_t p2);
-
-/* Save value of inferior_ptid so that it may be restored by
-   a later call to do_cleanups().  Returns the struct cleanup
-   pointer needed for later doing the cleanup.  */
-extern struct cleanup * save_inferior_ptid (void);
-
 extern void set_sigint_trap (void);
 
 extern void clear_sigint_trap (void);
@@ -95,10 +63,9 @@
 
 extern char *inferior_io_terminal;
 
-/* Collected pid, tid, etc. of the debugged inferior.  When there's
-   no inferior, PIDGET (inferior_ptid) will be 0. */
+/* Pid of our debugged inferior, or 0 if no inferior now.  */
 
-extern ptid_t inferior_ptid;
+extern int inferior_pid;
 
 /* Is the inferior running right now, as a result of a 'run&',
    'continue&' etc command? This is used in asycn gdb to determine
@@ -111,7 +78,7 @@
    redisplay the prompt until the execution is actually over. */
 extern int sync_execution;
 
-/* This is only valid when inferior_ptid is non-zero.
+/* This is only valid when inferior_pid is non-zero.
 
    If this is 0, then exec events should be noticed and responded to
    by the debugger (i.e., be reported to the user).
@@ -155,15 +122,15 @@
 
 extern CORE_ADDR read_pc (void);
 
-extern CORE_ADDR read_pc_pid (ptid_t);
+extern CORE_ADDR read_pc_pid (int);
 
-extern CORE_ADDR generic_target_read_pc (ptid_t);
+extern CORE_ADDR generic_target_read_pc (int);
 
 extern void write_pc (CORE_ADDR);
 
-extern void write_pc_pid (CORE_ADDR, ptid_t);
+extern void write_pc_pid (CORE_ADDR, int);
 
-extern void generic_target_write_pc (CORE_ADDR, ptid_t);
+extern void generic_target_write_pc (CORE_ADDR, int);
 
 extern CORE_ADDR read_sp (void);
 
@@ -241,9 +208,9 @@
 extern void detach (int);
 
 /* PTRACE method of waiting for inferior process.  */
-int ptrace_wait (ptid_t, int *);
+int ptrace_wait (int, int *);
 
-extern void child_resume (ptid_t, int, enum target_signal);
+extern void child_resume (int, int, enum target_signal);
 
 #ifndef PTRACE_ARG3_TYPE
 #define PTRACE_ARG3_TYPE int	/* Correct definition for most systems. */
@@ -257,7 +224,7 @@
 
 extern int proc_iterate_over_mappings (int (*)(int, CORE_ADDR));
 
-extern ptid_t procfs_first_available (void);
+extern int procfs_first_available (void);
 
 /* From fork-child.c */
 
@@ -294,8 +261,7 @@
 
 extern int signal_pass_update (int, int);
 
-extern void get_last_target_status(ptid_t *ptid,
-                                   struct target_waitstatus *status);
+extern void get_last_target_status(int *pid, struct target_waitstatus *status);
 
 /* From infcmd.c */
 
@@ -396,7 +362,7 @@
 
 extern char *stop_registers;
 
-/* Nonzero if the child process in inferior_ptid was attached rather
+/* Nonzero if the child process in inferior_pid was attached rather
    than forked.  */
 
 extern int attach_flag;
diff --git a/gdb/inflow.c b/gdb/inflow.c
index 28ebf7d..d9a0439 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -207,9 +207,9 @@
      debugging target with a version of target_terminal_init_inferior which
      passes in the process group to a generic routine which does all the work
      (and the non-threaded child_terminal_init_inferior can just pass in
-     inferior_ptid to the same routine).  */
+     inferior_pid to the same routine).  */
   /* We assume INFERIOR_PID is also the child's process group.  */
-  terminal_init_inferior_with_pgrp (PIDGET (inferior_ptid));
+  terminal_init_inferior_with_pgrp (PIDGET (inferior_pid));
 #endif /* PROCESS_GROUP_TYPE */
 }
 
@@ -573,11 +573,11 @@
 static void
 kill_command (char *arg, int from_tty)
 {
-  /* FIXME:  This should not really be inferior_ptid (or target_has_execution).
+  /* FIXME:  This should not really be inferior_pid (or target_has_execution).
      It should be a distinct flag that indicates that a target is active, cuz
      some targets don't have processes! */
 
-  if (ptid_equal (inferior_ptid, null_ptid))
+  if (inferior_pid == 0)
     error ("The program is not being run.");
   if (!query ("Kill the program being debugged? "))
     error ("Not confirmed.");
@@ -605,7 +605,7 @@
 pass_signal (int signo)
 {
 #ifndef _WIN32
-  kill (PIDGET (inferior_ptid), SIGINT);
+  kill (PIDGET (inferior_pid), SIGINT);
 #endif
 }
 
@@ -647,7 +647,7 @@
     {
 #ifndef _WIN32
       if ((*target_activity_function) ())
-	kill (PIDGET (inferior_ptid), SIGINT);
+	kill (inferior_pid, SIGINT);
 #endif
     }
 }
@@ -735,7 +735,7 @@
   add_com ("kill", class_run, kill_command,
 	   "Kill execution of program being debugged.");
 
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 
   terminal_is_ours = 1;
 
diff --git a/gdb/infptrace.c b/gdb/infptrace.c
index eede276..e41ca03 100644
--- a/gdb/infptrace.c
+++ b/gdb/infptrace.c
@@ -110,6 +110,22 @@
 static void store_register (int);
 #endif
 
+/*
+ * Some systems (Linux) may have threads implemented as pseudo-processes, 
+ * in which case we may be tracing more than one process at a time.
+ * In that case, inferior_pid will contain the main process ID and the 
+ * individual thread (process) id mashed together.  These macros are 
+ * used to separate them out.  The definitions may be overridden in tm.h
+ *
+ * NOTE: default definitions here are for systems with no threads.
+ * Useful definitions MUST be provided in tm.h
+ */
+
+#if !defined (PIDGET)	/* Default definition for PIDGET/TIDGET.  */
+#define PIDGET(PID)	PID
+#define TIDGET(PID)	0
+#endif
+
 void _initialize_kernel_u_addr (void);
 void _initialize_infptrace (void);
 
@@ -199,12 +215,12 @@
    hook before returning.  */
 
 int
-ptrace_wait (ptid_t ptid, int *status)
+ptrace_wait (int pid, int *status)
 {
   int wstate;
 
   wstate = wait (status);
-  target_post_wait (pid_to_ptid (wstate), *status);
+  target_post_wait (wstate, *status);
   return wstate;
 }
 
@@ -212,9 +228,8 @@
 kill_inferior (void)
 {
   int status;
-  int pid =  PIDGET (inferior_ptid);
 
-  if (pid == 0)
+  if (inferior_pid == 0)
     return;
 
   /* This once used to call "kill" to kill the inferior just in case
@@ -225,8 +240,8 @@
 
      The kill call causes problems under hpux10, so it's been removed;
      if this causes problems we'll deal with them as they arise.  */
-  ptrace (PT_KILL, pid, (PTRACE_ARG3_TYPE) 0, 0);
-  ptrace_wait (null_ptid, &status);
+  ptrace (PT_KILL, inferior_pid, (PTRACE_ARG3_TYPE) 0, 0);
+  ptrace_wait (0, &status);
   target_mourn_inferior ();
 }
 
@@ -237,17 +252,15 @@
    If SIGNAL is nonzero, give it that signal.  */
 
 void
-child_resume (ptid_t ptid, int step, enum target_signal signal)
+child_resume (int pid, int step, enum target_signal signal)
 {
-  int pid = PIDGET (ptid);
-
   errno = 0;
 
   if (pid == -1)
     /* Resume all threads.  */
     /* I think this only gets used in the non-threaded case, where "resume
-       all threads" and "resume inferior_ptid" are the same.  */
-    pid = PIDGET (inferior_ptid);
+       all threads" and "resume inferior_pid" are the same.  */
+    pid = inferior_pid;
 
   /* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
      it was.  (If GDB wanted it to start some other way, we have already
@@ -299,8 +312,7 @@
 detach (int signal)
 {
   errno = 0;
-  ptrace (PT_DETACH, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) 1,
-          signal);
+  ptrace (PT_DETACH, inferior_pid, (PTRACE_ARG3_TYPE) 1, signal);
   if (errno)
     perror_with_name ("ptrace");
   attach_flag = 0;
@@ -344,11 +356,16 @@
 /* U_REGS_OFFSET is the offset of the registers within the u area.  */
 #if !defined (U_REGS_OFFSET)
 #define U_REGS_OFFSET \
-  ptrace (PT_READ_U, PIDGET (inferior_ptid), \
+  ptrace (PT_READ_U, inferior_pid, \
 	  (PTRACE_ARG3_TYPE) (offsetof (struct user, u_ar0)), 0) \
     - KERNEL_U_ADDR
 #endif
 
+/* Registers we shouldn't try to fetch.  */
+#if !defined (CANNOT_FETCH_REGISTER)
+#define CANNOT_FETCH_REGISTER(regno) 0
+#endif
+
 /* Fetch one register.  */
 
 static void
@@ -370,8 +387,8 @@
     }
 
   /* Overload thread id onto process id */
-  if ((tid = TIDGET (inferior_ptid)) == 0)
-    tid = PIDGET (inferior_ptid);	/* no thread id, just use process id */
+  if ((tid = TIDGET (inferior_pid)) == 0)
+    tid = inferior_pid;		/* no thread id, just use process id */
 
   offset = U_REGS_OFFSET;
 
@@ -413,6 +430,11 @@
     }
 }
 
+/* Registers we shouldn't try to store.  */
+#if !defined (CANNOT_STORE_REGISTER)
+#define CANNOT_STORE_REGISTER(regno) 0
+#endif
+
 /* Store one register. */
 
 static void
@@ -431,8 +453,8 @@
     }
 
   /* Overload thread id onto process id */
-  if ((tid = TIDGET (inferior_ptid)) == 0)
-    tid = PIDGET (inferior_ptid);	/* no thread id, just use process id */
+  if ((tid = TIDGET (inferior_pid)) == 0)
+    tid = inferior_pid;		/* no thread id, just use process id */
 
   offset = U_REGS_OFFSET;
 
@@ -513,14 +535,14 @@
       if (addr != memaddr || len < (int) sizeof (PTRACE_XFER_TYPE))
 	{
 	  /* Need part of initial word -- fetch it.  */
-	  buffer[0] = ptrace (PT_READ_I, PIDGET (inferior_ptid), 
+	  buffer[0] = ptrace (PT_READ_I, PIDGET (inferior_pid), 
 			      (PTRACE_ARG3_TYPE) addr, 0);
 	}
 
       if (count > 1)		/* FIXME, avoid if even boundary */
 	{
 	  buffer[count - 1] 
-	    = ptrace (PT_READ_I, PIDGET (inferior_ptid),
+	    = ptrace (PT_READ_I, PIDGET (inferior_pid),
 		      ((PTRACE_ARG3_TYPE)
 		       (addr + (count - 1) * sizeof (PTRACE_XFER_TYPE))),
 		      0);
@@ -537,14 +559,14 @@
       for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
 	{
 	  errno = 0;
-	  ptrace (PT_WRITE_D, PIDGET (inferior_ptid), 
+	  ptrace (PT_WRITE_D, PIDGET (inferior_pid), 
 		  (PTRACE_ARG3_TYPE) addr, buffer[i]);
 	  if (errno)
 	    {
 	      /* Using the appropriate one (I or D) is necessary for
 	         Gould NP1, at least.  */
 	      errno = 0;
-	      ptrace (PT_WRITE_I, PIDGET (inferior_ptid), 
+	      ptrace (PT_WRITE_I, PIDGET (inferior_pid), 
 		      (PTRACE_ARG3_TYPE) addr, buffer[i]);
 	    }
 	  if (errno)
@@ -560,7 +582,7 @@
       for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
 	{
 	  errno = 0;
-	  buffer[i] = ptrace (PT_READ_I, PIDGET (inferior_ptid),
+	  buffer[i] = ptrace (PT_READ_I, PIDGET (inferior_pid),
 			      (PTRACE_ARG3_TYPE) addr, 0);
 	  if (errno)
 	    return 0;
@@ -610,7 +632,7 @@
 	    }
 	  printf_filtered ("%04x:", udot_off);
 	}
-      udot_val = ptrace (PT_READ_U, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) udot_off, 0);
+      udot_val = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) udot_off, 0);
       if (errno != 0)
 	{
 	  sprintf (mess, "\nreading user struct at offset 0x%x", udot_off);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 8b126db..028fe09 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -99,7 +99,7 @@
    when the inferior stopped in a different thread than it had been
    running in.  */
 
-static ptid_t previous_inferior_ptid;
+static int previous_inferior_pid;
 
 /* This is true for configurations that may follow through execl() and
    similar functions.  At present this is only true for HP-UX native.  */
@@ -110,6 +110,31 @@
 
 static int may_follow_exec = MAY_FOLLOW_EXEC;
 
+/* resume and wait_for_inferior use this to ensure that when
+   stepping over a hit breakpoint in a threaded application
+   only the thread that hit the breakpoint is stepped and the
+   other threads don't continue.  This prevents having another
+   thread run past the breakpoint while it is temporarily
+   removed.
+
+   This is not thread-specific, so it isn't saved as part of
+   the infrun state.
+
+   Versions of gdb which don't use the "step == this thread steps
+   and others continue" model but instead use the "step == this
+   thread steps and others wait" shouldn't do this.  */
+
+static int thread_step_needed = 0;
+
+/* This is true if thread_step_needed should actually be used.  At
+   present this is only true for HP-UX native.  */
+
+#ifndef USE_THREAD_STEP_NEEDED
+#define USE_THREAD_STEP_NEEDED (0)
+#endif
+
+static int use_thread_step_needed = USE_THREAD_STEP_NEEDED;
+
 /* GET_LONGJMP_TARGET returns the PC at which longjmp() will resume the
    program.  It needs to examine the jmp_buf argument and extract the PC
    from it.  The return value is non-zero on success, zero otherwise. */
@@ -307,9 +332,6 @@
 	(flags)[signum] = 0; \
   } while (0)
 
-/* Value to pass to target_resume() to cause all threads to resume */
-
-#define RESUME_ALL (pid_to_ptid (-1))
 
 /* Command list pointer for the "stop" placeholder.  */
 
@@ -387,7 +409,7 @@
 /* This is a cached copy of the pid/waitstatus of the last event
    returned by target_wait()/target_wait_hook().  This information is
    returned by get_last_target_status(). */
-static ptid_t target_last_wait_ptid;
+static int target_last_wait_pid = -1;
 static struct target_waitstatus target_last_waitstatus;
 
 /* This is used to remember when a fork, vfork or exec event
@@ -419,7 +441,7 @@
    set to 1, a vfork event has been seen, but cannot be followed
    until the exec is seen.
 
-   (In the latter case, inferior_ptid is still the parent of the
+   (In the latter case, inferior_pid is still the parent of the
    vfork, and pending_follow.fork_event.child_pid is the child.  The
    appropriate process is followed, according to the setting of
    follow-fork-mode.) */
@@ -491,7 +513,7 @@
     }
 
   /* If we're to be following the child, then attach to it, detach
-     from inferior_ptid, and set inferior_ptid to child_pid. */
+     from inferior_pid, and set inferior_pid to child_pid. */
   else if (follow_mode == follow_fork_mode_child)
     {
       char child_pid_spelling[100];	/* Arbitrary length. */
@@ -514,7 +536,7 @@
 
       /* Also reset the solib inferior hook from the parent. */
 #ifdef SOLIB_REMOVE_INFERIOR_HOOK
-      SOLIB_REMOVE_INFERIOR_HOOK (PIDGET (inferior_ptid));
+      SOLIB_REMOVE_INFERIOR_HOOK (inferior_pid);
 #endif
 
       /* Detach from the parent. */
@@ -522,7 +544,7 @@
       target_detach (NULL, 1);
 
       /* Attach to the child. */
-      inferior_ptid = pid_to_ptid (child_pid);
+      inferior_pid = child_pid;
       sprintf (child_pid_spelling, "%d", child_pid);
       dont_repeat ();
 
@@ -566,7 +588,7 @@
 
       /* We continue to follow the parent.  To help distinguish the two
          debuggers, though, both we and our clone will reset our prompts. */
-      sprintf (pid_suffix, "[%d] ", PIDGET (inferior_ptid));
+      sprintf (pid_suffix, "[%d] ", inferior_pid);
       set_prompt (strcat (get_prompt (), pid_suffix));
     }
 
@@ -628,12 +650,11 @@
   follow_inferior_fork (parent_pid, child_pid, 0, 1);
 
   /* Did we follow the child?  Had it exec'd before we saw the parent vfork? */
-  if (pending_follow.fork_event.saw_child_exec
-      && (PIDGET (inferior_ptid) == child_pid))
+  if (pending_follow.fork_event.saw_child_exec && (inferior_pid == child_pid))
     {
       pending_follow.fork_event.saw_child_exec = 0;
       pending_follow.kind = TARGET_WAITKIND_SPURIOUS;
-      follow_exec (PIDGET (inferior_ptid), pending_follow.execd_pathname);
+      follow_exec (inferior_pid, pending_follow.execd_pathname);
       xfree (pending_follow.execd_pathname);
     }
 }
@@ -655,14 +676,13 @@
       (pending_follow.kind == TARGET_WAITKIND_VFORKED))
     {
       pending_follow.kind = TARGET_WAITKIND_SPURIOUS;
-      follow_vfork (PIDGET (inferior_ptid),
-                    pending_follow.fork_event.child_pid);
+      follow_vfork (inferior_pid, pending_follow.fork_event.child_pid);
       follow_vfork_when_exec = 0;
-      saved_pid = PIDGET (inferior_ptid);
+      saved_pid = inferior_pid;
 
       /* Did we follow the parent?  If so, we're done.  If we followed
          the child then we must also follow its exec(). */
-      if (PIDGET (inferior_ptid) == pending_follow.fork_event.parent_pid)
+      if (inferior_pid == pending_follow.fork_event.parent_pid)
 	return;
     }
 
@@ -711,8 +731,7 @@
 
   gdb_flush (gdb_stdout);
   target_mourn_inferior ();
-  inferior_ptid = pid_to_ptid (saved_pid);
-  			/* Because mourn_inferior resets inferior_ptid. */
+  inferior_pid = saved_pid;	/* Because mourn_inferior resets inferior_pid. */
   push_target (tgt);
 
   /* That a.out is now the one to use. */
@@ -728,7 +747,7 @@
   SOLIB_RESTART ();
 #endif
 #ifdef SOLIB_CREATE_INFERIOR_HOOK
-  SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
+  SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
 #endif
 
   /* Reinsert all breakpoints.  (Those which were symbolic have
@@ -781,6 +800,8 @@
 }
 
 
+
+
 /* Resume the inferior, but allow a QUIT.  This is useful if the user
    wants to interrupt some lengthy single-stepping operation
    (for child processes, the SIGINT goes to the inferior, and so
@@ -796,8 +817,13 @@
   struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
   QUIT;
 
-  /* FIXME: calling breakpoint_here_p (read_pc ()) three times! */
-
+#ifdef CANNOT_STEP_BREAKPOINT
+  /* Most targets can step a breakpoint instruction, thus executing it
+     normally.  But if this one cannot, just continue and we will hit
+     it anyway.  */
+  if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
+    step = 0;
+#endif
 
   /* Some targets (e.g. Solaris x86) have a kernel bug when stepping
      over an instruction that causes a page fault without triggering
@@ -840,8 +866,7 @@
     {
     case (TARGET_WAITKIND_FORKED):
       pending_follow.kind = TARGET_WAITKIND_SPURIOUS;
-      follow_fork (PIDGET (inferior_ptid),
-                   pending_follow.fork_event.child_pid);
+      follow_fork (inferior_pid, pending_follow.fork_event.child_pid);
       break;
 
     case (TARGET_WAITKIND_VFORKED):
@@ -849,15 +874,14 @@
 	int saw_child_exec = pending_follow.fork_event.saw_child_exec;
 
 	pending_follow.kind = TARGET_WAITKIND_SPURIOUS;
-	follow_vfork (PIDGET (inferior_ptid),
-	              pending_follow.fork_event.child_pid);
+	follow_vfork (inferior_pid, pending_follow.fork_event.child_pid);
 
 	/* Did we follow the child, but not yet see the child's exec event?
 	   If so, then it actually ought to be waiting for us; we respond to
 	   parent vfork events.  We don't actually want to resume the child
 	   in this situation; we want to just get its exec event. */
 	if (!saw_child_exec &&
-	    (PIDGET (inferior_ptid) == pending_follow.fork_event.child_pid))
+	    (inferior_pid == pending_follow.fork_event.child_pid))
 	  should_resume = 0;
       }
       break;
@@ -878,37 +902,44 @@
 
   if (should_resume)
     {
-      ptid_t resume_ptid;
+      int resume_pid;
 
-      resume_ptid = RESUME_ALL;		/* Default */
-
-      if ((step || singlestep_breakpoints_inserted_p) &&
-	  !breakpoints_inserted && breakpoint_here_p (read_pc ()))
+      if (use_thread_step_needed && thread_step_needed)
 	{
-	  /* Stepping past a breakpoint without inserting breakpoints.
-	     Make sure only the current thread gets to step, so that
-	     other threads don't sneak past breakpoints while they are
-	     not inserted. */
+	  /* We stopped on a BPT instruction;
+	     don't continue other threads and
+	     just step this thread. */
+	  thread_step_needed = 0;
 
-	  resume_ptid = inferior_ptid;
+	  if (!breakpoint_here_p (read_pc ()))
+	    {
+	      /* Breakpoint deleted: ok to do regular resume
+	         where all the threads either step or continue. */
+	      resume_pid = -1;
+	    }
+	  else
+	    {
+	      if (!step)
+		{
+		  warning ("Internal error, changing continue to step.");
+		  remove_breakpoints ();
+		  breakpoints_inserted = 0;
+		  trap_expected = 1;
+		  step = 1;
+		}
+	      resume_pid = inferior_pid;
+	    }
 	}
-
-      if ((scheduler_mode == schedlock_on) ||
-	  (scheduler_mode == schedlock_step && 
-	   (step || singlestep_breakpoints_inserted_p)))
+      else
 	{
-	  /* User-settable 'scheduler' mode requires solo thread resume. */
-	    resume_ptid = inferior_ptid;
+	  /* Vanilla resume. */
+	  if ((scheduler_mode == schedlock_on) ||
+	      (scheduler_mode == schedlock_step && step != 0))
+	    resume_pid = inferior_pid;
+	  else
+	    resume_pid = -1;
 	}
-
-#ifdef CANNOT_STEP_BREAKPOINT
-      /* Most targets can step a breakpoint instruction, thus executing it
-	 normally.  But if this one cannot, just continue and we will hit
-	 it anyway.  */
-      if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
-	step = 0;
-#endif
-      target_resume (resume_ptid, step, sig);
+      target_resume (resume_pid, step, sig);
     }
 
   discard_cleanups (old_cleanups);
@@ -982,6 +1013,16 @@
   else
     {
       write_pc (addr);
+
+      /* New address; we don't need to single-step a thread
+         over a breakpoint we just hit, 'cause we aren't
+         continuing from there.
+
+         It's not worth worrying about the case where a user
+         asks for a "jump" at the current PC--if they get the
+         hiccup of re-hiting a hit breakpoint, what else do
+         they expect? */
+      thread_step_needed = 0;
     }
 
 #ifdef PREPARE_TO_PROCEED
@@ -999,6 +1040,7 @@
   if (PREPARE_TO_PROCEED (1) && breakpoint_here_p (read_pc ()))
     {
       oneproc = 1;
+      thread_step_needed = 1;
     }
 
 #endif /* PREPARE_TO_PROCEED */
@@ -1188,8 +1230,8 @@
     int current_line;
     struct symtab *current_symtab;
     int handling_longjmp;	/* FIXME */
-    ptid_t ptid;
-    ptid_t saved_inferior_ptid;
+    int pid;
+    int saved_inferior_pid;
     int update_step_sp;
     int stepping_through_solib_after_catch;
     bpstat stepping_through_solib_catchpoints;
@@ -1198,7 +1240,7 @@
     int new_thread_event;
     struct target_waitstatus tmpstatus;
     enum infwait_states infwait_state;
-    ptid_t waiton_ptid;
+    int waiton_pid;
     int wait_some_more;
   };
 
@@ -1227,7 +1269,7 @@
   struct execution_control_state ecss;
   struct execution_control_state *ecs;
 
-  old_cleanups = make_cleanup (delete_step_resume_breakpoint,
+  old_cleanups = make_cleanup (delete_breakpoint_current_contents,
 			       &step_resume_breakpoint);
   make_cleanup (delete_breakpoint_current_contents,
 		&through_sigtramp_breakpoint);
@@ -1239,8 +1281,10 @@
   /* Fill in with reasonable starting values.  */
   init_execution_control_state (ecs);
 
+  thread_step_needed = 0;
+
   /* We'll update this if & when we switch to a new thread. */
-  previous_inferior_ptid = inferior_ptid;
+  previous_inferior_pid = inferior_pid;
 
   overlay_cache_invalid = 1;
 
@@ -1255,9 +1299,9 @@
   while (1)
     {
       if (target_wait_hook)
-	ecs->ptid = target_wait_hook (ecs->waiton_ptid, ecs->wp);
+	ecs->pid = target_wait_hook (ecs->waiton_pid, ecs->wp);
       else
-	ecs->ptid = target_wait (ecs->waiton_ptid, ecs->wp);
+	ecs->pid = target_wait (ecs->waiton_pid, ecs->wp);
 
       /* Now figure out what to do with the result of the result.  */
       handle_inferior_event (ecs);
@@ -1289,7 +1333,7 @@
 
   if (!async_ecs->wait_some_more)
     {
-      old_cleanups = make_exec_cleanup (delete_step_resume_breakpoint, 
+      old_cleanups = make_exec_cleanup (delete_breakpoint_current_contents,
 					&step_resume_breakpoint);
       make_exec_cleanup (delete_breakpoint_current_contents,
 			 &through_sigtramp_breakpoint);
@@ -1297,8 +1341,10 @@
       /* Fill in with reasonable starting values.  */
       init_execution_control_state (async_ecs);
 
+      thread_step_needed = 0;
+
       /* We'll update this if & when we switch to a new thread. */
-      previous_inferior_ptid = inferior_ptid;
+      previous_inferior_pid = inferior_pid;
 
       overlay_cache_invalid = 1;
 
@@ -1312,9 +1358,9 @@
     }
 
   if (target_wait_hook)
-    async_ecs->ptid = target_wait_hook (async_ecs->waiton_ptid, async_ecs->wp);
+    async_ecs->pid = target_wait_hook (async_ecs->waiton_pid, async_ecs->wp);
   else
-    async_ecs->ptid = target_wait (async_ecs->waiton_ptid, async_ecs->wp);
+    async_ecs->pid = target_wait (async_ecs->waiton_pid, async_ecs->wp);
 
   /* Now figure out what to do with the result of the result.  */
   handle_inferior_event (async_ecs);
@@ -1352,7 +1398,7 @@
   ecs->current_line = ecs->sal.line;
   ecs->current_symtab = ecs->sal.symtab;
   ecs->infwait_state = infwait_normal_state;
-  ecs->waiton_ptid = pid_to_ptid (-1);
+  ecs->waiton_pid = -1;
   ecs->wp = &(ecs->ws);
 }
 
@@ -1373,55 +1419,12 @@
    target_wait()/target_wait_hook().  */
 
 void
-get_last_target_status(ptid_t *ptidp, struct target_waitstatus *status)
+get_last_target_status(int *pid, struct target_waitstatus *status)
 {
-  *ptidp = target_last_wait_ptid;
+  *pid = target_last_wait_pid;
   *status = target_last_waitstatus;
 }
 
-/* Switch thread contexts, maintaining "infrun state". */
-
-static void
-context_switch (struct execution_control_state *ecs)
-{
-  /* Caution: it may happen that the new thread (or the old one!)
-     is not in the thread list.  In this case we must not attempt
-     to "switch context", or we run the risk that our context may
-     be lost.  This may happen as a result of the target module
-     mishandling thread creation.  */
-
-  if (in_thread_list (inferior_ptid) && in_thread_list (ecs->ptid))
-    { /* Perform infrun state context switch: */
-      /* Save infrun state for the old thread.  */
-      save_infrun_state (inferior_ptid, prev_pc, 
-			 prev_func_start, prev_func_name, 
-			 trap_expected, step_resume_breakpoint,
-			 through_sigtramp_breakpoint, step_range_start, 
-			 step_range_end, step_frame_address, 
-			 ecs->handling_longjmp, ecs->another_trap,
-			 ecs->stepping_through_solib_after_catch,
-			 ecs->stepping_through_solib_catchpoints,
-			 ecs->stepping_through_sigtramp,
-			 ecs->current_line, ecs->current_symtab, 
-			 step_sp);
-
-      /* Load infrun state for the new thread.  */
-      load_infrun_state (ecs->ptid, &prev_pc, 
-			 &prev_func_start, &prev_func_name, 
-			 &trap_expected, &step_resume_breakpoint,
-			 &through_sigtramp_breakpoint, &step_range_start, 
-			 &step_range_end, &step_frame_address, 
-			 &ecs->handling_longjmp, &ecs->another_trap,
-			 &ecs->stepping_through_solib_after_catch,
-			 &ecs->stepping_through_solib_catchpoints,
-			 &ecs->stepping_through_sigtramp, 
-			 &ecs->current_line, &ecs->current_symtab,
-			 &step_sp);
-    }
-  inferior_ptid = ecs->ptid;
-}
-
-
 /* Given an execution control state that has been freshly filled in
    by an event from the inferior, figure out what it means and take
    appropriate action.  */
@@ -1433,29 +1436,44 @@
   int stepped_after_stopped_by_watchpoint;
 
   /* Cache the last pid/waitstatus. */
-  target_last_wait_ptid = ecs->ptid;
+  target_last_wait_pid = ecs->pid;
   target_last_waitstatus = *ecs->wp;
 
   /* Keep this extra brace for now, minimizes diffs.  */
   {
     switch (ecs->infwait_state)
       {
-      case infwait_thread_hop_state:
-	/* Cancel the waiton_ptid. */
-	ecs->waiton_ptid = pid_to_ptid (-1);
-	/* Fall thru to the normal_state case. */
-
       case infwait_normal_state:
+	/* Since we've done a wait, we have a new event.  Don't
+	   carry over any expectations about needing to step over a
+	   breakpoint. */
+	thread_step_needed = 0;
+
 	/* See comments where a TARGET_WAITKIND_SYSCALL_RETURN event
 	   is serviced in this loop, below. */
 	if (ecs->enable_hw_watchpoints_after_wait)
 	  {
-	    TARGET_ENABLE_HW_WATCHPOINTS (PIDGET (inferior_ptid));
+	    TARGET_ENABLE_HW_WATCHPOINTS (inferior_pid);
 	    ecs->enable_hw_watchpoints_after_wait = 0;
 	  }
 	stepped_after_stopped_by_watchpoint = 0;
 	break;
 
+      case infwait_thread_hop_state:
+	insert_breakpoints ();
+
+	/* We need to restart all the threads now,
+	 * unless we're running in scheduler-locked mode. 
+	 * FIXME: shouldn't we look at currently_stepping ()?
+	 */
+	if (scheduler_mode == schedlock_on)
+	  target_resume (ecs->pid, 0, TARGET_SIGNAL_0);
+	else
+	  target_resume (-1, 0, TARGET_SIGNAL_0);
+	ecs->infwait_state = infwait_normal_state;
+	prepare_to_wait (ecs);
+	return;
+
       case infwait_nullified_state:
 	break;
 
@@ -1474,21 +1492,20 @@
 
     /* If it's a new process, add it to the thread database */
 
-    ecs->new_thread_event = (! ptid_equal (ecs->ptid, inferior_ptid) 
-                             && ! in_thread_list (ecs->ptid));
+    ecs->new_thread_event = ((ecs->pid != inferior_pid) && !in_thread_list (ecs->pid));
 
     if (ecs->ws.kind != TARGET_WAITKIND_EXITED
 	&& ecs->ws.kind != TARGET_WAITKIND_SIGNALLED
 	&& ecs->new_thread_event)
       {
-	add_thread (ecs->ptid);
+	add_thread (ecs->pid);
 
 #ifdef UI_OUT
 	ui_out_text (uiout, "[New ");
-	ui_out_text (uiout, target_pid_or_tid_to_str (ecs->ptid));
+	ui_out_text (uiout, target_pid_or_tid_to_str (ecs->pid));
 	ui_out_text (uiout, "]\n");
 #else
-	printf_filtered ("[New %s]\n", target_pid_or_tid_to_str (ecs->ptid));
+	printf_filtered ("[New %s]\n", target_pid_or_tid_to_str (ecs->pid));
 #endif
 
 #if 0
@@ -1511,7 +1528,7 @@
 	   Therefore we need to continue all threads in order to
 	   make progress.  */
 
-	target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
+	target_resume (-1, 0, TARGET_SIGNAL_0);
 	prepare_to_wait (ecs);
 	return;
 #endif
@@ -1599,10 +1616,10 @@
 	   interested in reacting to forks of the child.  Note that
 	   we expect the child's fork event to be available if we
 	   waited for it now. */
-	if (ptid_equal (inferior_ptid, ecs->ptid))
+	if (inferior_pid == ecs->pid)
 	  {
 	    pending_follow.fork_event.saw_parent_fork = 1;
-	    pending_follow.fork_event.parent_pid = PIDGET (ecs->ptid);
+	    pending_follow.fork_event.parent_pid = ecs->pid;
 	    pending_follow.fork_event.child_pid = ecs->ws.value.related_pid;
 	    prepare_to_wait (ecs);
 	    return;
@@ -1610,26 +1627,16 @@
 	else
 	  {
 	    pending_follow.fork_event.saw_child_fork = 1;
-	    pending_follow.fork_event.child_pid = PIDGET (ecs->ptid);
+	    pending_follow.fork_event.child_pid = ecs->pid;
 	    pending_follow.fork_event.parent_pid = ecs->ws.value.related_pid;
 	  }
 
-	stop_pc = read_pc_pid (ecs->ptid);
-	ecs->saved_inferior_ptid = inferior_ptid;
-	inferior_ptid = ecs->ptid;
-	/* The second argument of bpstat_stop_status is meant to help
-	   distinguish between a breakpoint trap and a singlestep trap.
-	   This is only important on targets where DECR_PC_AFTER_BREAK
-	   is non-zero.  The prev_pc test is meant to distinguish between
-	   singlestepping a trap instruction, and singlestepping thru a
-	   jump to the instruction following a trap instruction. */
-	   
-	stop_bpstat = bpstat_stop_status (&stop_pc, 
-					  currently_stepping (ecs) &&
-					  prev_pc != 
-					  stop_pc - DECR_PC_AFTER_BREAK);
+	stop_pc = read_pc_pid (ecs->pid);
+	ecs->saved_inferior_pid = inferior_pid;
+	inferior_pid = ecs->pid;
+	stop_bpstat = bpstat_stop_status (&stop_pc, currently_stepping (ecs));
 	ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
-	inferior_ptid = ecs->saved_inferior_ptid;
+	inferior_pid = ecs->saved_inferior_pid;
 	goto process_event_stop_test;
 
 	/* If this a platform which doesn't allow a debugger to touch a
@@ -1649,10 +1656,10 @@
 	   it execs, and the child has not yet exec'd.  We probably
 	   should warn the user to that effect when the catchpoint
 	   triggers...) */
-	if (ptid_equal (ecs->ptid, inferior_ptid))
+	if (ecs->pid == inferior_pid)
 	  {
 	    pending_follow.fork_event.saw_parent_fork = 1;
-	    pending_follow.fork_event.parent_pid = PIDGET (ecs->ptid);
+	    pending_follow.fork_event.parent_pid = ecs->pid;
 	    pending_follow.fork_event.child_pid = ecs->ws.value.related_pid;
 	  }
 
@@ -1662,31 +1669,20 @@
 	else
 	  {
 	    pending_follow.fork_event.saw_child_fork = 1;
-	    pending_follow.fork_event.child_pid = PIDGET (ecs->ptid);
+	    pending_follow.fork_event.child_pid = ecs->pid;
 	    pending_follow.fork_event.parent_pid = ecs->ws.value.related_pid;
-	    target_post_startup_inferior (
-	      pid_to_ptid (pending_follow.fork_event.child_pid));
+	    target_post_startup_inferior (pending_follow.fork_event.child_pid);
 	    follow_vfork_when_exec = !target_can_follow_vfork_prior_to_exec ();
 	    if (follow_vfork_when_exec)
 	      {
-		target_resume (ecs->ptid, 0, TARGET_SIGNAL_0);
+		target_resume (ecs->pid, 0, TARGET_SIGNAL_0);
 		prepare_to_wait (ecs);
 		return;
 	      }
 	  }
 
 	stop_pc = read_pc ();
-	/* The second argument of bpstat_stop_status is meant to help
-	   distinguish between a breakpoint trap and a singlestep trap.
-	   This is only important on targets where DECR_PC_AFTER_BREAK
-	   is non-zero.  The prev_pc test is meant to distinguish between
-	   singlestepping a trap instruction, and singlestepping thru a
-	   jump to the instruction following a trap instruction. */
-	   
-	stop_bpstat = bpstat_stop_status (&stop_pc, 
-					  currently_stepping (ecs) &&
-					  prev_pc !=
-					  stop_pc - DECR_PC_AFTER_BREAK);
+	stop_bpstat = bpstat_stop_status (&stop_pc, currently_stepping (ecs));
 	ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
 	goto process_event_stop_test;
 
@@ -1702,7 +1698,7 @@
 	    inferior_ignoring_leading_exec_events--;
 	    if (pending_follow.kind == TARGET_WAITKIND_VFORKED)
 	      ENSURE_VFORKING_PARENT_REMAINS_STOPPED (pending_follow.fork_event.parent_pid);
-	    target_resume (ecs->ptid, 0, TARGET_SIGNAL_0);
+	    target_resume (ecs->pid, 0, TARGET_SIGNAL_0);
 	    prepare_to_wait (ecs);
 	    return;
 	  }
@@ -1713,7 +1709,7 @@
 	  savestring (ecs->ws.value.execd_pathname,
 		      strlen (ecs->ws.value.execd_pathname));
 
-	/* Did inferior_ptid exec, or did a (possibly not-yet-followed)
+	/* Did inferior_pid exec, or did a (possibly not-yet-followed)
 	   child of a vfork exec?
 
 	   ??rehrauer: This is unabashedly an HP-UX specific thing.  On
@@ -1737,7 +1733,7 @@
 	       the parent vfork event is delivered.  A single-step
 	       suffices. */
 	    if (RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK ())
-	      target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);
+	      target_resume (ecs->pid, 1, TARGET_SIGNAL_0);
 	    /* We expect the parent vfork event to be available now. */
 	    prepare_to_wait (ecs);
 	    return;
@@ -1745,25 +1741,15 @@
 
 	/* This causes the eventpoints and symbol table to be reset.  Must
 	   do this now, before trying to determine whether to stop. */
-	follow_exec (PIDGET (inferior_ptid), pending_follow.execd_pathname);
+	follow_exec (inferior_pid, pending_follow.execd_pathname);
 	xfree (pending_follow.execd_pathname);
 
-	stop_pc = read_pc_pid (ecs->ptid);
-	ecs->saved_inferior_ptid = inferior_ptid;
-	inferior_ptid = ecs->ptid;
-	/* The second argument of bpstat_stop_status is meant to help
-	   distinguish between a breakpoint trap and a singlestep trap.
-	   This is only important on targets where DECR_PC_AFTER_BREAK
-	   is non-zero.  The prev_pc test is meant to distinguish between
-	   singlestepping a trap instruction, and singlestepping thru a
-	   jump to the instruction following a trap instruction. */
-	   
-	stop_bpstat = bpstat_stop_status (&stop_pc, 
-					  currently_stepping (ecs) &&
-					  prev_pc !=
-					  stop_pc - DECR_PC_AFTER_BREAK);
+	stop_pc = read_pc_pid (ecs->pid);
+	ecs->saved_inferior_pid = inferior_pid;
+	inferior_pid = ecs->pid;
+	stop_bpstat = bpstat_stop_status (&stop_pc, currently_stepping (ecs));
 	ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
-	inferior_ptid = ecs->saved_inferior_ptid;
+	inferior_pid = ecs->saved_inferior_pid;
 	goto process_event_stop_test;
 
 	/* These syscall events are returned on HP-UX, as part of its
@@ -1787,7 +1773,7 @@
 	number_of_threads_in_syscalls++;
 	if (number_of_threads_in_syscalls == 1)
 	  {
-	    TARGET_DISABLE_HW_WATCHPOINTS (PIDGET (inferior_ptid));
+	    TARGET_DISABLE_HW_WATCHPOINTS (inferior_pid);
 	  }
 	resume (0, TARGET_SIGNAL_0);
 	prepare_to_wait (ecs);
@@ -1808,7 +1794,7 @@
 	   here, which will be serviced immediately after the target
 	   is waited on. */
       case TARGET_WAITKIND_SYSCALL_RETURN:
-	target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);
+	target_resume (ecs->pid, 1, TARGET_SIGNAL_0);
 
 	if (number_of_threads_in_syscalls > 0)
 	  {
@@ -1844,12 +1830,12 @@
        all threads in order to make progress.  */
     if (ecs->new_thread_event)
       {
-	target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
+	target_resume (-1, 0, TARGET_SIGNAL_0);
 	prepare_to_wait (ecs);
 	return;
       }
 
-    stop_pc = read_pc_pid (ecs->ptid);
+    stop_pc = read_pc_pid (ecs->pid);
 
     /* See if a thread hit a thread-specific breakpoint that was meant for
        another thread.  If so, then step that thread past the breakpoint,
@@ -1864,14 +1850,13 @@
 	  {
 	    ecs->random_signal = 0;
 	    if (!breakpoint_thread_match (stop_pc - DECR_PC_AFTER_BREAK,
-					  ecs->ptid))
+					  ecs->pid))
 	      {
 		int remove_status;
 
 		/* Saw a breakpoint, but it was hit by the wrong thread.
 		   Just continue. */
-		if (DECR_PC_AFTER_BREAK)
-		  write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK, ecs->ptid);
+		write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK, ecs->pid);
 
 		remove_status = remove_breakpoints ();
 		/* Did we fail to remove breakpoints?  If so, try
@@ -1883,40 +1868,39 @@
 		   then either :-) or execs. */
 		if (remove_status != 0)
 		  {
-		    /* FIXME!  This is obviously non-portable! */
-		    write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK + 4, 
-				  ecs->ptid);
-		    /* We need to restart all the threads now,
-		     * unles we're running in scheduler-locked mode. 
-		     * Use currently_stepping to determine whether to 
-		     * step or continue.
-		     */
-		    /* FIXME MVS: is there any reason not to call resume()? */
-		    if (scheduler_mode == schedlock_on)
-		      target_resume (ecs->ptid, 
-				     currently_stepping (ecs), 
-				     TARGET_SIGNAL_0);
-		    else
-		      target_resume (RESUME_ALL, 
-				     currently_stepping (ecs), 
-				     TARGET_SIGNAL_0);
-		    prepare_to_wait (ecs);
-		    return;
+		    write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK + 4, ecs->pid);
 		  }
 		else
 		  {		/* Single step */
-		    breakpoints_inserted = 0;
-		    if (!ptid_equal (inferior_ptid, ecs->ptid))
-		      context_switch (ecs);
-		    ecs->waiton_ptid = ecs->ptid;
-		    ecs->wp = &(ecs->ws);
-		    ecs->another_trap = 1;
+		    target_resume (ecs->pid, 1, TARGET_SIGNAL_0);
+		    /* FIXME: What if a signal arrives instead of the
+		       single-step happening?  */
 
+		    ecs->waiton_pid = ecs->pid;
+		    ecs->wp = &(ecs->ws);
 		    ecs->infwait_state = infwait_thread_hop_state;
-		    keep_going (ecs);
-		    registers_changed ();
+		    prepare_to_wait (ecs);
 		    return;
 		  }
+
+		/* We need to restart all the threads now,
+		 * unles we're running in scheduler-locked mode. 
+		 * FIXME: shouldn't we look at currently_stepping ()?
+		 */
+		if (scheduler_mode == schedlock_on)
+		  target_resume (ecs->pid, 0, TARGET_SIGNAL_0);
+		else
+		  target_resume (-1, 0, TARGET_SIGNAL_0);
+		prepare_to_wait (ecs);
+		return;
+	      }
+	    else
+	      {
+		/* This breakpoint matches--either it is the right
+		   thread or it's a generic breakpoint for all threads.
+		   Remember that we'll need to step just _this_ thread
+		   on any following user continuation! */
+		thread_step_needed = 1;
 	      }
 	  }
       }
@@ -1930,7 +1914,7 @@
        Note that if there's any kind of pending follow (i.e., of a fork,
        vfork or exec), we don't want to do this now.  Rather, we'll let
        the next resume handle it. */
-    if (! ptid_equal (ecs->ptid, inferior_ptid) &&
+    if ((ecs->pid != inferior_pid) &&
 	(pending_follow.kind == TARGET_WAITKIND_SPURIOUS))
       {
 	int printed = 0;
@@ -1973,7 +1957,7 @@
 	    if (signal_program[stop_signal] == 0)
 	      stop_signal = TARGET_SIGNAL_0;
 
-	    target_resume (ecs->ptid, 0, stop_signal);
+	    target_resume (ecs->pid, 0, stop_signal);
 	    prepare_to_wait (ecs);
 	    return;
 	  }
@@ -1981,10 +1965,43 @@
 	/* It's a SIGTRAP or a signal we're interested in.  Switch threads,
 	   and fall into the rest of wait_for_inferior().  */
 
-	context_switch (ecs);
+	/* Caution: it may happen that the new thread (or the old one!)
+	   is not in the thread list.  In this case we must not attempt
+	   to "switch context", or we run the risk that our context may
+	   be lost.  This may happen as a result of the target module
+	   mishandling thread creation.  */
+
+	if (in_thread_list (inferior_pid) && in_thread_list (ecs->pid))
+	  { /* Perform infrun state context switch: */
+	    /* Save infrun state for the old thread.  */
+	    save_infrun_state (inferior_pid, prev_pc,
+			       prev_func_start, prev_func_name,
+			       trap_expected, step_resume_breakpoint,
+			       through_sigtramp_breakpoint,
+			       step_range_start, step_range_end,
+			       step_frame_address, ecs->handling_longjmp,
+			       ecs->another_trap,
+			       ecs->stepping_through_solib_after_catch,
+			       ecs->stepping_through_solib_catchpoints,
+			       ecs->stepping_through_sigtramp);
+
+	    /* Load infrun state for the new thread.  */
+	    load_infrun_state (ecs->pid, &prev_pc,
+			       &prev_func_start, &prev_func_name,
+			       &trap_expected, &step_resume_breakpoint,
+			       &through_sigtramp_breakpoint,
+			       &step_range_start, &step_range_end,
+			       &step_frame_address, &ecs->handling_longjmp,
+			       &ecs->another_trap,
+			       &ecs->stepping_through_solib_after_catch,
+			       &ecs->stepping_through_solib_catchpoints,
+			       &ecs->stepping_through_sigtramp);
+	  }
+
+	inferior_pid = ecs->pid;
 
 	if (context_hook)
-	  context_hook (pid_to_thread_id (ecs->ptid));
+	  context_hook (pid_to_thread_id (ecs->pid));
 
 	flush_cached_frames ();
       }
@@ -2004,14 +2021,14 @@
     if (INSTRUCTION_NULLIFIED)
       {
 	registers_changed ();
-	target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);
+	target_resume (ecs->pid, 1, TARGET_SIGNAL_0);
 
 	/* We may have received a signal that we want to pass to
 	   the inferior; therefore, we must not clobber the waitstatus
 	   in WS. */
 
 	ecs->infwait_state = infwait_nullified_state;
-	ecs->waiton_ptid = ecs->ptid;
+	ecs->waiton_pid = ecs->pid;
 	ecs->wp = &(ecs->tmpstatus);
 	prepare_to_wait (ecs);
 	return;
@@ -2049,14 +2066,13 @@
 	   includes evaluating watchpoints, things will come to a
 	   stop in the correct manner.  */
 
-	if (DECR_PC_AFTER_BREAK)
-	  write_pc (stop_pc - DECR_PC_AFTER_BREAK);
+	write_pc (stop_pc - DECR_PC_AFTER_BREAK);
 
 	remove_breakpoints ();
 	registers_changed ();
-	target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);	/* Single step */
+	target_resume (ecs->pid, 1, TARGET_SIGNAL_0);	/* Single step */
 
-	ecs->waiton_ptid = ecs->ptid;
+	ecs->waiton_pid = ecs->pid;
 	ecs->wp = &(ecs->ws);
 	ecs->infwait_state = infwait_nonstep_watch_state;
 	prepare_to_wait (ecs);
@@ -2131,14 +2147,6 @@
 	else
 	  {
 	    /* See if there is a breakpoint at the current PC.  */
-
-	    /* The second argument of bpstat_stop_status is meant to help
-	       distinguish between a breakpoint trap and a singlestep trap.
-	       This is only important on targets where DECR_PC_AFTER_BREAK
-	       is non-zero.  The prev_pc test is meant to distinguish between
-	       singlestepping a trap instruction, and singlestepping thru a
-	       jump to the instruction following a trap instruction. */
-
 	    stop_bpstat = bpstat_stop_status
 	      (&stop_pc,
 	    /* Pass TRUE if our reason for stopping is something other
@@ -2148,7 +2156,6 @@
 	       sigtramp, which is detected by a new stack pointer value
 	       below any usual function calling stack adjustments.  */
 		(currently_stepping (ecs)
-		 && prev_pc != stop_pc - DECR_PC_AFTER_BREAK
 		 && !(step_range_end
 		      && INNER_THAN (read_sp (), (step_sp - 16))))
 	      );
@@ -2337,7 +2344,8 @@
 	     interferes with us */
 	  if (step_resume_breakpoint != NULL)
 	    {
-	      delete_step_resume_breakpoint (&step_resume_breakpoint);
+	      delete_breakpoint (step_resume_breakpoint);
+	      step_resume_breakpoint = NULL;
 	    }
 	  /* Not sure whether we need to blow this away too, but probably
 	     it is like the step-resume breakpoint.  */
@@ -2383,6 +2391,7 @@
 	case BPSTAT_WHAT_SINGLE:
 	  if (breakpoints_inserted)
 	    {
+	      thread_step_needed = 1;
 	      remove_breakpoints ();
 	    }
 	  breakpoints_inserted = 0;
@@ -2434,7 +2443,8 @@
 	      step_resume_breakpoint =
 		bpstat_find_step_resume_breakpoint (stop_bpstat);
 	    }
-	  delete_step_resume_breakpoint (&step_resume_breakpoint);
+	  delete_breakpoint (step_resume_breakpoint);
+	  step_resume_breakpoint = NULL;
 	  break;
 
 	case BPSTAT_WHAT_THROUGH_SIGTRAMP:
@@ -2548,7 +2558,7 @@
       {
 #if defined(SOLIB_ADD)
 	/* Have we reached our destination?  If not, keep going. */
-	if (SOLIB_IN_DYNAMIC_LINKER (PIDGET (ecs->ptid), stop_pc))
+	if (SOLIB_IN_DYNAMIC_LINKER (ecs->pid, stop_pc))
 	  {
 	    ecs->another_trap = 1;
 	    keep_going (ecs);
@@ -2755,16 +2765,11 @@
       {
 	/* It's a subroutine call.  */
 
-	if ((step_over_calls == STEP_OVER_NONE)
-	    || ((step_range_end == 1)
-	        && in_prologue (prev_pc, ecs->stop_func_start)))
+	if (step_over_calls == STEP_OVER_NONE)
 	  {
 	    /* I presume that step_over_calls is only 0 when we're
 	       supposed to be stepping at the assembly language level
 	       ("stepi").  Just stop.  */
-	    /* Also, maybe we just did a "nexti" inside a prolog,
-               so we thought it was a subroutine call but it was not.
-               Stop as well.  FENN */
 	    stop_step = 1;
 	    print_stop_reason (END_STEPPING_RANGE, 0);
 	    stop_stepping (ecs);
@@ -3114,26 +3119,26 @@
     {
       /* Are we stopping for a vfork event?  We only stop when we see
          the child's event.  However, we may not yet have seen the
-         parent's event.  And, inferior_ptid is still set to the
+         parent's event.  And, inferior_pid is still set to the
          parent's pid, until we resume again and follow either the
          parent or child.
 
-         To ensure that we can really touch inferior_ptid (aka, the
+         To ensure that we can really touch inferior_pid (aka, the
          parent process) -- which calls to functions like read_pc
          implicitly do -- wait on the parent if necessary. */
       if ((pending_follow.kind == TARGET_WAITKIND_VFORKED)
 	  && !pending_follow.fork_event.saw_parent_fork)
 	{
-	  ptid_t parent_ptid;
+	  int parent_pid;
 
 	  do
 	    {
 	      if (target_wait_hook)
-		parent_ptid = target_wait_hook (pid_to_ptid (-1), &(ecs->ws));
+		parent_pid = target_wait_hook (-1, &(ecs->ws));
 	      else
-		parent_ptid = target_wait (pid_to_ptid (-1), &(ecs->ws));
+		parent_pid = target_wait (-1, &(ecs->ws));
 	    }
-	  while (! ptid_equal (parent_ptid, inferior_ptid));
+	  while (parent_pid != inferior_pid);
 	}
 
       /* Assuming the inferior still exists, set these up for next
@@ -3278,7 +3283,7 @@
 	 as part of their normal status mechanism. */
 
       registers_changed ();
-      ecs->waiton_ptid = pid_to_ptid (-1);
+      ecs->waiton_pid = -1;
       ecs->wp = &(ecs->ws);
     }
   /* This is the old end of the while loop.  Let everybody know we
@@ -3308,7 +3313,7 @@
       /* Print a message only if not in the middle of doing a "step n"
 	 operation for n > 1 */
       if (!step_multi || !stop_step)
-	if (ui_out_is_mi_like_p (uiout))
+	if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	  ui_out_field_string (uiout, "reason", "end-stepping-range");
 #endif
       break;
@@ -3320,7 +3325,7 @@
       /* The inferior was terminated by a signal. */
 #ifdef UI_OUT
       annotate_signalled ();
-      if (ui_out_is_mi_like_p (uiout))
+      if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	ui_out_field_string (uiout, "reason", "exited-signalled");
       ui_out_text (uiout, "\nProgram terminated with signal ");
       annotate_signal_name ();
@@ -3354,7 +3359,7 @@
       annotate_exited (stop_info);
       if (stop_info)
 	{
-	  if (ui_out_is_mi_like_p (uiout))
+	  if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	    ui_out_field_string (uiout, "reason", "exited");
 	  ui_out_text (uiout, "\nProgram exited with code ");
 	  ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int) stop_info);
@@ -3362,7 +3367,7 @@
 	}
       else
 	{
-	  if (ui_out_is_mi_like_p (uiout))
+	  if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	    ui_out_field_string (uiout, "reason", "exited-normally");
 	  ui_out_text (uiout, "\nProgram exited normally.\n");
 	}
@@ -3428,13 +3433,13 @@
 
      (Note that there's no point in saying anything if the inferior
      has exited!) */
-  if (! ptid_equal (previous_inferior_ptid, inferior_ptid)
+  if ((previous_inferior_pid != inferior_pid)
       && target_has_execution)
     {
       target_terminal_ours_for_output ();
       printf_filtered ("[Switching to %s]\n",
-		       target_pid_or_tid_to_str (inferior_ptid));
-      previous_inferior_ptid = inferior_ptid;
+		       target_pid_or_tid_to_str (inferior_pid));
+      previous_inferior_pid = inferior_pid;
     }
 
   /* Make sure that the current_frame's pc is correct.  This
@@ -3548,14 +3553,13 @@
 #ifdef UI_OUT
 	  /* For mi, have the same behavior every time we stop:
              print everything but the source line. */
-	  if (ui_out_is_mi_like_p (uiout))
+	  if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
 	    source_flag = LOC_AND_ADDRESS;
 #endif
 
 #ifdef UI_OUT
-	  if (ui_out_is_mi_like_p (uiout))
-	    ui_out_field_int (uiout, "thread-id",
-	                      pid_to_thread_id (inferior_ptid));
+	  if (interpreter_p && strcmp (interpreter_p, "mi") == 0)
+	    ui_out_field_int (uiout, "thread-id", pid_to_thread_id (inferior_pid));
 #endif
 	  /* The behavior of this routine with respect to the source
 	     flag is:
@@ -3838,7 +3842,7 @@
       argv++;
     }
 
-  target_notice_signals (inferior_ptid);
+  target_notice_signals (inferior_pid);
 
   if (from_tty)
     {
@@ -4177,90 +4181,6 @@
   free_inferior_status (inf_status);
 }
 
-/* Oft used ptids */
-ptid_t null_ptid;
-ptid_t minus_one_ptid;
-
-/* Create a ptid given the necessary PID, LWP, and TID components.  */
-   
-ptid_t
-ptid_build (int pid, long lwp, long tid)
-{
-  ptid_t ptid;
-
-  ptid.pid = pid;
-  ptid.lwp = lwp;
-  ptid.tid = tid;
-  return ptid;
-}
-
-/* Create a ptid from just a pid.  */
-
-ptid_t
-pid_to_ptid (int pid)
-{
-  return ptid_build (pid, 0, 0);
-}
-
-/* Fetch the pid (process id) component from a ptid.  */
-
-int
-ptid_get_pid (ptid_t ptid)
-{
-  return ptid.pid;
-}
-
-/* Fetch the lwp (lightweight process) component from a ptid.  */
-
-long
-ptid_get_lwp (ptid_t ptid)
-{
-  return ptid.lwp;
-}
-
-/* Fetch the tid (thread id) component from a ptid.  */
-
-long
-ptid_get_tid (ptid_t ptid)
-{
-  return ptid.tid;
-}
-
-/* ptid_equal() is used to test equality of two ptids.  */
-
-int
-ptid_equal (ptid_t ptid1, ptid_t ptid2)
-{
-  return (ptid1.pid == ptid2.pid && ptid1.lwp == ptid2.lwp
-          && ptid1.tid == ptid2.tid);
-}
-
-/* restore_inferior_ptid() will be used by the cleanup machinery
-   to restore the inferior_ptid value saved in a call to
-   save_inferior_ptid().  */
-
-static void
-restore_inferior_ptid (void *arg)
-{
-  ptid_t *saved_ptid_ptr = arg;
-  inferior_ptid = *saved_ptid_ptr;
-  xfree (arg);
-}
-
-/* Save the value of inferior_ptid so that it may be restored by a
-   later call to do_cleanups().  Returns the struct cleanup pointer
-   needed for later doing the cleanup.  */
-
-struct cleanup *
-save_inferior_ptid (void)
-{
-  ptid_t *saved_ptid_ptr;
-
-  saved_ptid_ptr = xmalloc (sizeof (ptid_t));
-  *saved_ptid_ptr = inferior_ptid;
-  return make_cleanup (restore_inferior_ptid, saved_ptid_ptr);
-}
-
 
 static void
 build_infrun (void)
@@ -4445,10 +4365,4 @@
 the step command stops at a different source line.",
 			&setlist);
   add_show_from_set (c, &showlist);
-
-  /* ptid initializations */
-  null_ptid = ptid_build (0, 0, 0);
-  minus_one_ptid = ptid_build (-1, 0, 0);
-  inferior_ptid = null_ptid;
-  target_last_wait_ptid = minus_one_ptid;
 }
diff --git a/gdb/inftarg.c b/gdb/inftarg.c
index 6b37030..18a42f1 100644
--- a/gdb/inftarg.c
+++ b/gdb/inftarg.c
@@ -47,11 +47,11 @@
 static void child_prepare_to_store (void);
 
 #ifndef CHILD_WAIT
-static ptid_t child_wait (ptid_t, struct target_waitstatus *);
+static int child_wait (int, struct target_waitstatus *);
 #endif /* CHILD_WAIT */
 
 #if !defined(CHILD_POST_WAIT)
-void child_post_wait (ptid_t, int);
+void child_post_wait (int, int);
 #endif
 
 static void child_open (char *, int);
@@ -87,7 +87,7 @@
 static void child_stop (void);
 
 #ifndef CHILD_THREAD_ALIVE
-int child_thread_alive (ptid_t);
+int child_thread_alive (int);
 #endif
 
 static void init_child_ops (void);
@@ -116,8 +116,8 @@
 /* Wait for child to do something.  Return pid of child, or -1 in case
    of error; store status through argument pointer OURSTATUS.  */
 
-static ptid_t
-child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+static int
+child_wait (int pid, struct target_waitstatus *ourstatus)
 {
   int save_errno;
   int status;
@@ -126,7 +126,6 @@
   int related_pid;
   int syscall_id;
   enum target_waitkind kind;
-  int pid;
 
   do
     {
@@ -134,7 +133,7 @@
 				   attached process. */
       set_sigio_trap ();
 
-      pid = ptrace_wait (inferior_ptid, &status);
+      pid = ptrace_wait (inferior_pid, &status);
 
       save_errno = errno;
 
@@ -153,7 +152,7 @@
 	  /* Claim it exited with unknown signal.  */
 	  ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
 	  ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
-	  return pid_to_ptid (-1);
+	  return -1;
 	}
 
       /* Did it exit?
@@ -164,28 +163,26 @@
 	  continue;
 	}
 
-      if (!target_thread_alive (pid_to_ptid (pid)))
+      if (!target_thread_alive (pid))
 	{
 	  ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
-	  return pid_to_ptid (pid);
+	  return pid;
 	}
 
       if (target_has_forked (pid, &related_pid)
-	  && ((pid == PIDGET (inferior_ptid)) 
-	      || (related_pid == PIDGET (inferior_ptid))))
+	  && ((pid == inferior_pid) || (related_pid == inferior_pid)))
 	{
 	  ourstatus->kind = TARGET_WAITKIND_FORKED;
 	  ourstatus->value.related_pid = related_pid;
-	  return pid_to_ptid (pid);
+	  return pid;
 	}
 
       if (target_has_vforked (pid, &related_pid)
-	  && ((pid == PIDGET (inferior_ptid))
-	      || (related_pid == PIDGET (inferior_ptid))))
+	  && ((pid == inferior_pid) || (related_pid == inferior_pid)))
 	{
 	  ourstatus->kind = TARGET_WAITKIND_VFORKED;
 	  ourstatus->value.related_pid = related_pid;
-	  return pid_to_ptid (pid);
+	  return pid;
 	}
 
       if (target_has_execd (pid, &execd_pathname))
@@ -203,7 +200,7 @@
 	    {
 	      ourstatus->kind = TARGET_WAITKIND_EXECD;
 	      ourstatus->value.execd_pathname = execd_pathname;
-	      return pid_to_ptid (pid);
+	      return pid;
 	    }
 	}
 
@@ -214,23 +211,23 @@
 	{
 	  ourstatus->kind = kind;
 	  ourstatus->value.syscall_id = syscall_id;
-	  return pid_to_ptid (pid);
+	  return pid;
 	}
 
-      /*##  } while (pid != PIDGET (inferior_ptid)); ## *//* Some other child died or stopped */
+      /*##  } while (pid != inferior_pid); ## *//* Some other child died or stopped */
 /* hack for thread testing */
     }
-  while ((pid != PIDGET (inferior_ptid)) && not_same_real_pid);
+  while ((pid != inferior_pid) && not_same_real_pid);
 /*## */
 
   store_waitstatus (ourstatus, status);
-  return pid_to_ptid (pid);
+  return pid;
 }
 #endif /* CHILD_WAIT */
 
 #if !defined(CHILD_POST_WAIT)
 void
-child_post_wait (ptid_t ptid, int wait_status)
+child_post_wait (int pid, int wait_status)
 {
   /* This version of Unix doesn't require a meaningful "post wait"
      operation.
@@ -247,10 +244,8 @@
    for now we're going to try and be compatable with the old thread
    code.  */
 int
-child_thread_alive (ptid_t ptid)
+child_thread_alive (int pid)
 {
-  pid_t pid = PIDGET (ptid);
-
   return (kill (pid, 0) != -1);
 }
 
@@ -285,13 +280,12 @@
 
 	if (after_fork)
 	  printf_unfiltered ("Attaching after fork to %s\n",
-			     target_pid_to_str (pid_to_ptid (pid)));
+			     target_pid_to_str (pid));
 	else if (exec_file)
 	  printf_unfiltered ("Attaching to program: %s, %s\n", exec_file,
-			     target_pid_to_str (pid_to_ptid (pid)));
+			     target_pid_to_str (pid));
 	else
-	  printf_unfiltered ("Attaching to %s\n", 
-	                     target_pid_to_str (pid_to_ptid (pid)));
+	  printf_unfiltered ("Attaching to %s\n", target_pid_to_str (pid));
 
 	gdb_flush (gdb_stdout);
       }
@@ -301,7 +295,7 @@
     else
       REQUIRE_ATTACH (pid);
 
-    inferior_ptid = pid_to_ptid (pid);
+    inferior_pid = pid;
     push_target (&child_ops);
   }
 #endif /* ATTACH_DETACH */
@@ -345,10 +339,10 @@
 	  exec_file = "";
 	if (after_fork)
 	  printf_unfiltered ("Detaching after fork from %s\n",
-			     target_pid_to_str (pid_to_ptid (pid)));
+			     target_pid_to_str (pid));
 	else
 	  printf_unfiltered ("Detaching from program: %s, %s\n", exec_file,
-			     target_pid_to_str (pid_to_ptid (pid)));
+			     target_pid_to_str (pid));
 	gdb_flush (gdb_stdout);
       }
     if (args)
@@ -375,8 +369,8 @@
 static void
 child_detach (char *args, int from_tty)
 {
-  child_detach_from_process (PIDGET (inferior_ptid), args, from_tty, 0);
-  inferior_ptid = null_ptid;
+  child_detach_from_process (inferior_pid, args, from_tty, 0);
+  inferior_pid = 0;
   unpush_target (&child_ops);
 }
 
@@ -407,7 +401,7 @@
 child_files_info (struct target_ops *ignore)
 {
   printf_unfiltered ("\tUsing the running image of %s %s.\n",
-      attach_flag ? "attached" : "child", target_pid_to_str (inferior_ptid));
+      attach_flag ? "attached" : "child", target_pid_to_str (inferior_pid));
 }
 
 /* ARGSUSED */
@@ -452,10 +446,10 @@
   /* On some targets, there must be some explicit actions taken after
      the inferior has been started up.
    */
-  target_post_startup_inferior (pid_to_ptid (pid));
+  target_post_startup_inferior (pid);
 }
 
-/* Start an inferior Unix child process and sets inferior_ptid to its pid.
+/* Start an inferior Unix child process and sets inferior_pid to its pid.
    EXEC_FILE is the file to run.
    ALLARGS is a string containing the arguments to the program.
    ENV is the environment vector to pass.  Errors reported with error().  */
@@ -475,7 +469,7 @@
 
 #if !defined(CHILD_POST_STARTUP_INFERIOR)
 void
-child_post_startup_inferior (ptid_t ptid)
+child_post_startup_inferior (int pid)
 {
   /* This version of Unix doesn't require a meaningful "post startup inferior"
      operation by a debugger.
@@ -742,9 +736,9 @@
 
 #if !defined(CHILD_PID_TO_STR)
 char *
-child_pid_to_str (ptid_t ptid)
+child_pid_to_str (int pid)
 {
-  return normal_pid_to_str (ptid);
+  return normal_pid_to_str (pid);
 }
 #endif
 
diff --git a/gdb/infttrace.c b/gdb/infttrace.c
index ffcbd20..3229f35 100644
--- a/gdb/infttrace.c
+++ b/gdb/infttrace.c
@@ -383,7 +383,7 @@
 static thread_info_header deleted_threads =
 {0, NULL, NULL};
 
-static ptid_t saved_real_ptid;
+static saved_real_pid = 0;
 
 
 /*************************************************
@@ -623,7 +623,7 @@
       if (debug_on)
 	printf ("First thread, pid %d tid %d!\n", pid, tid);
 #endif
-      saved_real_ptid = inferior_ptid;
+      saved_real_pid = inferior_pid;
     }
   else
     {
@@ -1238,7 +1238,7 @@
   for (p = thread_head.head; p; p = p->next)
     {
       /* Is this an "unseen" thread which really happens to be a process?
-         If so, is it inferior_ptid and is a vfork in flight?  If yes to
+         If so, is it inferior_pid and is a vfork in flight?  If yes to
          all, then DON'T REMOVE IT!  We're in the midst of moving a vfork
          operation, which is a multiple step thing, to the point where we
          can touch the parent again.  We've most likely stopped to examine
@@ -1625,15 +1625,14 @@
 	       * in the multi-process future.  Use tid as thread,
 	       * probably dooming this to failure.  FIX!
 	       */
-	      if (! ptid_equal (saved_real_ptid, null_ptid))
+	      if (saved_real_pid != 0)
 		{
 #ifdef THREAD_DEBUG
 		  if (debug_on)
-		    printf ("...using saved pid %d\n",
-		            PIDGET (saved_real_ptid));
+		    printf ("...using saved pid %d\n", saved_real_pid);
 #endif
 
-		  real_pid = PIDGET (saved_real_ptid);
+		  real_pid = saved_real_pid;
 		  real_tid = gdb_tid;
 		}
 
@@ -1654,14 +1653,14 @@
 	      if (debug_on)
 		{
 		  printf ("Translated thread request to process request\n");
-		  if (ptid_equal (saved_real_ptid, null_ptid))
+		  if (saved_real_pid == 0)
 		    printf ("...but there's no saved pid\n");
 
 		  else
 		    {
-		      if (gdb_tid != PIDGET (saved_real_ptid))
+		      if (gdb_tid != saved_real_pid)
 			printf ("...but have the wrong pid (%d rather than %d)\n",
-				gdb_tid, PIDGET (saved_real_ptid));
+				gdb_tid, saved_real_pid);
 		    }
 		}
 #endif
@@ -1748,11 +1747,11 @@
    have its threads examined.
  */
 #define CHILD_VFORKED(evt,pid) \
-  (((evt) == TTEVT_VFORK) && ((pid) != PIDGET (inferior_ptid)))
+  (((evt) == TTEVT_VFORK) && ((pid) != inferior_pid))
 #define CHILD_URPED(evt,pid) \
   ((((evt) == TTEVT_EXEC) || ((evt) == TTEVT_EXIT)) && ((pid) != vforking_child_pid))
 #define PARENT_VFORKED(evt,pid) \
-  (((evt) == TTEVT_VFORK) && ((pid) == PIDGET (inferior_ptid)))
+  (((evt) == TTEVT_VFORK) && ((pid) == inferior_pid))
 
 static int
 can_touch_threads_of_process (int pid, ttevents_t stopping_event)
@@ -2596,8 +2595,8 @@
  *
  * Note: used by core gdb and so uses the pseudo-pid (really tid).
  */
-ptid_t
-ptrace_wait (ptid_t ptid, int *status)
+int
+ptrace_wait (int pid, int *status)
 {
   ttstate_t tsp;
   int ttwait_return;
@@ -2621,13 +2620,13 @@
       if (errno == ESRCH)
 	{
 	  *status = 0;		/* WIFEXITED */
-	  return inferior_ptid;
+	  return inferior_pid;
 	}
 
       warning ("Call of ttrace_wait returned with errno %d.",
 	       errno);
       *status = ttwait_return;
-      return inferior_ptid;
+      return inferior_pid;
     }
 
   real_pid = tsp.tts_pid;
@@ -2689,7 +2688,7 @@
 #ifdef THREAD_DEBUG
       if (debug_on)
 	printf ("Pid %d has zero'th thread %d; inferior pid is %d\n",
-		real_pid, real_tid, PIDGET (inferior_ptid));
+		real_pid, real_tid, inferior_pid);
 #endif
 
       add_tthread (real_pid, real_tid);
@@ -2852,7 +2851,7 @@
        * a new thread if for some reason it's never
        * seen the main thread before.
        */
-      inferior_ptid = pid_to_ptid (map_to_gdb_tid (real_tid));	/* HACK, FIX */
+      inferior_pid = map_to_gdb_tid (real_tid);		/* HACK, FIX */
 
       *status = 0 | (tsp.tts_u.tts_exit.tts_exitcode);
     }
@@ -2905,7 +2904,7 @@
 
   /* Remember this for later use in "hppa_prepare_to_proceed".
    */
-  old_gdb_pid = PIDGET (inferior_ptid);
+  old_gdb_pid = inferior_pid;
   reported_pid = return_pid;
   reported_bpt = ((tsp.tts_event & TTEVT_SIGNAL) && (5 == tsp.tts_u.tts_signal.tts_signo));
 
@@ -2914,7 +2913,7 @@
       warning ("Internal error: process-wait failed.");
     }
 
-  return pid_to_ptid (return_pid);
+  return return_pid;
 }
 
 
@@ -3151,9 +3150,9 @@
  * calling require_notification_of_events.
  */
 void
-child_post_startup_inferior (ptid_t ptid)
+child_post_startup_inferior (int real_pid)
 {
-  require_notification_of_events (PIDGET (ptid));
+  require_notification_of_events (real_pid);
 }
 
 /* From here on, we should expect tids rather than pids.
@@ -3583,9 +3582,8 @@
  * May need a FIXME for that reason.
  */
 int
-child_thread_alive (ptid_t ptid)
+child_thread_alive (lwpid_t gdb_tid)
 {
-  lwpid_t gdp_tid = PIDGET (ptid);
   lwpid_t tid;
 
   /* This spins down the lists twice.
@@ -3817,11 +3815,11 @@
   thread_info **paranoia;
   int para_count, i;
 
-  if (PIDGET (inferior_ptid) == 0)
+  if (inferior_pid == 0)
     return;
 
   /* Walk the list of "threads", some of which are "pseudo threads",
-     aka "processes".  For each that is NOT inferior_ptid, stop it,
+     aka "processes".  For each that is NOT inferior_pid, stop it,
      and detach it.
 
      You see, we may not have just a single process to kill.  If we're
@@ -3851,7 +3849,7 @@
 	}
       para_count++;
 
-      if (t->am_pseudo && (t->pid != PIDGET (inferior_ptid)))
+      if (t->am_pseudo && (t->pid != inferior_pid))
 	{
 	  /* TT_PROC_STOP doesn't require a subsequent ttrace_wait, as it
 	   * generates no event.
@@ -3874,7 +3872,7 @@
   xfree (paranoia);
 
   call_ttrace (TT_PROC_STOP,
-	       PIDGET (inferior_ptid),
+	       inferior_pid,
 	       TT_NIL,
 	       TT_NIL,
 	       TT_NIL);
@@ -4315,7 +4313,7 @@
  *   -1  |   Step current            Continue all threads
  *       |   thread and              (but which gets any
  *       |   continue others         signal?--We look at
- *       |                           "inferior_ptid")
+ *       |                           "inferior_pid")
  *       |
  *    N  |   Step _this_ thread      Continue _this_ thread
  *       |   and leave others        and leave others 
@@ -4325,12 +4323,11 @@
  *       |                           user command.
  */
 void
-child_resume (ptid_t ptid, int step, enum target_signal signal)
+child_resume (lwpid_t gdb_tid, int step, enum target_signal signal)
 {
   int resume_all_threads;
   lwpid_t tid;
   process_state_t new_process_state;
-  lwpid_t gdb_tid = PIDGET (ptid);
 
   resume_all_threads =
     (gdb_tid == INFTTRACE_ALL_THREADS) ||
@@ -4345,7 +4342,7 @@
       if (vfork_in_flight)
 	tid = vforking_child_pid;
       else
-	tid = map_from_gdb_tid (PIDGET (inferior_ptid));
+	tid = map_from_gdb_tid (inferior_pid);
     }
   else
     tid = map_from_gdb_tid (gdb_tid);
@@ -4651,7 +4648,7 @@
 /*
  * Like it says.
  *
- * One worry is that we may not be attaching to "inferior_ptid"
+ * One worry is that we may not be attaching to "inferior_pid"
  * and thus may not want to clear out our data.  FIXME?
  * 
  */
@@ -4705,7 +4702,7 @@
        *
        * We don't need to do mapping here, as we know this
        * is the first thread and thus gets the real pid
-       * (and is "inferior_ptid").
+       * (and is "inferior_pid").
        *
        * NOTE: it probably isn't the originating thread,
        *       but that doesn't matter (we hope!).
@@ -4879,7 +4876,7 @@
 {
   errno = 0;
   call_ttrace (TT_PROC_DETACH,
-	       PIDGET (inferior_ptid),
+	       inferior_pid,
 	       TT_NIL,
 	       (TTRACE_ARG_TYPE) signal,
 	       TT_NIL);
@@ -4942,7 +4939,7 @@
 	{
 	  /* Need part of initial word -- fetch it.  */
 	  buffer[0] = call_ttrace (TT_LWP_RDTEXT,
-				   PIDGET (inferior_ptid),
+				   inferior_pid,
 				   (TTRACE_ARG_TYPE) addr,
 				   TT_NIL,
 				   TT_NIL);
@@ -4951,7 +4948,7 @@
       if (count > 1)		/* FIXME, avoid if even boundary */
 	{
 	  buffer[count - 1] = call_ttrace (TT_LWP_RDTEXT,
-					   PIDGET (inferior_ptid),
+					   inferior_pid,
 					   ((TTRACE_ARG_TYPE)
 			  (addr + (count - 1) * sizeof (TTRACE_XFER_TYPE))),
 					   TT_NIL,
@@ -4970,7 +4967,7 @@
 	{
 	  errno = 0;
 	  call_ttrace (TT_LWP_WRDATA,
-		       PIDGET (inferior_ptid),
+		       inferior_pid,
 		       (TTRACE_ARG_TYPE) addr,
 		       (TTRACE_ARG_TYPE) buffer[i],
 		       TT_NIL);
@@ -4980,7 +4977,7 @@
 	         Gould NP1, at least.  */
 	      errno = 0;
 	      call_ttrace (TT_LWP_WRTEXT,
-			   PIDGET (inferior_ptid),
+			   inferior_pid,
 			   (TTRACE_ARG_TYPE) addr,
 			   (TTRACE_ARG_TYPE) buffer[i],
 			   TT_NIL);
@@ -4996,7 +4993,7 @@
 	{
 	  errno = 0;
 	  buffer[i] = call_ttrace (TT_LWP_RDTEXT,
-				   PIDGET (inferior_ptid),
+				   inferior_pid,
 				   (TTRACE_ARG_TYPE) addr,
 				   TT_NIL,
 				   TT_NIL);
@@ -5047,7 +5044,7 @@
 	  printf_filtered ("%04x:", udot_off);
 	}
       udot_val = call_ttrace (TT_LWP_RUREGS,
-			      PIDGET (inferior_ptid),
+			      inferior_pid,
 			      (TTRACE_ARG_TYPE) udot_off,
 			      TT_NIL,
 			      TT_NIL);
@@ -5077,7 +5074,7 @@
   int name_index;
   int i;
   int done;
-  ptid_t saved_inferior_ptid;
+  int saved_inferior_pid;
 
   /* As of 10.x HP-UX, there's an explicit request to get the
    *pathname.
@@ -5103,19 +5100,19 @@
   name_index = 0;
   done = 0;
 
-  /* On the chance that pid != inferior_ptid, set inferior_ptid
-     to pid, so that (grrrr!) implicit uses of inferior_ptid get
+  /* On the chance that pid != inferior_pid, set inferior_pid
+     to pid, so that (grrrr!) implicit uses of inferior_pid get
      the right id.
    */
-  saved_inferior_ptid = inferior_ptid;
-  inferior_ptid = pid_to_ptid (tid);
+  saved_inferior_pid = inferior_pid;
+  inferior_pid = tid;
 
   /* Try to grab a null-terminated string. */
   while (!done)
     {
       if (target_read_memory (top_of_stack, four_chars, 4) != 0)
 	{
-	  inferior_ptid = saved_inferior_ptid;
+	  inferior_pid = saved_inferior_pid;
 	  return NULL;
 	}
       for (i = 0; i < 4; i++)
@@ -5130,11 +5127,11 @@
 
   if (exec_file_buffer[0] == '\0')
     {
-      inferior_ptid = saved_inferior_ptid;
+      inferior_pid = saved_inferior_pid;
       return NULL;
     }
 
-  inferior_ptid = saved_inferior_ptid;
+  inferior_pid = saved_inferior_pid;
   return exec_file_buffer;
 }
 
@@ -5629,18 +5626,17 @@
 
 
 char *
-hppa_pid_or_tid_to_str (ptid_t ptid)
+hppa_pid_or_tid_to_str (pid_t id)
 {
   static char buf[100];		/* Static because address returned. */
-  pid_t id = PIDGET (ptid);
 
   /* Does this appear to be a process?  If so, print it that way. */
   if (is_process_id (id))
-    return child_pid_to_str (ptid);
+    return child_pid_to_str (id);
 
   /* Else, print both the GDB thread number and the system thread id. */
-  sprintf (buf, "thread %d (", pid_to_thread_id (ptid));
-  strcat (buf, hppa_tid_to_str (ptid));
+  sprintf (buf, "thread %d (", pid_to_thread_id (id));
+  strcat (buf, hppa_tid_to_str (id));
   strcat (buf, ")\0");
 
   return buf;
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index c1549fc..20c05f3 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -1224,7 +1224,7 @@
   stop_signal = TARGET_SIGNAL_0;
   do
     {
-      target_resume (pid_to_ptid (-1), 0, stop_signal);
+      target_resume (-1, 0, stop_signal);
       wait_for_inferior ();
     }
   while (stop_signal != TARGET_SIGNAL_TRAP);
diff --git a/gdb/language.c b/gdb/language.c
index 117bd2e..1a005b2 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -720,7 +720,7 @@
   num_pad_chars = field_width - strlen (temp_nbr_buf);	/* possibly negative */
 
   if (strlen (local_hex_format_prefix ()) + num_len + num_pad_chars
-      >= RESULT_BUF_LEN)		/* paranoia */
+      < RESULT_BUF_LEN)		/* paranoia */
     internal_error (__FILE__, __LINE__,
 		    "longest_local_hex_string_custom: insufficient space to store result");
 
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index 91f3691..a9d8f37 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -73,7 +73,7 @@
 {
   /* The process id of the LWP.  This is a combination of the LWP id
      and overall process id.  */
-  ptid_t ptid;
+  int pid;
 
   /* Non-zero if we sent this LWP a SIGSTOP (but the LWP didn't report
      it back yet).  */
@@ -82,14 +82,6 @@
   /* Non-zero if this LWP is stopped.  */
   int stopped;
 
-  /* Non-zero if this LWP will be/has been resumed.  Note that an LWP
-     can be marked both as stopped and resumed at the same time.  This
-     happens if we try to resume an LWP that has a wait status
-     pending.  We shouldn't let the LWP run until that wait status has
-     been processed, but we should not report that wait status if GDB
-     didn't try to let the LWP run.  */
-  int resumed;
-
   /* If non-zero, a pending wait status.  */
   int status;
 
@@ -110,16 +102,23 @@
 static int threaded;
 
 
-#define GET_LWP(ptid)		ptid_get_lwp (ptid)
-#define GET_PID(ptid)		ptid_get_pid (ptid)
-#define is_lwp(ptid)		(GET_LWP (ptid) != 0)
-#define BUILD_LWP(lwp, pid)	ptid_build (pid, lwp, 0)
+#ifndef TIDGET
+#define TIDGET(PID)		(((PID) & 0x7fffffff) >> 16)
+#define PIDGET(PID)		(((PID) & 0xffff))
+#define MERGEPID(PID, TID)	(((PID) & 0xffff) | ((TID) << 16))
+#endif
+
+#define THREAD_FLAG		0x80000000
+#define is_lwp(pid)		(((pid) & THREAD_FLAG) == 0 && TIDGET (pid))
+#define GET_LWP(pid)		TIDGET (pid)
+#define GET_PID(pid)		PIDGET (pid)
+#define BUILD_LWP(tid, pid)	MERGEPID (pid, tid)
 
 #define is_cloned(pid)	(GET_LWP (pid) != GET_PID (pid))
 
 /* If the last reported event was a SIGTRAP, this variable is set to
    the process id of the LWP/thread that got it.  */
-ptid_t trap_ptid;
+int trap_pid;
 
 
 /* This module's target-specific operations.  */
@@ -151,13 +150,10 @@
 
 
 /* Prototypes for local functions.  */
-static int stop_wait_callback (struct lwp_info *lp, void *data);
+static void lin_lwp_mourn_inferior (void);
 
 
-/* Initialize the list of LWPs.  Note that this module, contrary to
-   what GDB's generic threads layer does for its thread list,
-   re-initializes the LWP lists whenever we mourn or detach (which
-   doesn't involve mourning) the inferior.  */
+/* Initialize the list of LWPs.  */
 
 static void
 init_lwp_list (void)
@@ -180,17 +176,17 @@
    Return a pointer to the structure describing the new LWP.  */
 
 static struct lwp_info *
-add_lwp (ptid_t ptid)
+add_lwp (int pid)
 {
   struct lwp_info *lp;
 
-  gdb_assert (is_lwp (ptid));
+  gdb_assert (is_lwp (pid));
 
   lp = (struct lwp_info *) xmalloc (sizeof (struct lwp_info));
 
   memset (lp, 0, sizeof (struct lwp_info));
 
-  lp->ptid = ptid;
+  lp->pid = pid;
 
   lp->next = lwp_list;
   lwp_list = lp;
@@ -203,14 +199,14 @@
 /* Remove the LWP specified by PID from the list.  */
 
 static void
-delete_lwp (ptid_t ptid)
+delete_lwp (int pid)
 {
   struct lwp_info *lp, *lpprev;
 
   lpprev = NULL;
 
   for (lp = lwp_list; lp; lpprev = lp, lp = lp->next)
-    if (ptid_equal (lp->ptid, ptid))
+    if (lp->pid == pid)
       break;
 
   if (!lp)
@@ -232,18 +228,15 @@
    to PID.  If no corresponding LWP could be found, return NULL.  */
 
 static struct lwp_info *
-find_lwp_pid (ptid_t ptid)
+find_lwp_pid (int pid)
 {
   struct lwp_info *lp;
-  int lwp;
 
-  if (is_lwp (ptid))
-    lwp = GET_LWP (ptid);
-  else
-    lwp = GET_PID (ptid);
+  if (is_lwp (pid))
+    pid = GET_LWP (pid);
 
   for (lp = lwp_list; lp; lp = lp->next)
-    if (lwp == GET_LWP (lp->ptid))
+    if (pid == GET_LWP (lp->pid))
       return lp;
 
   return NULL;
@@ -257,33 +250,47 @@
 struct lwp_info *
 iterate_over_lwps (int (*callback) (struct lwp_info *, void *), void *data)
 {
-  struct lwp_info *lp, *lpnext;
+  struct lwp_info *lp;
 
-  for (lp = lwp_list; lp; lp = lpnext)
-    {
-      lpnext = lp->next;
-      if ((*callback) (lp, data))
-	return lp;
-    }
+  for (lp = lwp_list; lp; lp = lp->next)
+    if ((*callback) (lp, data))
+      return lp;
 
   return NULL;
 }
 
 
+/* Helper functions.  */
+
+static void
+restore_inferior_pid (void *arg)
+{
+  int *saved_pid_ptr = arg;
+  inferior_pid = *saved_pid_ptr;
+  xfree (arg);
+}
+
+static struct cleanup *
+save_inferior_pid (void)
+{
+  int *saved_pid_ptr;
+
+  saved_pid_ptr = xmalloc (sizeof (int));
+  *saved_pid_ptr = inferior_pid;
+  return make_cleanup (restore_inferior_pid, saved_pid_ptr);
+}
+
+
 /* Implementation of the PREPARE_TO_PROCEED hook for the Linux LWP
    layer.
 
    Note that this implementation is potentially redundant now that
-   default_prepare_to_proceed() has been added.
-
-   FIXME This may not support switching threads after Ctrl-C
-   correctly. The default implementation does support this. */
+   default_prepare_to_proceed() has been added.  */
 
 int
 lin_lwp_prepare_to_proceed (void)
 {
-  if (! ptid_equal (trap_ptid, null_ptid)
-      && ! ptid_equal (inferior_ptid, trap_ptid))
+  if (trap_pid && inferior_pid != trap_pid)
     {
       /* Switched over from TRAP_PID.  */
       CORE_ADDR stop_pc = read_pc ();
@@ -291,12 +298,12 @@
 
       /* Avoid switching where it wouldn't do any good, i.e. if both
          threads are at the same breakpoint.  */
-      trap_pc = read_pc_pid (trap_ptid);
+      trap_pc = read_pc_pid (trap_pid);
       if (trap_pc != stop_pc && breakpoint_here_p (trap_pc))
 	{
 	  /* User hasn't deleted the breakpoint.  Return non-zero, and
              switch back to TRAP_PID.  */
-	  inferior_ptid = trap_ptid;
+	  inferior_pid = trap_pid;
 
 	  /* FIXME: Is this stuff really necessary?  */
 	  flush_cached_frames ();
@@ -323,110 +330,35 @@
    process.  */
 
 void
-lin_lwp_attach_lwp (ptid_t ptid, int verbose)
+lin_lwp_attach_lwp (int pid, int verbose)
 {
   struct lwp_info *lp;
 
-  gdb_assert (is_lwp (ptid));
+  gdb_assert (is_lwp (pid));
 
   if (verbose)
-    printf_filtered ("[New %s]\n", target_pid_to_str (ptid));
+    printf_filtered ("[New %s]\n", target_pid_to_str (pid));
 
-  /* We assume that we're already tracing the initial process.  */
-  if (is_cloned (ptid) && ptrace (PTRACE_ATTACH, GET_LWP (ptid), 0, 0) < 0)
-    error ("Can't attach %s: %s", target_pid_to_str (ptid), strerror (errno));
+  if (ptrace (PTRACE_ATTACH, GET_LWP (pid), 0, 0) < 0)
+    error ("Can't attach %s: %s", target_pid_to_str (pid), strerror (errno));
 
-  lp = find_lwp_pid (ptid);
-  if (lp == NULL)
-    lp = add_lwp (ptid);
-
-  if (is_cloned (ptid))
-    {
-      lp->signalled = 1;
-      stop_wait_callback (lp, NULL);
-    }
+  lp = add_lwp (pid);
+  lp->signalled = 1;
 }
 
 static void
 lin_lwp_attach (char *args, int from_tty)
 {
-  struct lwp_info *lp;
-
   /* FIXME: We should probably accept a list of process id's, and
      attach all of them.  */
-  child_ops.to_attach (args, from_tty);
-
-  /* Add the initial process as the first LWP to the list.  */
-  lp = add_lwp (BUILD_LWP (PIDGET (inferior_ptid), PIDGET (inferior_ptid)));
-
-  /* Make sure the initial process is stopped.  The user-level threads
-     layer might want to poke around in the inferior, and that won't
-     work if things haven't stabilized yet.  */
-  lp->signalled = 1;
-  stop_wait_callback (lp, NULL);
-  gdb_assert (lp->status == 0);
-
-  /* Fake the SIGSTOP that core GDB expects.  */
-  lp->status = W_STOPCODE (SIGSTOP);
-  lp->resumed = 1;
-}
-
-static int
-detach_callback (struct lwp_info *lp, void *data)
-{
-  gdb_assert (lp->status == 0 || WIFSTOPPED (lp->status));
-
-  if (debug_lin_lwp && lp->status)
-    fprintf_unfiltered (gdb_stdlog, "Pending %s for LWP %ld on detach.\n",
-			strsignal (WSTOPSIG (lp->status)), GET_LWP (lp->ptid));
-
-  while (lp->signalled && lp->stopped)
-    {
-      if (ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
-		  WSTOPSIG (lp->status)) < 0)
-	error ("Can't continue %s: %s", target_pid_to_str (lp->ptid),
-	       strerror (errno));
-
-      lp->stopped = 0;
-      lp->signalled = 0;
-      lp->status = 0;
-      stop_wait_callback (lp, NULL);
-
-      gdb_assert (lp->status == 0 || WIFSTOPPED (lp->status));
-    }
-
-  if (is_cloned (lp->ptid))
-    {
-      if (ptrace (PTRACE_DETACH, GET_LWP (lp->ptid), 0,
-		  WSTOPSIG (lp->status)) < 0)
-	error ("Can't detach %s: %s", target_pid_to_str (lp->ptid),
-	       strerror (errno));
-
-      delete_lwp (lp->ptid);
-    }
-
-  return 0;
+  error("Not implemented yet");
 }
 
 static void
 lin_lwp_detach (char *args, int from_tty)
 {
-  iterate_over_lwps (detach_callback, NULL);
-
-  /* Only the initial (uncloned) process should be left right now.  */
-  gdb_assert (num_lwps == 1);
-
-  trap_ptid = null_ptid;
-
-  /* Destroy LWP info; it's no longer valid.  */
-  init_lwp_list ();
-
-  /* Restore the original signal mask.  */
-  sigprocmask (SIG_SETMASK, &normal_mask, NULL);
-  sigemptyset (&blocked_mask);
-
-  inferior_ptid = pid_to_ptid (GET_PID (inferior_ptid));
-  child_ops.to_detach (args, from_tty);
+  /* FIXME: Provide implementation when we implement lin_lwp_attach.  */
+  error ("Not implemented yet");
 }
 
 
@@ -443,7 +375,7 @@
 {
   struct lwp_info *lp = data;
 
-  if (tp->private->lwpid == GET_LWP (lp->ptid))
+  if (tp->private->lwpid == GET_LWP (lp->pid))
     return 1;
 
   return 0;
@@ -462,7 +394,7 @@
       /* FIXME: kettenis/2000-08-26: This should really be handled
          properly by core GDB.  */
 
-      tp = find_thread_pid (lp->ptid);
+      tp = find_thread_pid (lp->pid);
       if (tp == NULL)
 	tp = iterate_over_threads (find_lwp_callback, lp);
       gdb_assert (tp);
@@ -479,7 +411,7 @@
 	}
 #endif
 
-      child_resume (pid_to_ptid (GET_LWP (lp->ptid)), 0, TARGET_SIGNAL_0);
+      child_resume (GET_LWP (lp->pid), 0, TARGET_SIGNAL_0);
       lp->stopped = 0;
       lp->step = 0;
     }
@@ -487,22 +419,8 @@
   return 0;
 }
 
-static int
-resume_clear_callback (struct lwp_info *lp, void *data)
-{
-  lp->resumed = 0;
-  return 0;
-}
-
-static int
-resume_set_callback (struct lwp_info *lp, void *data)
-{
-  lp->resumed = 1;
-  return 0;
-}
-
 static void
-lin_lwp_resume (ptid_t ptid, int step, enum target_signal signo)
+lin_lwp_resume (int pid, int step, enum target_signal signo)
 {
   struct lwp_info *lp;
   int resume_all;
@@ -511,29 +429,21 @@
      STEP is non-zero, a specific PID means `step only this process
      id'.  But if STEP is zero, then PID means `continue *all*
      processes, but give the signal only to this one'.  */
-  resume_all = (PIDGET (ptid) == -1) || !step;
-
-  if (resume_all)
-    iterate_over_lwps (resume_set_callback, NULL);
-  else
-    iterate_over_lwps (resume_clear_callback, NULL);
+  resume_all = (pid == -1) || !step;
 
   /* If PID is -1, it's the current inferior that should be
-     handled specially.  */
-  if (PIDGET (ptid) == -1)
-    ptid = inferior_ptid;
+     handled special.  */
+  if (pid == -1)
+    pid = inferior_pid;
 
-  lp = find_lwp_pid (ptid);
+  lp = find_lwp_pid (pid);
   if (lp)
     {
-      ptid = pid_to_ptid (GET_LWP (lp->ptid));
+      pid = GET_LWP (lp->pid);
 
       /* Remember if we're stepping.  */
       lp->step = step;
 
-      /* Mark this LWP as resumed.  */
-      lp->resumed = 1;
-
       /* If we have a pending wait status for this thread, there is no
          point in resuming the process.  */
       if (lp->status)
@@ -552,7 +462,7 @@
   if (resume_all)
     iterate_over_lwps (resume_callback, NULL);
 
-  child_resume (ptid, step, signo);
+  child_resume (pid, step, signo);
 }
 
 
@@ -565,7 +475,7 @@
     {
       int ret;
 
-      ret = kill (GET_LWP (lp->ptid), SIGSTOP);
+      ret = kill (GET_LWP (lp->pid), SIGSTOP);
       gdb_assert (ret == 0);
 
       lp->signalled = 1;
@@ -585,36 +495,35 @@
       pid_t pid;
       int status;
 
-    get_another_event:
       gdb_assert (lp->status == 0);
 
-      pid = waitpid (GET_LWP (lp->ptid), &status,
-		     is_cloned (lp->ptid) ? __WCLONE : 0);
+      pid = waitpid (GET_LWP (lp->pid), &status,
+		     is_cloned (lp->pid) ? __WCLONE : 0);
       if (pid == -1 && errno == ECHILD)
 	/* OK, the proccess has disappeared.  We'll catch the actual
 	   exit event in lin_lwp_wait.  */
 	return 0;
 
-      gdb_assert (pid == GET_LWP (lp->ptid));
+      gdb_assert (pid == GET_LWP (lp->pid));
 
       if (WIFEXITED (status) || WIFSIGNALED (status))
 	{
 	  gdb_assert (num_lwps > 1);
 
-	  if (in_thread_list (lp->ptid))
+	  if (in_thread_list (lp->pid))
 	    {
 	      /* Core GDB cannot deal with us deleting the current
 		 thread.  */
-	      if (!ptid_equal (lp->ptid, inferior_ptid))
-		delete_thread (lp->ptid);
+	      if (lp->pid != inferior_pid)
+		delete_thread (lp->pid);
 	      printf_unfiltered ("[%s exited]\n",
-				 target_pid_to_str (lp->ptid));
+				 target_pid_to_str (lp->pid));
 	    }
 	  if (debug_lin_lwp)
 	    fprintf_unfiltered (gdb_stdlog, 
-				"%s exited.\n", target_pid_to_str (lp->ptid));
+				"%s exited.\n", target_pid_to_str (lp->pid));
 
-	  delete_lwp (lp->ptid);
+	  delete_lwp (lp->pid);
 	  return 0;
 	}
 
@@ -624,7 +533,7 @@
       if (WSTOPSIG (status) != SIGSTOP)
 	{
 	  if (WSTOPSIG (status) == SIGTRAP
-	      && breakpoint_inserted_here_p (read_pc_pid (pid_to_ptid (pid))
+	      && breakpoint_inserted_here_p (read_pc_pid (pid)
 					     - DECR_PC_AFTER_BREAK))
 	    {
 	      /* If a LWP other than the LWP that we're reporting an
@@ -644,29 +553,11 @@
 		fprintf_unfiltered (gdb_stdlog,
 				    "Tripped breakpoint at %lx in LWP %d"
 				    " while waiting for SIGSTOP.\n",
-				    (long) read_pc_pid (lp->ptid), pid);
+				    (long) read_pc_pid (lp->pid), pid);
 
 	      /* Set the PC to before the trap.  */
 	      if (DECR_PC_AFTER_BREAK)
-		write_pc_pid (read_pc_pid (pid_to_ptid (pid)) 
-		                - DECR_PC_AFTER_BREAK,
-			      pid_to_ptid (pid));
-
-	      /* Now resume this LWP and get the SIGSTOP event. */
-	      ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
-	      goto get_another_event;
-	    }
-	  else if (WSTOPSIG (status) == SIGINT &&
-		   signal_pass_state (SIGINT) == 0)
-	    {
-	      /* Since SIGINT gets forwarded to the entire process group
-		 (in the case where ^C/BREAK is typed at the tty/console),
-		 just ignore all SIGINT events from all lwp's except for
-		 the one that was caught by lin_lwp_wait.  */
-
-	      /* Now resume this LWP and get the SIGSTP event. */
-	      ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
-	      goto get_another_event;
+		write_pc_pid (read_pc_pid (pid) - DECR_PC_AFTER_BREAK, pid);
 	    }
 	  else
 	    {
@@ -676,7 +567,7 @@
 				    strsignal (WSTOPSIG (status)), pid);
 
 	      /* The thread was stopped with a signal other than
-		 SIGSTOP, and didn't accidentally trip a breakpoint.
+		 SIGSTOP, and didn't accidentiliy trip a breakpoint.
 		 Record the wait status.  */
 	      lp->status = status;
 	    }
@@ -697,9 +588,7 @@
 static int
 status_callback (struct lwp_info *lp, void *data)
 {
-  /* Only report a pending wait status if we pretend that this has
-     indeed been resumed.  */
-  return (lp->status != 0 && lp->resumed);
+  return (lp->status != 0);
 }
 
 /* Return non-zero if LP isn't stopped.  */
@@ -710,21 +599,12 @@
   return (lp->stopped == 0);
 }
 
-/* Return non-zero if LP has been resumed.  */
-
 static int
-resumed_callback (struct lwp_info *lp, void *data)
-{
-  return lp->resumed;
-}
-
-static ptid_t
-lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+lin_lwp_wait (int pid, struct target_waitstatus *ourstatus)
 {
   struct lwp_info *lp = NULL;
   int options = 0;
   int status = 0;
-  pid_t pid = PIDGET (ptid);
 
   /* Make sure SIGCHLD is blocked.  */
   if (! sigismember (&blocked_mask, SIGCHLD))
@@ -735,9 +615,6 @@
 
  retry:
 
-  /* Make sure there is at least one thread that has been resumed.  */
-  gdb_assert (iterate_over_lwps (resumed_callback, NULL));
-
   /* First check if there is a LWP with a wait status pending.  */
   if (pid == -1)
     {
@@ -747,8 +624,8 @@
 	{
 	  if (debug_lin_lwp)
 	    fprintf_unfiltered (gdb_stdlog, 
-				"Using pending wait status for LWP %ld.\n",
-				GET_LWP (lp->ptid));
+				"Using pending wait status for LWP %d.\n",
+				GET_LWP (lp->pid));
 
 	  status = lp->status;
 	  lp->status = 0;
@@ -759,15 +636,14 @@
          processes.  */
       options = __WCLONE | WNOHANG;
     }
-  else if (is_lwp (ptid))
+  else if (is_lwp (pid))
     {
       if (debug_lin_lwp)
 	fprintf_unfiltered (gdb_stdlog, 
-			    "Waiting for specific LWP %ld.\n",
-			    GET_LWP (ptid));
+			    "Waiting for specific LWP %d.\n", GET_LWP (pid));
 
       /* We have a specific LWP to check.  */
-      lp = find_lwp_pid (ptid);
+      lp = find_lwp_pid (GET_LWP (pid));
       gdb_assert (lp);
       status = lp->status;
       lp->status = 0;
@@ -775,14 +651,14 @@
       if (debug_lin_lwp)
 	if (status)
 	  fprintf_unfiltered (gdb_stdlog, 
-			      "Using pending wait status for LWP %ld.\n",
-			      GET_LWP (lp->ptid));
+			      "Using pending wait status for LWP %d.\n",
+			      GET_LWP (lp->pid));
 
       /* If we have to wait, take into account whether PID is a cloned
          process or not.  And we have to convert it to something that
          the layer beneath us can understand.  */
-      options = is_cloned (lp->ptid) ? __WCLONE : 0;
-      pid = GET_LWP (ptid);
+      options = is_cloned (lp->pid) ? __WCLONE : 0;
+      pid = GET_LWP (pid);
     }
 
   if (status && lp->signalled)
@@ -798,10 +674,8 @@
 
       /* Resume the thread.  It should halt immediately returning the
 	 pending SIGSTOP.  */
-      child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step,
-                    TARGET_SIGNAL_0);
+      child_resume (GET_LWP (lp->pid), lp->step, TARGET_SIGNAL_0);
       lp->stopped = 0;
-      gdb_assert (lp->resumed);
 
       /* This should catch the pending SIGSTOP.  */
       stop_wait_callback (lp, NULL);
@@ -820,26 +694,25 @@
 	{
 	  gdb_assert (pid == -1 || lwpid == pid);
 
-	  lp = find_lwp_pid (pid_to_ptid (lwpid));
+	  lp = find_lwp_pid (lwpid);
 	  if (! lp)
 	    {
-	      lp = add_lwp (BUILD_LWP (lwpid, GET_PID (inferior_ptid)));
+	      lp = add_lwp (BUILD_LWP (lwpid, inferior_pid));
 	      if (threaded)
 		{
 		  gdb_assert (WIFSTOPPED (status)
 			      && WSTOPSIG (status) == SIGSTOP);
 		  lp->signalled = 1;
 
-		  if (! in_thread_list (inferior_ptid))
+		  if (! in_thread_list (inferior_pid))
 		    {
-		      inferior_ptid = BUILD_LWP (GET_PID (inferior_ptid),
-		                                 GET_PID (inferior_ptid));
-		      add_thread (inferior_ptid);
+		      inferior_pid = BUILD_LWP (inferior_pid, inferior_pid);
+		      add_thread (inferior_pid);
 		    }
 
-		  add_thread (lp->ptid);
+		  add_thread (lp->pid);
 		  printf_unfiltered ("[New %s]\n",
-				     target_pid_to_str (lp->ptid));
+				     target_pid_to_str (lp->pid));
 		}
 	    }
 
@@ -848,21 +721,21 @@
              left in the process.  */
 	  if ((WIFEXITED (status) || WIFSIGNALED (status)) && num_lwps > 1)
 	    {
-	      if (in_thread_list (lp->ptid))
+	      if (in_thread_list (lp->pid))
 		{
 		  /* Core GDB cannot deal with us deleting the current
                      thread.  */
-		  if (! ptid_equal (lp->ptid, inferior_ptid))
-		    delete_thread (lp->ptid);
+		  if (lp->pid != inferior_pid)
+		    delete_thread (lp->pid);
 		  printf_unfiltered ("[%s exited]\n",
-				     target_pid_to_str (lp->ptid));
+				     target_pid_to_str (lp->pid));
 		}
 	      if (debug_lin_lwp)
 		fprintf_unfiltered (gdb_stdlog, 
 				    "%s exited.\n", 
-				    target_pid_to_str (lp->ptid));
+				    target_pid_to_str (lp->pid));
 
-	      delete_lwp (lp->ptid);
+	      delete_lwp (lp->pid);
 
 	      /* Make sure there is at least one thread running.  */
 	      gdb_assert (iterate_over_lwps (running_callback, NULL));
@@ -880,15 +753,13 @@
 	      if (debug_lin_lwp)
 		fprintf_unfiltered (gdb_stdlog, 
 				    "Delayed SIGSTOP caught for %s.\n",
-				    target_pid_to_str (lp->ptid));
+				    target_pid_to_str (lp->pid));
 
 	      /* This is a delayed SIGSTOP.  */
 	      lp->signalled = 0;
 
-	      child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step,
-	                    TARGET_SIGNAL_0);
+	      child_resume (GET_LWP (lp->pid), lp->step, TARGET_SIGNAL_0);
 	      lp->stopped = 0;
-	      gdb_assert (lp->resumed);
 
 	      /* Discard the event.  */
 	      status = 0;
@@ -932,12 +803,7 @@
 	  && signal_print_state (signo) == 0
 	  && signal_pass_state (signo) == 1)
 	{
-	  /* FIMXE: kettenis/2001-06-06: Should we resume all threads
-             here?  It is not clear we should.  GDB may not expect
-             other threads to run.  On the other hand, not resuming
-             newly attached threads may cause an unwanted delay in
-             getting them running.  */
-	  child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step, signo);
+	  child_resume (GET_LWP (lp->pid), lp->step, signo);
 	  lp->stopped = 0;
 	  status = 0;
 	  goto retry;
@@ -958,18 +824,18 @@
      process id.  */
 
   if (WIFSTOPPED (status) && WSTOPSIG (status) == SIGTRAP)
-    trap_ptid = (threaded ? lp->ptid : pid_to_ptid (GET_LWP (lp->ptid)));
+    trap_pid = (threaded ? lp->pid : GET_LWP (lp->pid));
   else
-    trap_ptid = null_ptid;
+    trap_pid = 0;
 
   store_waitstatus (ourstatus, status);
-  return (threaded ? lp->ptid : pid_to_ptid (GET_LWP (lp->ptid)));
+  return (threaded ? lp->pid : GET_LWP (lp->pid));
 }
 
 static int
 kill_callback (struct lwp_info *lp, void *data)
 {
-  ptrace (PTRACE_KILL, GET_LWP (lp->ptid), 0, 0);
+  ptrace (PTRACE_KILL, GET_LWP (lp->pid), 0, 0);
   return 0;
 }
 
@@ -985,22 +851,22 @@
   /* For cloned processes we must check both with __WCLONE and
      without, since the exit status of a cloned process isn't reported
      with __WCLONE.  */
-  if (is_cloned (lp->ptid))
+  if (is_cloned (lp->pid))
     {
       do
 	{
-	  pid = waitpid (GET_LWP (lp->ptid), NULL, __WCLONE);
+	  pid = waitpid (GET_LWP (lp->pid), NULL, __WCLONE);
 	}
-      while (pid == GET_LWP (lp->ptid));
+      while (pid == GET_LWP (lp->pid));
 
       gdb_assert (pid == -1 && errno == ECHILD);
     }
 
   do
     {
-      pid = waitpid (GET_LWP (lp->ptid), NULL, 0);
+      pid = waitpid (GET_LWP (lp->pid), NULL, 0);
     }
-  while (pid == GET_LWP (lp->ptid));
+  while (pid == GET_LWP (lp->pid));
 
   gdb_assert (pid == -1 && errno == ECHILD);
   return 0;
@@ -1021,31 +887,46 @@
 static void
 lin_lwp_create_inferior (char *exec_file, char *allargs, char **env)
 {
-  child_ops.to_create_inferior (exec_file, allargs, env);
+  struct target_ops *target_beneath;
+
+  init_lwp_list ();
+
+#if 0
+  target_beneath = find_target_beneath (&lin_lwp_ops);
+#else
+  target_beneath = &child_ops;
+#endif
+  target_beneath->to_create_inferior (exec_file, allargs, env);
 }
 
 static void  
 lin_lwp_mourn_inferior (void)
 {
-  trap_ptid = null_ptid;
+  struct target_ops *target_beneath;
 
-  /* Destroy LWP info; it's no longer valid.  */
   init_lwp_list ();
 
+  trap_pid = 0;
+
   /* Restore the original signal mask.  */
   sigprocmask (SIG_SETMASK, &normal_mask, NULL);
   sigemptyset (&blocked_mask);
 
-  child_ops.to_mourn_inferior ();
+#if 0
+  target_beneath = find_target_beneath (&lin_lwp_ops);
+#else
+  target_beneath = &child_ops;
+#endif
+  target_beneath->to_mourn_inferior ();
 }
 
 static void
 lin_lwp_fetch_registers (int regno)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  if (is_lwp (inferior_ptid))
-    inferior_ptid = pid_to_ptid (GET_LWP (inferior_ptid));
+  if (is_lwp (inferior_pid))
+    inferior_pid = GET_LWP (inferior_pid);
 
   fetch_inferior_registers (regno);
 
@@ -1055,10 +936,10 @@
 static void
 lin_lwp_store_registers (int regno)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  if (is_lwp (inferior_ptid))
-    inferior_ptid = pid_to_ptid (GET_LWP (inferior_ptid));
+  if (is_lwp (inferior_pid))
+    inferior_pid = GET_LWP (inferior_pid);
 
   store_inferior_registers (regno);
 
@@ -1070,11 +951,11 @@
 		     struct mem_attrib *attrib,
 		     struct target_ops *target)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
   int xfer;
 
-  if (is_lwp (inferior_ptid))
-    inferior_ptid = pid_to_ptid (GET_LWP (inferior_ptid));
+  if (is_lwp (inferior_pid))
+    inferior_pid = GET_LWP (inferior_pid);
 
   xfer = child_xfer_memory (memaddr, myaddr, len, write, attrib, target);
 
@@ -1083,12 +964,12 @@
 }
 
 static int
-lin_lwp_thread_alive (ptid_t ptid)
+lin_lwp_thread_alive (int pid)
 {
-  gdb_assert (is_lwp (ptid));
+  gdb_assert (is_lwp (pid));
 
   errno = 0;
-  ptrace (PTRACE_PEEKUSER, GET_LWP (ptid), 0, 0);
+  ptrace (PTRACE_PEEKUSER, GET_LWP (pid), 0, 0);
   if (errno)
     return 0;
 
@@ -1096,17 +977,17 @@
 }
 
 static char *
-lin_lwp_pid_to_str (ptid_t ptid)
+lin_lwp_pid_to_str (int pid)
 {
   static char buf[64];
 
-  if (is_lwp (ptid))
+  if (is_lwp (pid))
     {
-      snprintf (buf, sizeof (buf), "LWP %ld", GET_LWP (ptid));
+      snprintf (buf, sizeof (buf), "LWP %d", GET_LWP (pid));
       return buf;
     }
 
-  return normal_pid_to_str (ptid);
+  return normal_pid_to_str (pid);
 }
 
 static void
diff --git a/gdb/lin-thread.c b/gdb/lin-thread.c
index a14af7b..8c303fd 100644
--- a/gdb/lin-thread.c
+++ b/gdb/lin-thread.c
@@ -125,25 +125,20 @@
 /* Prototypes for supply_gregset etc. */
 #include "gregset.h"
 
-/* Macros for superimposing PID and TID into inferior_ptid.  */
-#define GET_PID(ptid)		ptid_get_pid (ptid)
-#define GET_LWP(ptid)		ptid_get_lwp (ptid)
-#define GET_THREAD(ptid)	ptid_get_tid (ptid)
+#ifndef TIDGET
+#define TIDGET(PID)		(((PID) & 0x7fffffff) >> 16)
+#define PIDGET(PID)		(((PID) & 0xffff))
+#define MERGEPID(PID, TID)	(((PID) & 0xffff) | ((TID) << 16))
+#endif
 
-#define is_lwp(ptid)		(GET_LWP (ptid) != 0)
-#define is_thread(ptid)		(GET_THREAD (ptid) != 0)
-
-#define BUILD_LWP(lwp, pid)	ptid_build (pid, lwp, 0)
-#define BUILD_THREAD(tid, pid)	ptid_build (pid, 0, tid)
-
-/* From linux-thread.c.  FIXME: These should go in a separate header
-   file, but I'm told that the life expectancy of lin-thread.c and
-   linux-thread.c isn't very long... */
-
-extern int linux_child_wait (int, int *, int *);
-extern void check_all_signal_numbers (void);
-extern void linuxthreads_discard_global_state (void);
-extern void attach_thread (int);
+/* Macros for superimposing PID and TID into inferior_pid.  */
+#define THREAD_FLAG		0x80000000
+#define is_thread(ARG)		(((ARG) & THREAD_FLAG) != 0)
+#define is_lwp(ARG)		(((ARG) & THREAD_FLAG) == 0)
+#define GET_LWP(PID)		TIDGET (PID)
+#define GET_THREAD(PID)		TIDGET (PID)
+#define BUILD_LWP(TID, PID)	MERGEPID (PID, TID)
+#define BUILD_THREAD(TID, PID)	(MERGEPID (PID, TID) | THREAD_FLAG)
 
 /*
  * target_beneath is a pointer to the target_ops underlying this one.
@@ -308,6 +303,8 @@
   return rw_common (ph, addr, (char *) buf, size, PS_WRITE);
 }
 
+static struct cleanup *save_inferior_pid    (void);
+static void            restore_inferior_pid (void *saved_pid);
 static char *thr_err_string   (td_err_e);
 static char *thr_state_string (td_thr_state_e);
 
@@ -318,9 +315,10 @@
  * Common proc_service routine for reading and writing memory.  
  */
 
-/* FIXME: once we've munged the inferior_ptid, why can't we
+/* FIXME: once we've munged the inferior_pid, why can't we
    simply call target_read/write_memory and return?  */
 
+
 static ps_err_e
 rw_common (const struct ps_prochandle *ph,
 	   paddr_t addr,
@@ -328,11 +326,11 @@
 	   int     size,
 	   int     write_p)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
   int to_do = size;
   int done  = 0;
 
-  inferior_ptid = pid_to_ptid (main_prochandle.pid);
+  inferior_pid = main_prochandle.pid;
 
   while (to_do > 0)
     {
@@ -355,19 +353,19 @@
 }
 
 /* Cleanup functions used by the register callbacks
-   (which have to manipulate the global inferior_ptid).  */
+   (which have to manipulate the global inferior_pid).  */
 
 ps_err_e
 ps_lgetregs (gdb_ps_prochandle_t ph,		/* Get LWP general regs */
 	     lwpid_t     lwpid,
 	     prgregset_t gregset)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, main_prochandle.pid);
+  inferior_pid = BUILD_LWP (lwpid, main_prochandle.pid);
   current_target.to_fetch_registers (-1);
 
-  fill_gregset ((gdb_gregset_t *) gregset, -1);
+  fill_gregset (gregset, -1);
   do_cleanups (old_chain);
 
   return PS_OK;
@@ -378,10 +376,10 @@
 	     lwpid_t           lwpid,
 	     const prgregset_t gregset)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, main_prochandle.pid);
-  supply_gregset ((gdb_gregset_t *) gregset);
+  inferior_pid = BUILD_LWP (lwpid, main_prochandle.pid);
+  supply_gregset (gregset);
   current_target.to_store_registers (-1);
   do_cleanups (old_chain);
   return PS_OK;
@@ -392,9 +390,9 @@
 	       lwpid_t       lwpid,
 	       gdb_prfpregset_t *fpregset)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, main_prochandle.pid);
+  inferior_pid = BUILD_LWP (lwpid, main_prochandle.pid);
   current_target.to_fetch_registers (-1);
   fill_fpregset (fpregset, -1);
   do_cleanups (old_chain);
@@ -406,9 +404,9 @@
 	       lwpid_t             lwpid,
 	       const gdb_prfpregset_t *fpregset)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, main_prochandle.pid);
+  inferior_pid = BUILD_LWP (lwpid, main_prochandle.pid);
   supply_fpregset (fpregset);
   current_target.to_store_registers (-1);
   do_cleanups (old_chain);
@@ -625,6 +623,52 @@
  * Local utility functions:
  */
 
+
+/*
+
+   LOCAL FUNCTION
+
+   save_inferior_pid - Save inferior_pid on the cleanup list
+   restore_inferior_pid - Restore inferior_pid from the cleanup list
+
+   SYNOPSIS
+
+   struct cleanup *save_inferior_pid (void);
+   void            restore_inferior_pid (void *saved_pid);
+
+   DESCRIPTION
+
+   These two functions act in unison to restore inferior_pid in
+   case of an error.
+
+   NOTES
+
+   inferior_pid is a global variable that needs to be changed by many
+   of these routines before calling functions in procfs.c.  In order
+   to guarantee that inferior_pid gets restored (in case of errors),
+   you need to call save_inferior_pid before changing it.  At the end
+   of the function, you should invoke do_cleanups to restore it.
+
+ */
+
+static struct cleanup *
+save_inferior_pid (void)
+{
+  int *saved_pid_ptr;
+  
+  saved_pid_ptr = xmalloc (sizeof (int));
+  *saved_pid_ptr = inferior_pid;
+  return make_cleanup (restore_inferior_pid, saved_pid_ptr);
+}
+
+static void
+restore_inferior_pid (void *arg)
+{
+  int *saved_pid_ptr = arg;
+  inferior_pid = *saved_pid_ptr;
+  xfree (arg);
+}
+
 /*
 
    LOCAL FUNCTION
@@ -876,10 +920,10 @@
     }
 
   /* Set up the breakpoint. */
-  create_thread_event_breakpoint ((CORE_ADDR) notify.u.bptaddr);
+  create_thread_event_breakpoint (notify.u.bptaddr);
 
   /* Save it's location. */
-  thread_creation_bkpt_address = (CORE_ADDR) notify.u.bptaddr;
+  thread_creation_bkpt_address = notify.u.bptaddr;
 
   /* thread death */
   /* get breakpoint location */
@@ -889,10 +933,10 @@
       return;
     }
   /* Set up the breakpoint. */
-  create_thread_event_breakpoint ((CORE_ADDR) notify.u.bptaddr);
+  create_thread_event_breakpoint (notify.u.bptaddr);
 
   /* Save it's location. */
-  thread_death_bkpt_address = (CORE_ADDR) notify.u.bptaddr;
+  thread_death_bkpt_address = notify.u.bptaddr;
 }
 
 /* This function handles the global parts of disabling thread events.
@@ -925,7 +969,6 @@
 {
   /* FIXME: to be more efficient, we should keep a static 
      list of threads, and update it only here (with td_ta_thr_iter). */
-  return 0;
 }
 
 static void
@@ -1001,7 +1044,7 @@
     goto quit;	/* un-interesting object file */
 
   /* Initialize our "main prochandle" with the main inferior pid.  */
-  main_prochandle.pid = PIDGET (inferior_ptid);
+  main_prochandle.pid = PIDGET (inferior_pid);
 
   /* Now attempt to open a thread_db connection to the 
      thread library running in the child process.  */
@@ -1015,7 +1058,7 @@
     break;	
   case TD_OK:		/* libthread detected in child: we go live now! */
     thread_db_push_target ();
-    event_pid = PIDGET (inferior_ptid);	/* for resume */
+    event_pid = inferior_pid;	/* for resume */
 
     /* Now stop everyone else, and attach any new threads you find.  */
     p_td_ta_thr_iter (main_threadagent, 
@@ -1062,14 +1105,14 @@
  */
 
 static int
-thread_db_alive (ptid_t ptid)
+thread_db_alive (int pid)
 {
-  if (is_thread (ptid))		/* user-space (non-kernel) thread */
+  if (is_thread (pid))		/* user-space (non-kernel) thread */
     {
       td_thrhandle_t th;
       td_err_e ret;
-      int pid = GET_THREAD (ptid);
 
+      pid = GET_THREAD (pid);
       if ((ret = p_td_ta_map_id2thr (main_threadagent, pid, &th)) != TD_OK)
 	return 0;		/* thread not found */
       if ((ret = p_td_thr_validate (&th)) != TD_OK)
@@ -1077,7 +1120,7 @@
       return 1;			/* known thread: return true */
     }
   else if (target_beneath->to_thread_alive)
-    return target_beneath->to_thread_alive (ptid);
+    return target_beneath->to_thread_alive (pid);
   else
     return 0;		/* default to "not alive" (shouldn't happen anyway) */
 }
@@ -1123,17 +1166,17 @@
  */
 
 static char *
-thread_db_pid_to_str (ptid_t ptid)
+thread_db_pid_to_str (int pid)
 {
   static char buf[100];
   td_thrhandle_t th;
   td_thrinfo_t ti;
   td_err_e ret;
 
-  if (is_thread (ptid))
+  if (is_thread (pid))
     {
       if ((ret = p_td_ta_map_id2thr (main_threadagent, 
-				     GET_THREAD (ptid),
+				     GET_THREAD (pid),
 				     &th)) != TD_OK)
 	error ("thread_db: map_id2thr failed: %s", thr_err_string (ret));
 
@@ -1142,14 +1185,14 @@
 
       if (ti.ti_state == TD_THR_ACTIVE &&
 	  ti.ti_lid != 0)
-	sprintf (buf, "Thread %ld (LWP %d)", ti.ti_tid, ti.ti_lid);
+	sprintf (buf, "Thread %d (LWP %d)", ti.ti_tid, ti.ti_lid);
       else
-	sprintf (buf, "Thread %ld (%s)", ti.ti_tid,
+	sprintf (buf, "Thread %d (%s)", ti.ti_tid,
 		 thr_state_string (ti.ti_state));
     }
-  else if (GET_LWP (ptid))
-    sprintf (buf, "LWP %ld", GET_LWP (ptid));
-  else return normal_pid_to_str (ptid);
+  else if (GET_LWP (pid))
+    sprintf (buf, "LWP %d", GET_LWP (pid));
+  else return normal_pid_to_str (pid);
 
   return buf;
 }
@@ -1167,7 +1210,7 @@
 }
 
 /* 
- * xfer_memory has to munge the inferior_ptid before passing the call
+ * xfer_memory has to munge the inferior_pid before passing the call
  * down to the target layer.  
  */
 
@@ -1179,14 +1222,14 @@
   struct cleanup *old_chain;
   int ret;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  if (is_thread (inferior_ptid) ||
-      !target_thread_alive (inferior_ptid))
+  if (is_thread (inferior_pid) ||
+      !target_thread_alive (inferior_pid))
     {
       /* FIXME: use the LID/LWP, so that underlying process layer
 	 can read memory from specific threads?  */
-      inferior_ptid = pid_to_ptid (main_prochandle.pid);
+      inferior_pid = main_prochandle.pid;
     }
 
   ret = target_beneath->to_xfer_memory (memaddr, myaddr, len,
@@ -1196,7 +1239,7 @@
 }
 
 /* 
- * fetch_registers has to determine if inferior_ptid is a user-space thread.
+ * fetch_registers has to determine if inferior_pid is a user-space thread.
  * If so, we use the thread_db API to get the registers.
  * And if not, we call the underlying process stratum.
  */
@@ -1210,15 +1253,15 @@
   thread_t thread;
   td_err_e ret;
 
-  if (!is_thread (inferior_ptid))	/* kernel thread */
+  if (!is_thread (inferior_pid))	/* kernel thread */
     {			/* pass the request on to the target underneath.  */
       target_beneath->to_fetch_registers (regno);
       return;
     }
 
-  /* convert inferior_ptid into a td_thrhandle_t */
+  /* convert inferior_pid into a td_thrhandle_t */
 
-  if ((thread = GET_THREAD (inferior_ptid)) == 0)
+  if ((thread = GET_THREAD (inferior_pid)) == 0)
     error ("fetch_registers:  thread == 0");
 
   if ((ret = p_td_ta_map_id2thr (main_threadagent, thread, &thandle)) != TD_OK)
@@ -1240,13 +1283,13 @@
    because the td routines call ps_lget* which affect the values stored in the
    registers array.  */
 
-  supply_gregset ((gdb_gregset_t *) gregset);
+  supply_gregset (gregset);
   supply_fpregset (&fpregset);
 
 }
 
 /* 
- * store_registers has to determine if inferior_ptid is a user-space thread.
+ * store_registers has to determine if inferior_pid is a user-space thread.
  * If so, we use the thread_db API to get the registers.
  * And if not, we call the underlying process stratum.
  */
@@ -1260,15 +1303,15 @@
   thread_t thread;
   td_err_e ret;
 
-  if (!is_thread (inferior_ptid))	/* Kernel thread: */
+  if (!is_thread (inferior_pid))	/* Kernel thread: */
     {		/* pass the request on to the underlying target vector.  */
       target_beneath->to_store_registers (regno);
       return;
     }
 
-  /* convert inferior_ptid into a td_thrhandle_t */
+  /* convert inferior_pid into a td_thrhandle_t */
 
-  if ((thread = GET_THREAD (inferior_ptid)) == 0)
+  if ((thread = GET_THREAD (inferior_pid)) == 0)
     error ("store_registers: thread == 0");
 
   if ((ret = p_td_ta_map_id2thr (main_threadagent, thread, &thandle)) != TD_OK)
@@ -1292,7 +1335,7 @@
 
     }
 
-  fill_gregset  ((gdb_gregset_t *) gregset, regno);
+  fill_gregset  (gregset, regno);
   fill_fpregset (&fpregset, regno);
 
   if ((ret = p_td_thr_setgregs (&thandle, gregset)) != TD_OK)
@@ -1307,12 +1350,12 @@
 		   int lid,	/* kernel thread id */
 		   int verbose)
 {
-  ptid_t gdb_ptid = BUILD_THREAD (tid, main_prochandle.pid);
+  int gdb_pid = BUILD_THREAD (tid, main_prochandle.pid);
   int wait_pid, wait_status;
 
   if (verbose)
-    printf_filtered ("[New %s]\n", target_pid_to_str (gdb_ptid));
-  add_thread (gdb_ptid);
+    printf_filtered ("[New %s]\n", target_pid_to_str (gdb_pid));
+  add_thread (gdb_pid);
 
   if (lid != main_prochandle.pid)
     {
@@ -1365,7 +1408,7 @@
 static void
 thread_db_find_new_threads (void)
 {
-  if (PIDGET (inferior_ptid) == -1)	/* FIXME: still necessary? */
+  if (inferior_pid == -1)	/* FIXME: still necessary? */
     {
       printf_filtered ("No process.\n");
       return;
@@ -1384,7 +1427,7 @@
 /*
  * Resume all threads, or resume a single thread.
  * If step is true, then single-step the appropriate thread
- * (or single-step inferior_ptid, but continue everyone else).
+ * (or single-step inferior_pid, but continue everyone else).
  * If signo is true, then send that signal to at least one thread.
  */
 
@@ -1424,7 +1467,7 @@
       /* Unconditionally continue the thread with no signal.
 	 Only the event thread will get a signal of any kind.  */
 
-      target_beneath->to_resume (pid_to_ptid (ti.ti_lid), 0, 0);
+      target_beneath->to_resume (ti.ti_lid, 0, 0);
     }
   return 0;
 }
@@ -1437,7 +1480,7 @@
     {
       /* Unconditionally continue the thread with no signal (for now).  */
 
-      target_beneath->to_resume (pid_to_ptid (thread->lid), 0, 0);
+      target_beneath->to_resume (thread->lid, 0, 0);
     }
   return 0;
 }
@@ -1447,29 +1490,29 @@
 static int last_resume_signo;
 
 static void
-thread_db_resume (ptid_t ptid, int step, enum target_signal signo)
+thread_db_resume (int pid, int step, enum target_signal signo)
 {
-  last_resume_pid   = PIDGET (ptid);
+  last_resume_pid   = pid;
   last_resume_step  = step;
   last_resume_signo = signo;
 
   /* resuming a specific pid? */
-  if (PIDGET (ptid) != -1)
+  if (pid != -1)
     {
-      if (is_thread (ptid))
-	ptid = pid_to_ptid (get_lwp_from_thread_id (GET_THREAD (ptid)));
-      else if (GET_LWP (ptid))
-	ptid = pid_to_ptid (GET_LWP (ptid));
+      if (is_thread (pid))
+	pid = get_lwp_from_thread_id (GET_THREAD (pid));
+      else if (GET_LWP (pid))
+	pid = GET_LWP (pid);
     }
 
   /* Apparently the interpretation of 'pid' is dependent on 'step':
      If step is true, then a specific pid means 'step only this pid'.
      But if step is not true, then pid means 'continue ALL pids, but
      give the signal only to this one'.  */
-  if (PIDGET (ptid) != -1 && step)
+  if (pid != -1 && step)
     {
       /* FIXME: is this gonna work in all circumstances? */
-      target_beneath->to_resume (ptid, step, signo);
+      target_beneath->to_resume (pid, step, signo);
     }
   else
     {
@@ -1486,11 +1529,11 @@
       /* now resume event thread, and if necessary also main thread. */
       if (event_pid)
 	{
-	  target_beneath->to_resume (pid_to_ptid (event_pid), step, signo);
+	  target_beneath->to_resume (event_pid, step, signo);
 	}
       if (event_pid != main_prochandle.pid)
 	{
-	  target_beneath->to_resume (pid_to_ptid (main_prochandle.pid), 0, 0);
+	  target_beneath->to_resume (main_prochandle.pid, 0, 0);
 	}
     }
 }
@@ -1503,7 +1546,7 @@
 {
   td_thrinfo_t ti;
   td_err_e     ret;
-  ptid_t      gdb_ptid;
+  int          gdb_pid;
   int on_off = 1;
 
   if ((ret = p_td_thr_get_info (th, &ti)) != TD_OK)
@@ -1516,8 +1559,8 @@
      We build this list anew at every wait event.  */
   insert_thread (ti.ti_tid, ti.ti_lid, ti.ti_state, ti.ti_type);
   /* Now: if we've already seen it, stop it, else add it and attach it.  */
-  gdb_ptid = BUILD_THREAD (ti.ti_tid, main_prochandle.pid);
-  if (!in_thread_list (gdb_ptid))	/* new thread */
+  gdb_pid = BUILD_THREAD (ti.ti_tid, main_prochandle.pid);
+  if (!in_thread_list (gdb_pid))	/* new thread */
     {
       handle_new_thread (ti.ti_tid, ti.ti_lid, 1);
       /* Enable thread events */
@@ -1612,14 +1655,13 @@
 
 	  if (retpid != event_pid &&
 	      signo == SIGTRAP &&
-	      breakpoint_inserted_here_p (read_pc_pid (pid_to_ptid (retpid)) - 
+	      breakpoint_inserted_here_p (read_pc_pid (retpid) - 
 					  DECR_PC_AFTER_BREAK))
 	    {
 	      /* Set the pc to before the trap and DO NOT re-send the signal */
 	      if (DECR_PC_AFTER_BREAK)
-		write_pc_pid (read_pc_pid (pid_to_ptid (retpid)) 
-		                - DECR_PC_AFTER_BREAK,
-			      pid_to_ptid (retpid));
+		write_pc_pid (read_pc_pid (retpid) - DECR_PC_AFTER_BREAK,
+			      retpid);
 	    }
 
 	  /* Since SIGINT gets forwarded to the entire process group
@@ -1634,7 +1676,7 @@
 	    {
 	      wstatus [signo] = 1;
 	    }
-	  child_resume (pid_to_ptid (retpid), 0, TARGET_SIGNAL_0);
+	  child_resume (retpid, 0, TARGET_SIGNAL_0);
 	  continue;
 	}
 
@@ -1690,15 +1732,14 @@
  * user-space thread.  
  */
 
-static ptid_t
-thread_db_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+static int
+thread_db_wait (int pid, struct target_waitstatus *ourstatus)
 {
   td_thrhandle_t thandle;
   td_thrinfo_t ti;
   td_err_e ret;
   lwpid_t lwp;
   int retpid;
-  ptid_t retptid;
   int status;
   int save_errno;
 
@@ -1712,10 +1753,10 @@
 
   /* FIXME: should I do the wait right here inline?  */
 #if 0
-  if (PIDGET (ptid) == -1)
+  if (pid == -1)
     lwp = -1;
   else
-    lwp = get_lwp_from_thread_id (GET_THREAD (ptid));
+    lwp = get_lwp_from_thread_id (GET_THREAD (pid));
 #endif
 
 
@@ -1726,7 +1767,7 @@
      FIXME: do I have any killing to do?
      Can I get this event mistakenly from a thread?  */
   if (ourstatus->kind == TARGET_WAITKIND_EXITED)
-    return pid_to_ptid (retpid);
+    return retpid;
 
   /* OK, we got an event of interest.
      Go stop all threads and look for new ones.
@@ -1768,46 +1809,44 @@
 
   /* If the process layer does not furnish an lwp,
      then perhaps the returned pid IS the lwp... */
-#if 0 /* Always true (if it'd compile...) */
-  if ((lwp = GET_LWP (pid_to_ptid (retpid))) == 0)
-#endif
+  if ((lwp = GET_LWP (retpid)) == 0)
     lwp = retpid;
 
   if ((ret = p_td_ta_map_lwp2thr (main_threadagent, lwp, &thandle)) != TD_OK)
-    return pid_to_ptid (retpid); /* LWP is not mapped onto a user-space thread. */
+    return retpid;	/* LWP is not mapped onto a user-space thread. */
 
   if ((ret = p_td_thr_validate (&thandle)) != TD_OK)
-    return pid_to_ptid (retpid);	/* LWP is not mapped onto a valid thread. */
+    return retpid;	/* LWP is not mapped onto a valid thread. */
 
   if ((ret = p_td_thr_get_info (&thandle, &ti)) != TD_OK)
     {
       warning ("thread_db: thr_get_info failed ('%s')", thr_err_string (ret));
-      return pid_to_ptid (retpid);
+      return retpid;
     }
 
-  retptid = BUILD_THREAD (ti.ti_tid, main_prochandle.pid);
+  retpid = BUILD_THREAD (ti.ti_tid, main_prochandle.pid);
   /* If this is a new user thread, notify GDB about it.  */
-  if (!in_thread_list (retptid))
+  if (!in_thread_list (retpid))
     {
-      printf_filtered ("[New %s]\n", target_pid_to_str (retptid));
-      add_thread (retptid);
+      printf_filtered ("[New %s]\n", target_pid_to_str (retpid));
+      add_thread (retpid);
     }
 
 #if 0
   /* Now detect if this is a thread creation/deletion event: */
   check_for_thread_event (ourstatus, retpid);
 #endif
-  return retptid;
+  return retpid;
 }
 
 /* 
  * kill has to call the underlying kill.
- * FIXME: I'm not sure if it's necessary to check inferior_ptid any more,
- * but we might need to fix inferior_ptid up if it's a user thread.
+ * FIXME: I'm not sure if it's necessary to check inferior_pid any more,
+ * but we might need to fix inferior_pid up if it's a user thread.
  */
 
 static int
-kill_thread_callback (const td_thrhandle_t *th, void *data)
+kill_thread_callback (td_thrhandle_t *th, void *data)
 {
   td_thrinfo_t ti;
   td_err_e     ret;
@@ -1835,7 +1874,7 @@
 
   /* Fixme: 
      For Linux, threads may need to be waited.  */
-  if (! ptid_equal (inferior_ptid, null_ptid))
+  if (inferior_pid != 0)
     {
       /* Go kill the children first.  Save the main thread for last. */
       p_td_ta_thr_iter (main_threadagent, 
@@ -1852,7 +1891,7 @@
 	 detach would not work.  */
       disable_thread_event_reporting (main_threadagent);
 
-      inferior_ptid = pid_to_ptid (main_prochandle.pid);
+      inferior_pid = main_prochandle.pid;
 
       /* 
        * Since both procfs_kill and ptrace_kill call target_mourn, 
@@ -1897,7 +1936,7 @@
  */
 
 static int
-detach_thread_callback (const td_thrhandle_t *th, void *data)
+detach_thread_callback (td_thrhandle_t *th, void *data)
 {
   /* Called once per thread.  */
   td_thrinfo_t ti;
@@ -1930,8 +1969,8 @@
       /* Now cancel any pending SIGTRAPS.  FIXME!  */
 
       /* Call underlying detach method.  FIXME just detach it.  */
-      old_chain = save_inferior_ptid ();
-      inferior_ptid = pid_to_ptid (ti.ti_lid);
+      old_chain = save_inferior_pid ();
+      inferior_pid = ti.ti_lid;
       detach (TARGET_SIGNAL_0);
       do_cleanups (old_chain);
     }
@@ -1960,7 +1999,7 @@
   thread_db_unpush_target ();
 
   /* above call nullifies target_beneath, so don't use that! */
-  inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
+  inferior_pid = PIDGET (inferior_pid);
   target_detach (args, from_tty);
 }
 
diff --git a/gdb/linux-thread.c b/gdb/linux-thread.c
index f93387b..8e73eb2 100644
--- a/gdb/linux-thread.c
+++ b/gdb/linux-thread.c
@@ -205,11 +205,10 @@
 #endif
 /* Check to see if the given thread is alive.  */
 static int
-linuxthreads_thread_alive (ptid_t ptid)
+linuxthreads_thread_alive (int pid)
 {
   errno = 0;
-  return ptrace (PT_READ_U, PIDGET (ptid), (PTRACE_ARG3_TYPE)0, 0) >= 0 
-         || errno == 0;
+  return ptrace (PT_READ_U, pid, (PTRACE_ARG3_TYPE)0, 0) >= 0 || errno == 0;
 }
 
 /* On detach(), find a SIGTRAP status.  If stop is non-zero, find a
@@ -309,7 +308,7 @@
   for (;;)
     {
       /* resume the child every time... */
-      child_resume (pid_to_ptid (pid), 1, TARGET_SIGNAL_0);
+      child_resume (pid, 1, TARGET_SIGNAL_0);
 
       /* loop as long as errno == EINTR:
 	 waitpid syscall may be aborted due to GDB receiving a signal. 
@@ -374,6 +373,26 @@
   return 1;
 }
 
+/* Cleanup stub for save_inferior_pid.  */
+static void
+restore_inferior_pid (void *arg)
+{
+  int *saved_pid_ptr = arg;
+  inferior_pid = *saved_pid_ptr;
+  xfree (arg);
+}
+
+/* Register a cleanup to restore the value of inferior_pid.  */
+static struct cleanup *
+save_inferior_pid (void)
+{
+  int *saved_pid_ptr;
+  
+  saved_pid_ptr = xmalloc (sizeof (int));
+  *saved_pid_ptr = inferior_pid;
+  return make_cleanup (restore_inferior_pid, saved_pid_ptr);
+}
+
 static void
 sigchld_handler (int signo)
 {
@@ -614,10 +633,9 @@
     if (linuxthreads_breakpoint_zombie[j].pid == pid)
       break;
 
-  if (in_thread_list (pid_to_ptid (pid)) 
-      && linuxthreads_thread_alive (pid_to_ptid (pid)))
+  if (in_thread_list (pid) && linuxthreads_thread_alive (pid))
     {
-      CORE_ADDR pc = read_pc_pid (pid_to_ptid (pid));
+      CORE_ADDR pc = read_pc_pid (pid);
       if (linuxthreads_breakpoint_addr == pc - DECR_PC_AFTER_BREAK
 	  && j > linuxthreads_breakpoint_last)
 	{
@@ -633,7 +651,7 @@
 static void
 kill_thread (int pid)
 {
-  if (in_thread_list (pid_to_ptid (pid)))
+  if (in_thread_list (pid))
     {
       ptrace (PT_KILL, pid, (PTRACE_ARG3_TYPE) 0, 0);
     }
@@ -647,17 +665,17 @@
 static void
 resume_thread (int pid)
 {
-  if (pid != PIDGET (inferior_ptid)
-      && in_thread_list (pid_to_ptid (pid))
-      && linuxthreads_thread_alive (pid_to_ptid (pid)))
+  if (pid != inferior_pid
+      && in_thread_list (pid)
+      && linuxthreads_thread_alive (pid))
     {
       if (pid == linuxthreads_step_pid)
 	{
-	  child_resume (pid_to_ptid (pid), 1, linuxthreads_step_signo);
+	  child_resume (pid, 1, linuxthreads_step_signo);
 	}
       else
 	{
-	  child_resume (pid_to_ptid (pid), 0, TARGET_SIGNAL_0);
+	  child_resume (pid, 0, TARGET_SIGNAL_0);
 	}
     }
 }
@@ -666,16 +684,14 @@
 static void
 detach_thread (int pid)
 {
-  ptid_t ptid = pid_to_ptid (pid);
-
-  if (in_thread_list (ptid) && linuxthreads_thread_alive (ptid))
+  if (in_thread_list (pid) && linuxthreads_thread_alive (pid))
     {
       /* Remove pending SIGTRAP and SIGSTOP */
       linuxthreads_find_trap (pid, 1);
 
-      inferior_ptid = ptid;
+      inferior_pid = pid;
       detach (TARGET_SIGNAL_0);
-      inferior_ptid = pid_to_ptid (linuxthreads_manager_pid);
+      inferior_pid = linuxthreads_manager_pid;
     }
 }
 
@@ -691,18 +707,17 @@
 static void
 stop_thread (int pid)
 {
-  if (pid != PIDGET (inferior_ptid))
+  if (pid != inferior_pid)
     {
-      if (in_thread_list (pid_to_ptid (pid)))
+      if (in_thread_list (pid))
 	{
 	  kill (pid, SIGSTOP);
 	}
       else if (ptrace (PT_ATTACH, pid, (PTRACE_ARG3_TYPE) 0, 0) == 0)
 	{
 	  if (!linuxthreads_attach_pending)
-	    printf_filtered ("[New %s]\n",
-	                     target_pid_to_str (pid_to_ptid (pid)));
-	  add_thread (pid_to_ptid (pid));
+	    printf_filtered ("[New %s]\n", target_pid_to_str (pid));
+	  add_thread (pid);
 	  if (linuxthreads_sig_debug.signal)
 	    {
 	      /* After a new thread in glibc 2.1 signals gdb its existence,
@@ -723,7 +738,7 @@
   int status;
   int rpid;
 
-  if (pid != PIDGET (inferior_ptid) && in_thread_list (pid_to_ptid (pid)))
+  if (pid != inferior_pid && in_thread_list (pid))
     {
       /* loop as long as errno == EINTR:
 	 waitpid syscall may be aborted if GDB receives a signal. 
@@ -763,7 +778,7 @@
 	    {
 	      break;
 	    }
-	  if (errno != EINTR && linuxthreads_thread_alive (pid_to_ptid (pid)))
+	  if (errno != EINTR && linuxthreads_thread_alive (pid))
 	    perror_with_name ("wait_thread/waitpid");
 
 	  /* the thread is dead.  */
@@ -790,20 +805,20 @@
     {
       if (linuxthreads_manager)
 	{
-	  if (test_pid > 0 && test_pid != PIDGET (inferior_ptid))
+	  if (test_pid > 0 && test_pid != inferior_pid)
 	    {
-	      old_chain = save_inferior_ptid ();
-	      inferior_ptid = pid_to_ptid (test_pid);
+	      old_chain = save_inferior_pid ();
+	      inferior_pid = test_pid;
 	    }
 	  read_memory (linuxthreads_manager,
 		       (char *)&linuxthreads_manager_pid, sizeof (pid_t));
 	}
       if (linuxthreads_initial)
 	{
-	  if (test_pid > 0 && test_pid != PIDGET (inferior_ptid))
+	  if (test_pid > 0 && test_pid != inferior_pid)
 	    {
-	      old_chain = save_inferior_ptid ();
-	      inferior_ptid = pid_to_ptid (test_pid);
+	      old_chain = save_inferior_pid ();
+	      inferior_pid = test_pid;
 	    }
 	  read_memory(linuxthreads_initial,
 		      (char *)&linuxthreads_initial_pid, sizeof (pid_t));
@@ -813,14 +828,13 @@
   if (linuxthreads_manager_pid != 0)
     {
       if (old_chain == NULL && test_pid > 0 &&
-	  test_pid != PIDGET (inferior_ptid) 
-	  && linuxthreads_thread_alive (pid_to_ptid (test_pid)))
+	  test_pid != inferior_pid && linuxthreads_thread_alive (test_pid))
 	{
-	  old_chain = save_inferior_ptid ();
-	  inferior_ptid = pid_to_ptid (test_pid);
+	  old_chain = save_inferior_pid ();
+	  inferior_pid = test_pid;
 	}
 
-      if (linuxthreads_thread_alive (inferior_ptid))
+      if (linuxthreads_thread_alive (inferior_pid))
 	{
 	  if (test_pid > 0)
 	    {
@@ -830,14 +844,14 @@
 		  stop_thread (linuxthreads_manager_pid);
 		  wait_thread (linuxthreads_manager_pid);
 		}
-	      if (!in_thread_list (pid_to_ptid (test_pid)))
+	      if (!in_thread_list (test_pid))
 	        {
 		  if (!linuxthreads_attach_pending)
 		    printf_filtered ("[New %s]\n",
-				     target_pid_to_str (pid_to_ptid (test_pid)));
-		  add_thread (pid_to_ptid (test_pid));
+				     target_pid_to_str (test_pid));
+		  add_thread (test_pid);
 		  if (linuxthreads_sig_debug.signal
-		      && PIDGET (inferior_ptid) == test_pid)
+		      && inferior_pid == test_pid)
 		    {
 		      /* After a new thread in glibc 2.1 signals gdb its
 			 existence, it suspends itself and wait for
@@ -1019,7 +1033,7 @@
   linuxthreads_breakpoint_zombie = (struct linuxthreads_breakpoint *)
     xmalloc (sizeof (struct linuxthreads_breakpoint) * (linuxthreads_max + 1));
 
-  if (PIDGET (inferior_ptid) != 0 && 
+  if (inferior_pid && 
       !linuxthreads_attach_pending && 
       !using_thread_db)		/* suppressed by thread_db module */
     {
@@ -1027,7 +1041,7 @@
 
       target_write_memory (linuxthreads_debug, (char *)&on, sizeof (on));
       linuxthreads_attach_pending = 1;
-      update_stop_threads (PIDGET (inferior_ptid));
+      update_stop_threads (inferior_pid);
       linuxthreads_attach_pending = 0;
     }
 
@@ -1040,10 +1054,7 @@
    return 1 otherwise 0.
 
    Note that this implementation is potentially redundant now that
-   default_prepare_to_proceed() has been added.
-
-   FIXME This may not support switching threads after Ctrl-C
-   correctly. The default implementation does support this. */
+   default_prepare_to_proceed() has been added.  */
 
 int
 linuxthreads_prepare_to_proceed (int step)
@@ -1051,14 +1062,13 @@
   if (!linuxthreads_max
       || !linuxthreads_manager_pid
       || !linuxthreads_breakpoint_pid
-      || !breakpoint_here_p (
-	    read_pc_pid (pid_to_ptid (linuxthreads_breakpoint_pid))))
+      || !breakpoint_here_p (read_pc_pid (linuxthreads_breakpoint_pid)))
     return 0;
 
   if (step)
     {
       /* Mark the current inferior as single stepping process.  */
-      linuxthreads_step_pid = PIDGET (inferior_ptid);
+      linuxthreads_step_pid = inferior_pid;
     }
 
   linuxthreads_inferior_pid = linuxthreads_breakpoint_pid;
@@ -1068,10 +1078,9 @@
 /* Convert a pid to printable form. */
 
 char *
-linuxthreads_pid_to_str (ptid_t ptid)
+linuxthreads_pid_to_str (int pid)
 {
   static char buf[100];
-  int pid = PIDGET (ptid);
 
   sprintf (buf, "%s %d%s", linuxthreads_max ? "Thread" : "Pid", pid,
 	   (pid == linuxthreads_manager_pid) ? " (manager thread)"
@@ -1130,28 +1139,26 @@
 		continue;
 
 	      pid = linuxthreads_breakpoint_zombie[i].pid;
-	      if (!linuxthreads_thread_alive (pid_to_ptid (pid)))
+	      if (!linuxthreads_thread_alive (pid))
 		continue;
 
-	      if (linuxthreads_breakpoint_zombie[i].pc 
-	           != read_pc_pid (pid_to_ptid (pid)))
+	      if (linuxthreads_breakpoint_zombie[i].pc != read_pc_pid (pid))
 		continue;
 
 	      /* Continue in STEP mode until the thread pc has moved or
 		 until SIGTRAP is found on the same PC.  */
 	      if (linuxthreads_find_trap (pid, 0)
-		  && linuxthreads_breakpoint_zombie[i].pc 
-		       == read_pc_pid (pid_to_ptid (pid)))
+		  && linuxthreads_breakpoint_zombie[i].pc == read_pc_pid (pid))
 		write_pc_pid (linuxthreads_breakpoint_zombie[i].pc
-			      - DECR_PC_AFTER_BREAK, pid_to_ptid (pid));
+			      - DECR_PC_AFTER_BREAK, pid);
 	    }
 
 	  /* Detach thread after thread.  */
-	  inferior_ptid = pid_to_ptid (linuxthreads_manager_pid);
+	  inferior_pid = linuxthreads_manager_pid;
 	  iterate_active_threads (detach_thread, 1);
 
 	  /* Remove pending SIGTRAP and SIGSTOP */
-	  linuxthreads_find_trap (PIDGET (inferior_ptid), 1);
+	  linuxthreads_find_trap (inferior_pid, 1);
 
 	  linuxthreads_wait_last = -1;
 	  WSETSTOP (linuxthreads_exit_status, 0);
@@ -1177,11 +1184,11 @@
    signal activated.  */
 
 static void
-linuxthreads_resume (ptid_t ptid, int step, enum target_signal signo)
+linuxthreads_resume (int pid, int step, enum target_signal signo)
 {
   if (!linuxthreads_max || stop_soon_quietly || linuxthreads_manager_pid == 0)
     {
-      child_ops.to_resume (ptid, step, signo);
+      child_ops.to_resume (pid, step, signo);
     }
   else
     {
@@ -1198,28 +1205,28 @@
 	  struct cleanup *old_chain = NULL;
 	  int i;
 
-	  if (PIDGET (ptid) < 0)
+	  if (pid < 0)
 	    {
-	      linuxthreads_step_pid = step ? PIDGET (inferior_ptid) : 0;
+	      linuxthreads_step_pid = step ? inferior_pid : 0;
 	      linuxthreads_step_signo = signo;
-	      rpid = PIDGET (inferior_ptid);
+	      rpid = inferior_pid;
 	    }
 	  else
-	    rpid = PIDGET (ptid);
+	    rpid = pid;
 
-	  if (PIDGET (ptid) < 0 || !step)
+	  if (pid < 0 || !step)
 	    {
 	      linuxthreads_breakpoints_inserted = 1;
 
 	      /* Walk through linuxthreads array in order to resume threads */
-	      if (PIDGET (ptid) >= 0 && !ptid_equal (inferior_ptid, ptid))
+	      if (pid >= 0 && inferior_pid != pid)
 		{
-		  old_chain = save_inferior_ptid ();
-		  inferior_ptid = ptid;
+		  old_chain = save_inferior_pid ();
+		  inferior_pid = pid;
 		}
 
 	      iterate_active_threads (resume_thread, 0);
-	      if (linuxthreads_manager_pid != PIDGET (inferior_ptid)
+	      if (linuxthreads_manager_pid != inferior_pid
 		  && !linuxthreads_pending_status (linuxthreads_manager_pid))
 		resume_thread (linuxthreads_manager_pid);
 	    }
@@ -1230,8 +1237,7 @@
 	  for (i = 0; i <= linuxthreads_breakpoint_last; i++)
 	    if (linuxthreads_breakpoint_zombie[i].pid == rpid)
 	      {
-		if (linuxthreads_breakpoint_zombie[i].pc 
-		      != read_pc_pid (pid_to_ptid (rpid)))
+		if (linuxthreads_breakpoint_zombie[i].pc != read_pc_pid (rpid))
 		  {
 		    /* The current pc is out of zombie breakpoint.  */
 		    REMOVE_BREAKPOINT_ZOMBIE(i);
@@ -1247,7 +1253,7 @@
       /* [unles it has a wait event pending] */
       if (!linuxthreads_pending_status (rpid))
 	{
-	  child_ops.to_resume (pid_to_ptid (rpid), step, signo);
+	  child_ops.to_resume (rpid, step, signo);
 	}
     }
 }
@@ -1307,15 +1313,14 @@
 /* Wait for any threads to stop.  We may have to convert PID from a thread id
    to a LWP id, and vice versa on the way out.  */
 
-static ptid_t
-linuxthreads_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+static int
+linuxthreads_wait (int pid, struct target_waitstatus *ourstatus)
 {
   int status;
   int rpid;
   int i;
   int last;
   int *wstatus;
-  int pid = PIDGET (ptid);
 
   if (linuxthreads_max && !linuxthreads_breakpoints_inserted)
     wstatus = alloca (LINUXTHREAD_NSIG * sizeof (int));
@@ -1335,7 +1340,7 @@
 	  if (linuxthreads_inferior_pid)
 	    pid = linuxthreads_inferior_pid;
 	  else if (pid < 0)
-	    pid = PIDGET (inferior_ptid);
+	    pid = inferior_pid;
 	  last = rpid = 0;
 	}
       else if (pid < 0 && linuxthreads_wait_last >= 0)
@@ -1378,7 +1383,7 @@
 	      if (WIFEXITED(linuxthreads_exit_status))
 		{
 		  store_waitstatus (ourstatus, linuxthreads_exit_status);
-		  return inferior_ptid;
+		  return inferior_pid;
 		}
 	      else
 		{
@@ -1388,7 +1393,7 @@
 		  /* Claim it exited with unknown signal.  */
 		  ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
 		  ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
-		  return pid_to_ptid (-1);
+		  return -1;
 		}
 	    }
 
@@ -1415,8 +1420,7 @@
 		    linuxthreads_breakpoint_zombie[i].pid = rpid;
 		    linuxthreads_breakpoint_last++;
 		  }
-		linuxthreads_breakpoint_zombie[i].pc 
-		  = read_pc_pid (pid_to_ptid (rpid));
+		linuxthreads_breakpoint_zombie[i].pc = read_pc_pid (rpid);
 		linuxthreads_breakpoint_zombie[i].step = 1;
 	      }
 	    else
@@ -1431,7 +1435,7 @@
 			wstatus[last++] = status;
 		      }
 		  }
-		child_resume (pid_to_ptid (rpid), 1, TARGET_SIGNAL_0);
+		child_resume (rpid, 1, TARGET_SIGNAL_0);
 		continue;
 	      }
 	  if (linuxthreads_inferior_pid)
@@ -1449,12 +1453,11 @@
 		{
 		  if (linuxthreads_step_pid == rpid)
 		    {
-		      child_resume (pid_to_ptid (rpid), 1,
-		                    linuxthreads_step_signo);
+		      child_resume (rpid, 1, linuxthreads_step_signo);
 		    }
 		  else
 		    {
-		      child_resume (pid_to_ptid (rpid), 0, TARGET_SIGNAL_0);
+		      child_resume (rpid, 0, TARGET_SIGNAL_0);
 		    }
 		}
 	      continue;
@@ -1487,8 +1490,7 @@
 	    {
 	      /* There is a potential zombie breakpoint */
 	      if (WIFEXITED(status)
-		  || linuxthreads_breakpoint_zombie[i].pc 
-		       != read_pc_pid (pid_to_ptid (rpid)))
+		  || linuxthreads_breakpoint_zombie[i].pc != read_pc_pid (rpid))
 	        {
 		  /* The current pc is out of zombie breakpoint.  */
 		  REMOVE_BREAKPOINT_ZOMBIE(i);
@@ -1498,14 +1500,14 @@
 	        {
 		  /* This is a real one ==> decrement PC and restart.  */
 		  write_pc_pid (linuxthreads_breakpoint_zombie[i].pc
-				- DECR_PC_AFTER_BREAK, pid_to_ptid (rpid));
+				- DECR_PC_AFTER_BREAK, rpid);
 		  if (linuxthreads_step_pid == rpid)
 		    {
-		      child_resume (pid_to_ptid (rpid), 1, linuxthreads_step_signo);
+		      child_resume (rpid, 1, linuxthreads_step_signo);
 		    }
 		  else
 		    {
-		      child_resume (pid_to_ptid (rpid), 0, TARGET_SIGNAL_0);
+		      child_resume (rpid, 0, TARGET_SIGNAL_0);
 		    }
 		  continue;
 		}
@@ -1516,7 +1518,7 @@
 	    update_stop_threads (rpid);
 
 	}
-      else if (rpid != PIDGET (inferior_ptid))
+      else if (rpid != inferior_pid)
 	continue;
 
       store_waitstatus (ourstatus, status);
@@ -1540,7 +1542,7 @@
       else if (linuxthreads_breakpoint_pid)
 	linuxthreads_breakpoint_pid = 0;
 
-      return pid_to_ptid (rpid);
+      return rpid;
     }
 }
 
@@ -1608,17 +1610,17 @@
   int rpid;
   int status;
 
-  if (PIDGET (inferior_ptid) == 0)
+  if (inferior_pid == 0)
     return;
 
   if (linuxthreads_max && linuxthreads_manager_pid != 0)
     {
       /* Remove all threads status.  */
-      inferior_ptid = pid_to_ptid (linuxthreads_manager_pid);
+      inferior_pid = linuxthreads_manager_pid;
       iterate_active_threads (kill_thread, 1);
     }
 
-  kill_thread (PIDGET (inferior_ptid));
+  kill_thread (inferior_pid);
 
 #if 0
   /* doing_quit_force solves a real problem, but I think a properly
@@ -1637,9 +1639,9 @@
 	      kill_thread (rpid);
 	}
       else
-	while ((rpid = waitpid (PIDGET (inferior_ptid), &status, 0)) > 0)
+	while ((rpid = waitpid (inferior_pid, &status, 0)) > 0)
 	  if (!WIFEXITED(status))
-	    ptrace (PT_KILL, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) 0, 0);
+	    ptrace (PT_KILL, inferior_pid, (PTRACE_ARG3_TYPE) 0, 0);
     }
 #endif
 
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index 9cd1672..28ef6b6 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -287,8 +287,8 @@
       int i;
 
       errno = 0;
-      retval = ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
-                       (PTRACE_ARG3_TYPE) & ec, 0);
+      retval = ptrace (PTRACE_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) & ec,
+		       0);
       if (errno)
 	perror_with_name ("ptrace(PTRACE_GETREGS)");
 
@@ -340,8 +340,8 @@
       int i;
 
       errno = 0;
-      retval = ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
-                       (PTRACE_ARG3_TYPE) & fc, 0);
+      retval = ptrace (PTRACE_GETFPREGS, inferior_pid, (PTRACE_ARG3_TYPE) & fc,
+		       0);
       if (errno)
 	perror_with_name ("ptrace(PTRACE_GETFPREGS)");
 
@@ -396,8 +396,8 @@
 	      8 * REGISTER_RAW_SIZE (O0_REGNUM));
 
       errno = 0;
-      retval = ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
-                       (PTRACE_ARG3_TYPE) & ec, 0);
+      retval = ptrace (PTRACE_SETREGS, inferior_pid, (PTRACE_ARG3_TYPE) & ec,
+		       0);
       if (errno)
 	perror_with_name ("ptrace(PTRACE_SETREGS)");
     }
@@ -444,8 +444,8 @@
 
 /* We read fcontext first so that we can get good values for fq_t... */
       errno = 0;
-      retval = ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
-                       (PTRACE_ARG3_TYPE) & fc, 0);
+      retval = ptrace (PTRACE_GETFPREGS, inferior_pid, (PTRACE_ARG3_TYPE) & fc,
+		       0);
       if (errno)
 	perror_with_name ("ptrace(PTRACE_GETFPREGS)");
 
@@ -455,8 +455,8 @@
       fc.fsr = read_register (FPS_REGNUM);
 
       errno = 0;
-      retval = ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
-                       (PTRACE_ARG3_TYPE) & fc, 0);
+      retval = ptrace (PTRACE_SETFPREGS, inferior_pid, (PTRACE_ARG3_TYPE) & fc,
+		       0);
       if (errno)
 	perror_with_name ("ptrace(PTRACE_SETFPREGS)");
     }
@@ -508,7 +508,7 @@
   else
     reglo = reghi = regno;
 
-  ecp = registers_addr (PIDGET (inferior_ptid));
+  ecp = registers_addr (inferior_pid);
 
   for (regno = reglo; regno <= reghi; regno++)
     {
@@ -524,7 +524,7 @@
 	  unsigned int reg;
 
 	  errno = 0;
-	  reg = ptrace (ptrace_fun, PIDGET (inferior_ptid),
+	  reg = ptrace (ptrace_fun, inferior_pid,
 			(PTRACE_ARG3_TYPE) (ecp + regmap[regno] + i), 0);
 	  if (errno)
 	    perror_with_name ("ptrace(PTRACE_PEEKUSP)");
@@ -539,6 +539,11 @@
    If REGNO is -1, do this for all registers.
    Otherwise, REGNO specifies which register (so we can save time).  */
 
+/* Registers we shouldn't try to store.  */
+#if !defined (CANNOT_STORE_REGISTER)
+#define CANNOT_STORE_REGISTER(regno) 0
+#endif
+
 void
 store_inferior_registers (int regno)
 {
@@ -554,7 +559,7 @@
   else
     reglo = reghi = regno;
 
-  ecp = registers_addr (PIDGET (inferior_ptid));
+  ecp = registers_addr (inferior_pid);
 
   for (regno = reglo; regno <= reghi; regno++)
     {
@@ -574,7 +579,7 @@
 	  reg = *(unsigned int *) &registers[REGISTER_BYTE (regno) + i];
 
 	  errno = 0;
-	  ptrace (ptrace_fun, PIDGET (inferior_ptid),
+	  ptrace (ptrace_fun, inferior_pid,
 		  (PTRACE_ARG3_TYPE) (ecp + regmap[regno] + i), reg);
 	  if (errno)
 	    perror_with_name ("ptrace(PTRACE_POKEUSP)");
@@ -586,13 +591,12 @@
 /* Wait for child to do something.  Return pid of child, or -1 in case
    of error; store status through argument pointer OURSTATUS.  */
 
-ptid_t
-child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+int
+child_wait (int pid, struct target_waitstatus *ourstatus)
 {
   int save_errno;
   int thread;
   union wait status;
-  int pid;
 
   while (1)
     {
@@ -618,7 +622,7 @@
 	  return -1;
 	}
 
-      if (pid != PIDGET (inferior_ptid))	/* Some other process?!? */
+      if (pid != PIDGET (inferior_pid))		/* Some other process?!? */
 	continue;
 
       thread = status.w_tid;	/* Get thread id from status */
@@ -626,27 +630,26 @@
       /* Initial thread value can only be acquired via wait, so we have to
          resort to this hack.  */
 
-      if (TIDGET (inferior_ptid) == 0 && thread != 0)
+      if (TIDGET (inferior_pid) == 0 && thread != 0)
 	{
-	  inferior_ptid = MERGEPID (PIDGET (inferior_ptid), thread);
-	  add_thread (inferior_ptid);
+	  inferior_pid = BUILDPID (inferior_pid, thread);
+	  add_thread (inferior_pid);
 	}
 
-      ptid = BUILDPID (pid, thread);
+      pid = BUILDPID (pid, thread);
 
       /* We've become a single threaded process again.  */
       if (thread == 0)
-	inferior_ptid = ptid;
+	inferior_pid = pid;
 
       /* Check for thread creation.  */
       if (WIFSTOPPED (status)
 	  && WSTOPSIG (status) == SIGTRAP
-	  && !in_thread_list (ptid))
+	  && !in_thread_list (pid))
 	{
 	  int realsig;
 
-	  realsig = ptrace (PTRACE_GETTRACESIG, PIDGET (ptid),
-	                    (PTRACE_ARG3_TYPE) 0, 0);
+	  realsig = ptrace (PTRACE_GETTRACESIG, pid, (PTRACE_ARG3_TYPE) 0, 0);
 
 	  if (realsig == SIGNEWTHREAD)
 	    {
@@ -654,7 +657,7 @@
 	         realsig -- the code in wait_for_inferior expects SIGTRAP. */
 	      ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
 	      ourstatus->value.sig = TARGET_SIGNAL_0;
-	      return ptid;
+	      return pid;
 	    }
 	  else
 	    error ("Signal for unknown thread was not SIGNEWTHREAD");
@@ -663,16 +666,15 @@
       /* Check for thread termination.  */
       else if (WIFSTOPPED (status)
 	       && WSTOPSIG (status) == SIGTRAP
-	       && in_thread_list (ptid))
+	       && in_thread_list (pid))
 	{
 	  int realsig;
 
-	  realsig = ptrace (PTRACE_GETTRACESIG, PIDGET (ptid),
-	                    (PTRACE_ARG3_TYPE) 0, 0);
+	  realsig = ptrace (PTRACE_GETTRACESIG, pid, (PTRACE_ARG3_TYPE) 0, 0);
 
 	  if (realsig == SIGTHREADEXIT)
 	    {
-	      ptrace (PTRACE_CONT, PIDGET (ptid), (PTRACE_ARG3_TYPE) 0, 0);
+	      ptrace (PTRACE_CONT, PIDGET (pid), (PTRACE_ARG3_TYPE) 0, 0);
 	      continue;
 	    }
 	}
@@ -703,16 +705,14 @@
       store_waitstatus (ourstatus, status.w_status);
 #endif
 
-      return ptid;
+      return pid;
     }
 }
 
 /* Return nonzero if the given thread is still alive.  */
 int
-child_thread_alive (ptid_t ptid)
+child_thread_alive (int pid)
 {
-  int pid = PIDGET (ptid);
-
   /* Arggh.  Apparently pthread_kill only works for threads within
      the process that calls pthread_kill.
 
@@ -730,10 +730,9 @@
    If SIGNAL is nonzero, give it that signal.  */
 
 void
-child_resume (ptid_t ptid, int step, enum target_signal signal)
+child_resume (int pid, int step, enum target_signal signal)
 {
   int func;
-  int pid = PIDGET (ptid);
 
   errno = 0;
 
@@ -741,7 +740,7 @@
      we only want to step/continue a single thread.  */
   if (pid == -1)
     {
-      pid = PIDGET (inferior_ptid);
+      pid = inferior_pid;
       func = step ? PTRACE_SINGLESTEP : PTRACE_CONT;
     }
   else
@@ -767,11 +766,11 @@
    buffer.  */
 
 char *
-child_pid_to_str (ptid_t ptid)
+child_pid_to_str (int pid)
 {
   static char buf[40];
 
-  sprintf (buf, "process %d thread %d", PIDGET (ptid), TIDGET (ptid));
+  sprintf (buf, "process %d thread %d", PIDGET (pid), TIDGET (pid));
 
   return buf;
 }
diff --git a/gdb/m3-nat.c b/gdb/m3-nat.c
index d01e22c..3ff9835 100644
--- a/gdb/m3-nat.c
+++ b/gdb/m3-nat.c
@@ -1232,10 +1232,10 @@
 
    There is no other way to exit this loop.
 
-   Returns the inferior_ptid for rest of gdb.
+   Returns the inferior_pid for rest of gdb.
    Side effects: Set *OURSTATUS.  */
-ptid_t
-mach_really_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+int
+mach_really_wait (int pid, struct target_waitstatus *ourstatus)
 {
   kern_return_t ret;
   int w;
@@ -1311,7 +1311,7 @@
 		    }
 		}
 	      store_waitstatus (ourstatus, w);
-	      return inferior_ptid;
+	      return inferior_pid;
 	    }
 	}
 
@@ -1346,7 +1346,7 @@
 	  mach3_exception_actions (&w, FALSE, "Task");
 
 	  store_waitstatus (ourstatus, w);
-	  return inferior_ptid;
+	  return inferior_pid;
 	}
     }
 }
@@ -1575,9 +1575,6 @@
  *
  * Note that this implementation is potentially redundant now that
  * default_prepare_to_proceed() has been added.  
- *
- * FIXME This may not support switching threads after Ctrl-C
- * correctly. The default implementation does support this.
  */
 
 mach3_prepare_to_proceed (int select_it)
@@ -3818,14 +3815,14 @@
 {
   WAITTYPE w;
 
-  if (PIDGET (inferior_ptid) == 0 || PIDGET (inferior_ptid) == 1)
+  if (inferior_pid == 0 || inferior_pid == 1)
     return;
 
   /* kill() it, since the Unix server does not otherwise notice when
    * killed with task_terminate().
    */
-  if (PIDGET (inferior_ptid) > 0)
-    kill (PIDGET (inferior_ptid), SIGKILL);
+  if (inferior_pid > 0)
+    kill (inferior_pid, SIGKILL);
 
   /* It's propably terminate already */
   (void) task_terminate (inferior_task);
@@ -3887,7 +3884,7 @@
    If SIGNAL is nonzero, give it that signal.  */
 
 void
-m3_resume (ptid_t ptid, int step, enum target_signal signal)
+m3_resume (int pid, int step, enum target_signal signal)
 {
   kern_return_t ret;
 
@@ -3916,8 +3913,8 @@
 
   vm_read_cache_valid = FALSE;
 
-  if (signal && PIDGET (inferior_ptid) > 0)	/* Do not signal, if attached by MID */
-    kill (PIDGET (inferior_ptid), target_signal_to_host (signal));
+  if (signal && inferior_pid > 0)	/* Do not signal, if attached by MID */
+    kill (inferior_pid, target_signal_to_host (signal));
 
   if (step)
     {
@@ -4017,10 +4014,10 @@
     {
       mid_attach (-(pid));
 
-      /* inferior_ptid will be NEGATIVE! */
-      inferior_ptid = pid_to_ptid (pid);
+      /* inferior_pid will be NEGATIVE! */
+      inferior_pid = pid;
 
-      return PIDGET (inferior_ptid);
+      return inferior_pid;
     }
 
   inferior_task = task_by_pid (pid);
@@ -4029,9 +4026,9 @@
 
   task_attach (inferior_task);
 
-  inferior_ptid = pid_to_ptid (pid);
+  inferior_pid = pid;
 
-  return PIDGET (inferior_ptid);
+  return inferior_pid;
 }
 
 /* Attach to process PID, then initialize for debugging it
@@ -4056,17 +4053,15 @@
       exec_file = (char *) get_exec_file (0);
 
       if (exec_file)
-	printf_unfiltered ("Attaching to program `%s', %s\n", exec_file,
-	                   target_pid_to_str (pid_to_ptid (pid)));
+	printf_unfiltered ("Attaching to program `%s', %s\n", exec_file, target_pid_to_str (pid));
       else
-	printf_unfiltered ("Attaching to %s\n",
-	                   target_pid_to_str (pid_to_ptid (pid)));
+	printf_unfiltered ("Attaching to %s\n", target_pid_to_str (pid));
 
       gdb_flush (gdb_stdout);
     }
 
-  m3_do_attach (pid_to_ptid (pid));
-  inferior_ptid = pid_to_ptid (pid);
+  m3_do_attach (pid);
+  inferior_pid = pid;
   push_target (&m3_ops);
 }
 
@@ -4154,8 +4149,8 @@
   if (remove_breakpoints ())
     warning ("Could not remove breakpoints when detaching");
 
-  if (signal && PIDGET (inferior_ptid) > 0)
-    kill (PIDGET (inferior_ptid), signal);
+  if (signal && inferior_pid > 0)
+    kill (inferior_pid, signal);
 
   /* the task might be dead by now */
   (void) task_resume (inferior_task);
@@ -4184,14 +4179,14 @@
       if (exec_file == 0)
 	exec_file = "";
       printf_unfiltered ("Detaching from program: %s %s\n",
-			 exec_file, target_pid_to_str (inferior_ptid));
+			 exec_file, target_pid_to_str (inferior_pid));
       gdb_flush (gdb_stdout);
     }
   if (args)
     siggnal = atoi (args);
 
   m3_do_detach (siggnal);
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
   unpush_target (&m3_ops);	/* Pop out of handling an inferior */
 }
 #endif /* ATTACH_DETACH */
@@ -4217,7 +4212,7 @@
 {
   /* FIXME: should print MID and all that crap.  */
   printf_unfiltered ("\tUsing the running image of %s %s.\n",
-      attach_flag ? "attached" : "child", target_pid_to_str (inferior_ptid));
+      attach_flag ? "attached" : "child", target_pid_to_str (inferior_pid));
 }
 
 static void
@@ -4463,7 +4458,7 @@
   m3_ops.to_attach = m3_attach;
   m3_ops.to_detach = m3_detach;
   m3_ops.to_resume = m3_resume;
-  m3_ops.to_wait = mach_really_wait;
+  m3_ops.to_wait = mach_really__wait;
   m3_ops.to_fetch_registers = fetch_inferior_registers;
   m3_ops.to_store_registers = store_inferior_registers;
   m3_ops.to_prepare_to_store = m3_prepare_to_store;
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c
index b4bfefd..c95b16e5 100644
--- a/gdb/m32r-rom.c
+++ b/gdb/m32r-rom.c
@@ -42,6 +42,7 @@
 
 extern void report_transfer_performance (unsigned long, time_t, time_t);
 
+#ifndef _MSC_VER
 /*
  * All this stuff just to get my host computer's IP address!
  */
@@ -51,6 +52,7 @@
 #if 1
 #include <arpa/inet.h>		/* for inet_ntoa */
 #endif
+#endif
 
 static char *board_addr;	/* user-settable IP address for M32R-EVA */
 static char *server_addr;	/* user-settable IP address for gdb host */
@@ -108,6 +110,7 @@
 static void
 m32r_load (char *filename, int from_tty)
 {
+  extern int inferior_pid;
   bfd *abfd;
   asection *s;
   unsigned int i, data_count = 0;
@@ -163,7 +166,7 @@
   if (exec_bfd)
     write_pc (bfd_get_start_address (exec_bfd));
 
-  inferior_ptid = null_ptid;	/* No process now */
+  inferior_pid = 0;		/* No process now */
 
   /* This is necessary because many things were based on the PC at the
      time that we attached to the monitor, which is no longer valid
@@ -390,6 +393,8 @@
   monitor_open (args, &mon2000_cmds, from_tty);
 }
 
+#ifndef _MSC_VER
+
 /* Function: set_board_address
    Tell the BootOne monitor what it's ethernet IP address is. */
 
@@ -453,6 +458,7 @@
   bfd *abfd;
   asection *s;
   time_t start_time, end_time;	/* for timing of download */
+  extern int inferior_pid;
   int resp_len, data_count = 0;
   char buf[1024];
   struct hostent *hostent;
@@ -559,7 +565,7 @@
       report_transfer_performance (data_count, start_time, end_time);
       printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
     }
-  inferior_ptid = null_ptid;	/* No process now */
+  inferior_pid = 0;		/* No process now */
 
   /* This is necessary because many things were based on the PC at the
      time that we attached to the monitor, which is no longer valid
@@ -571,6 +577,8 @@
   clear_symtab_users ();
 }
 
+#endif /* ! _MSC_VER */
+
 void
 _initialize_m32r_rom (void)
 {
@@ -598,6 +606,7 @@
   mon2000_ops.to_open = mon2000_open;
   add_target (&mon2000_ops);
 
+#ifndef _MSC_VER
   add_show_from_set
     (add_set_cmd ("download-path", class_obscure, var_string,
 		  (char *) &download_path,
@@ -623,4 +632,5 @@
       "Upload the srec file via the monitor's Ethernet upload capability.");
 
   add_com ("tload", class_obscure, m32r_load, "test upload command.");
+#endif
 }
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 863dc90..a636b34 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -334,7 +334,7 @@
                           read_memory_integer (frame->saved_regs[regnum], 2));
 
       write_register (HARD_PC_REGNUM, frame->extra_info->return_pc);
-      sp = (fp + frame->extra_info->size + 2) & 0x0ffff;
+      sp = fp + frame->extra_info->size;
       write_register (HARD_SP_REGNUM, sp);
     }
   flush_cached_frames ();
@@ -489,12 +489,10 @@
                   v = read_memory_unsigned_integer (*pc + j + 1, 1);
                   if (buffer[j] & 1)
                     v |= 0xff00;
-                  *pc = *pc + 1;
                 }
               else if (buffer[j] == 0xf2)
                 {
                   v = read_memory_unsigned_integer (*pc + j + 1, 2);
-                  *pc = *pc + 2;
                 }
               cur_val = v;
               break;
@@ -589,7 +587,7 @@
   func_end = pc + 128;
   found_frame_point = 0;
   *frame_offset = 0;
-  save_addr = fp + STACK_CORRECTION;
+  save_addr = fp;
   while (!done && pc + 2 < func_end)
     {
       struct insn_sequence *seq;
diff --git a/gdb/m68knbsd-nat.c b/gdb/m68knbsd-nat.c
index ec986ee..8612b96 100644
--- a/gdb/m68knbsd-nat.c
+++ b/gdb/m68knbsd-nat.c
@@ -34,12 +34,12 @@
   struct reg inferior_registers;
   struct fpreg inferior_fp_registers;
 
-  ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PT_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers, 0);
   memcpy (&registers[REGISTER_BYTE (0)], &inferior_registers,
 	  sizeof (inferior_registers));
 
-  ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+  ptrace (PT_GETFPREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
   memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
 	  sizeof (inferior_fp_registers));
@@ -55,12 +55,12 @@
 
   memcpy (&inferior_registers, &registers[REGISTER_BYTE (0)],
 	  sizeof (inferior_registers));
-  ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+  ptrace (PT_SETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers, 0);
 
   memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
 	  sizeof (inferior_fp_registers));
-  ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+  ptrace (PT_SETFPREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
 }
 
diff --git a/gdb/m88k-nat.c b/gdb/m88k-nat.c
index b631cda..dca0c9b 100644
--- a/gdb/m88k-nat.c
+++ b/gdb/m88k-nat.c
@@ -76,7 +76,7 @@
   offset = (char *) &u.pt_r0 - (char *) &u;
   regaddr = offset;		/* byte offset to r0; */
 
-/*  offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
+/*  offset = ptrace (3, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
   for (regno = 0; regno < NUM_REGS; regno++)
     {
       /*regaddr = register_addr (regno, offset); */
@@ -84,20 +84,20 @@
 
       for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
 	{
-	  *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
+	  *(int *) &buf[i] = ptrace (3, inferior_pid,
 				     (PTRACE_ARG3_TYPE) regaddr, 0);
 	  regaddr += sizeof (int);
 	}
       supply_register (regno, buf);
     }
   /* now load up registers 36 - 38; special pc registers */
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+  *(int *) &buf[0] = ptrace (3, inferior_pid,
 			     (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
   supply_register (SXIP_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+  *(int *) &buf[0] = ptrace (3, inferior_pid,
 			     (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
   supply_register (SNIP_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+  *(int *) &buf[0] = ptrace (3, inferior_pid,
 			     (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
   supply_register (SFIP_REGNUM, buf);
 }
@@ -128,7 +128,7 @@
 	{
 	  regaddr = offset + regno * sizeof (int);
 	  errno = 0;
-	  ptrace (6, PIDGET (inferior_ptid),
+	  ptrace (6, inferior_pid,
 		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
 	  if (errno != 0)
 	    {
@@ -137,13 +137,13 @@
 	    }
 	}
       else if (regno == SXIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
+	ptrace (6, inferior_pid,
 		(PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
       else if (regno == SNIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
+	ptrace (6, inferior_pid,
 		(PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
       else if (regno == SFIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
+	ptrace (6, inferior_pid,
 		(PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
       else
 	printf_unfiltered ("Bad register number for store_inferior routine\n");
@@ -155,7 +155,7 @@
 	  /*      regaddr = register_addr (regno, offset); */
 	  errno = 0;
 	  regaddr = offset + regno * sizeof (int);
-	  ptrace (6, PIDGET (inferior_ptid),
+	  ptrace (6, inferior_pid,
 		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
 	  if (errno != 0)
 	    {
@@ -163,11 +163,11 @@
 	      perror_with_name (buf);
 	    }
 	}
-      ptrace (6, PIDGET (inferior_ptid),
+      ptrace (6, inferior_pid,
 	      (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
-      ptrace (6, PIDGET (inferior_ptid),
+      ptrace (6, inferior_pid,
 	      (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
-      ptrace (6, PIDGET (inferior_ptid),
+      ptrace (6, inferior_pid,
 	      (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
     }
 }
diff --git a/gdb/mac-nat.c b/gdb/mac-nat.c
index 22f5e01..23da860 100644
--- a/gdb/mac-nat.c
+++ b/gdb/mac-nat.c
@@ -78,8 +78,8 @@
     }
 }
 
-static ptid_t
-child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+static int
+child_wait (int pid, struct target_waitstatus *ourstatus)
 {
 }
 
@@ -116,16 +116,15 @@
 
 	  if (exec_file)
 	    printf_unfiltered ("Attaching to program `%s', %s\n", exec_file,
-			       target_pid_to_str (pid_to_ptid (pid)));
+			       target_pid_to_str (pid));
 	  else
-	    printf_unfiltered ("Attaching to %s\n",
-	                       target_pid_to_str (pid_to_ptid (pid)));
+	    printf_unfiltered ("Attaching to %s\n", target_pid_to_str (pid));
 
 	  gdb_flush (gdb_stdout);
 	}
       /* Do we need to do anything special? */
       attach_flag = 1;
-      inferior_ptid = pid_to_ptid (pid);
+      inferior_pid = pid;
       push_target (&child_ops);
     }
 }
@@ -141,10 +140,10 @@
       if (exec_file == 0)
 	exec_file = "";
       printf_unfiltered ("Detaching from program: %s %s\n", exec_file,
-			 target_pid_to_str (inferior_ptid));
+			 target_pid_to_str (inferior_pid));
       gdb_flush (gdb_stdout);
     }
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
   unpush_target (&child_ops);
 }
 
@@ -154,7 +153,7 @@
 child_files_info (struct target_ops *ignore)
 {
   printf_unfiltered ("\tUsing the running image of %s %s.\n",
-      attach_flag ? "attached" : "child", target_pid_to_str (inferior_ptid));
+      attach_flag ? "attached" : "child", target_pid_to_str (inferior_pid));
 }
 
 /* ARGSUSED */
@@ -164,7 +163,7 @@
   error ("Use the \"run\" command to start a Mac application.");
 }
 
-/* Start an inferior Mac program and sets inferior_ptid to its pid.
+/* Start an inferior Mac program and sets inferior_pid to its pid.
    EXEC_FILE is the file to run.
    ALLARGS is a string containing the arguments to the program.
    ENV is the environment vector to pass.  Errors reported with error().  */
@@ -203,7 +202,7 @@
       error ("Error launching %s, code %d\n", exec_file, launch_err);
     }
 
-  inferior_ptid = pid_to_ptid (launchparms.launchProcessSN.lowLongOfPSN);
+  inferior_pid = launchparms.launchProcessSN.lowLongOfPSN;
   /* FIXME be sure that high long of PSN is 0 */
 
   push_target (&child_ops);
@@ -252,7 +251,7 @@
 }
 
 void
-child_resume (ptid_t ptid, int step, enum target_signal signal)
+child_resume (int pid, int step, enum target_signal signal)
 {
 }
 
diff --git a/gdb/main.c b/gdb/main.c
index f7aa518..ceac132 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -90,6 +90,10 @@
 extern int enable_external_editor;
 extern char *external_editor_command;
 
+#ifdef __CYGWIN__
+#include <sys/cygwin.h>		/* for cygwin32_conv_to_posix_path */
+#endif
+
 /* Call command_loop.  If it happens to return, pass that through as a
    non-zero return status. */
 
@@ -530,7 +534,21 @@
      *before* all the command line arguments are processed; it sets
      global parameters, which are independent of what file you are
      debugging or what directory you are in.  */
+#ifdef __CYGWIN__
+  {
+    char *tmp = getenv ("HOME");
+
+    if (tmp != NULL)
+      {
+	homedir = (char *) alloca (PATH_MAX + 1);
+	cygwin32_conv_to_posix_path (tmp, homedir);
+      }
+    else
+      homedir = NULL;
+  }
+#else
   homedir = getenv ("HOME");
+#endif
   if (homedir)
     {
       homeinit = (char *) alloca (strlen (homedir) +
@@ -688,6 +706,13 @@
 #endif
     }
 
+  /* The default command loop. 
+     The WIN32 Gui calls this main to set up gdb's state, and 
+     has its own command loop. */
+#if !defined _WIN32 || defined __GNUC__
+  /* GUIs generally have their own command loop, mainloop, or
+     whatever.  This is a good place to gain control because many
+     error conditions will end up here via longjmp(). */
 #if 0
   /* FIXME: cagney/1999-11-06: The original main loop was like: */
   while (1)
@@ -723,6 +748,7 @@
     {
       catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL);
     }
+#endif
   /* No exit -- exit is through quit_command.  */
 }
 
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index aab357e..401a09e 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -378,7 +378,7 @@
 
 static void sort_blocks (struct symtab *);
 
-static int compare_blocks (const PTR, const PTR);
+static int compare_blocks (const void *, const void *);
 
 static struct partial_symtab *new_psymtab (char *, struct objfile *);
 
diff --git a/gdb/memattr.c b/gdb/memattr.c
index 8e934e7..b1b4a78 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -1,23 +1,4 @@
-/* Memory attributes support, for GDB.
-   Copyright 2001 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.  */
-
+/* memattr.c */
 #include "defs.h"
 #include "command.h"
 #include "gdbcmd.h"
@@ -71,7 +52,6 @@
 	  printf_unfiltered ("overlapping memory region\n");
 	  return NULL;
 	}
-      n = n->next;
     }
 
   new = xmalloc (sizeof (struct mem_region));
diff --git a/gdb/memattr.h b/gdb/memattr.h
index 6796b71..75b5f78 100644
--- a/gdb/memattr.h
+++ b/gdb/memattr.h
@@ -1,23 +1,4 @@
-/* Memory attributes support, for GDB.
-   Copyright 2001 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.  */
-
+/* memattr.h */
 #ifndef MEMATTR_H
 #define MEMATTR_H
 
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index ab49319..1c8aa78 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,190 +1,3 @@
-2001-07-04  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c (mi_ui_out_impl): Initialize is_mi_like_p to one.
-
-2001-06-27  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c (mi_table_begin): Include nr_cols and nr_rows in mi1
-	table output.
-	* mi-out.c (mi_table_begin): Only suppress output when mi0. Change
-	the header to a list.
-	(mi_table_body): For mi1, close the header list and open a table
-	body list.
-	(mi_table_end): For mi1, close the body list.
-	(mi_table_header): For mi1, output a tuple containing all the
-	header information.
-	(mi_open, mi_close): Reverse logic of mi_version test.
-	* gdbmi.texinfo (GDB/MI Breakpoint Table Commands): Update.
-
-2001-06-26  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbmi.texinfo (GDB/MI Output Syntax): Delete reference to query
-	packet.
-
-2001-06-26  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-cmd-stack.c (list_args_or_locals): Output a list of "args" or
-	"locals" entries.
-	* gdbmi.texinfo (stack-list-locals, stack-list-arguments)
-	(exec-interrupt, target-select, thread-select): Update
-	documentation.
-
-2001-06-26  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-cmd-stack.c (mi_cmd_stack_list_frames): Output a list of
-	"stack" entries.
-	(mi_cmd_stack_list_args): Ditto for "stack-args".
-	* gdbmi.texinfo (stack-list-frames, stack-list-arguments): Update
-	documentation.
-	(GDB/MI Stack Manipulation Commands): Fix section title.  Was
-	Stack Manipulation Commands in GDB/MI.
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbmi.texinfo: Update output examples that contain stop reason
-	output, change the args=.... to a list.
-	(exec-return): Ditto.
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-main.c (mi_cmd_data_read_memory): Output the memory contents
-	- memory and data - as a list.
-	* gdbmi.texinfo (data-read-memory): Update documentation.
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-main.c (mi_cmd_data_list_register_values): Output a list of
-	register values.
-	* gdbmi.texinfo (data-list-register-values): Update documentation.
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-main.c (mi_cmd_data_list_register_names): Output a list of
-	register names.
-	(mi_cmd_data_list_register_names): Include the pseudo registers.
-	(mi_cmd_data_list_register_names): Don't leave holes in the list,
-	output "" for NULL registers.
-	* gdbmi.texinfo (data-list-register-names): Update documentation.
-
-2001-06-23  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-main.c (mi_cmd_data_list_changed_registers): Output a list of
-	register numbers.
-	* gdbmi.texinfo (data-list-changed-registers): Update
-	documentation.
-	
-2001-06-23  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbmi.texinfo (data-disassemble): Update documentation of
-	output.  Produces a list of instructions and a list of source
-	lines.
-
-2001-06-22  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-cmd-disas.c (mi_cmd_disassemble): For "-data-disassemble",
-	output a list instead of a tupple.
-
-2001-06-21  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c (struct ui_out_data): Replace field first_header with
-	suppress_output.
-	(mi_begin, mi_end): Check suppress_header.
-	(mi_field_int, mi_field_skip): Ditto.
-	(mi_field_string, mi_field_fmt): Ditto.
-	(mi_table_begin): When nr_rows is zero, set suppress_header else,
-	output the start of the header.
-	(mi_table_body): Clear suppress header.
-
-2001-06-21  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c (mi_open): For lists, when mi_version > 0, use ``[''.
-	(mi_close): Ditto for ``]''.
-
-2001-06-20  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c (mi_table_header): Add parameter ``col_name''.
-
-2001-06-18  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c: Include "gdb_assert.h".
-	(mi_table_begin): Add parameter ``nr_rows''.
-
-2001-06-18  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-main.c: Use strncmp as the "mi" test.  Allow "mi", "mi0" and
-	"mi1".
-	(mi_command_loop): Add parameter mi_version, pass to mi_out_new.
-	(mi1_command_loop, mi0_command_loop): New functions.
-	(_initialize_mi_main): Recognize "mi", "mi0" and "mi1".
-	* mi-out.c (mi_out_new): Add parameter mi_version.
-	(struct ui_out_data): Add field mi_version.
-	* mi-out.h (mi_out_new): Update.
-
-2001-06-07  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbmi.texinfo (GDB/MI Output Syntax): Add tuples and lists to
-	syntax.
-	(GDB/MI Draft Changes to Output Syntax): Delete section.
-	
-Mon Jun 11 17:22:25 2001  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* mi-out.c: Fix typo. s/supress/suppress/.
-
-2001-06-09  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c (mi_table_end, mi_table_begin, mi_begin, mi_end): Move
-	supress_field_separator updates from here.
-	(mi_open, mi_close): To here.
-	(mi_open): Add parameter name. Output a field_separator.
-	(mi_table_begin): Update.
-	(mi_table_header): Update.
-	(mi_begin): Update.
-
-2001-06-09  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c (mi_table_begin): Make char* parameters constant.
-	(mi_table_header): Ditto.
-	(mi_field_int): Ditto.
-	(mi_field_skip): Ditto.
-	(mi_field_string): Ditto.
-	(mi_field_fmt): Ditto.
-	(mi_text): Ditto.
-	(mi_message): Ditto.
-
-2001-05-12  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c (mi_close, mi_open): Output ``[]'' when a list.
-
-Fri May 11 13:55:07 2001  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* mi-cmd-var.c: Replace ui_out_list_begin, ui_out_list_end and
- 	make_cleanup_ui_out_list_end with ui_out_tupple_begin,
- 	ui_out_tupple_end and make_cleanup_ui_out_tupple_begin_end.
-	* mi-cmd-stack.c: Ditto.
-	* mi-cmd-disas.c: Ditto.
-	* mi-main.c: Ditto.
-
-2001-05-10  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c (mi_open, mi_close): Replace list_open and list_close.
-	(mi_table_begin): Update.
-	(mi_table_header): Update.
-	(mi_begin): Update.
-	(mi_table_body): Update.
-	(mi_table_end): Update.
-	(mi_end): Update.
-
-Thu May 10 16:28:13 2001  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* mi-main.c (mi_execute_async_cli_command): Always initialize
- 	old_cleanups.
-
-2001-05-08  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-out.c (mi_begin, mi_end): Replace mi_list_begin and
-	mi_list_end.
-	(mi_ui_out_impl): Update.
-
 2001-03-28  Andrew Cagney  <ac131313@redhat.com>
 
 	* mi-main.c (mi_cmd_data_read_memory): Use xcalloc.
diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo
index ae69649..985ac71 100644
--- a/gdb/mi/gdbmi.texinfo
+++ b/gdb/mi/gdbmi.texinfo
@@ -117,6 +117,7 @@
 * GDB/MI Thread Commands::
 * GDB/MI Tracepoint Commands::
 * GDB/MI Variable Objects::
+* GDB/MI Draft Changes to Output Syntax::
 @end menu
 
 @c When these are implemented, they should be moved to be between Misc and
@@ -256,24 +257,14 @@
 depending on the needs---this is still in development).
 
 @item @var{result} @expansion{}
-@code{ @var{variable} "=" @var{value}}
-
-@item @var{variable} @expansion{}
-@code{ @var{string} }
+@code{[ @var{string} "=" ] @var{value}}
 
 @item @var{value} @expansion{}
-@code{ @var{const} | @var{tuple} | @var{list} }
+@code{@var{const} | "@{" @var{result} ( "," @var{result} )* "@}"}
 
 @item @var{const} @expansion{}
 @code{@var{c-string}}
 
-@item @var{tuple} @expansion{}
-@code{ "@{@}" | "@{" @var{result} ( "," @var{result} )* "@}" }
-
-@item @var{list} @expansion{}
-@code{ "[]" | "[" @var{value} ( "," @var{value} )* "]" | "["
-@var{result} ( "," @var{result} )* "]" }
-
 @item @var{stream-record} @expansion{}
 @code{@var{console-stream-output} | @var{target-stream-output} | @var{log-stream-output}}
 
@@ -294,6 +285,14 @@
 @end table
 
 @noindent
+In addition, the following are still being developed:
+
+@table @code
+@item @var{query}
+This action is currently undefined.
+@end table
+
+@noindent
 Notes:
 
 @itemize @bullet
@@ -340,18 +339,14 @@
 @var{log-stream-output} is output text coming from @value{GDBN}'s internals, for
 instance messages that should be displayed as part of an error log.  All
 the log output is prefixed by @samp{&}.
-
-@item
-@cindex list output in @sc{gdb/mi}
-New @sc{gdb/mi} commands should only output @var{lists} containing
-@var{values}.
-
-
 @end itemize
 
 @xref{GDB/MI Stream Records, , @sc{gdb/mi} Stream Records}, for more
 details about the various output records.
 
+@xref{GDB/MI Draft Changes to Output Syntax, , @sc{gdb/mi} Draft Changes
+to Output Syntax}, for proposed revisions to the current output syntax.
+
 @node GDB/MI Simple Examples
 @subsection Simple Examples of @sc{gdb/mi} Interaction
 @cindex @sc{gdb/mi}, simple examples
@@ -588,16 +583,10 @@
 ^done
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
+bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x000100d0",func="main",file="hello.c",line="5",times="0",
-ignore="3"@}]@}
+ignore="3"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -636,16 +625,10 @@
 ^done
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
+bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x000100d0",func="main",file="hello.c",line="5",cond="1",
-times="0",ignore="3"@}]@}
+times="0",ignore="3"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -673,14 +656,7 @@
 ^done
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[]@}
+^done,BreakpointTable=@{@}
 (@value{GDBP})
 @end example
 
@@ -708,15 +684,9 @@
 ^done
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n",
-addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
+^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
+bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -743,15 +713,9 @@
 ^done
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
-addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
+^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
+bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -849,17 +813,11 @@
 ^done,bkpt=@{number="2",addr="0x00010774",file="recursive2.c",line="11"@}
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
+bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x0001072c", func="main",file="recursive2.c",line="4",times="0"@},
 bkpt=@{number="2",type="breakpoint",disp="del",enabled="y",
-addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"@}]@}
+addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"@}@}
 (@value{GDBP})
 -break-insert -r foo.*
 ~int foo(int, int);
@@ -898,7 +856,7 @@
 @end table
 
 If there are no breakpoints or watchpoints, the @code{BreakpointTable}
-@code{body} field is an empty list.
+field is an empty list.
 
 @subsubheading @value{GDBN} Command
 
@@ -909,17 +867,11 @@
 @smallexample
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
+bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@},
 bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
-addr="0x00010114",func="foo",file="hello.c",line="13",times="0"@}]@}
+addr="0x00010114",func="foo",file="hello.c",line="13",times="0"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -928,14 +880,7 @@
 @smallexample
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[]@}
+^done,BreakpointTable=@{@}
 (@value{GDBP})
 @end smallexample
 
@@ -978,7 +923,7 @@
 ^running
 ^done,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@},
 value=@{old="-268439212",new="55"@},
-frame=@{func="main",args=[],file="recursive2.c",line="5"@}
+frame=@{func="main",args=@{@},file="recursive2.c",line="5"@}
 (@value{GDBP})
 @end smallexample
 
@@ -995,14 +940,14 @@
 ^running
 ^done,reason="watchpoint-trigger",
 wpt=@{number="5",exp="C"@},value=@{old="-276895068",new="3"@},
-frame=@{func="callee4",args=[],
+frame=@{func="callee4",args=@{@},
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
 (@value{GDBP})
 -exec-continue
 ^running
 ^done,reason="watchpoint-scope",wpnum="5",
-frame=@{func="callee3",args=[@{name="strarg",
-value="0x11940 \"A string argument.\""@}],
+frame=@{func="callee3",args=@{@{name="strarg",
+value="0x11940 \"A string argument.\""@}@},
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
 (@value{GDBP})
 @end smallexample
@@ -1017,58 +962,40 @@
 ^done,wpt=@{number="2",exp="C"@}
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
+bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x00010734",func="callee4",
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
 bkpt=@{number="2",type="watchpoint",disp="keep",
-enabled="y",addr="",what="C",times="0"@}]@}
+enabled="y",addr="",what="C",times="0"@}@}
 (@value{GDBP})
 -exec-continue
 ^running
 ^done,reason="watchpoint-trigger",wpt=@{number="2",exp="C"@},
 value=@{old="-276895068",new="3"@},
-frame=@{func="callee4",args=[],
+frame=@{func="callee4",args=@{@},
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
+bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x00010734",func="callee4",
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
 bkpt=@{number="2",type="watchpoint",disp="keep",
-enabled="y",addr="",what="C",times="-5"@}]@}
+enabled="y",addr="",what="C",times="-5"@}@}
 (@value{GDBP})
 -exec-continue
 ^running
 ^done,reason="watchpoint-scope",wpnum="2",
-frame=@{func="callee3",args=[@{name="strarg",
-value="0x11940 \"A string argument.\""@}],
+frame=@{func="callee3",args=@{@{name="strarg",
+value="0x11940 \"A string argument.\""@}@},
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
 (@value{GDBP})
 -break-list
-^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
-hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
-@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
-@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
-@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
-@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
-@{width="40",alignment="2",col_name="what",colhdr="What"@}],
-body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
+bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
 addr="0x00010734",func="callee4",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@}]@}
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -1153,7 +1080,7 @@
 (@value{GDBP})
 -data-disassemble -s $pc -e "$pc + 20" -- 0
 ^done,
-asm_insns=[
+asm_insns=@{
 @{address="0x000107c0",func-name="main",offset="4",
 inst="mov  2, %o0"@},
 @{address="0x000107c4",func-name="main",offset="8",
@@ -1163,7 +1090,7 @@
 @{address="0x000107cc",func-name="main",offset="16",
 inst="sethi  %hi(0x11800), %o2"@},
 @{address="0x000107d0",func-name="main",offset="20",
-inst="or  %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}]
+inst="or  %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -1172,7 +1099,7 @@
 
 @smallexample
 -data-disassemble -f basics.c -l 32 -- 0
-^done,asm_insns=[
+^done,asm_insns=@{
 @{address="0x000107bc",func-name="main",offset="0",
 inst="save  %sp, -112, %sp"@},
 @{address="0x000107c0",func-name="main",offset="4",
@@ -1181,7 +1108,7 @@
 inst="sethi %hi(0x11800), %o2"@},
 [@dots{}]
 @{address="0x0001081c",func-name="main",offset="96",inst="ret "@},
-@{address="0x00010820",func-name="main",offset="100",inst="restore "@}]
+@{address="0x00010820",func-name="main",offset="100",inst="restore "@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -1190,13 +1117,13 @@
 @smallexample
 (@value{GDBP})
 -data-disassemble -f basics.c -l 32 -n 3 -- 0
-^done,asm_insns=[
+^done,asm_insns=@{
 @{address="0x000107bc",func-name="main",offset="0",
 inst="save  %sp, -112, %sp"@},
 @{address="0x000107c0",func-name="main",offset="4",
 inst="mov  2, %o0"@},
 @{address="0x000107c4",func-name="main",offset="8",
-inst="sethi  %hi(0x11800), %o2"@}]
+inst="sethi  %hi(0x11800), %o2"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -1205,19 +1132,20 @@
 @smallexample
 (@value{GDBP})
 -data-disassemble -f basics.c -l 32 -n 3 -- 1
-^done,asm_insns=[
+^done,asm_insns=@{
 src_and_asm_line=@{line="31",
 file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
-  testsuite/gdb.mi/basics.c",line_asm_insn=[
+  testsuite/gdb.mi/basics.c",line_asm_insn=@{
 @{address="0x000107bc",func-name="main",offset="0",
-inst="save  %sp, -112, %sp"@}]@},
+inst="save  %sp, -112, %sp"@}@}@},
+
 src_and_asm_line=@{line="32",
 file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
-  testsuite/gdb.mi/basics.c",line_asm_insn=[
+  testsuite/gdb.mi/basics.c",line_asm_insn=@{
 @{address="0x000107c0",func-name="main",offset="4",
 inst="mov  2, %o0"@},
 @{address="0x000107c4",func-name="main",offset="8",
-inst="sethi  %hi(0x11800), %o2"@}]@}]
+inst="sethi  %hi(0x11800), %o2"@}@}@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -1291,12 +1219,12 @@
 
 (@value{GDBP})
 *stopped,reason="breakpoint-hit",bkptno="1",frame=@{func="main",
-args=[],file="try.c",line="5"@}
+args=@{@},file="try.c",line="5"@}
 (@value{GDBP})
 -data-list-changed-registers
-^done,changed-registers=["0","1","2","4","5","6","7","8","9",
+^done,changed-registers=@{"0","1","2","4","5","6","7","8","9",
 "10","11","13","14","15","16","17","18","19","20","21","22","23",
-"24","25","26","27","28","30","31","64","65","66","67","69"]
+"24","25","26","27","28","30","31","64","65","66","67","69"@}
 (@value{GDBP})
 @end smallexample
 
@@ -1313,9 +1241,7 @@
 Show a list of register names for the current target.  If no arguments
 are given, it shows a list of the names of all the registers.  If
 integer numbers are given as arguments, it will print a list of the
-names of the registers corresponding to the arguments.  To ensure
-consistency between a register name and its number, the output list may
-include empty register names.
+names of the registers corresponding to the arguments.
 
 @subsubheading @value{GDBN} Command
 
@@ -1329,16 +1255,16 @@
 @smallexample
 (@value{GDBP})
 -data-list-register-names
-^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7",
+^done,register-names=@{"r0","r1","r2","r3","r4","r5","r6","r7",
 "r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18",
 "r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29",
 "r30","r31","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9",
 "f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20",
 "f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31",
-"", "pc","ps","cr","lr","ctr","xer"]
+"pc","ps","cr","lr","ctr","xer"@}
 (@value{GDBP})
 -data-list-register-names 1 2 3
-^done,register-names=["r1","r2","r3"]
+^done,register-names=@{"r1","r2","r3"@}
 (@value{GDBP})
 @end smallexample
 
@@ -1386,11 +1312,11 @@
 @smallexample
 (@value{GDBP})
 -data-list-register-values r 64 65
-^done,register-values=[@{number="64",value="0xfe00a300"@},
-@{number="65",value="0x00029002"@}]
+^done,register-values=@{@{number="64",value="0xfe00a300"@},
+@{number="65",value="0x00029002"@}@}
 (@value{GDBP})
 -data-list-register-values x
-^done,register-values=[@{number="0",value="0xfe0043c8"@},
+^done,register-values=@{@{number="0",value="0xfe0043c8"@},
 @{number="1",value="0x3fff88"@},@{number="2",value="0xfffffffe"@},
 @{number="3",value="0x0"@},@{number="4",value="0xa"@},
 @{number="5",value="0x3fff68"@},@{number="6",value="0x3fff58"@},
@@ -1425,7 +1351,7 @@
 @{number="63",value="0x0"@},@{number="64",value="0xfe00a300"@},
 @{number="65",value="0x29002"@},@{number="66",value="0x202f04b5"@},
 @{number="67",value="0xfe0043b0"@},@{number="68",value="0xfe00b3e4"@},
-@{number="69",value="0x20002b03"@}]
+@{number="69",value="0x20002b03"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -1503,10 +1429,10 @@
 9-data-read-memory -o -6 -- bytes+6 x 1 3 2
 9^done,addr="0x00001390",nr-bytes="6",total-bytes="6",
 next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396",
-prev-page="0x0000138a",memory=[
-@{addr="0x00001390",data=["0x00","0x01"]@},
-@{addr="0x00001392",data=["0x02","0x03"]@},
-@{addr="0x00001394",data=["0x04","0x05"]@}]
+prev-page="0x0000138a",memory=@{
+@{addr="0x00001390",data=@{"0x00","0x01"@}@},
+@{addr="0x00001392",data=@{"0x02","0x03"@}@},
+@{addr="0x00001394",data=@{"0x04","0x05"@}@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -1518,8 +1444,8 @@
 5-data-read-memory shorts+64 d 2 1 1
 5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",
 next-row="0x00001512",prev-row="0x0000150e",
-next-page="0x00001512",prev-page="0x0000150e",memory=[
-@{addr="0x00001510",data=["128"]@}]
+next-page="0x00001512",prev-page="0x0000150e",memory=@{
+@{addr="0x00001510",data=@{"128"@}@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -1532,15 +1458,15 @@
 4-data-read-memory bytes+16 x 1 8 4 x
 4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32",
 next-row="0x000013c0",prev-row="0x0000139c",
-next-page="0x000013c0",prev-page="0x00001380",memory=[
-@{addr="0x000013a0",data=["0x10","0x11","0x12","0x13"],ascii="xxxx"@},
-@{addr="0x000013a4",data=["0x14","0x15","0x16","0x17"],ascii="xxxx"@},
-@{addr="0x000013a8",data=["0x18","0x19","0x1a","0x1b"],ascii="xxxx"@},
-@{addr="0x000013ac",data=["0x1c","0x1d","0x1e","0x1f"],ascii="xxxx"@},
-@{addr="0x000013b0",data=["0x20","0x21","0x22","0x23"],ascii=" !\"#"@},
-@{addr="0x000013b4",data=["0x24","0x25","0x26","0x27"],ascii="$%&'"@},
-@{addr="0x000013b8",data=["0x28","0x29","0x2a","0x2b"],ascii="()*+"@},
-@{addr="0x000013bc",data=["0x2c","0x2d","0x2e","0x2f"],ascii=",-./"@}]
+next-page="0x000013c0",prev-page="0x00001380",memory=@{
+@{addr="0x000013a0",data=@{"0x10","0x11","0x12","0x13"@},ascii="xxxx"@},
+@{addr="0x000013a4",data=@{"0x14","0x15","0x16","0x17"@},ascii="xxxx"@},
+@{addr="0x000013a8",data=@{"0x18","0x19","0x1a","0x1b"@},ascii="xxxx"@},
+@{addr="0x000013ac",data=@{"0x1c","0x1d","0x1e","0x1f"@},ascii="xxxx"@},
+@{addr="0x000013b0",data=@{"0x20","0x21","0x22","0x23"@},ascii=" !\"#"@},
+@{addr="0x000013b4",data=@{"0x24","0x25","0x26","0x27"@},ascii="$%&'"@},
+@{addr="0x000013b8",data=@{"0x28","0x29","0x2a","0x2b"@},ascii="()*+"@},
+@{addr="0x000013bc",data=@{"0x2c","0x2d","0x2e","0x2f"@},ascii=",-./"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -1851,7 +1777,7 @@
 ^running
 (@value{GDBP})
 @@Hello world
-*stopped,reason="breakpoint-hit",bkptno="2",frame=@{func="foo",args=[],
+*stopped,reason="breakpoint-hit",bkptno="2",frame=@{func="foo",args=@{@},
 file="hello.c",line="13"@}
 (@value{GDBP})
 @end smallexample
@@ -1883,7 +1809,7 @@
 ^running
 (@value{GDBP})
 @@hello from foo
-*stopped,reason="function-finished",frame=@{func="main",args=[],
+*stopped,reason="function-finished",frame=@{func="main",args=@{@},
 file="hello.c",line="7"@}
 (@value{GDBP})
 @end smallexample
@@ -1897,7 +1823,7 @@
 ^running
 (@value{GDBP})
 *stopped,reason="function-finished",frame=@{addr="0x000107b0",func="foo",
-args=[@{name="a",value="1"],@{name="b",value="9"@}@},
+args=@{@{name="a",value="1"@},@{name="b",value="9"@}@},
 file="recursive2.c",line="14"@},
 gdb-result-var="$1",return-value="0"
 (@value{GDBP})
@@ -1935,7 +1861,7 @@
 222^done
 (@value{GDBP})
 111*stopped,signal-name="SIGINT",signal-meaning="Interrupt",
-frame=@{addr="0x00010140",func="foo",args=[],file="try.c",line="13"@}
+frame=@{addr="0x00010140",func="foo",args=@{@},file="try.c",line="13"@}
 (@value{GDBP})
 
 (@value{GDBP})
@@ -2032,7 +1958,7 @@
 000^running
 (@value{GDBP})
 000*stopped,reason="breakpoint-hit",bkptno="1",
-frame=@{func="callee4",args=[],
+frame=@{func="callee4",args=@{@},
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
 (@value{GDBP})
 205-break-delete
@@ -2040,8 +1966,8 @@
 (@value{GDBP})
 111-exec-return
 111^done,frame=@{level="0 ",func="callee3",
-args=[@{name="strarg",
-value="0x11940 \"A string argument.\""@}],
+args=@{@{name="strarg",
+value="0x11940 \"A string argument.\""@}@},
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
 (@value{GDBP})
 @end smallexample
@@ -2075,7 +2001,7 @@
 ^running
 (@value{GDBP})
 *stopped,reason="breakpoint-hit",bkptno="1",
-frame=@{func="main",args=[],file="recursive2.c",line="4"@}
+frame=@{func="main",args=@{@},file="recursive2.c",line="4"@}
 (@value{GDBP})
 @end smallexample
 
@@ -2127,8 +2053,8 @@
 ^running
 (@value{GDBP})
 *stopped,reason="end-stepping-range",
-frame=@{func="foo",args=[@{name="a",value="10"@},
-@{name="b",value="0"@}],file="recursive2.c",line="11"@}
+frame=@{func="foo",args=@{@{name="a",value="10"@},
+@{name="b",value="0"@}@},file="recursive2.c",line="11"@}
 (@value{GDBP})
 @end smallexample
 
@@ -2171,14 +2097,14 @@
 
 (@value{GDBP})
 *stopped,reason="end-stepping-range",
-frame=@{func="foo",args=[],file="try.c",line="10"@}
+frame=@{func="foo",args=@{@},file="try.c",line="10"@}
 (@value{GDBP})
 -exec-step-instruction
 ^running
 
 (@value{GDBP})
 *stopped,reason="end-stepping-range",
-frame=@{addr="0x000100f4",func="foo",args=[],file="try.c",line="10"@}
+frame=@{addr="0x000100f4",func="foo",args=@{@},file="try.c",line="10"@}
 (@value{GDBP})
 @end smallexample
 
@@ -2209,7 +2135,7 @@
 ^running
 (@value{GDBP})
 x = 55
-*stopped,reason="location-reached",frame=@{func="main",args=[],
+*stopped,reason="location-reached",frame=@{func="main",args=@{@},
 file="recursive2.c",line="6"@}
 (@value{GDBP})
 @end smallexample
@@ -2553,7 +2479,7 @@
 
 @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 @node GDB/MI Stack Manipulation
-@section @sc{gdb/mi} Stack Manipulation Commands
+@section Stack manipulation commands in @sc{gdb/mi}
 
 
 @subheading The @code{-stack-info-frame} Command
@@ -2645,7 +2571,7 @@
 (@value{GDBP})
 -stack-list-frames
 ^done,
-stack=[
+stack=@{
 frame=@{level="0 ",addr="0x00010734",func="callee4",
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@},
 frame=@{level="1 ",addr="0x0001076c",func="callee3",
@@ -2655,39 +2581,39 @@
 frame=@{level="3 ",addr="0x000107b4",func="callee1",
 file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="27"@},
 frame=@{level="4 ",addr="0x000107e0",func="main",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}]
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}@}
 (@value{GDBP})
 -stack-list-arguments 0
 ^done,
-stack-args=[
-frame=@{level="0",args=[]@},
-frame=@{level="1",args=[name="strarg"]@},
-frame=@{level="2",args=[name="intarg",name="strarg"]@},
-frame=@{level="3",args=[name="intarg",name="strarg",name="fltarg"]@},
-frame=@{level="4",args=[]@}]
+stack-args=@{
+frame=@{level="0",args=@{@}@},
+frame=@{level="1",args=@{name="strarg"@}@},
+frame=@{level="2",args=@{name="intarg",name="strarg"@}@},
+frame=@{level="3",args=@{name="intarg",name="strarg",name="fltarg"@}@},
+frame=@{level="4",args=@{@}@}@}
 (@value{GDBP})
 -stack-list-arguments 1
 ^done,
-stack-args=[
-frame=@{level="0",args=[]@},
+stack-args=@{
+frame=@{level="0",args=@{@}@},
 frame=@{level="1",
- args=[@{name="strarg",value="0x11940 \"A string argument.\""@}]@},
-frame=@{level="2",args=[
+ args=@{@{name="strarg",value="0x11940 \"A string argument.\""@}@}@},
+frame=@{level="2",args=@{
 @{name="intarg",value="2"@},
-@{name="strarg",value="0x11940 \"A string argument.\""@}]@},
-@{frame=@{level="3",args=[
+@{name="strarg",value="0x11940 \"A string argument.\""@}@}@},
+@{frame=@{level="3",args=@{
 @{name="intarg",value="2"@},
 @{name="strarg",value="0x11940 \"A string argument.\""@},
-@{name="fltarg",value="3.5"@}]@},
-frame=@{level="4",args=[]@}]
+@{name="fltarg",value="3.5"@}@}@},
+frame=@{level="4",args=@{@}@}@}
 (@value{GDBP})
 -stack-list-arguments 0 2 2
-^done,stack-args=[frame=@{level="2",args=[name="intarg",name="strarg"]@}]
+^done,stack-args=@{frame=@{level="2",args=@{name="intarg",name="strarg"@}@}@}
 (@value{GDBP})
 -stack-list-arguments 1 2 2
-^done,stack-args=[frame=@{level="2",
-args=[@{name="intarg",value="2"@},
-@{name="strarg",value="0x11940 \"A string argument.\""@}]@}]
+^done,stack-args=@{frame=@{level="2",
+args=@{@{name="intarg",value="2"@},
+@{name="strarg",value="0x11940 \"A string argument.\""@}@}@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -2736,7 +2662,7 @@
 (@value{GDBP})
 -stack-list-frames
 ^done,stack=
-[frame=@{level="0 ",addr="0x0001076c",func="foo",
+@{frame=@{level="0 ",addr="0x0001076c",func="foo",
   file="recursive2.c",line="11"@},
 frame=@{level="1 ",addr="0x000107a4",func="foo",
   file="recursive2.c",line="14"@},
@@ -2759,7 +2685,7 @@
 frame=@{level="10",addr="0x000107a4",func="foo",
   file="recursive2.c",line="14"@},
 frame=@{level="11",addr="0x00010738",func="main",
-  file="recursive2.c",line="4"@}]
+  file="recursive2.c",line="4"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -2769,12 +2695,12 @@
 (@value{GDBP})
 -stack-list-frames 3 5
 ^done,stack=
-[frame=@{level="3 ",addr="0x000107a4",func="foo",
+@{frame=@{level="3 ",addr="0x000107a4",func="foo",
   file="recursive2.c",line="14"@},
 frame=@{level="4 ",addr="0x000107a4",func="foo",
   file="recursive2.c",line="14"@},
 frame=@{level="5 ",addr="0x000107a4",func="foo",
-  file="recursive2.c",line="14"@}]
+  file="recursive2.c",line="14"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -2784,8 +2710,8 @@
 (@value{GDBP})
 -stack-list-frames 3 3
 ^done,stack=
-[frame=@{level="3 ",addr="0x000107a4",func="foo",
-  file="recursive2.c",line="14"@}]
+@{frame=@{level="3 ",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -2812,11 +2738,11 @@
 @smallexample
 (@value{GDBP})
 -stack-list-locals 0
-^done,locals=[name="A",name="B",name="C"]
+^done,locals=@{name="A",name="B",name="C"@}
 (@value{GDBP})
 -stack-list-locals 1
-^done,locals=[@{name="A",value="1"@},@{name="B",value="2"@},
-  @{name="C",value="3"@}]
+^done,locals=@{@{name="A",value="1"@},@{name="B",value="2"@},
+  @{name="C",value="3"@}@}
 (@value{GDBP})
 @end smallexample
 
@@ -3320,7 +3246,7 @@
 
 @smallexample
 ^connected,addr="@var{address}",func="@var{function name}",
-  args=[@var{arg list}]
+  args=@{@var{arg list}@}
 @end smallexample
 
 @subsubheading @value{GDBN} Command
@@ -3332,7 +3258,7 @@
 @smallexample
 (@value{GDBP})
 -target-select async /dev/ttya
-^connected,addr="0xfe00a300",func="??",args=[]
+^connected,addr="0xfe00a300",func="??",args=@{@}
 (@value{GDBP})
 @end smallexample
 
@@ -3448,8 +3374,8 @@
 -thread-select 3
 ^done,new-thread-id="3",
 frame=@{level="0 ",func="vprintf",
-args=[@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@},
-@{name="arg",value="0x2"@}],file="vprintf.c",line="31"@}
+args=@{@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@},
+@{name="arg",value="0x2"@}@},file="vprintf.c",line="31"@}
 (@value{GDBP})
 @end smallexample
 
@@ -3816,6 +3742,164 @@
 expression after fetching all the new values from memory or registers.
 A @samp{*} causes all existing variable objects to be updated.
 
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Draft Changes to Output Syntax
+@section  @sc{gdb/mi} Draft Changes to Output Syntax
+
+@cindex draft changes to output syntax of @sc{gdb/mi}
+@cindex @sc{gdb/mi}, draft changes to output syntax
+
+One problem identified in the existing @sc{gdb/mi} output syntax was the
+difficulty in differentiating between a tuple such as:
+
+@example
+@{number="1",type="breakpoint",disp="keep",enabled="y"@}
+@end example
+
+where each value has a unique label, and a list such as:
+
+@example
+@{"1","2","4"@}
+@{bp="1",bp="2",bp="4"@}
+@end example
+
+where values are un-labeled or the label is duplicated.
+
+What follows is a draft revision to the output specification that
+addresses this problem.
+
+The output from @sc{gdb/mi} consists of zero or more out-of-band records
+optionally followed by a single result record, the result record being
+for the most recent command input.  The sequence is terminated by
+@samp{(@value{GDBP})}.
+
+Asynchronous @sc{gdb/mi} output is similar.
+
+Each output record directly associated with an input command is prefixed
+by the input command's @code{@var{token}}.
+
+@table @code
+@item @var{output} @expansion{}
+@{ @var{out-of-band-record} @} @code{[} @var{result-record} @code{]} "@code{(@value{GDBP})}" @var{nl}
+
+@item @var{result-record} @expansion{}
+@code{[} @var{token} @code{]} "^" @var{result-class} @{ "," @var{result} @} @var{nl}
+
+@item @var{out-of-band-record} @expansion{}
+@var{async-record} @code{|} @var{stream-record}
+
+@item @var{async-record} @expansion{}
+@var{exec-async-output} @code{|} @var{status-async-output} @code{|} @var{notify-async-output}
+
+@item @var{exec-async-output} @expansion{}
+@code{[} @var{token} @code{]} "*" @var{async-output}
+
+@item @var{status-async-output} @expansion{}
+@code{[} @var{token} @code{]} "+" @var{async-output}
+
+@item @var{notify-async-output} @expansion{}
+@code{[} @var{token} @code{]} "=" @var{async-output}
+
+@item @var{async-output} @expansion{}
+@var{async-class} @{ "," @var{result} @} @var{nl}
+
+@item @var{result-class} @expansion{}
+"done" @code{|} "running" @code{|} "connected" @code{|} "error" @code{|} "exit"
+
+@item @var{async-class} @expansion{}
+"stopped" @code{|} @emph{others depending on need as still in development}
+
+@item @var{result} @expansion{}
+@var{string} "=" @var{value}
+
+@item @var{value} @expansion{}
+@var{c-string} @code{|} @var{tupple} @code{|} @var{list}
+
+@item @var{tupple} @expansion{}
+"@{@}" @code{|} "@{" @var{result} @{ "," @var{result} @} "@}"
+
+@item @var{list} @expansion{}
+"@code{[]}" @code{|} "@code{[}" @var{value} @{ "," @var{value} @} "@code{]}"
+
+@item @var{string} @expansion{}
+@emph{[-A-Za-z\.0-9_]*}
+
+@item @var{c-string} @expansion{}
+@emph{See the input specification}
+
+@item @var{stream-record} @expansion{}
+@var{console-stream-output} @code{|} @var{target-stream-output} @code{|} @var{log-stream-output}
+
+@item @var{console-stream-output} @expansion{}
+"~" @var{c-string}
+
+@item @var{target-stream-output} @expansion{}
+"@@" @var{c-string}
+
+@item @var{log-stream-output} @expansion{}
+"&" @var{c-string}
+
+@item @var{nl} @expansion{}
+CR @code{|} CR-LF
+
+@item @var{token} @expansion{}
+"any sequence of digits"
+
+@end table
+
+In addition, the following are still being developed.
+
+@table @code
+
+@item @var{query}
+This action is currently undefined.
+
+@end table
+
+Notes:
+
+@itemize @bullet
+
+@item
+All output sequences end in a single line containing a period.
+
+@item
+The @code{@var{token}} is from the corresponding request.  If an execution
+command is interrupted by the @code{-exec-interrupt} command, the token
+associated with the `*stopped' message is the one of the original
+execution command, not the one of the interrupt command.
+
+@item
+@var{status-async-output} contains on-going status information about the
+progress of a slow operation.  It can be discarded.  All status output is
+prefixed by the prefix @samp{+}.
+
+@item
+@var{exec-async-output} contains asynchronous state change on the target
+(stopped, started, disappeared).  All async output is prefixed by
+the prefix @samp{*}.
+
+@item
+@var{notify-async-output} contains supplementary information that the
+client should handle (new breakpoint information).  All notify output is
+prefixed by the prefix @samp{=}.
+
+@item
+@var{console-stream-output} is output that should be displayed as is, in the
+console.  It is the textual response to a CLI command.  All the console
+output is prefixed by the prefix @samp{~}.
+
+@item
+@var{target-stream-output} is the output produced by the target program.
+All the target output is prefixed by the prefix @samp{@@}.
+
+@item
+@var{log-stream-output} is output text coming from @value{GDBN}'s
+internals, for instance messages that should be displayed as part of an
+error log.  All the log output is prefixed by the prefix @samp{&}.
+
+@end itemize
+
 @c Local variables:
 @c change-log-default-name: "ChangeLog-mi"
 @c End:
diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c
index 0b51324..1937eb0 100644
--- a/gdb/mi/mi-cmd-disas.c
+++ b/gdb/mi/mi-cmd-disas.c
@@ -377,7 +377,7 @@
 		  /* Just one line to print. */
 		  if (next_line == mle[i].line)
 		    {
-		      ui_out_tuple_begin (uiout, "src_and_asm_line");
+		      ui_out_list_begin (uiout, "src_and_asm_line");
 		      print_source_lines (symtab, next_line, mle[i].line + 1, 0);
 		    }
 		  else
@@ -385,21 +385,21 @@
 		      /* Several source lines w/o asm instructions associated. */
 		      for (; next_line < mle[i].line; next_line++)
 			{
-			  ui_out_tuple_begin (uiout, "src_and_asm_line");
+			  ui_out_list_begin (uiout, "src_and_asm_line");
 			  print_source_lines (symtab, next_line, mle[i].line + 1, 0);
 			  ui_out_list_begin (uiout, "line_asm_insn");
 			  ui_out_list_end (uiout);
-			  ui_out_tuple_end (uiout);
+			  ui_out_list_end (uiout);
 			}
 		      /* Print the last line and leave list open for
 		         asm instructions to be added. */
-		      ui_out_tuple_begin (uiout, "src_and_asm_line");
+		      ui_out_list_begin (uiout, "src_and_asm_line");
 		      print_source_lines (symtab, next_line, mle[i].line + 1, 0);
 		    }
 		}
 	      else
 		{
-		  ui_out_tuple_begin (uiout, "src_and_asm_line");
+		  ui_out_list_begin (uiout, "src_and_asm_line");
 		  print_source_lines (symtab, mle[i].line, mle[i].line + 1, 0);
 		}
 
@@ -418,7 +418,7 @@
 		  else
 		    num_displayed++;
 		}
-	      ui_out_tuple_begin (uiout, NULL);
+	      ui_out_list_begin (uiout, NULL);
 	      ui_out_field_core_addr (uiout, "address", pc);
 
 	      if (!build_address_symbolic (pc, 0, &name, &offset, &filename, &line, &unmapped))
@@ -437,12 +437,12 @@
 	      pc += (*tm_print_insn) (pc, &di);
 	      ui_out_field_stream (uiout, "inst", stb);
 	      ui_file_rewind (stb->stream);
-	      ui_out_tuple_end (uiout);
+	      ui_out_list_end (uiout);
 	    }
 	  if (close_list)
 	    {
 	      ui_out_list_end (uiout);
-	      ui_out_tuple_end (uiout);
+	      ui_out_list_end (uiout);
 	      close_list = 0;
 	    }
 	  if (how_many >= 0)
@@ -466,7 +466,7 @@
 	      else
 		num_displayed++;
 	    }
-	  ui_out_tuple_begin (uiout, NULL);
+	  ui_out_list_begin (uiout, NULL);
 	  ui_out_field_core_addr (uiout, "address", pc);
 
 	  if (!build_address_symbolic (pc, 0, &name, &offset, &filename, &line, &unmapped))
@@ -485,7 +485,7 @@
 	  pc += (*tm_print_insn) (pc, &di);
 	  ui_out_field_stream (uiout, "inst", stb);
 	  ui_file_rewind (stb->stream);
-	  ui_out_tuple_end (uiout);
+	  ui_out_list_end (uiout);
 	}
       ui_out_list_end (uiout);
     }
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 3cfdadb..2d80be7 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -192,10 +192,10 @@
        i++, fi = get_prev_frame (fi))
     {
       QUIT;
-      ui_out_tuple_begin (uiout, "frame");
+      ui_out_list_begin (uiout, "frame");
       ui_out_field_int (uiout, "level", i);
       list_args_or_locals (0, atoi (argv[0]), fi);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
     }
 
   ui_out_list_end (uiout);
@@ -265,7 +265,7 @@
 	  if (print_me)
 	    {
 	      if (values)
-		ui_out_tuple_begin (uiout, NULL);
+		ui_out_list_begin (uiout, NULL);
 	      ui_out_field_string (uiout, "name", SYMBOL_NAME (sym));
 
 	      if (values)
@@ -280,7 +280,7 @@
 		    sym2 = sym;
 		  print_variable_value (sym2, fi, stb->stream);
 		  ui_out_field_stream (uiout, "value", stb);
-		  ui_out_tuple_end (uiout);
+		  ui_out_list_end (uiout);
 		}
 	    }
 	}
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 3ad9673..dfdc4a6 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -273,11 +273,11 @@
   if (numchild <= 0)
     return MI_CMD_DONE;
 
-  ui_out_tuple_begin (uiout, "children");
+  ui_out_list_begin (uiout, "children");
   cc = childlist;
   while (*cc != NULL)
     {
-      ui_out_tuple_begin (uiout, "child");
+      ui_out_list_begin (uiout, "child");
       ui_out_field_string (uiout, "name", varobj_get_objname (*cc));
       ui_out_field_string (uiout, "exp", varobj_get_expression (*cc));
       ui_out_field_int (uiout, "numchild", varobj_get_num_children (*cc));
@@ -285,10 +285,10 @@
       /* C++ pseudo-variables (public, private, protected) do not have a type */
       if (type)
 	ui_out_field_string (uiout, "type", varobj_get_type (*cc));
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
       cc++;
     }
-  ui_out_tuple_end (uiout);
+  ui_out_list_end (uiout);
   xfree (childlist);
   return MI_CMD_DONE;
 }
@@ -421,10 +421,10 @@
   if ((*name == '*') && (*(name + 1) == '\0'))
     {
       nv = varobj_list (&rootlist);
-      ui_out_tuple_begin (uiout, "changelist");
+      ui_out_list_begin (uiout, "changelist");
       if (nv <= 0)
 	{
-	  ui_out_tuple_end (uiout);
+	  ui_out_list_end (uiout);
 	  return MI_CMD_DONE;
 	}
       cr = rootlist;
@@ -434,7 +434,7 @@
 	  cr++;
 	}
       xfree (rootlist);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
     }
   else
     {
@@ -443,9 +443,9 @@
       if (var == NULL)
 	error ("mi_cmd_var_update: Variable object not found");
 
-      ui_out_tuple_begin (uiout, "changelist");
+      ui_out_list_begin (uiout, "changelist");
       varobj_update_one (var);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
     }
     return MI_CMD_DONE;
 }
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 5187cb0..06638bf 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -271,7 +271,7 @@
      case, some entries of REGISTER_NAME will change depending upon
      the particular processor being debugged.  */
 
-  numregs = NUM_REGS + NUM_PSEUDO_REGS;
+  numregs = NUM_REGS;
 
   ui_out_list_begin (uiout, "register-names");
 
@@ -283,9 +283,9 @@
 	{
 	  if (REGISTER_NAME (regnum) == NULL
 	      || *(REGISTER_NAME (regnum)) == '\0')
-	    ui_out_field_string (uiout, NULL, "");
-	  else
-	    ui_out_field_string (uiout, NULL, REGISTER_NAME (regnum));
+	    continue;
+
+	  ui_out_field_string (uiout, NULL, REGISTER_NAME (regnum));
 	}
     }
 
@@ -293,16 +293,17 @@
   for (i = 0; i < argc; i++)
     {
       regnum = atoi (argv[i]);
-      if (regnum < 0 || regnum >= numregs)
+
+      if (regnum >= 0
+	  && regnum < numregs
+	  && REGISTER_NAME (regnum) != NULL
+	  && *REGISTER_NAME (regnum) != '\000')
+	ui_out_field_string (uiout, NULL, REGISTER_NAME (regnum));
+      else
 	{
 	  xasprintf (&mi_error_message, "bad register number");
 	  return MI_CMD_ERROR;
 	}
-      if (REGISTER_NAME (regnum) == NULL
-	  || *(REGISTER_NAME (regnum)) == '\0')
-	ui_out_field_string (uiout, NULL, "");
-      else
-	ui_out_field_string (uiout, NULL, REGISTER_NAME (regnum));
     }
   ui_out_list_end (uiout);
   return MI_CMD_DONE;
@@ -443,12 +444,12 @@
 	  if (REGISTER_NAME (regnum) == NULL
 	      || *(REGISTER_NAME (regnum)) == '\0')
 	    continue;
-	  ui_out_tuple_begin (uiout, NULL);
+	  ui_out_list_begin (uiout, NULL);
 	  ui_out_field_int (uiout, "number", regnum);
 	  result = get_register (regnum, format);
 	  if (result == -1)
 	    return MI_CMD_ERROR;
-	  ui_out_tuple_end (uiout);
+	  ui_out_list_end (uiout);
 	}
     }
 
@@ -462,12 +463,12 @@
 	  && REGISTER_NAME (regnum) != NULL
 	  && *REGISTER_NAME (regnum) != '\000')
 	{
-	  ui_out_tuple_begin (uiout, NULL);
+	  ui_out_list_begin (uiout, NULL);
 	  ui_out_field_int (uiout, "number", regnum);
 	  result = get_register (regnum, format);
 	  if (result == -1)
 	    return MI_CMD_ERROR;
-	  ui_out_tuple_end (uiout);
+	  ui_out_list_end (uiout);
 	}
       else
 	{
@@ -899,7 +900,7 @@
       {
 	int col;
 	int col_byte;
-	ui_out_tuple_begin (uiout, NULL);
+	ui_out_list_begin (uiout, NULL);
 	ui_out_field_core_addr (uiout, "addr", addr + row_byte);
 	/* ui_out_field_core_addr_symbolic (uiout, "saddr", addr + row_byte); */
 	ui_out_list_begin (uiout, "data");
@@ -939,7 +940,7 @@
 	      }
 	    ui_out_field_stream (uiout, "ascii", stream);
 	  }
-	ui_out_tuple_end (uiout);
+	ui_out_list_end (uiout);
       }
     ui_out_stream_delete (stream);
     ui_out_list_end (uiout);
@@ -1271,7 +1272,6 @@
       xasprintf (&run, "%s %s", mi, async_args);
       make_exec_cleanup (free, run);
       add_continuation (mi_exec_async_cli_cmd_continuation, NULL);
-      old_cleanups = NULL;
     }
   else
     {
@@ -1350,7 +1350,7 @@
   static char *previous_sect_name = NULL;
   int new_section;
 
-  if (!interpreter_p || strncmp (interpreter_p, "mi", 2) != 0)
+  if (!interpreter_p || strcmp (interpreter_p, "mi") != 0)
     return;
 
   update_threshold.tv_sec = 0;
@@ -1376,11 +1376,11 @@
       if (last_async_command)
 	fputs_unfiltered (last_async_command, raw_stdout);
       fputs_unfiltered ("+download", raw_stdout);
-      ui_out_tuple_begin (uiout, NULL);
+      ui_out_list_begin (uiout, NULL);
       ui_out_field_string (uiout, "section", section_name);
       ui_out_field_int (uiout, "section-size", total_section);
       ui_out_field_int (uiout, "total-size", grand_total);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
       mi_out_put (uiout, raw_stdout);
       fputs_unfiltered ("\n", raw_stdout);
       gdb_flush (raw_stdout);
@@ -1394,13 +1394,13 @@
       if (last_async_command)
 	fputs_unfiltered (last_async_command, raw_stdout);
       fputs_unfiltered ("+download", raw_stdout);
-      ui_out_tuple_begin (uiout, NULL);
+      ui_out_list_begin (uiout, NULL);
       ui_out_field_string (uiout, "section", section_name);
       ui_out_field_int (uiout, "section-sent", sent_so_far);
       ui_out_field_int (uiout, "section-size", total_section);
       ui_out_field_int (uiout, "total-sent", total_sent);
       ui_out_field_int (uiout, "total-size", grand_total);
-      ui_out_tuple_end (uiout);
+      ui_out_list_end (uiout);
       mi_out_put (uiout, raw_stdout);
       fputs_unfiltered ("\n", raw_stdout);
       gdb_flush (raw_stdout);
@@ -1408,7 +1408,7 @@
 }
 
 static void
-mi_command_loop (int mi_version)
+mi_command_loop (void)
 {
   /* HACK: Force stdout/stderr to point at the console.  This avoids
      any potential side effects caused by legacy code that is still
@@ -1424,7 +1424,7 @@
 
   /* HACK: Poke the ui_out table directly.  Should we be creating a
      mi_out object wired up to the above gdb_stdout / gdb_stderr? */
-  uiout = mi_out_new (mi_version);
+  uiout = mi_out_new ();
 
   /* HACK: Override any other interpreter hooks.  We need to create a
      real event table and pass in that. */
@@ -1464,18 +1464,6 @@
 }
 
 static void
-mi0_command_loop (void)
-{
-  mi_command_loop (0);
-}
-
-static void
-mi1_command_loop (void)
-{
-  mi_command_loop (1);
-}
-
-static void
 setup_architecture_data (void)
 {
   /* don't trust REGISTER_BYTES to be zero. */
@@ -1493,30 +1481,24 @@
 void
 _initialize_mi_main (void)
 {
-  if (interpreter_p == NULL)
-    return;
-
   /* If we're _the_ interpreter, take control. */
-  if (strcmp (interpreter_p, "mi0") == 0)
-    command_loop_hook = mi0_command_loop;
-  else if (strcmp (interpreter_p, "mi") == 0
-	   || strcmp (interpreter_p, "mi1") == 0)
-    command_loop_hook = mi1_command_loop;
-  else
-    return;
-
-  init_ui_hook = mi_init_ui;
-  setup_architecture_data ();
-  register_gdbarch_swap (&old_regs, sizeof (old_regs), NULL);
-  register_gdbarch_swap (NULL, 0, setup_architecture_data);
-  if (event_loop_p)
+  if (interpreter_p
+      && strcmp (interpreter_p, "mi") == 0)
     {
-      /* These overwrite some of the initialization done in
-	 _intialize_event_loop. */
-      call_readline = gdb_readline2;
-      input_handler = mi_execute_command_wrapper;
-      add_file_handler (input_fd, stdin_event_handler, 0);
-      async_command_editing_p = 0;
+      init_ui_hook = mi_init_ui;
+      command_loop_hook = mi_command_loop;
+      setup_architecture_data ();
+      register_gdbarch_swap (&old_regs, sizeof (old_regs), NULL);
+      register_gdbarch_swap (NULL, 0, setup_architecture_data);
+      if (event_loop_p)
+	{
+	  /* These overwrite some of the initialization done in
+	     _intialize_event_loop. */
+	  call_readline = gdb_readline2;
+	  input_handler = mi_execute_command_wrapper;
+	  add_file_handler (input_fd, stdin_event_handler, 0);
+	  async_command_editing_p = 0;
+	}
     }
   /* FIXME: Should we notify main that we are here as a possible
      interpreter? */
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index 7e09f2d..612cdf8 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -31,39 +31,34 @@
 
 struct ui_out_data
   {
-    int suppress_field_separator;
-    int suppress_output;
-    int mi_version;
+    int supress_field_separator;
+    int first_header;
     struct ui_file *buffer;
   };
 
 /* These are the MI output functions */
 
-static void mi_table_begin (struct ui_out *uiout, int nbrofcols,
-			    int nr_rows, const char *tblid);
+static void mi_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid);
 static void mi_table_body (struct ui_out *uiout);
 static void mi_table_end (struct ui_out *uiout);
 static void mi_table_header (struct ui_out *uiout, int width,
-			     enum ui_align alig, const char *col_name,
-			     const char *colhdr);
-static void mi_begin (struct ui_out *uiout, enum ui_out_type type,
-		      int level, const char *id);
-static void mi_end (struct ui_out *uiout, enum ui_out_type type, int level);
+			     enum ui_align alig, char *colhdr);
+static void mi_list_begin (struct ui_out *uiout, int list_flag, char *lstid);
+static void mi_list_end (struct ui_out *uiout, int list_flag);
 static void mi_field_int (struct ui_out *uiout, int fldno, int width,
-			  enum ui_align alig, const char *fldname, int value);
+			  enum ui_align alig, char *fldname, int value);
 static void mi_field_skip (struct ui_out *uiout, int fldno, int width,
-			   enum ui_align alig, const char *fldname);
+			   enum ui_align alig, char *fldname);
 static void mi_field_string (struct ui_out *uiout, int fldno, int width,
-			     enum ui_align alig, const char *fldname,
+			     enum ui_align alig, char *fldname,
 			     const char *string);
 static void mi_field_fmt (struct ui_out *uiout, int fldno,
 			  int width, enum ui_align align,
-			  const char *fldname, const char *format,
-			  va_list args);
+			  char *fldname, char *format, va_list args);
 static void mi_spaces (struct ui_out *uiout, int numspaces);
-static void mi_text (struct ui_out *uiout, const char *string);
-static void mi_message (struct ui_out *uiout, int verbosity,
-			const char *format, va_list args);
+static void mi_text (struct ui_out *uiout, char *string);
+static void mi_message (struct ui_out *uiout, int verbosity, char *format,
+			va_list args);
 static void mi_wrap_hint (struct ui_out *uiout, char *identstring);
 static void mi_flush (struct ui_out *uiout);
 
@@ -78,8 +73,8 @@
   mi_table_body,
   mi_table_end,
   mi_table_header,
-  mi_begin,
-  mi_end,
+  mi_list_begin,
+  mi_list_end,
   mi_field_int,
   mi_field_skip,
   mi_field_string,
@@ -88,17 +83,15 @@
   mi_text,
   mi_message,
   mi_wrap_hint,
-  mi_flush,
-  1, /* Needs MI hacks.  */
+  mi_flush
 };
 
 /* Prototypes for local functions */
 
 extern void _initialize_mi_out (void);
 static void field_separator (struct ui_out *uiout);
-static void mi_open (struct ui_out *uiout, const char *name,
-		     enum ui_out_type type);
-static void mi_close (struct ui_out *uiout, enum ui_out_type type);
+static void list_open (struct ui_out *uiout);
+static void list_close (struct ui_out *uiout);
 
 static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
 			   char *format,...);
@@ -106,26 +99,15 @@
 /* Mark beginning of a table */
 
 void
-mi_table_begin (struct ui_out *uiout,
-		int nr_cols,
-		int nr_rows,
-		const char *tblid)
+mi_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  mi_open (uiout, tblid, ui_out_type_tuple);
-  if (data->mi_version == 0)
-    {
-      if (nr_rows == 0)
-	data->suppress_output = 1;
-      else
-	mi_open (uiout, "hdr", ui_out_type_list);
-      return;
-    }
-  mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/,
-		"nr_rows", nr_rows);
-  mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/,
-		"nr_cols", nr_cols);
-  mi_open (uiout, "hdr", ui_out_type_list);
+  field_separator (uiout);
+  if (tblid)
+    fprintf_unfiltered (data->buffer, "%s=", tblid);
+  list_open (uiout);
+  data->first_header = 0;
+  data->supress_field_separator = 1;
 }
 
 /* Mark beginning of a table body */
@@ -134,13 +116,9 @@
 mi_table_body (struct ui_out *uiout)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   /* close the table header line if there were any headers */
-  mi_close (uiout, ui_out_type_list);
-  if (data->mi_version == 0)
-    return;
-  mi_open (uiout, "body", ui_out_type_list);
+  if (data->first_header)
+    list_close (uiout);
 }
 
 /* Mark end of a table */
@@ -149,76 +127,56 @@
 mi_table_end (struct ui_out *uiout)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  data->suppress_output = 0;
-  if (data->mi_version == 0)
-    {
-      mi_close (uiout, ui_out_type_tuple);
-      return;
-    }
-  mi_close (uiout, ui_out_type_list); /* body */
-  mi_close (uiout, ui_out_type_tuple);
+  list_close (uiout);
+  /* If table was empty this flag did not get reset yet */
+  data->supress_field_separator = 0;
 }
 
 /* Specify table header */
 
 void
-mi_table_header (struct ui_out *uiout, int width, int alignment,
-		 const char *col_name,
-		 const char *colhdr)
+mi_table_header (struct ui_out *uiout, int width, int alignment, char *colhdr)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
-  if (data->mi_version == 0)
+  if (!data->first_header++)
     {
-      mi_field_string (uiout, 0, width, alignment, 0, colhdr);
-      return;
+      fputs_unfiltered ("hdr=", data->buffer);
+      list_open (uiout);
     }
-  mi_open (uiout, NULL, ui_out_type_tuple);
-  mi_field_int (uiout, 0, 0, 0, "width", width);
-  mi_field_int (uiout, 0, 0, 0, "alignment", alignment);
-  mi_field_string (uiout, 0, 0, 0, "col_name", col_name);
-  mi_field_string (uiout, 0, width, alignment, "colhdr", colhdr);
-  mi_close (uiout, ui_out_type_tuple);
+  mi_field_string (uiout, 0, width, alignment, 0, colhdr);
 }
 
 /* Mark beginning of a list */
 
 void
-mi_begin (struct ui_out *uiout,
-	  enum ui_out_type type,
-	  int level,
-	  const char *id)
+mi_list_begin (struct ui_out *uiout, int list_flag, char *lstid)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
-  mi_open (uiout, id, type);
+  field_separator (uiout);
+  data->supress_field_separator = 1;
+  if (lstid)
+    fprintf_unfiltered (data->buffer, "%s=", lstid);
+  list_open (uiout);
 }
 
 /* Mark end of a list */
 
 void
-mi_end (struct ui_out *uiout,
-	enum ui_out_type type,
-	int level)
+mi_list_end (struct ui_out *uiout, int list_flag)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
-  mi_close (uiout, type);
+  list_close (uiout);
+  /* If list was empty this flag did not get reset yet */
+  data->supress_field_separator = 0;
 }
 
 /* output an int field */
 
 void
 mi_field_int (struct ui_out *uiout, int fldno, int width, int alignment,
-	      const char *fldname, int value)
+	      char *fldname, int value)
 {
   char buffer[20];		/* FIXME: how many chars long a %d can become? */
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
 
   sprintf (buffer, "%d", value);
   mi_field_string (uiout, fldno, width, alignment, fldname, buffer);
@@ -228,11 +186,8 @@
 
 void
 mi_field_skip (struct ui_out *uiout, int fldno, int width, int alignment,
-	       const char *fldname)
+	       char *fldname)
 {
-  struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   mi_field_string (uiout, fldno, width, alignment, fldname, "");
 }
 
@@ -244,12 +199,10 @@
 		 int fldno,
 		 int width,
 		 int align,
-		 const char *fldname,
+		 char *fldname,
 		 const char *string)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   field_separator (uiout);
   if (fldname)
     fprintf_unfiltered (data->buffer, "%s=", fldname);
@@ -264,13 +217,9 @@
 void
 mi_field_fmt (struct ui_out *uiout, int fldno,
 	      int width, enum ui_align align,
-	      const char *fldname,
-	      const char *format,
-	      va_list args)
+	      char *fldname, char *format, va_list args)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_output)
-    return;
   field_separator (uiout);
   if (fldname)
     fprintf_unfiltered (data->buffer, "%s=\"", fldname);
@@ -286,14 +235,12 @@
 }
 
 void
-mi_text (struct ui_out *uiout, const char *string)
+mi_text (struct ui_out *uiout, char *string)
 {
 }
 
 void
-mi_message (struct ui_out *uiout, int verbosity,
-	    const char *format,
-	    va_list args)
+mi_message (struct ui_out *uiout, int verbosity, char *format, va_list args)
 {
 }
 
@@ -343,58 +290,24 @@
 field_separator (struct ui_out *uiout)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  if (data->suppress_field_separator)
-    data->suppress_field_separator = 0;
+  if (data->supress_field_separator)
+    data->supress_field_separator = 0;
   else
     fputc_unfiltered (',', data->buffer);
 }
 
 static void
-mi_open (struct ui_out *uiout,
-	 const char *name,
-	 enum ui_out_type type)
+list_open (struct ui_out *uiout)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  field_separator (uiout);
-  data->suppress_field_separator = 1;
-  if (name)
-    fprintf_unfiltered (data->buffer, "%s=", name);
-  switch (type)
-    {
-    case ui_out_type_tuple:
-      fputc_unfiltered ('{', data->buffer);
-      break;
-    case ui_out_type_list:
-      if (data->mi_version == 0)
-	fputc_unfiltered ('{', data->buffer);
-      else
-	fputc_unfiltered ('[', data->buffer);
-      break;
-    default:
-      internal_error (__FILE__, __LINE__, "bad switch");
-    }
+  fputc_unfiltered ('{', data->buffer);
 }
 
 static void
-mi_close (struct ui_out *uiout,
-	  enum ui_out_type type)
+list_close (struct ui_out *uiout)
 {
   struct ui_out_data *data = ui_out_data (uiout);
-  switch (type)
-    {
-    case ui_out_type_tuple:
-      fputc_unfiltered ('}', data->buffer);
-      break;
-    case ui_out_type_list:
-      if (data->mi_version == 0)
-	fputc_unfiltered ('}', data->buffer);
-      else
-	fputc_unfiltered (']', data->buffer);
-      break;
-    default:
-      internal_error (__FILE__, __LINE__, "bad switch");
-    }
-  data->suppress_field_separator = 0;
+  fputc_unfiltered ('}', data->buffer);
 }
 
 /* add a string to the buffer */
@@ -435,12 +348,11 @@
 /* initalize private members at startup */
 
 struct ui_out *
-mi_out_new (int mi_version)
+mi_out_new (void)
 {
   int flags = 0;
   struct ui_out_data *data = XMALLOC (struct ui_out_data);
-  data->suppress_field_separator = 0;
-  data->mi_version = mi_version;
+  data->supress_field_separator = 0;
   /* FIXME: This code should be using a ``string_file'' and not the
      TUI buffer hack. */
   data->buffer = mem_fileopen ();
diff --git a/gdb/mi/mi-out.h b/gdb/mi/mi-out.h
index 1ae693f..37a643c 100644
--- a/gdb/mi/mi-out.h
+++ b/gdb/mi/mi-out.h
@@ -25,7 +25,7 @@
 struct ui_out;
 struct ui_file;
 
-extern struct ui_out *mi_out_new (int mi_version);
+extern struct ui_out *mi_out_new (void);
 extern void mi_out_put (struct ui_out *uiout, struct ui_file *stream);
 extern void mi_out_rewind (struct ui_out *uiout);
 extern void mi_out_buffered (struct ui_out *uiout, char *string);
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 9481747..7608297 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -47,8 +47,6 @@
 #include "symfile.h"
 #include "objfiles.h"
 #include "demangle.h"
-#include "value.h"
-#include "cp-abi.h"
 
 /* Accumulate the minimal symbols for each objfile in bunches of BUNCH_SIZE.
    At the end, copy them all into one newly allocated location on an objfile's
@@ -77,7 +75,7 @@
 
 /* Prototypes for local functions. */
 
-static int compare_minimal_symbols (const PTR, const PTR);
+static int compare_minimal_symbols (const void *, const void *);
 
 static int
 compact_minimal_symbols (struct minimal_symbol *, int, struct objfile *);
@@ -958,24 +956,9 @@
       objfile->minimal_symbol_count = mcount;
       objfile->msymbols = msymbols;
 
-      /* Try to guess the appropriate C++ ABI by looking at the names 
-	 of the minimal symbols in the table.  */
-      {
-	int i;
-
-	for (i = 0; i < mcount; i++)
-	  {
-	    const char *name = SYMBOL_NAME (&objfile->msymbols[i]);
-	    if (name[0] == '_' && name[1] == 'Z')
-	      {
-		switch_to_cp_abi ("gnu-v3");
-		break;
-	      }
-	  }
-      }
-      
       /* Now walk through all the minimal symbols, selecting the newly added
          ones and attempting to cache their C++ demangled names. */
+
       for (; mcount-- > 0; msymbols++)
 	SYMBOL_INIT_DEMANGLED_NAME (msymbols, &objfile->symbol_obstack);
 
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index 545c741..2fa8816 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -83,7 +83,7 @@
       regaddr = REGISTER_PTRACE_ADDR (regno);
       for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
 	{
-	  *(int *) &buf[i] = ptrace (PT_READ_U, PIDGET (inferior_ptid),
+	  *(int *) &buf[i] = ptrace (PT_READ_U, inferior_pid,
 				     (PTRACE_ARG3_TYPE) regaddr, 0);
 	  regaddr += sizeof (int);
 	}
@@ -114,7 +114,7 @@
 	return;
       regaddr = REGISTER_PTRACE_ADDR (regno);
       errno = 0;
-      ptrace (PT_WRITE_U, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr,
+      ptrace (PT_WRITE_U, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
 	      read_register (regno));
       if (errno != 0)
 	{
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index f723e46..b29a33a 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -546,9 +546,9 @@
    all registers should be sign extended for simplicity? */
 
 static CORE_ADDR
-mips_read_pc (ptid_t ptid)
+mips_read_pc (int pid)
 {
-  return read_signed_register_pid (PC_REGNUM, ptid);
+  return read_signed_register_pid (PC_REGNUM, pid);
 }
 
 /* This returns the PC of the first inst after the prologue.  If we can't
@@ -669,21 +669,21 @@
 
 
 /* These the fields of 32 bit mips instructions */
-#define mips32_op(x) (x >> 26)
-#define itype_op(x) (x >> 26)
-#define itype_rs(x) ((x >> 21) & 0x1f)
+#define mips32_op(x) (x >> 25)
+#define itype_op(x) (x >> 25)
+#define itype_rs(x) ((x >> 21)& 0x1f)
 #define itype_rt(x) ((x >> 16) & 0x1f)
-#define itype_immediate(x) (x & 0xffff)
+#define itype_immediate(x) ( x & 0xffff)
 
-#define jtype_op(x) (x >> 26)
-#define jtype_target(x) (x & 0x03ffffff)
+#define jtype_op(x) (x >> 25)
+#define jtype_target(x) ( x & 0x03fffff)
 
-#define rtype_op(x) (x >> 26)
-#define rtype_rs(x) ((x >> 21) & 0x1f)
-#define rtype_rt(x) ((x >> 16) & 0x1f)
-#define rtype_rd(x) ((x >> 11) & 0x1f)
-#define rtype_shamt(x) ((x >> 6) & 0x1f)
-#define rtype_funct(x) (x & 0x3f)
+#define rtype_op(x) (x >>25)
+#define rtype_rs(x) ((x>>21) & 0x1f)
+#define rtype_rt(x) ((x>>16)  & 0x1f)
+#define rtype_rd(x) ((x>>11) & 0x1f)
+#define rtype_shamt(x) ((x>>6) & 0x1f)
+#define rtype_funct(x) (x & 0x3f )
 
 static CORE_ADDR
 mips32_relative_offset (unsigned long inst)
@@ -706,39 +706,25 @@
   unsigned long inst;
   int op;
   inst = mips_fetch_instruction (pc);
-  if ((inst & 0xe0000000) != 0)	/* Not a special, jump or branch instruction */
+  if ((inst & 0xe0000000) != 0)	/* Not a special, junp or branch instruction */
     {
-      if (itype_op (inst) >> 2 == 5)
-				/* BEQL, BNEL, BLEZL, BGTZL: bits 0101xx */
+      if ((inst >> 27) == 5)	/* BEQL BNEZ BLEZL BGTZE , bits 0101xx */
 	{
-	  op = (itype_op (inst) & 0x03);
+	  op = ((inst >> 25) & 0x03);
 	  switch (op)
 	    {
-	    case 0:		/* BEQL */
-	      goto equal_branch;
-	    case 1:		/* BNEL */
-	      goto neq_branch;
-	    case 2:		/* BLEZL */
-	      goto less_branch;
-	    case 3:		/* BGTZ */
-	      goto greater_branch;
+	    case 0:
+	      goto equal_branch;	/* BEQL   */
+	    case 1:
+	      goto neq_branch;	/* BNEZ   */
+	    case 2:
+	      goto less_branch;	/* BLEZ   */
+	    case 3:
+	      goto greater_branch;	/* BGTZ */
 	    default:
 	      pc += 4;
 	    }
 	}
-      else if (itype_op (inst) == 17 && itype_rs (inst) == 8)
-				/* BC1F, BC1FL, BC1T, BC1TL: 010001 01000 */
-	{
-	  int tf = itype_rt (inst) & 0x01;
-	  int cnum = itype_rt (inst) >> 2;
-	  int fcrcs = read_signed_register (FCRCS_REGNUM);
-	  int cond = ((fcrcs >> 24) & 0x0e) | ((fcrcs >> 23) & 0x01);
-
-	  if (((cond >> cnum) & 0x01) == tf)
-	    pc += mips32_relative_offset (inst) + 4;
-	  else
-	    pc += 8;
-	}
       else
 	pc += 4;		/* Not a branch, next instruction is easy */
     }
@@ -746,7 +732,7 @@
     {				/* This gets way messy */
 
       /* Further subdivide into SPECIAL, REGIMM and other */
-      switch (op = itype_op (inst) & 0x07)	/* extract bits 28,27,26 */
+      switch (op = ((inst >> 26) & 0x07))	/* extract bits 28,27,26 */
 	{
 	case 0:		/* SPECIAL */
 	  op = rtype_funct (inst);
@@ -761,15 +747,15 @@
 	      pc += 4;
 	    }
 
-	  break;	/* end SPECIAL */
+	  break;		/* end special */
 	case 1:		/* REGIMM */
 	  {
-	    op = itype_rt (inst);	/* branch condition */
-	    switch (op)
+	    op = jtype_op (inst);	/* branch condition */
+	    switch (jtype_op (inst))
 	      {
 	      case 0:		/* BLTZ */
-	      case 2:		/* BLTZL */
-	      case 16:		/* BLTZAL */
+	      case 2:		/* BLTXL */
+	      case 16:		/* BLTZALL */
 	      case 18:		/* BLTZALL */
 	      less_branch:
 		if (read_signed_register (itype_rs (inst)) < 0)
@@ -777,7 +763,7 @@
 		else
 		  pc += 8;	/* after the delay slot */
 		break;
-	      case 1:		/* BGEZ */
+	      case 1:		/* GEZ */
 	      case 3:		/* BGEZL */
 	      case 17:		/* BGEZAL */
 	      case 19:		/* BGEZALL */
@@ -787,19 +773,19 @@
 		else
 		  pc += 8;	/* after the delay slot */
 		break;
-		/* All of the other instructions in the REGIMM category */
+		/* All of the other intructions in the REGIMM catagory */
 	      default:
 		pc += 4;
 	      }
 	  }
-	  break;	/* end REGIMM */
+	  break;		/* end REGIMM */
 	case 2:		/* J */
 	case 3:		/* JAL */
 	  {
 	    unsigned long reg;
 	    reg = jtype_target (inst) << 2;
-	    /* Upper four bits get never changed... */
 	    pc = reg + ((pc + 4) & 0xf0000000);
+	    /* Whats this mysterious 0xf000000 adjustment ??? */
 	  }
 	  break;
 	  /* FIXME case JALX : */
@@ -810,7 +796,7 @@
 	    /* Add 1 to indicate 16 bit mode - Invert ISA mode */
 	  }
 	  break;		/* The new PC will be alternate mode */
-	case 4:		/* BEQ, BEQL */
+	case 4:		/* BEQ , BEQL */
 	equal_branch:
 	  if (read_signed_register (itype_rs (inst)) ==
 	      read_signed_register (itype_rt (inst)))
@@ -818,15 +804,15 @@
 	  else
 	    pc += 8;
 	  break;
-	case 5:		/* BNE, BNEL */
+	case 5:		/* BNE , BNEL */
 	neq_branch:
 	  if (read_signed_register (itype_rs (inst)) !=
-	      read_signed_register (itype_rt (inst)))
+	      read_signed_register (itype_rs (inst)))
 	    pc += mips32_relative_offset (inst) + 4;
 	  else
 	    pc += 8;
 	  break;
-	case 6:		/* BLEZ, BLEZL */
+	case 6:		/* BLEZ , BLEZL */
 	less_zero_branch:
 	  if (read_signed_register (itype_rs (inst) <= 0))
 	    pc += mips32_relative_offset (inst) + 4;
@@ -834,13 +820,14 @@
 	    pc += 8;
 	  break;
 	case 7:
-	default:
-	greater_branch:	/* BGTZ, BGTZL */
+	greater_branch:	/* BGTZ BGTZL */
 	  if (read_signed_register (itype_rs (inst) > 0))
 	    pc += mips32_relative_offset (inst) + 4;
 	  else
 	    pc += 8;
 	  break;
+	default:
+	  pc += 8;
 	}			/* switch */
     }				/* else */
   return pc;
@@ -1353,7 +1340,7 @@
 
 /* mips_addr_bits_remove - remove useless address bits  */
 
-static CORE_ADDR
+CORE_ADDR
 mips_addr_bits_remove (CORE_ADDR addr)
 {
   if (GDB_TARGET_IS_MIPS64)
@@ -1392,34 +1379,7 @@
   return addr;
 }
 
-/* mips_software_single_step() is called just before we want to resume
-   the inferior, if we want to single-step it but there is no hardware
-   or kernel single-step support (MIPS on Linux for example).  We find
-   the target of the coming instruction and breakpoint it.
-
-   single_step is also called just after the inferior stops.  If we had
-   set up a simulated single-step, we undo our damage.  */
-
 void
-mips_software_single_step (enum target_signal sig, int insert_breakpoints_p)
-{
-  static CORE_ADDR next_pc;
-  typedef char binsn_quantum[BREAKPOINT_MAX];
-  static binsn_quantum break_mem;
-  CORE_ADDR pc;
-
-  if (insert_breakpoints_p)
-    {
-      pc = read_register (PC_REGNUM);
-      next_pc = mips_next_pc (pc);
-
-      target_insert_breakpoint (next_pc, break_mem);
-    }
-  else
-    target_remove_breakpoint (next_pc, break_mem);
-}
-
-static void
 mips_init_frame_pc_first (int fromleaf, struct frame_info *prev)
 {
   CORE_ADDR pc, tmp;
@@ -2233,8 +2193,8 @@
          don't use float registers for arguments.  This duplication of
          arguments in general registers can't hurt non-MIPS16 functions
          because those registers are normally skipped.  */
-      /* MIPS_EABI squeezes a struct that contains a single floating
-         point value into an FP register instead of pushing it onto the
+      /* MIPS_EABI squeeses a struct that contains a single floating
+         point value into an FP register instead of pusing it onto the
          stack. */
       if (fp_register_arg_p (typecode, arg_type)
 	  && float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
@@ -3249,7 +3209,7 @@
 {
   struct return_value_word lo;
   struct return_value_word hi;
-  return_value_location (valtype, &hi, &lo);
+  return_value_location (valtype, &lo, &hi);
 
   memcpy (valbuf + lo.buf_offset,
 	  regbuf + REGISTER_BYTE (lo.reg) + lo.reg_offset,
@@ -3270,7 +3230,7 @@
   char raw_buffer[MAX_REGISTER_RAW_SIZE];
   struct return_value_word lo;
   struct return_value_word hi;
-  return_value_location (valtype, &hi, &lo);
+  return_value_location (valtype, &lo, &hi);
 
   memset (raw_buffer, 0, sizeof (raw_buffer));
   memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
@@ -3319,6 +3279,7 @@
 static void
 show_mipsfpu_command (char *args, int from_tty)
 {
+  char *msg;
   char *fpu;
   switch (MIPS_FPU_TYPE)
     {
@@ -3426,7 +3387,7 @@
 int
 mips_set_processor_type (char *str)
 {
-  int i;
+  int i, j;
 
   if (str == NULL)
     return 0;
@@ -3532,17 +3493,16 @@
     {
       if (pc_is_mips16 (*pcptr))
 	{
-	  static unsigned char mips16_big_breakpoint[] =
-	    MIPS16_BIG_BREAKPOINT;
+	  static char mips16_big_breakpoint[] = MIPS16_BIG_BREAKPOINT;
 	  *pcptr = UNMAKE_MIPS16_ADDR (*pcptr);
 	  *lenptr = sizeof (mips16_big_breakpoint);
 	  return mips16_big_breakpoint;
 	}
       else
 	{
-	  static unsigned char big_breakpoint[] = BIG_BREAKPOINT;
-	  static unsigned char pmon_big_breakpoint[] = PMON_BIG_BREAKPOINT;
-	  static unsigned char idt_big_breakpoint[] = IDT_BIG_BREAKPOINT;
+	  static char big_breakpoint[] = BIG_BREAKPOINT;
+	  static char pmon_big_breakpoint[] = PMON_BIG_BREAKPOINT;
+	  static char idt_big_breakpoint[] = IDT_BIG_BREAKPOINT;
 
 	  *lenptr = sizeof (big_breakpoint);
 
@@ -3560,19 +3520,16 @@
     {
       if (pc_is_mips16 (*pcptr))
 	{
-	  static unsigned char mips16_little_breakpoint[] =
-	    MIPS16_LITTLE_BREAKPOINT;
+	  static char mips16_little_breakpoint[] = MIPS16_LITTLE_BREAKPOINT;
 	  *pcptr = UNMAKE_MIPS16_ADDR (*pcptr);
 	  *lenptr = sizeof (mips16_little_breakpoint);
 	  return mips16_little_breakpoint;
 	}
       else
 	{
-	  static unsigned char little_breakpoint[] = LITTLE_BREAKPOINT;
-	  static unsigned char pmon_little_breakpoint[] =
-	    PMON_LITTLE_BREAKPOINT;
-	  static unsigned char idt_little_breakpoint[] =
-	    IDT_LITTLE_BREAKPOINT;
+	  static char little_breakpoint[] = LITTLE_BREAKPOINT;
+	  static char pmon_little_breakpoint[] = PMON_LITTLE_BREAKPOINT;
+	  static char idt_little_breakpoint[] = IDT_LITTLE_BREAKPOINT;
 
 	  *lenptr = sizeof (little_breakpoint);
 
@@ -3911,12 +3868,6 @@
   int elf_flags;
   enum mips_abi mips_abi;
 
-  /* Reset the disassembly info, in case it was set to something
-     non-default.  */
-  tm_print_insn_info.flavour = bfd_target_unknown_flavour;
-  tm_print_insn_info.arch = bfd_arch_unknown;
-  tm_print_insn_info.mach = 0;
-
   /* Extract the elf_flags if available */
   if (info.abfd != NULL
       && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
@@ -3961,10 +3912,6 @@
 	case bfd_mach_mips5000:
 	  mips_abi = MIPS_ABI_EABI64;
 	  break;
-	case bfd_mach_mips8000:
-	case bfd_mach_mips10000:
-	  mips_abi = MIPS_ABI_N32;
-	  break;
 	}
     }
 #ifdef MIPS_DEFAULT_ABI
@@ -4008,7 +3955,6 @@
   set_gdbarch_double_bit (gdbarch, 64);
   set_gdbarch_long_double_bit (gdbarch, 64);
   tdep->mips_abi = mips_abi;
-
   switch (mips_abi)
     {
     case MIPS_ABI_O32:
@@ -4080,17 +4026,6 @@
       set_gdbarch_long_bit (gdbarch, 32);
       set_gdbarch_ptr_bit (gdbarch, 32);
       set_gdbarch_long_long_bit (gdbarch, 64);
-
-      /* Set up the disassembler info, so that we get the right
-	 register names from libopcodes.  */
-      tm_print_insn_info.flavour = bfd_target_elf_flavour;
-      tm_print_insn_info.arch = bfd_arch_mips;
-      if (info.bfd_arch_info != NULL
-	  && info.bfd_arch_info->arch == bfd_arch_mips
-	  && info.bfd_arch_info->mach)
-	tm_print_insn_info.mach = info.bfd_arch_info->mach;
-      else
-	tm_print_insn_info.mach = bfd_mach_mips8000;
       break;
     default:
       tdep->mips_abi_string = "default";
@@ -4163,15 +4098,6 @@
   set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
   set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
 
-  /* Add/remove bits from an address. The MIPS needs be careful to
-     ensure that all 32 bit addresses are sign extended to 64 bits. */
-  set_gdbarch_addr_bits_remove (gdbarch, mips_addr_bits_remove);
-
-  /* There's a mess in stack frame creation.  See comments in
-     blockframe.c near reference to INIT_FRAME_PC_FIRST.  */
-  set_gdbarch_init_frame_pc_first (gdbarch, mips_init_frame_pc_first);
-  set_gdbarch_init_frame_pc (gdbarch, init_frame_pc_noop);
-
   /* Map debug register numbers onto internal register numbers. */
   set_gdbarch_stab_reg_to_regnum (gdbarch, mips_stab_reg_to_regnum);
   set_gdbarch_ecoff_reg_to_regnum (gdbarch, mips_ecoff_reg_to_regnum);
@@ -4374,6 +4300,12 @@
 		      "mips_dump_tdep: IGNORE_HELPER_CALL # %s\n",
 		      XSTRING (IGNORE_HELPER_CALL (PC)));
   fprintf_unfiltered (file,
+		      "mips_dump_tdep: INIT_FRAME_PC # %s\n",
+		      XSTRING (INIT_FRAME_PC (FROMLEAF, PREV)));
+  fprintf_unfiltered (file,
+		      "mips_dump_tdep: INIT_FRAME_PC_FIRST # %s\n",
+		      XSTRING (INIT_FRAME_PC_FIRST (FROMLEAF, PREV)));
+  fprintf_unfiltered (file,
 		      "mips_dump_tdep: IN_SIGTRAMP # %s\n",
 		      XSTRING (IN_SIGTRAMP (PC, NAME)));
   fprintf_unfiltered (file,
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index 17a8fb7..dac06fc 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -185,7 +185,7 @@
     asection *got_sect;		/* Section pointer for .got section */
   };
 
-static void alphacoff_locate_sections (bfd *, asection *, PTR);
+static void alphacoff_locate_sections (bfd *, asection *, void *);
 
 /* We are called once per section from read_alphacoff_dynamic_symtab.
    We need to examine each section we are passed, check to see
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index dd7674e..506c27c 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -30,7 +30,6 @@
 #include "gdbcore.h"
 #include "symfile.h"
 #include "regcache.h"
-#include "arch-utils.h"
 
 extern void _initialize_mn10300_tdep (void);
 static CORE_ADDR mn10300_analyze_prologue (struct frame_info *fi,
@@ -86,13 +85,13 @@
   return register_name (reg, regs, sizeof regs);
 }
   
-static CORE_ADDR
+CORE_ADDR
 mn10300_saved_pc_after_call (struct frame_info *fi)
 {
   return read_memory_integer (read_register (SP_REGNUM), 4);
 }
 
-static void
+void
 mn10300_extract_return_value (struct type *type, char *regbuf, char *valbuf)
 {
   if (TYPE_CODE (type) == TYPE_CODE_PTR)
@@ -101,14 +100,14 @@
     memcpy (valbuf, regbuf + REGISTER_BYTE (0), TYPE_LENGTH (type));
 }
 
-static CORE_ADDR
+CORE_ADDR
 mn10300_extract_struct_value_address (char *regbuf)
 {
   return extract_address (regbuf + REGISTER_BYTE (4),
 			  REGISTER_RAW_SIZE (4));
 }
 
-static void
+void
 mn10300_store_return_value (struct type *type, char *valbuf)
 {
   if (TYPE_CODE (type) == TYPE_CODE_PTR)
@@ -147,7 +146,7 @@
 
 
 /* Should call_function allocate stack space for a struct return?  */
-static int
+int
 mn10300_use_struct_convention (int gcc_p, struct type *type)
 {
   return (TYPE_NFIELDS (type) > 1 || TYPE_LENGTH (type) > 8);
@@ -160,7 +159,7 @@
    so we need a single byte breakpoint.  Matsushita hasn't defined
    one, so we defined it ourselves.  */
 
-static unsigned char *
+unsigned char *
 mn10300_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size)
 {
   static char breakpoint[] =
@@ -197,66 +196,32 @@
   if (fi == NULL || movm_args == 0)
     return;
 
-  if (movm_args & movm_other_bit)
-    {
-      /* The `other' bit leaves a blank area of four bytes at the
-         beginning of its block of saved registers, making it 32 bytes
-         long in total.  */
-      fi->saved_regs[LAR_REGNUM]    = fi->frame + offset + 4;
-      fi->saved_regs[LIR_REGNUM]    = fi->frame + offset + 8;
-      fi->saved_regs[MDR_REGNUM]    = fi->frame + offset + 12;
-      fi->saved_regs[A0_REGNUM + 1] = fi->frame + offset + 16;
-      fi->saved_regs[A0_REGNUM]     = fi->frame + offset + 20;
-      fi->saved_regs[D0_REGNUM + 1] = fi->frame + offset + 24;
-      fi->saved_regs[D0_REGNUM]     = fi->frame + offset + 28;
-      offset += 32;
-    }
-  if (movm_args & movm_a3_bit)
+  if (movm_args & 0x10)
     {
       fi->saved_regs[A3_REGNUM] = fi->frame + offset;
       offset += 4;
     }
-  if (movm_args & movm_a2_bit)
+  if (movm_args & 0x20)
     {
       fi->saved_regs[A2_REGNUM] = fi->frame + offset;
       offset += 4;
     }
-  if (movm_args & movm_d3_bit)
+  if (movm_args & 0x40)
     {
       fi->saved_regs[D3_REGNUM] = fi->frame + offset;
       offset += 4;
     }
-  if (movm_args & movm_d2_bit)
+  if (movm_args & 0x80)
     {
       fi->saved_regs[D2_REGNUM] = fi->frame + offset;
       offset += 4;
     }
-  if (AM33_MODE)
+  if (AM33_MODE && movm_args & 0x02)
     {
-      if (movm_args & movm_exother_bit)
-        {
-          fi->saved_regs[MCVF_REGNUM]   = fi->frame + offset;
-          fi->saved_regs[MCRL_REGNUM]   = fi->frame + offset + 4;
-          fi->saved_regs[MCRH_REGNUM]   = fi->frame + offset + 8;
-          fi->saved_regs[MDRQ_REGNUM]   = fi->frame + offset + 12;
-          fi->saved_regs[E0_REGNUM + 1] = fi->frame + offset + 16;
-          fi->saved_regs[E0_REGNUM + 0] = fi->frame + offset + 20;
-          offset += 24;
-        }
-      if (movm_args & movm_exreg1_bit)
-        {
-          fi->saved_regs[E0_REGNUM + 7] = fi->frame + offset;
-          fi->saved_regs[E0_REGNUM + 6] = fi->frame + offset + 4;
-          fi->saved_regs[E0_REGNUM + 5] = fi->frame + offset + 8;
-          fi->saved_regs[E0_REGNUM + 4] = fi->frame + offset + 12;
-          offset += 16;
-        }
-      if (movm_args & movm_exreg0_bit)
-        {
-          fi->saved_regs[E0_REGNUM + 3] = fi->frame + offset;
-          fi->saved_regs[E0_REGNUM + 2] = fi->frame + offset + 4;
-          offset += 8;
-        }
+      fi->saved_regs[E0_REGNUM + 5] = fi->frame + offset;
+      fi->saved_regs[E0_REGNUM + 4] = fi->frame + offset + 4;
+      fi->saved_regs[E0_REGNUM + 3] = fi->frame + offset + 8;
+      fi->saved_regs[E0_REGNUM + 2] = fi->frame + offset + 12;
     }
 }
 
@@ -544,32 +509,6 @@
   return addr;
 }
 
-
-/* Function: saved_regs_size
-   Return the size in bytes of the register save area, based on the
-   saved_regs array in FI.  */
-static int
-saved_regs_size (struct frame_info *fi)
-{
-  int adjust = 0;
-  int i;
-
-  /* Reserve four bytes for every register saved.  */
-  for (i = 0; i < NUM_REGS; i++)
-    if (fi->saved_regs[i])
-      adjust += 4;
-
-  /* If we saved LIR, then it's most likely we used a `movm'
-     instruction with the `other' bit set, in which case the SP is
-     decremented by an extra four bytes, "to simplify calculation
-     of the transfer area", according to the processor manual.  */
-  if (fi->saved_regs[LIR_REGNUM])
-    adjust += 4;
-
-  return adjust;
-}
-
-
 /* Function: frame_chain
    Figure out and return the caller's frame pointer given current
    frame_info struct.
@@ -577,7 +516,7 @@
    We don't handle dummy frames yet but we would probably just return the
    stack pointer that was in use at the time the function call was made?  */
 
-static CORE_ADDR
+CORE_ADDR
 mn10300_frame_chain (struct frame_info *fi)
 {
   struct frame_info *dummy;
@@ -620,7 +559,19 @@
     }
   else
     {
-      int adjust = saved_regs_size (fi);
+      int adjust = 0;
+
+      adjust += (fi->saved_regs[D2_REGNUM] ? 4 : 0);
+      adjust += (fi->saved_regs[D3_REGNUM] ? 4 : 0);
+      adjust += (fi->saved_regs[A2_REGNUM] ? 4 : 0);
+      adjust += (fi->saved_regs[A3_REGNUM] ? 4 : 0);
+      if (AM33_MODE)
+	{
+	  adjust += (fi->saved_regs[E0_REGNUM + 5] ? 4 : 0);
+	  adjust += (fi->saved_regs[E0_REGNUM + 4] ? 4 : 0);
+	  adjust += (fi->saved_regs[E0_REGNUM + 3] ? 4 : 0);
+	  adjust += (fi->saved_regs[E0_REGNUM + 2] ? 4 : 0);
+	}
 
       /* Our caller does not have a frame pointer.  So his frame starts
          at the base of our frame (fi->frame) + register save space
@@ -632,7 +583,7 @@
 /* Function: skip_prologue
    Return the address of the first inst past the prologue of the function.  */
 
-static CORE_ADDR
+CORE_ADDR
 mn10300_skip_prologue (CORE_ADDR pc)
 {
   /* We used to check the debug symbols, but that can lose if
@@ -640,41 +591,38 @@
   return mn10300_analyze_prologue (NULL, pc);
 }
 
-/* generic_pop_current_frame calls this function if the current
-   frame isn't a dummy frame.  */
-static void
-mn10300_pop_frame_regular (struct frame_info *frame)
-{
-  int regnum;
-
-  write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
-
-  /* Restore any saved registers.  */
-  for (regnum = 0; regnum < NUM_REGS; regnum++)
-    if (frame->saved_regs[regnum] != 0)
-      {
-        ULONGEST value;
-
-        value = read_memory_unsigned_integer (frame->saved_regs[regnum],
-                                              REGISTER_RAW_SIZE (regnum));
-        write_register (regnum, value);
-      }
-
-  /* Actually cut back the stack.  */
-  write_register (SP_REGNUM, FRAME_FP (frame));
-
-  /* Don't we need to set the PC?!?  XXX FIXME.  */
-}
 
 /* Function: pop_frame
    This routine gets called when either the user uses the `return'
    command, or the call dummy breakpoint gets hit.  */
-static void
-mn10300_pop_frame (void)
+
+void
+mn10300_pop_frame (struct frame_info *frame)
 {
-  /* This function checks for and handles generic dummy frames, and
-     calls back to our function for ordinary frames.  */
-  generic_pop_current_frame (mn10300_pop_frame_regular);
+  int regnum;
+
+  if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+    generic_pop_dummy_frame ();
+  else
+    {
+      write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
+
+      /* Restore any saved registers.  */
+      for (regnum = 0; regnum < NUM_REGS; regnum++)
+	if (frame->saved_regs[regnum] != 0)
+	  {
+	    ULONGEST value;
+
+	    value = read_memory_unsigned_integer (frame->saved_regs[regnum],
+						REGISTER_RAW_SIZE (regnum));
+	    write_register (regnum, value);
+	  }
+
+      /* Actually cut back the stack.  */
+      write_register (SP_REGNUM, FRAME_FP (frame));
+
+      /* Don't we need to set the PC?!?  XXX FIXME.  */
+    }
 
   /* Throw away any cached frame information.  */
   flush_cached_frames ();
@@ -684,7 +632,7 @@
    Setup arguments for a call to the target.  Arguments go in
    order on the stack.  */
 
-static CORE_ADDR
+CORE_ADDR
 mn10300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
 			int struct_return, CORE_ADDR struct_addr)
 {
@@ -765,7 +713,7 @@
    Set up the return address for the inferior function call.
    Needed for targets where we don't actually execute a JSR/BSR instruction */
 
-static CORE_ADDR
+CORE_ADDR
 mn10300_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
 {
   unsigned char buf[4];
@@ -779,11 +727,12 @@
    Store the structure value return address for an inferior function
    call.  */
 
-static void
+CORE_ADDR
 mn10300_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
 {
   /* The structure return address is passed as the first argument.  */
   write_register (0, addr);
+  return sp;
 }
 
 /* Function: frame_saved_pc 
@@ -793,10 +742,22 @@
    instead of RP, because that's where "caller" of the dummy-frame
    will be found.  */
 
-static CORE_ADDR
+CORE_ADDR
 mn10300_frame_saved_pc (struct frame_info *fi)
 {
-  int adjust = saved_regs_size (fi);
+  int adjust = 0;
+
+  adjust += (fi->saved_regs[D2_REGNUM] ? 4 : 0);
+  adjust += (fi->saved_regs[D3_REGNUM] ? 4 : 0);
+  adjust += (fi->saved_regs[A2_REGNUM] ? 4 : 0);
+  adjust += (fi->saved_regs[A3_REGNUM] ? 4 : 0);
+  if (AM33_MODE)
+    {
+      adjust += (fi->saved_regs[E0_REGNUM + 5] ? 4 : 0);
+      adjust += (fi->saved_regs[E0_REGNUM + 4] ? 4 : 0);
+      adjust += (fi->saved_regs[E0_REGNUM + 3] ? 4 : 0);
+      adjust += (fi->saved_regs[E0_REGNUM + 2] ? 4 : 0);
+    }
 
   return (read_memory_integer (fi->frame + adjust, REGISTER_SIZE));
 }
@@ -815,8 +776,8 @@
    First, during normal backtracing, second, while figuring out the frame
    pointer just prior to calling the target function (see run_stack_dummy).  */
 
-static void
-mn10300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
+void
+mn10300_init_extra_frame_info (struct frame_info *fi)
 {
   if (fi->next)
     fi->pc = FRAME_SAVED_PC (fi->next);
@@ -831,14 +792,6 @@
   mn10300_analyze_prologue (fi, 0);
 }
 
-
-/* This function's job is handled by init_extra_frame_info.  */
-static void
-mn10300_frame_init_saved_regs (struct frame_info *frame)
-{
-}
-
-
 /* Function: mn10300_virtual_frame_pointer
    Return the register that the function uses for a frame pointer, 
    plus any necessary offset to be applied to the register before
@@ -893,35 +846,6 @@
   return 4;
 }
 
-/* If DWARF2 is a register number appearing in Dwarf2 debug info, then
-   mn10300_dwarf2_reg_to_regnum (DWARF2) is the corresponding GDB
-   register number.  Why don't Dwarf2 and GDB use the same numbering?
-   Who knows?  But since people have object files lying around with
-   the existing Dwarf2 numbering, and other people have written stubs
-   to work with the existing GDB, neither of them can change.  So we
-   just have to cope.  */
-static int
-mn10300_dwarf2_reg_to_regnum (int dwarf2)
-{
-  /* This table is supposed to be shaped like the REGISTER_NAMES
-     initializer in gcc/config/mn10300/mn10300.h.  Registers which
-     appear in GCC's numbering, but have no counterpart in GDB's
-     world, are marked with a -1.  */
-  static int dwarf2_to_gdb[] = {
-    0,  1,  2,  3,  4,  5,  6,  7, -1, 8,
-    15, 16, 17, 18, 19, 20, 21, 22
-  };
-  int gdb;
-
-  if (dwarf2 < 0
-      || dwarf2 >= (sizeof (dwarf2_to_gdb) / sizeof (dwarf2_to_gdb[0]))
-      || dwarf2_to_gdb[dwarf2] == -1)
-    internal_error (__FILE__, __LINE__,
-                    "bogus register number in debug info: %d", dwarf2);
-
-  return dwarf2_to_gdb[dwarf2];
-}
-
 static void
 mn10300_print_register (const char *name, int regnum, int reg_width)
 {
@@ -1020,7 +944,6 @@
 mn10300_gdbarch_init (struct gdbarch_info info,
 		      struct gdbarch_list *arches)
 {
-  static LONGEST mn10300_call_dummy_words[] = { 0 };
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep = NULL;
   int am33_mode;
@@ -1058,72 +981,25 @@
       return NULL; /* keep GCC happy. */
     }
 
-  /* Registers.  */
-  set_gdbarch_num_regs (gdbarch, num_regs);
-  set_gdbarch_register_name (gdbarch, register_name);
   set_gdbarch_register_size (gdbarch, 4);
-  set_gdbarch_register_bytes (gdbarch, 
-                              num_regs * gdbarch_register_size (gdbarch));
   set_gdbarch_max_register_raw_size (gdbarch, 4);
-  set_gdbarch_register_raw_size (gdbarch, mn10300_register_raw_size);
-  set_gdbarch_register_byte (gdbarch, mn10300_register_byte);
-  set_gdbarch_max_register_virtual_size (gdbarch, 4);
-  set_gdbarch_register_virtual_size (gdbarch, mn10300_register_virtual_size);
   set_gdbarch_register_virtual_type (gdbarch, mn10300_register_virtual_type);
-  set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mn10300_dwarf2_reg_to_regnum);
-  set_gdbarch_do_registers_info (gdbarch, mn10300_do_registers_info);
-  set_gdbarch_fp_regnum (gdbarch, 31);
-
-  /* Breakpoints.  */
-  set_gdbarch_breakpoint_from_pc (gdbarch, mn10300_breakpoint_from_pc);
-  set_gdbarch_function_start_offset (gdbarch, 0);
-  set_gdbarch_decr_pc_after_break (gdbarch, 0);
-
-  /* Stack unwinding.  */
-  set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
-  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
-  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
-  set_gdbarch_saved_pc_after_call (gdbarch, mn10300_saved_pc_after_call);
-  set_gdbarch_init_extra_frame_info (gdbarch, mn10300_init_extra_frame_info);
-  set_gdbarch_frame_init_saved_regs (gdbarch, mn10300_frame_init_saved_regs);
-  set_gdbarch_frame_chain (gdbarch, mn10300_frame_chain);
-  set_gdbarch_frame_saved_pc (gdbarch, mn10300_frame_saved_pc);
-  set_gdbarch_extract_return_value (gdbarch, mn10300_extract_return_value);
-  set_gdbarch_extract_struct_value_address
-    (gdbarch, mn10300_extract_struct_value_address);
-  set_gdbarch_store_return_value (gdbarch, mn10300_store_return_value);
-  set_gdbarch_store_struct_return (gdbarch, mn10300_store_struct_return);
-  set_gdbarch_pop_frame (gdbarch, mn10300_pop_frame);
-  set_gdbarch_skip_prologue (gdbarch, mn10300_skip_prologue);
-  set_gdbarch_frame_args_skip (gdbarch, 0);
-  set_gdbarch_frame_args_address (gdbarch, default_frame_address);
-  set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
-  set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
-  /* That's right, we're using the stack pointer as our frame pointer.  */
-  set_gdbarch_read_fp (gdbarch, generic_target_read_sp);
-
-  /* Calling functions in the inferior from GDB.  */
+  set_gdbarch_register_byte (gdbarch, mn10300_register_byte);
+  set_gdbarch_register_virtual_size (gdbarch, mn10300_register_virtual_size);
+  set_gdbarch_register_raw_size (gdbarch, mn10300_register_raw_size);
   set_gdbarch_call_dummy_p (gdbarch, 1);
-  set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
-  set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
-  set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
-  set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
-  set_gdbarch_call_dummy_words (gdbarch, mn10300_call_dummy_words);
-  set_gdbarch_sizeof_call_dummy_words (gdbarch, 
-                                       sizeof (mn10300_call_dummy_words));
-  set_gdbarch_call_dummy_length (gdbarch, 0);
-  set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
-  set_gdbarch_call_dummy_start_offset (gdbarch, 0);
-  set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
+  set_gdbarch_register_name (gdbarch, register_name);
   set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
-  set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
+  set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 0);
+  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
+  set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
   set_gdbarch_push_arguments (gdbarch, mn10300_push_arguments);
-  set_gdbarch_reg_struct_has_addr (gdbarch, mn10300_reg_struct_has_addr);
   set_gdbarch_push_return_address (gdbarch, mn10300_push_return_address);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
+  set_gdbarch_reg_struct_has_addr (gdbarch, mn10300_reg_struct_has_addr);
   set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
-  set_gdbarch_use_struct_convention (gdbarch, mn10300_use_struct_convention);
+  set_gdbarch_num_regs (gdbarch, num_regs);
+  set_gdbarch_do_registers_info (gdbarch, mn10300_do_registers_info);
 
   tdep->am33_mode = am33_mode;
 
diff --git a/gdb/mon960-rom.c b/gdb/mon960-rom.c
index 847d4cf..27c5092 100644
--- a/gdb/mon960-rom.c
+++ b/gdb/mon960-rom.c
@@ -42,12 +42,14 @@
 static void
 mon960_load_gen (char *filename, int from_tty)
 {
+  extern int inferior_pid;
+
   generic_load (filename, from_tty);
   /* Finally, make the PC point at the start address */
   if (exec_bfd)
     write_pc (bfd_get_start_address (exec_bfd));
 
-  inferior_ptid = null_ptid;		/* No process now */
+  inferior_pid = 0;		/* No process now */
 }
 
 #else
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 1174dd9..15b11d5 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -67,13 +67,13 @@
 static void monitor_printable_string (char *newstr, char *oldstr, int len);
 static void monitor_error (char *function, char *message, CORE_ADDR memaddr, int len, char *string, int final_char);
 static void monitor_detach (char *args, int from_tty);
-static void monitor_resume (ptid_t ptid, int step, enum target_signal sig);
+static void monitor_resume (int pid, int step, enum target_signal sig);
 static void monitor_interrupt (int signo);
 static void monitor_interrupt_twice (int signo);
 static void monitor_interrupt_query (void);
 static void monitor_wait_cleanup (void *old_timeout);
 
-static ptid_t monitor_wait (ptid_t ptid, struct target_waitstatus *status);
+static int monitor_wait (int pid, struct target_waitstatus *status);
 static void monitor_fetch_registers (int regno);
 static void monitor_store_registers (int regno);
 static void monitor_prepare_to_store (void);
@@ -129,12 +129,6 @@
 static struct re_pattern_buffer getmem_resp_delim_pattern;
 static char getmem_resp_delim_fastmap[256];
 
-static struct re_pattern_buffer setmem_resp_delim_pattern;
-static char setmem_resp_delim_fastmap[256];
-
-static struct re_pattern_buffer setreg_resp_delim_pattern;
-static char setreg_resp_delim_fastmap[256];
-
 static int dump_reg_flag;	/* Non-zero means do a dump_registers cmd when
 				   monitor_wait wakes up.  */
 
@@ -758,14 +752,6 @@
     compile_pattern (mon_ops->getmem.resp_delim, &getmem_resp_delim_pattern,
 		     getmem_resp_delim_fastmap);
 
-  if (mon_ops->setmem.resp_delim)
-    compile_pattern (mon_ops->setmem.resp_delim, &setmem_resp_delim_pattern,
-                     setmem_resp_delim_fastmap);
-
-  if (mon_ops->setreg.resp_delim)
-    compile_pattern (mon_ops->setreg.resp_delim, &setreg_resp_delim_pattern,
-                     setreg_resp_delim_fastmap);
-  
   unpush_target (targ_ops);
 
   if (dev_name)
@@ -847,7 +833,7 @@
 
   push_target (targ_ops);
 
-  inferior_ptid = pid_to_ptid (42000);	/* Make run command think we are busy... */
+  inferior_pid = 42000;		/* Make run command think we are busy... */
 
   /* Give monitor_wait something to read */
 
@@ -936,7 +922,7 @@
 /* Tell the remote machine to resume.  */
 
 static void
-monitor_resume (ptid_t ptid, int step, enum target_signal sig)
+monitor_resume (int pid, int step, enum target_signal sig)
 {
   /* Some monitors require a different command when starting a program */
   monitor_debug ("MON resume\n");
@@ -1086,8 +1072,8 @@
 /* Wait until the remote machine stops, then return, storing status in
    status just as `wait' would.  */
 
-static ptid_t
-monitor_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+monitor_wait (int pid, struct target_waitstatus *status)
 {
   int old_timeout = timeout;
   char buf[TARGET_BUF_SIZE];
@@ -1163,7 +1149,7 @@
 
   in_monitor_wait = 0;
 
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 /* Fetch register REGNO, or all registers if REGNO is -1. Returns
@@ -1354,13 +1340,6 @@
   else
     monitor_printf (current_monitor->setreg.cmd, name, val);
 
-  if (current_monitor->setreg.resp_delim)
-    {
-      monitor_debug ("EXP setreg.resp_delim\n");
-      monitor_expect_regexp (&setreg_resp_delim_pattern, NULL, 0);
-      if (current_monitor->flags & MO_SETREG_INTERACTIVE)
-	monitor_printf ("%s\r", paddr_nz (val));
-    }
   if (current_monitor->setreg.term)
     {
       monitor_debug ("EXP setreg.term\n");
@@ -1487,12 +1466,6 @@
 
       monitor_printf_noecho (cmd, memaddr);
 
-      if (current_monitor->setmem.resp_delim)
-        {
-          monitor_debug ("EXP setmem.resp_delim");
-          monitor_expect_regexp (&setmem_resp_delim_pattern, NULL, 0); 
-	  monitor_printf ("%x\r", val);
-       }
       if (current_monitor->setmem.term)
 	{
 	  monitor_debug ("EXP setmem.term");
@@ -2207,7 +2180,7 @@
   if (exec_bfd)
     write_pc (bfd_get_start_address (exec_bfd));
 
-  inferior_ptid = null_ptid ;	/* No process now */
+  inferior_pid = 0;		/* No process now */
 
 /* This is necessary because many things were based on the PC at the time that
    we attached to the monitor, which is no longer valid now that we have loaded
diff --git a/gdb/nindy-share/ttyflush.c b/gdb/nindy-share/ttyflush.c
index ff3b644..9754472 100644
--- a/gdb/nindy-share/ttyflush.c
+++ b/gdb/nindy-share/ttyflush.c
@@ -22,6 +22,11 @@
 #include "defs.h"
 #include "serial.h"
 
+#ifdef _MSC_VER
+# include <stdlib.h>
+# define sleep _sleep
+#endif
+
 /* Flush all pending input and output for SERIAL, wait for a second, and
    then if there is a character pending, discard it and flush again.  */
 
diff --git a/gdb/ns32knbsd-nat.c b/gdb/ns32knbsd-nat.c
index fd6e619..7527d94 100644
--- a/gdb/ns32knbsd-nat.c
+++ b/gdb/ns32knbsd-nat.c
@@ -43,9 +43,9 @@
   struct reg inferior_registers;
   struct fpreg inferior_fpregisters;
 
-  ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PT_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers, 0);
-  ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+  ptrace (PT_GETFPREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_fpregisters, 0);
 
   RF (R0_REGNUM + 0, inferior_registers.r_r0);
@@ -104,9 +104,9 @@
   RS (LP0_REGNUM + 5, inferior_fpregisters.r_freg[5]);
   RS (LP0_REGNUM + 7, inferior_fpregisters.r_freg[7]);
 
-  ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+  ptrace (PT_SETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers, 0);
-  ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+  ptrace (PT_SETFPREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_fpregisters, 0);
 }
 
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 85762c3..e862709 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -854,7 +854,7 @@
   /* First try to open an existing file in the current directory, and
      then try the directory where the symbol file is located. */
 
-  symsfilename = concat ("./", lbasename (filename), ".syms", (char *) NULL);
+  symsfilename = concat ("./", basename (filename), ".syms", (char *) NULL);
   if ((fd = open_existing_mapped_file (symsfilename, mtime, flags)) < 0)
     {
       xfree (symsfilename);
@@ -874,7 +874,7 @@
   if ((fd < 0) && (flags & OBJF_MAPPED))
     {
       xfree (symsfilename);
-      symsfilename = concat ("./", lbasename (filename), ".syms",
+      symsfilename = concat ("./", basename (filename), ".syms",
 			     (char *) NULL);
       if ((fd = open (symsfilename, O_RDWR | O_CREAT | O_TRUNC, 0666)) < 0)
 	{
diff --git a/gdb/ocd.c b/gdb/ocd.c
index f5962c0..609edcd 100644
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -151,7 +151,7 @@
 /*  Return nonzero if the thread TH is still alive on the remote system.  */
 
 int
-ocd_thread_alive (ptid_t th)
+ocd_thread_alive (int th)
 {
   return 1;
 }
@@ -344,7 +344,7 @@
      variables, especially since GDB will someday have a notion of debugging
      several processes.  */
 
-  inferior_ptid = pid_to_ptid (42000);
+  inferior_pid = 42000;
   /* Start the remote connection; if error (0), discard this target.
      In particular, if the user quits, be sure to discard it
      (we'd be in an inconsistent state otherwise).  */
@@ -376,7 +376,7 @@
 /* Tell the remote machine to resume.  */
 
 void
-ocd_resume (ptid_t ptid, int step, enum target_signal siggnal)
+ocd_resume (int pid, int step, enum target_signal siggnal)
 {
   int pktlen;
 
@@ -1251,7 +1251,7 @@
 {
   generic_load (args, from_tty);
 
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 
 /* This is necessary because many things were based on the PC at the time that
    we attached to the monitor, which is no longer valid now that we have loaded
diff --git a/gdb/ocd.h b/gdb/ocd.h
index 5fa1fb9..6b299cb 100644
--- a/gdb/ocd.h
+++ b/gdb/ocd.h
@@ -93,7 +93,7 @@
 
 void ocd_detach (char *args, int from_tty);
 
-void ocd_resume (ptid_t ptid, int step, enum target_signal siggnal);
+void ocd_resume (int pid, int step, enum target_signal siggnal);
 
 void ocd_prepare_to_store (void);
 
@@ -111,7 +111,7 @@
 
 void ocd_create_inferior (char *exec_file, char *args, char **env);
 
-int ocd_thread_alive (ptid_t th);
+int ocd_thread_alive (int th);
 
 void ocd_error (char *s, int error_code);
 
diff --git a/gdb/osfsolib.c b/gdb/osfsolib.c
index b5a6151..0173b63 100644
--- a/gdb/osfsolib.c
+++ b/gdb/osfsolib.c
@@ -876,7 +876,7 @@
   stop_signal = TARGET_SIGNAL_0;
   do
     {
-      target_resume (minus_one_ptid, 0, stop_signal);
+      target_resume (-1, 0, stop_signal);
       wait_for_inferior ();
     }
   while (stop_signal != TARGET_SIGNAL_TRAP);
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index d786af9..b09ec08 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -58,6 +58,11 @@
 #include "symfile.h" /* Required by objfiles.h.  */
 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
 
+/* MSVC uses strnicmp instead of strncasecmp */
+#ifdef _MSC_VER
+#define strncasecmp strnicmp
+#endif
+
 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
    as well as gratuitiously global symbol names, so we can have multiple
    yacc generated parsers in gdb.  Note that these are only the variables
diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h
index ebedef7..fcfb2ef 100644
--- a/gdb/partial-stab.h
+++ b/gdb/partial-stab.h
@@ -40,9 +40,6 @@
 
 switch (CUR_SYMBOL_TYPE)
   {
-    static struct complaint function_outside_compilation_unit = {
-      "function `%s' appears to be defined outside of all compilation units", 0, 0
-    };
     char *p;
     /*
      * Standard, external, non-debugger, symbols
@@ -579,15 +576,6 @@
 	continue;
 
       case 'f':
-        if (! pst)
-          {
-            int name_len = p - namestring;
-            char *name = xmalloc (name_len + 1);
-            memcpy (name, namestring, name_len);
-            name[name_len] = '\0';
-            complain (&function_outside_compilation_unit, name);
-            xfree (name);
-          }
 	CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
 #ifdef DBXREAD_ONLY
 	/* Kludges for ELF/STABS with Sun ACC */
@@ -612,12 +600,10 @@
 	   the bounds created by N_SO symbols.  If that's the case
 	   use the address of this function as the low bound for
 	   the partial symbol table.  */
-	if (pst
-            && (textlow_not_set
-                || (CUR_SYMBOL_VALUE < pst->textlow
-                    && (CUR_SYMBOL_VALUE
-                        != ANOFFSET (objfile->section_offsets,
-                                     SECT_OFF_TEXT (objfile))))))
+	if (textlow_not_set
+	    || (pst && CUR_SYMBOL_VALUE < pst->textlow
+		&& CUR_SYMBOL_VALUE
+		!= ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))))
 	  {
 	    pst->textlow = CUR_SYMBOL_VALUE;
 	    textlow_not_set = 0;
@@ -634,15 +620,6 @@
 	   are put into the global psymtab like one would expect.
 	   They're also in the minimal symbol table.  */
       case 'F':
-        if (! pst)
-          {
-            int name_len = p - namestring;
-            char *name = xmalloc (name_len + 1);
-            memcpy (name, namestring, name_len);
-            name[name_len] = '\0';
-            complain (&function_outside_compilation_unit, name);
-            xfree (name);
-          }
 	CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
 #ifdef DBXREAD_ONLY
 	/* Kludges for ELF/STABS with Sun ACC */
@@ -670,12 +647,10 @@
 	   the bounds created by N_SO symbols.  If that's the case
 	   use the address of this function as the low bound for
 	   the partial symbol table.  */
-	if (pst
-            && (textlow_not_set
-                || (CUR_SYMBOL_VALUE < pst->textlow
-                    && (CUR_SYMBOL_VALUE
-                        != ANOFFSET (objfile->section_offsets,
-                                     SECT_OFF_TEXT (objfile))))))
+	if (textlow_not_set
+	    || (pst && CUR_SYMBOL_VALUE < pst->textlow
+		&& CUR_SYMBOL_VALUE
+		!= ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))))
 	  {
 	    pst->textlow = CUR_SYMBOL_VALUE;
 	    textlow_not_set = 0;
diff --git a/gdb/ppc-bdm.c b/gdb/ppc-bdm.c
index 4468caa..7aae995 100644
--- a/gdb/ppc-bdm.c
+++ b/gdb/ppc-bdm.c
@@ -40,8 +40,7 @@
 
 static void bdm_ppc_open (char *name, int from_tty);
 
-static ptid_t bdm_ppc_wait (ptid_t ptid,
-                            struct target_waitstatus *target_status);
+static int bdm_ppc_wait (int pid, struct target_waitstatus *target_status);
 
 static void bdm_ppc_fetch_registers (int regno);
 
@@ -98,8 +97,8 @@
    Returns "pid" (though it's not clear what, if anything, that
    means in the case of this target).  */
 
-static ptid_t
-bdm_ppc_wait (ptid_t ptid, struct target_waitstatus *target_status)
+static int
+bdm_ppc_wait (int pid, struct target_waitstatus *target_status)
 {
   int stop_reason;
 
@@ -110,7 +109,7 @@
   if (stop_reason)
     {
       target_status->value.sig = TARGET_SIGNAL_INT;
-      return inferior_ptid;
+      return inferior_pid;
     }
 
   target_status->value.sig = TARGET_SIGNAL_TRAP;	/* XXX for now */
@@ -125,7 +124,7 @@
   }
 #endif
 
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 static int bdm_regmap[] =
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index bcb438c..b80c9ae 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -63,7 +63,7 @@
 supply_gregset (gdb_gregset_t *gregsetp)
 {
   int regi;
-  register elf_greg_t *regp = (elf_greg_t *) gregsetp;
+  register greg_t *regp = (greg_t *) gregsetp;
 
   for (regi = 0; regi < 32; regi++)
     supply_register (regi, (char *) (regp + regi));
@@ -76,7 +76,7 @@
 fill_gregset (gdb_gregset_t *gregsetp, int regno)
 {
   int regi;
-  elf_greg_t *regp = (elf_greg_t *) gregsetp;
+  greg_t *regp = (greg_t *) gregsetp;
 
 #define COPY_REG(_idx_,_regi_) \
   if ((regno == -1) || regno == _regi_) \
diff --git a/gdb/ppcnbsd-nat.c b/gdb/ppcnbsd-nat.c
index b206110..427f48f 100644
--- a/gdb/ppcnbsd-nat.c
+++ b/gdb/ppcnbsd-nat.c
@@ -45,7 +45,7 @@
 #endif
   int i;
 
-  ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PT_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers, 0);
   for (i = 0; i < 32; i++)
     RF (i, inferior_registers.fixreg[i]);
@@ -56,7 +56,7 @@
   RF (PC_REGNUM, inferior_registers.pc);
 
 #ifdef PT_GETFPREGS
-  ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+  ptrace (PT_GETFPREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
   for (i = 0; i < 32; i++)
     RF (FP0_REGNUM + i, inferior_fp_registers.fpreg[i]);
@@ -82,13 +82,13 @@
   RS (PPC_CTR_REGNUM, inferior_registers.ctr);
   RS (PC_REGNUM, inferior_registers.pc);
 
-  ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+  ptrace (PT_SETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers, 0);
 
 #ifdef PT_SETFPREGS
   for (i = 0; i < 32; i++)
     RS (FP0_REGNUM + i, inferior_fp_registers.fpreg[i]);
-  ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+  ptrace (PT_SETFPREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
 #endif
 }
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 746a064..c49f51b 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -37,7 +37,6 @@
 #include "annotate.h"
 #include "symfile.h"		/* for overlay functions */
 #include "objfiles.h"		/* ditto */
-#include "completer.h"		/* for completion functions */
 #ifdef UI_OUT
 #include "ui-out.h"
 #endif
@@ -1909,7 +1908,8 @@
 
       annotate_arg_begin ();
 
-      list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+      ui_out_list_begin (uiout, NULL);
+      list_chain = make_cleanup_ui_out_list_end (uiout);
       fprintf_symbol_filtered (stb->stream, SYMBOL_SOURCE_NAME (sym),
 			    SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
       ui_out_field_stream (uiout, "name", stb);
@@ -1952,7 +1952,7 @@
       else
 	ui_out_text (uiout, "???");
 
-      /* Invoke ui_out_tuple_end.  */
+      /* Invoke ui_out_list_end.  */
       do_cleanups (list_chain);
 #else
 	  val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
@@ -2452,8 +2452,6 @@
 void
 _initialize_printcmd (void)
 {
-  struct cmd_list_element *c;
-
   current_display_number = -1;
 
   add_info ("address", address_info,
@@ -2476,12 +2474,11 @@
 Default count is 1.  Default address is following last thing printed\n\
 with this command or \"print\".", NULL));
 
-  c = add_com ("disassemble", class_vars, disassemble_command,
-	       "Disassemble a specified section of memory.\n\
+  add_com ("disassemble", class_vars, disassemble_command,
+	   "Disassemble a specified section of memory.\n\
 Default is the function surrounding the pc of the selected frame.\n\
 With a single argument, the function surrounding that address is dumped.\n\
 Two arguments are taken as a range of memory to dump.");
-  c->completer = location_completer;
   if (xdb_commands)
     add_com_alias ("va", "disassemble", class_xdb, 0);
 
@@ -2559,12 +2556,11 @@
 You can see these environment settings with the \"show\" command.", NULL));
 
   /* "call" is the same as "set", but handy for dbx users to call fns. */
-  c = add_com ("call", class_vars, call_command,
-	       "Call a function in the program.\n\
+  add_com ("call", class_vars, call_command,
+	   "Call a function in the program.\n\
 The argument is the function name and arguments, in the notation of the\n\
 current working language.  The result is printed and saved in the value\n\
 history, if it is not void.");
-  c->completer = location_completer;
 
   add_cmd ("variable", class_vars, set_command,
 	   "Evaluate expression EXP and assign result to variable VAR, using assignment\n\
@@ -2575,7 +2571,7 @@
 This may usually be abbreviated to simply \"set\".",
 	   &setlist);
 
-  c = add_com ("print", class_vars, print_command,
+  add_com ("print", class_vars, print_command,
 	   concat ("Print value of expression EXP.\n\
 Variables accessible are those of the lexical environment of the selected\n\
 stack frame, plus all those whose scope is global or an entire file.\n\
@@ -2597,13 +2593,11 @@
 		   "\n\
 EXP may be preceded with /FMT, where FMT is a format letter\n\
 but no count or size letter (see \"x\" command).", NULL));
-  c->completer = location_completer;
   add_com_alias ("p", "print", class_vars, 1);
 
-  c = add_com ("inspect", class_vars, inspect_command,
+  add_com ("inspect", class_vars, inspect_command,
 	   "Same as \"print\" command, except that if you are running in the epoch\n\
 environment, the value is printed in its own window.");
-  c->completer = location_completer;
 
   add_show_from_set (
 		 add_set_cmd ("max-symbolic-offset", no_class, var_uinteger,
diff --git a/gdb/proc-api.c b/gdb/proc-api.c
index 4cae8fd..d881edc 100644
--- a/gdb/proc-api.c
+++ b/gdb/proc-api.c
@@ -27,7 +27,6 @@
 
 #include "defs.h"
 #include "gdbcmd.h"
-#include "completer.h"
 
 #if defined (NEW_PROC_API)
 #define _STRUCTURED_PROC 1
@@ -220,9 +219,7 @@
 int
 ioctl_with_trace (int fd, long opcode, void *ptr, char *file, int line)
 {
-  int i = 0;
-  int ret;
-  int arg1;
+  int i, ret, arg1;
 
   prepare_to_trace ();
 
diff --git a/gdb/proc-service.c b/gdb/proc-service.c
index c13929c..3cebc63 100644
--- a/gdb/proc-service.c
+++ b/gdb/proc-service.c
@@ -51,11 +51,33 @@
 
 /* Building process ids.  */
 
+#ifndef MERGEPID
+#define MERGEPID(PID, TID)	(((PID) & 0xffff) | ((TID) << 16))
+#endif
+
 #define BUILD_LWP(tid, pid)	MERGEPID (pid, tid)
 
 
 /* Helper functions.  */
 
+static void
+restore_inferior_pid (void *arg)
+{
+  int *saved_pid_ptr = arg;
+  inferior_pid = *saved_pid_ptr;
+  xfree (arg);
+}
+
+static struct cleanup *
+save_inferior_pid (void)
+{
+  int *saved_pid_ptr;
+
+  saved_pid_ptr = xmalloc (sizeof (int));
+  *saved_pid_ptr = inferior_pid;
+  return make_cleanup (restore_inferior_pid, saved_pid_ptr);
+}
+
 /* Transfer LEN bytes of memory between BUF and address ADDR in the
    process specified by PH.  If WRITE, transfer them to the process,
    else transfer them from the process.  Returns PS_OK for success,
@@ -68,10 +90,10 @@
 ps_xfer_memory (const struct ps_prochandle *ph, paddr_t addr,
 		char *buf, size_t len, int write)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
   int ret;
 
-  inferior_ptid = pid_to_ptid (ph->pid);
+  inferior_pid = ph->pid;
 
   if (write)
     ret = target_write_memory (addr, buf, len);
@@ -228,9 +250,9 @@
 ps_err_e
 ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, ph->pid);
+  inferior_pid = BUILD_LWP (lwpid, ph->pid);
 
   target_fetch_registers (-1);
   fill_gregset ((gdb_gregset_t *) gregset, -1);
@@ -245,9 +267,9 @@
 ps_err_e
 ps_lsetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, const prgregset_t gregset)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, ph->pid);
+  inferior_pid = BUILD_LWP (lwpid, ph->pid);
 
   /* FIXME: We should really make supply_gregset const-correct.  */
   supply_gregset ((gdb_gregset_t *) gregset);
@@ -264,9 +286,9 @@
 ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
 	       gdb_prfpregset_t *fpregset)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, ph->pid);
+  inferior_pid = BUILD_LWP (lwpid, ph->pid);
 
   target_fetch_registers (-1);
   fill_fpregset ((gdb_fpregset_t *) fpregset, -1);
@@ -282,9 +304,9 @@
 ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
 	       const gdb_prfpregset_t *fpregset)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, ph->pid);
+  inferior_pid = BUILD_LWP (lwpid, ph->pid);
 
   /* FIXME: We should really make supply_fpregset const-correct.  */
   supply_fpregset ((gdb_fpregset_t *) fpregset);
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 5a91ed8..c0d3277 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -106,26 +106,26 @@
 static void procfs_open (char *, int);
 static void procfs_attach (char *, int);
 static void procfs_detach (char *, int);
-static void procfs_resume (ptid_t, int, enum target_signal);
+static void procfs_resume (int, int, enum target_signal);
 static int procfs_can_run (void);
 static void procfs_stop (void);
 static void procfs_files_info (struct target_ops *);
 static void procfs_fetch_registers (int);
 static void procfs_store_registers (int);
-static void procfs_notice_signals (ptid_t);
+static void procfs_notice_signals (int);
 static void procfs_prepare_to_store (void);
 static void procfs_kill_inferior (void);
 static void procfs_mourn_inferior (void);
 static void procfs_create_inferior (char *, char *, char **);
-static ptid_t procfs_wait (ptid_t, struct target_waitstatus *);
+static int procfs_wait (int, struct target_waitstatus *);
 static int procfs_xfer_memory (CORE_ADDR, char *, int, int,
 			       struct mem_attrib *attrib,
 			       struct target_ops *);
 
-static int procfs_thread_alive (ptid_t);
+static int procfs_thread_alive (int);
 
 void procfs_find_new_threads (void);
-char *procfs_pid_to_str (ptid_t);
+char *procfs_pid_to_str (int);
 
 struct target_ops procfs_ops;		/* the target vector */
 
@@ -315,6 +315,18 @@
 typedef prstatus_t gdb_lwpstatus_t;
 #endif /* NEW_PROC_API */
 
+
+/* Provide default composite pid manipulation macros for systems that
+   don't have threads. */
+
+#ifndef PIDGET
+#define PIDGET(PID)		(PID)
+#define TIDGET(PID)		(PID)
+#endif
+#ifndef MERGEPID
+#define MERGEPID(PID, TID)	(PID)
+#endif
+
 typedef struct procinfo {
   struct procinfo *next;
   int pid;			/* Process ID    */
@@ -2892,7 +2904,7 @@
   int funcstat = 0;
   int fd;
 
-  pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);
+  pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
 
 #ifdef NEW_PROC_API
   /* Open map fd.  */
@@ -3438,7 +3450,7 @@
  * Here are all of the gdb target vector functions and their friends.
  */
 
-static ptid_t do_attach (ptid_t ptid);
+static int do_attach (int pid);
 static void do_detach (int signo);
 static int register_gdb_signals (procinfo *, gdb_sigset_t *);
 
@@ -3590,14 +3602,13 @@
 
       if (exec_file)
 	printf_filtered ("Attaching to program `%s', %s\n", 
-			 exec_file, target_pid_to_str (pid_to_ptid (pid)));
+			 exec_file, target_pid_to_str (pid));
       else
-	printf_filtered ("Attaching to %s\n",
-	                 target_pid_to_str (pid_to_ptid (pid)));
+	printf_filtered ("Attaching to %s\n", target_pid_to_str (pid));
 
       fflush (stdout);
     }
-  inferior_ptid = do_attach (pid_to_ptid (pid));
+  inferior_pid = do_attach (pid);
   push_target (&procfs_ops);
 }
 
@@ -3613,31 +3624,31 @@
       if (exec_file == 0)
 	exec_file = "";
       printf_filtered ("Detaching from program: %s %s\n",
-	      exec_file, target_pid_to_str (inferior_ptid));
+	      exec_file, target_pid_to_str (inferior_pid));
       fflush (stdout);
     }
   if (args)
     signo = atoi (args);
   
   do_detach (signo);
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
   unpush_target (&procfs_ops);		/* Pop out of handling an inferior */
 }
 
-static ptid_t
-do_attach (ptid_t ptid)
+static int
+do_attach (int pid)
 {
   procinfo *pi;
   int fail;
 
-  if ((pi = create_procinfo (PIDGET (ptid), 0)) == NULL)
+  if ((pi = create_procinfo (pid, 0)) == NULL)
     perror ("procfs: out of memory in 'attach'");
 
   if (!open_procinfo_files (pi, FD_CTL))
     {
       fprintf_filtered (gdb_stderr, "procfs:%d -- ", __LINE__);
       sprintf (errmsg, "do_attach: couldn't open /proc file for process %d", 
-	       PIDGET (ptid));
+	       pid);
       dead_procinfo (pi, errmsg, NOKILL);
     }
 
@@ -3687,7 +3698,7 @@
   procinfo *pi;
 
   /* Find procinfo for the main process */
-  pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0); /* FIXME: threads */
+  pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);	/* FIXME: threads */
   if (signo)
     if (!proc_set_current_signal (pi, signo))
       proc_warn (pi, "do_detach, set_current_signal", __LINE__);
@@ -3743,14 +3754,14 @@
   int            pid;
   int            tid;
 
-  pid = PIDGET (inferior_ptid);
-  tid = TIDGET (inferior_ptid);
+  pid = PIDGET (inferior_pid);
+  tid = TIDGET (inferior_pid);
 
   /* First look up procinfo for the main process. */
   pi  = find_procinfo_or_die (pid, 0);
 
   /* If the event thread is not the same as GDB's requested thread 
-     (ie. inferior_ptid), then look up procinfo for the requested 
+     (ie. inferior_pid), then look up procinfo for the requested 
      thread.  */
   if ((tid != 0) && 
       (tid != proc_get_current_thread (pi)))
@@ -3758,7 +3769,7 @@
 
   if (pi == NULL)
     error ("procfs: fetch_registers failed to find procinfo for %s", 
-	   target_pid_to_str (inferior_ptid));
+	   target_pid_to_str (inferior_pid));
 
   if ((gregs = proc_get_gregs (pi)) == NULL)
     proc_error (pi, "fetch_registers, get_gregs", __LINE__);
@@ -3815,14 +3826,14 @@
   int            pid;
   int            tid;
 
-  pid = PIDGET (inferior_ptid);
-  tid = TIDGET (inferior_ptid);
+  pid = PIDGET (inferior_pid);
+  tid = TIDGET (inferior_pid);
 
   /* First find procinfo for main process */
   pi  = find_procinfo_or_die (pid, 0);
 
   /* If current lwp for process is not the same as requested thread
-     (ie. inferior_ptid), then find procinfo for the requested thread.  */
+     (ie. inferior_pid), then find procinfo for the requested thread.  */
 
   if ((tid != 0) && 
       (tid != proc_get_current_thread (pi)))
@@ -3830,7 +3841,7 @@
 
   if (pi == NULL)
     error ("procfs: store_registers: failed to find procinfo for %s",
-	   target_pid_to_str (inferior_ptid));
+	   target_pid_to_str (inferior_pid));
 
   if ((gregs = proc_get_gregs (pi)) == NULL)
     proc_error (pi, "store_registers, get_gregs", __LINE__);
@@ -3936,14 +3947,13 @@
  *         event codes are returned thru a pointer parameter.
  */
 
-static ptid_t
-procfs_wait (ptid_t ptid, struct target_waitstatus *status)
+static int  
+procfs_wait (int pid, struct target_waitstatus *status)
 {
   /* First cut: loosely based on original version 2.1 */
   procinfo *pi;
-  int       wstat;
-  int       temp_tid;
-  ptid_t    retval, temp_ptid;
+  int       temp, wstat;
+  int       retval;
   int       why, what, flags;
   int       retry = 0;
 
@@ -3951,10 +3961,10 @@
 
   retry++;
   wstat    = 0;
-  retval   = pid_to_ptid (-1);
+  retval   = -1;
 
   /* Find procinfo for main process */
-  pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);
+  pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
   if (pi)
     {
       /* We must assume that the status is stale now... */
@@ -3975,17 +3985,14 @@
 	  /* wait_for_stop failed: has the child terminated? */
 	  if (errno == ENOENT)
 	    {
-	      int wait_retval;
-
 	      /* /proc file not found; presumably child has terminated. */
-	      wait_retval = wait (&wstat); /* "wait" for the child's exit  */
+	      retval = wait (&wstat);	/* "wait" for the child's exit  */
 
-	      if (wait_retval != PIDGET (inferior_ptid)) /* wrong child? */
+	      if (retval != PIDGET (inferior_pid))	/* wrong child? */
 		error ("procfs: couldn't stop process %d: wait returned %d\n",
-		       PIDGET (inferior_ptid), wait_retval);
+		       inferior_pid, retval);
 	      /* FIXME: might I not just use waitpid?
 		 Or try find_procinfo to see if I know about this child? */
-	      retval = pid_to_ptid (wait_retval);
 	    }
 	  else if (errno == EINTR)
 	    goto wait_again;
@@ -4062,7 +4069,7 @@
 			   return a "success" exit code.  Bogus: what if
 			   it returns something else?  */
 			wstat = 0;
-			retval = inferior_ptid;  /* ? ? ? */
+			retval = inferior_pid;  /* ? ? ? */
 		      }
 		    else
 		      {
@@ -4077,7 +4084,7 @@
 
 			/* If wait returns -1, that's what we return to GDB. */
 			if (temp < 0)
-			  retval = pid_to_ptid (temp);
+			  retval = temp;
 		      }
 		  }
 		else
@@ -4104,12 +4111,12 @@
 		      {
 			/* How to exit gracefully, returning "unknown event" */
 			status->kind = TARGET_WAITKIND_SPURIOUS;
-			return inferior_ptid;
+			return inferior_pid;
 		      }
 		    else
 		      {
 			/* How to keep going without returning to wfi: */
-			target_resume (ptid, 0, TARGET_SIGNAL_0);
+			target_resume (pid, 0, TARGET_SIGNAL_0);
 			goto wait_again;
 		      }
 		  }
@@ -4135,21 +4142,20 @@
 		     */
 
 		    /* If not in procinfo list, add it.  */
-		    temp_tid = proc_get_current_thread (pi);
-		    if (!find_procinfo (pi->pid, temp_tid))
-		      create_procinfo  (pi->pid, temp_tid);
+		    temp = proc_get_current_thread (pi);
+		    if (!find_procinfo (pi->pid, temp))
+		      create_procinfo  (pi->pid, temp);
 
-		    temp_ptid = MERGEPID (pi->pid, temp_tid);
+		    temp = MERGEPID (pi->pid, temp);
 		    /* If not in GDB's thread list, add it.  */
-		    if (!in_thread_list (temp_ptid))
+		    if (!in_thread_list (temp))
 		      {
-			printf_filtered ("[New %s]\n",
-					 target_pid_to_str (temp_ptid));
-			add_thread (temp_ptid);
+			printf_filtered ("[New %s]\n", target_pid_to_str (temp));
+			add_thread (temp);
 		      }
 		    /* Return to WFI, but tell it to immediately resume. */
 		    status->kind = TARGET_WAITKIND_SPURIOUS;
-		    return inferior_ptid;
+		    return inferior_pid;
 		  }
 		else if (syscall_is_lwp_exit (pi, what))
 		  {
@@ -4188,7 +4194,7 @@
 		    }
 #endif
 		    status->kind = TARGET_WAITKIND_SPURIOUS;
-		    return inferior_ptid;
+		    return inferior_pid;
 		  }
 		break;
 	      case PR_REQUESTED:
@@ -4205,17 +4211,17 @@
 		else
 		  {
 		    /* If not in procinfo list, add it.  */
-		    temp_tid = proc_get_current_thread (pi);
-		    if (!find_procinfo (pi->pid, temp_tid))
-		      create_procinfo  (pi->pid, temp_tid);
+		    temp = proc_get_current_thread (pi);
+		    if (!find_procinfo (pi->pid, temp))
+		      create_procinfo  (pi->pid, temp);
 
 		    /* If not in GDB's thread list, add it.  */
-		    temp_ptid = MERGEPID (pi->pid, temp_tid);
-		    if (!in_thread_list (temp_ptid))
+		    temp = MERGEPID (pi->pid, temp);
+		    if (!in_thread_list (temp))
 		      {
 			printf_filtered ("[New %s]\n", 
-					 target_pid_to_str (temp_ptid));
-			add_thread (temp_ptid);
+					 target_pid_to_str (temp));
+			add_thread (temp);
 		      }
 
 		    status->kind = TARGET_WAITKIND_STOPPED;
@@ -4267,7 +4273,7 @@
 		  break;
 		case FLTPAGE:		/* Recoverable page fault */
 		default:	 /* FIXME: use si_signo if possible for fault */
-		  retval = pid_to_ptid (-1);
+		  retval = -1;
 		  printf_filtered ("procfs:%d -- ", __LINE__);
 		  printf_filtered ("child stopped for unknown reason:\n");
 		  proc_prettyprint_why (why, what, 1);
@@ -4286,8 +4292,8 @@
 	       * Got this far without error:
 	       * If retval isn't in the threads database, add it.
 	       */
-	      if (PIDGET (retval) > 0 &&
-		  !ptid_equal (retval, inferior_ptid) &&
+	      if (retval > 0 &&
+		  retval != inferior_pid &&
 		  !in_thread_list (retval))
 		{
 		  /*
@@ -4303,16 +4309,16 @@
 
 		  /* In addition, it's possible that this is the first
 		   * new thread we've seen, in which case we may not 
-		   * have created entries for inferior_ptid yet.
+		   * have created entries for inferior_pid yet.
 		   */
-		  if (TIDGET (inferior_ptid) != 0)
+		  if (TIDGET (inferior_pid) != 0)
 		    {
-		      if (!in_thread_list (inferior_ptid))
-			add_thread (inferior_ptid);
-		      if (find_procinfo (PIDGET (inferior_ptid), 
-					 TIDGET (inferior_ptid)) == NULL)
-			create_procinfo (PIDGET (inferior_ptid), 
-					 TIDGET (inferior_ptid));
+		      if (!in_thread_list (inferior_pid))
+			add_thread (inferior_pid);
+		      if (find_procinfo (PIDGET (inferior_pid), 
+					 TIDGET (inferior_pid)) == NULL)
+			create_procinfo (PIDGET (inferior_pid), 
+					 TIDGET (inferior_pid));
 		    }
 		}
 	    }
@@ -4351,7 +4357,7 @@
   int nbytes = 0;
 
   /* Find procinfo for main process */
-  pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);
+  pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
   if (pi->as_fd == 0 &&
       open_procinfo_files (pi, FD_AS) == 0)
     {
@@ -4489,7 +4495,7 @@
  */
 
 static void
-procfs_resume (ptid_t ptid, int step, enum target_signal signo)
+procfs_resume (int pid, int step, enum target_signal signo)
 {
   procinfo *pi, *thread;
   int native_signo;
@@ -4511,7 +4517,7 @@
      to proc_run_process (for use in the prrun struct by ioctl). */
 
   /* Find procinfo for main process */
-  pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);
+  pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
 
   /* First cut: ignore pid argument */
   errno = 0;
@@ -4531,13 +4537,13 @@
   /* Void the process procinfo's caches.  */
   invalidate_cache (NULL, pi, NULL);
 
-  if (PIDGET (ptid) != -1)
+  if (pid != -1)
     {
       /* Resume a specific thread, presumably suppressing the others. */
-      thread = find_procinfo (PIDGET (ptid), TIDGET (ptid));
+      thread = find_procinfo (PIDGET (pid), TIDGET (pid));
       if (thread == NULL)
-	warning ("procfs: resume can't find thread %ld -- resuming all.",
-		 TIDGET (ptid));
+	warning ("procfs: resume can't find thread %d -- resuming all.",
+		 TIDGET (pid));
       else
 	{
 	  if (thread->tid != 0)
@@ -4601,10 +4607,10 @@
  */
 
 static void
-procfs_notice_signals (ptid_t ptid)
+procfs_notice_signals (int pid)
 {
   gdb_sigset_t signals;
-  procinfo *pi = find_procinfo_or_die (PIDGET (ptid), 0);
+  procinfo *pi = find_procinfo_or_die (PIDGET (pid), 0);
 
   if (proc_get_traced_signals (pi, &signals) &&
       register_gdb_signals    (pi, &signals))
@@ -4624,7 +4630,7 @@
 {
   printf_filtered ("\tUsing the running image of %s %s via /proc.\n",
 		   attach_flag? "attached": "child", 
-		   target_pid_to_str (inferior_ptid));
+		   target_pid_to_str (inferior_pid));
 }
 
 /*
@@ -4756,10 +4762,10 @@
 static void 
 procfs_kill_inferior (void)
 {
-  if (!ptid_equal (inferior_ptid, null_ptid)) /* ? */
+  if (inferior_pid != 0) /* ? */
     {
       /* Find procinfo for main process */
-      procinfo *pi = find_procinfo (PIDGET (inferior_ptid), 0);
+      procinfo *pi = find_procinfo (PIDGET (inferior_pid), 0);
 
       if (pi)
 	unconditionally_kill_inferior (pi);
@@ -4778,10 +4784,10 @@
 {
   procinfo *pi;
 
-  if (!ptid_equal (inferior_ptid, null_ptid))
+  if (inferior_pid != 0)
     {
       /* Find procinfo for main process */
-      pi = find_procinfo (PIDGET (inferior_ptid), 0);
+      pi = find_procinfo (PIDGET (inferior_pid), 0);
       if (pi)
 	destroy_procinfo (pi);
     }
@@ -4866,7 +4872,7 @@
 
   /* The 'process ID' we return to GDB is composed of
      the actual process ID plus the lwp ID. */
-  inferior_ptid = MERGEPID (pi->pid, proc_get_current_thread (pi));
+  inferior_pid = MERGEPID (pi->pid, proc_get_current_thread (pi));
 
 #ifdef START_INFERIOR_TRAPS_EXPECTED
   startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
@@ -5095,7 +5101,7 @@
 static int
 procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr)
 {
-  ptid_t gdb_threadid = MERGEPID (pi->pid, thread->tid);
+  int gdb_threadid = MERGEPID (pi->pid, thread->tid);
 
   if (!in_thread_list (gdb_threadid))
     add_thread (gdb_threadid);
@@ -5116,7 +5122,7 @@
   procinfo *pi;
 
   /* Find procinfo for main process */
-  pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);
+  pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
   proc_update_threads (pi);
   proc_iterate_over_threads (pi, procfs_notice_thread, NULL);
 }
@@ -5131,13 +5137,13 @@
  */
 
 static int
-procfs_thread_alive (ptid_t ptid)
+procfs_thread_alive (int pid)
 {
   int proc, thread;
   procinfo *pi;
 
-  proc    = PIDGET (ptid);
-  thread  = TIDGET (ptid);
+  proc    = PIDGET (pid);
+  thread  = TIDGET (pid);
   /* If I don't know it, it ain't alive! */
   if ((pi = find_procinfo (proc, thread)) == NULL)
     return 0;
@@ -5161,14 +5167,14 @@
  */
 
 char *
-procfs_pid_to_str (ptid_t ptid)
+procfs_pid_to_str (int pid)
 {
   static char buf[80];
   int proc, thread;
   procinfo *pi;
 
-  proc    = PIDGET (ptid);
-  thread  = TIDGET (ptid);
+  proc    = PIDGET (pid);
+  thread  = TIDGET (pid);
   pi      = find_procinfo (proc, thread);
 
   if (thread == 0)
@@ -5184,16 +5190,15 @@
  */
 
 int 
-procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, int len, int rwflag,
-                       int after)
+procfs_set_watchpoint (int pid, CORE_ADDR addr, int len, int rwflag, int after)
 {
 #ifndef UNIXWARE
 #ifndef AIX5
   int       pflags = 0;
   procinfo *pi; 
 
-  pi = find_procinfo_or_die (PIDGET (ptid) == -1 ? 
-			     PIDGET (inferior_ptid) : PIDGET (ptid), 0);
+  pi = find_procinfo_or_die (pid == -1 ? 
+			     PIDGET (inferior_pid) : PIDGET (pid), 0);
 
   /* Translate from GDB's flags to /proc's */
   if (len > 0)	/* len == 0 means delete watchpoint */
@@ -5241,12 +5246,12 @@
  */
 
 int
-procfs_stopped_by_watchpoint (ptid_t ptid)
+procfs_stopped_by_watchpoint (int pid)
 {
   procinfo *pi;
 
-  pi = find_procinfo_or_die (PIDGET (ptid) == -1 ? 
-			     PIDGET (inferior_ptid) : PIDGET (ptid), 0);
+  pi = find_procinfo (pid == -1 ? 
+		      PIDGET (inferior_pid) : PIDGET (pid), 0);
 
   if (!pi)	/* If no process, then not stopped by watchpoint!  */
     return 0;
@@ -5273,31 +5278,31 @@
  * Function: procfs_find_LDT_entry 
  *
  * Input:
- *   ptid_t ptid;	// The GDB-style pid-plus-LWP.
+ *   int pid;	// The GDB-style pid-plus-LWP.
  *
  * Return:
  *   pointer to the corresponding LDT entry.
  */
 
 struct ssd *
-procfs_find_LDT_entry (ptid_t ptid)
+procfs_find_LDT_entry (int pid)
 {
   gdb_gregset_t *gregs;
   int            key;
   procinfo      *pi;
 
   /* Find procinfo for the lwp. */
-  if ((pi = find_procinfo (PIDGET (ptid), TIDGET (ptid))) == NULL)
+  if ((pi = find_procinfo (PIDGET (pid), TIDGET (pid))) == NULL)
     {
-      warning ("procfs_find_LDT_entry: could not find procinfo for %d:%d.",
-	       PIDGET (ptid), TIDGET (ptid));
+      warning ("procfs_find_LDT_entry: could not find procinfi for %d.",
+	       pid);
       return NULL;
     }
   /* get its general registers. */
   if ((gregs = proc_get_gregs (pi)) == NULL)
     {
-      warning ("procfs_find_LDT_entry: could not read gregs for %d:%d.",
-	       PIDGET (ptid), TIDGET (ptid));
+      warning ("procfs_find_LDT_entry: could not read gregs for %d.",
+	       pid);
       return NULL;
     }
   /* Now extract the GS register's lower 16 bits. */
@@ -5348,7 +5353,7 @@
       argv++;
     }
   if (pid == 0)
-    pid = PIDGET (inferior_ptid);
+    pid = PIDGET (inferior_pid);
   if (pid == 0)
     error ("No current process: you must name one.");
   else
@@ -5397,13 +5402,13 @@
   sysset_t *sysset;
   int       syscallnum = 0;
 
-  if (PIDGET (inferior_ptid) <= 0)
+  if (inferior_pid <= 0)
     error ("you must be debugging a process to use this command.");
 
   if (args == NULL || args[0] == 0)
     error_no_arg ("system call to trace");
 
-  pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);
+  pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
   if (isdigit (args[0]))
     {
       syscallnum = atoi (args);
@@ -5490,8 +5495,11 @@
  * we will be able to find a 'live' procinfo.
  */
 
-ptid_t
+int
 procfs_first_available (void)
 {
-  return pid_to_ptid (procinfo_list ? procinfo_list->pid : -1);
+  if (procinfo_list)
+    return procinfo_list->pid;
+  else
+    return -1;
 }
diff --git a/gdb/ptx4-nat.c b/gdb/ptx4-nat.c
index 65eef9d..ee74227 100644
--- a/gdb/ptx4-nat.c
+++ b/gdb/ptx4-nat.c
@@ -153,7 +153,7 @@
   curseg = 0;
   while (1)
     {
-      rv = ptrace (PT_NEXT_VSEG, PIDGET (inferior_ptid), &pv, curseg);
+      rv = ptrace (PT_NEXT_VSEG, inferior_pid, &pv, curseg);
 #ifdef VERBOSE_DEBUG
       printf ("PT_NEXT_VSEG: rv %d errno %d\n", rv, errno);
 #endif
@@ -187,7 +187,7 @@
 	      close (interp_fd);
 	      return 0;
 	    }
-	  rv = ptrace (PT_RDATA_PAGE, PIDGET (inferior_ptid), buf2,
+	  rv = ptrace (PT_RDATA_PAGE, inferior_pid, buf2,
 		       memptr);
 	  if (-1 == rv)
 	    {
diff --git a/gdb/rdi-share/host.h b/gdb/rdi-share/host.h
index 53b6568..4dffa84 100644
--- a/gdb/rdi-share/host.h
+++ b/gdb/rdi-share/host.h
@@ -37,14 +37,13 @@
 #endif
 #endif
 
-/* A temporary sop to older compilers */
-#if defined (__NetBSD__) || defined (unix)
+#ifdef unix                   /* A temporary sop to older compilers */
 #  ifndef __unix              /* (good for long-term portability?)  */
 #    define __unix    1
 #  endif
 #endif
 
-#if defined(__unix)
+#ifdef __unix
 /* Generic unix -- hopefully a split into other variants will not be    */
 /* needed.  However, beware the 'bsd' test above and safe_toupper etc.  */
 /* which cope with backwards (pre-posix/X/open) unix compatility.       */
@@ -60,6 +59,13 @@
 #  define COMPILING_ON_WINDOWS_CONSOLE 1
 #  define COMPILING_ON_WINDOWS 1
 #endif
+#ifdef _MSC_VER
+#  define COMPILING_ON_MSDOS    1
+#  define COMPILING_ON_WINDOWS  1
+#  if defined(__cplusplus)
+#    define IMPLEMENT_BOOL_AS_INT 1 /* VC++ doesn't have 'bool' (yet) */
+#  endif
+#endif
 /* The '(defined(__sparc) && defined(P_tmpdir)                     */
 /* && !defined(__svr4__))' is to detect gcc on SunOS.              */
 /* C++ compilers don't have to define __STDC__                     */
@@ -181,7 +187,8 @@
 #  define FILENAME_MAX 256
 #endif
 
-#if (!defined(__STDC__) && !defined(__cplusplus)) || defined(COMPILING_ON_SUNOS)
+#if (!defined(__STDC__) && !defined(__cplusplus) && !defined(_MSC_VER)) || \
+    defined(COMPILING_ON_SUNOS)
 /* Use bcopy rather than memmove, as memmove is not available.     */
 /* There does not seem to be a header for bcopy.                   */
 void bcopy(const char *src, char *dst, int length);
diff --git a/gdb/rdi-share/hostchan.h b/gdb/rdi-share/hostchan.h
index 3e6d26f..b9acb77 100644
--- a/gdb/rdi-share/hostchan.h
+++ b/gdb/rdi-share/hostchan.h
@@ -23,13 +23,6 @@
 #endif
 #endif
 
-/* A temporary sop to older compilers */
-#if defined (__NetBSD__) || defined (unix)
-#  ifndef __unix              /* (good for long-term portability?)  */
-#    define __unix    1
-#  endif
-#endif
-
 /* struct timeval */
 #if defined(__unix) || defined(__CYGWIN32__)
 #  include <sys/time.h>
diff --git a/gdb/rdi-share/unixcomm.c b/gdb/rdi-share/unixcomm.c
index 0abd411..6891c0d 100644
--- a/gdb/rdi-share/unixcomm.c
+++ b/gdb/rdi-share/unixcomm.c
@@ -96,15 +96,7 @@
 #define PARPORT2   "/dev/par1"
 #endif
 
-#if defined(_WIN32) || defined (__CYGWIN32__) 
-#define SERIAL_PREFIX "com"
-#define SERPORT1   "com1"
-#define SERPORT2   "com2"
-#define PARPORT1   "lpt1"
-#define PARPORT2   "lpt2"
-#endif
-
-#if !defined (SERIAL_PREFIX)
+#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (bsdi)
 #define SERIAL_PREFIX "/dev/cuaa"
 #define SERPORT1   "/dev/cuaa0"
 #define SERPORT2   "/dev/cuaa1"
@@ -113,6 +105,14 @@
 #endif
 
 
+#if defined(_WIN32) || defined (__CYGWIN32__) 
+#define SERIAL_PREFIX "com"
+#define SERPORT1   "com1"
+#define SERPORT2   "com2"
+#define PARPORT1   "lpt1"
+#define PARPORT2   "lpt2"
+#endif
+
 
 
 /*
diff --git a/gdb/regcache.c b/gdb/regcache.c
index b939d9a..b58ed29 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -49,9 +49,10 @@
 
 signed char *register_valid;
 
-/* The thread/process associated with the current set of registers. */
+/* The thread/process associated with the current set of registers.
+   For now, -1 is special, and means `no current process'.  */
 
-static ptid_t registers_ptid;
+static int registers_pid = -1;
 
 /*
  * FUNCTIONS:
@@ -153,7 +154,7 @@
 {
   int i;
 
-  registers_ptid = pid_to_ptid (-1);
+  registers_pid = -1;
 
   /* Force cleanup of any alloca areas if using C alloca instead of
      a builtin alloca.  This particular call is used to clean up
@@ -279,10 +280,10 @@
 legacy_read_register_gen (int regnum, char *myaddr)
 {
   gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS));
-  if (! ptid_equal (registers_ptid, inferior_ptid))
+  if (registers_pid != inferior_pid)
     {
       registers_changed ();
-      registers_ptid = inferior_ptid;
+      registers_pid = inferior_pid;
     }
 
   if (!register_cached (regnum))
@@ -315,6 +316,11 @@
 /* Write register REGNUM at MYADDR to the target.  MYADDR points at
    REGISTER_RAW_BYTES(REGNUM), which must be in target byte-order.  */
 
+/* Registers we shouldn't try to store.  */
+#if !defined (CANNOT_STORE_REGISTER)
+#define CANNOT_STORE_REGISTER(regnum) 0
+#endif
+
 static void
 legacy_write_register_gen (int regnum, char *myaddr)
 {
@@ -326,10 +332,10 @@
   if (CANNOT_STORE_REGISTER (regnum))
     return;
 
-  if (! ptid_equal (registers_ptid, inferior_ptid))
+  if (registers_pid != inferior_pid)
     {
       registers_changed ();
-      registers_ptid = inferior_ptid;
+      registers_pid = inferior_pid;
     }
 
   size = REGISTER_RAW_SIZE (regnum);
@@ -434,22 +440,21 @@
 }
 
 ULONGEST
-read_register_pid (int regnum, ptid_t ptid)
+read_register_pid (int regnum, int pid)
 {
-  ptid_t save_ptid;
   int save_pid;
   CORE_ADDR retval;
 
-  if (ptid_equal (ptid, inferior_ptid))
+  if (pid == inferior_pid)
     return read_register (regnum);
 
-  save_ptid = inferior_ptid;
+  save_pid = inferior_pid;
 
-  inferior_ptid = ptid;
+  inferior_pid = pid;
 
   retval = read_register (regnum);
 
-  inferior_ptid = save_ptid;
+  inferior_pid = save_pid;
 
   return retval;
 }
@@ -465,21 +470,21 @@
 }
 
 LONGEST
-read_signed_register_pid (int regnum, ptid_t ptid)
+read_signed_register_pid (int regnum, int pid)
 {
-  ptid_t save_ptid;
+  int save_pid;
   LONGEST retval;
 
-  if (ptid_equal (ptid, inferior_ptid))
+  if (pid == inferior_pid)
     return read_signed_register (regnum);
 
-  save_ptid = inferior_ptid;
+  save_pid = inferior_pid;
 
-  inferior_ptid = ptid;
+  inferior_pid = pid;
 
   retval = read_signed_register (regnum);
 
-  inferior_ptid = save_ptid;
+  inferior_pid = save_pid;
 
   return retval;
 }
@@ -498,23 +503,23 @@
 }
 
 void
-write_register_pid (int regnum, CORE_ADDR val, ptid_t ptid)
+write_register_pid (int regnum, CORE_ADDR val, int pid)
 {
-  ptid_t save_ptid;
+  int save_pid;
 
-  if (ptid_equal (ptid, inferior_ptid))
+  if (pid == inferior_pid)
     {
       write_register (regnum, val);
       return;
     }
 
-  save_ptid = inferior_ptid;
+  save_pid = inferior_pid;
 
-  inferior_ptid = ptid;
+  inferior_pid = pid;
 
   write_register (regnum, val);
 
-  inferior_ptid = save_ptid;
+  inferior_pid = save_pid;
 }
 
 /* SUPPLY_REGISTER()
@@ -531,10 +536,10 @@
 supply_register (int regnum, char *val)
 {
 #if 1
-  if (! ptid_equal (registers_ptid, inferior_ptid))
+  if (registers_pid != inferior_pid)
     {
       registers_changed ();
-      registers_ptid = inferior_ptid;
+      registers_pid = inferior_pid;
     }
 #endif
 
@@ -585,12 +590,12 @@
    TARGET_READ_PC directly. (cagney). */
 
 CORE_ADDR
-generic_target_read_pc (ptid_t ptid)
+generic_target_read_pc (int pid)
 {
 #ifdef PC_REGNUM
   if (PC_REGNUM >= 0)
     {
-      CORE_ADDR pc_val = ADDR_BITS_REMOVE ((CORE_ADDR) read_register_pid (PC_REGNUM, ptid));
+      CORE_ADDR pc_val = ADDR_BITS_REMOVE ((CORE_ADDR) read_register_pid (PC_REGNUM, pid));
       return pc_val;
     }
 #endif
@@ -600,37 +605,37 @@
 }
 
 CORE_ADDR
-read_pc_pid (ptid_t ptid)
+read_pc_pid (int pid)
 {
-  ptid_t saved_inferior_ptid;
+  int saved_inferior_pid;
   CORE_ADDR pc_val;
 
-  /* In case ptid != inferior_ptid. */
-  saved_inferior_ptid = inferior_ptid;
-  inferior_ptid = ptid;
+  /* In case pid != inferior_pid. */
+  saved_inferior_pid = inferior_pid;
+  inferior_pid = pid;
 
-  pc_val = TARGET_READ_PC (ptid);
+  pc_val = TARGET_READ_PC (pid);
 
-  inferior_ptid = saved_inferior_ptid;
+  inferior_pid = saved_inferior_pid;
   return pc_val;
 }
 
 CORE_ADDR
 read_pc (void)
 {
-  return read_pc_pid (inferior_ptid);
+  return read_pc_pid (inferior_pid);
 }
 
 void
-generic_target_write_pc (CORE_ADDR pc, ptid_t ptid)
+generic_target_write_pc (CORE_ADDR pc, int pid)
 {
 #ifdef PC_REGNUM
   if (PC_REGNUM >= 0)
-    write_register_pid (PC_REGNUM, pc, ptid);
+    write_register_pid (PC_REGNUM, pc, pid);
   if (NPC_REGNUM >= 0)
-    write_register_pid (NPC_REGNUM, pc + 4, ptid);
+    write_register_pid (NPC_REGNUM, pc + 4, pid);
   if (NNPC_REGNUM >= 0)
-    write_register_pid (NNPC_REGNUM, pc + 8, ptid);
+    write_register_pid (NNPC_REGNUM, pc + 8, pid);
 #else
   internal_error (__FILE__, __LINE__,
 		  "generic_target_write_pc");
@@ -638,23 +643,23 @@
 }
 
 void
-write_pc_pid (CORE_ADDR pc, ptid_t ptid)
+write_pc_pid (CORE_ADDR pc, int pid)
 {
-  ptid_t saved_inferior_ptid;
+  int saved_inferior_pid;
 
-  /* In case ptid != inferior_ptid. */
-  saved_inferior_ptid = inferior_ptid;
-  inferior_ptid = ptid;
+  /* In case pid != inferior_pid. */
+  saved_inferior_pid = inferior_pid;
+  inferior_pid = pid;
 
-  TARGET_WRITE_PC (pc, ptid);
+  TARGET_WRITE_PC (pc, pid);
 
-  inferior_ptid = saved_inferior_ptid;
+  inferior_pid = saved_inferior_pid;
 }
 
 void
 write_pc (CORE_ADDR pc)
 {
-  write_pc_pid (pc, inferior_ptid);
+  write_pc_pid (pc, inferior_pid);
 }
 
 /* Cope with strage ways of getting to the stack and frame pointers */
@@ -769,8 +774,4 @@
 
   add_com ("flushregs", class_maintenance, reg_flush_command,
 	   "Force gdb to flush its register cache (maintainer command)");
-
-   /* Initialize the thread/process associated with the current set of
-      registers.  For now, -1 is special, and means `no current process'.  */
-  registers_ptid = pid_to_ptid (-1);
 }
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 93fbbc7..dbffb57 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -66,15 +66,15 @@
 extern ULONGEST read_register (int regnum);
 
 /* Rename to read_unsigned_register_pid()? */
-extern ULONGEST read_register_pid (int regnum, ptid_t ptid);
+extern ULONGEST read_register_pid (int regnum, int pid);
 
 extern LONGEST read_signed_register (int regnum);
 
-extern LONGEST read_signed_register_pid (int regnum, ptid_t ptid);
+extern LONGEST read_signed_register_pid (int regnum, int pid);
 
 extern void write_register (int regnum, LONGEST val);
 
-extern void write_register_pid (int regnum, CORE_ADDR val, ptid_t ptid);
+extern void write_register_pid (int regnum, CORE_ADDR val, int pid);
 
 extern void supply_register (int regnum, char *val);
 
diff --git a/gdb/remote-adapt.c b/gdb/remote-adapt.c
index 9d31d52..10139b4 100644
--- a/gdb/remote-adapt.c
+++ b/gdb/remote-adapt.c
@@ -753,7 +753,7 @@
 /* Tell the remote machine to resume.  */
 
 void
-adapt_resume (ptid_t ptid, int step, enum target_signal sig)
+adapt_resume (int pid, int step, enum target_signal sig)
 {
   if (step)
     {
@@ -781,8 +781,8 @@
 /* Wait until the remote machine stops, then return,
    storing status in STATUS just as `wait' would.  */
 
-ptid_t
-adapt_wait (ptid_t ptid, struct target_waitstatus *status)
+int
+adapt_wait (struct target_waitstatus *status)
 {
   /* Strings to look for.  '?' means match any single character.  
      Note that with the algorithm we use, the initial character
@@ -815,7 +815,7 @@
       status->kind = TARGET_WAITKIND_STOPPED;
       status->value.sig = TARGET_SIGNAL_TRAP;
       need_artificial_trap--;
-      return inferior_ptid;
+      return 0;
     }
 
   timeout = 0;			/* Don't time out -- user program is running. */
@@ -871,7 +871,7 @@
     }
   timeout = old_timeout;
   immediate_quit = old_immediate_quit;
-  return inferior_ptid;
+  return 0;
 }
 
 /* Return the name of register number REGNO
diff --git a/gdb/remote-array.c b/gdb/remote-array.c
index beb0c6b..10f9c90 100644
--- a/gdb/remote-array.c
+++ b/gdb/remote-array.c
@@ -44,12 +44,30 @@
 
 #define ARRAY_PROMPT ">> "
 
+#define SWAP_TARGET_AND_HOST(buffer,len) 				\
+  do									\
+    {									\
+      if (TARGET_BYTE_ORDER != HOST_BYTE_ORDER)				\
+	{								\
+	  char tmp;							\
+	  char *p = (char *)(buffer);					\
+	  char *q = ((char *)(buffer)) + len - 1;		   	\
+	  for (; p < q; p++, q--)				 	\
+	    {								\
+	      tmp = *q;							\
+	      *q = *p;							\
+	      *p = tmp;							\
+	    }								\
+	}								\
+    }									\
+  while (0)
+
 static void debuglogs (int, char *, ...);
 static void array_open ();
 static void array_close ();
 static void array_detach ();
 static void array_attach ();
-static void array_resume (ptid_t ptid, int step, enum target_signal sig);
+static void array_resume ();
 static void array_fetch_register ();
 static void array_store_register ();
 static void array_fetch_registers ();
@@ -61,8 +79,7 @@
 static void array_mourn_inferior ();
 static void make_gdb_packet ();
 static int array_xfer_memory ();
-static ptid_t array_wait (ptid_t ptid,
-                                 struct target_waitstatus *status);
+static int array_wait ();
 static int array_insert_breakpoint ();
 static int array_remove_breakpoint ();
 static int tohex ();
@@ -490,10 +507,22 @@
 
   val = 0;
 
-  for (i = 0; i < 8; i++)
-    val = (val << 4) + get_hex_digit (i == 0);
+#if 0
+  if (HOST_BYTE_ORDER == BIG_ENDIAN)
+    {
+#endif
+      for (i = 0; i < 8; i++)
+	val = (val << 4) + get_hex_digit (i == 0);
+#if 0
+    }
+  else
+    {
+      for (i = 7; i >= 0; i--)
+	val = (val << 4) + get_hex_digit (i == 0);
+    }
+#endif
 
-  debuglogs (4, "get_hex_word() got a 0x%x.", val);
+  debuglogs (4, "get_hex_word() got a 0x%x for a %s host.", val, (HOST_BYTE_ORDER == BIG_ENDIAN) ? "big endian" : "little endian");
 
   return val;
 }
@@ -668,7 +697,7 @@
  * array_resume -- Tell the remote machine to resume.
  */
 static void
-array_resume (ptid_t ptid, int step, enum target_signal sig)
+array_resume (int pid, int step, enum target_signal sig)
 {
   debuglogs (1, "array_resume (step=%d, sig=%d)", step, sig);
 
@@ -688,8 +717,8 @@
  * array_wait -- Wait until the remote machine stops, then return,
  *          storing status in status just as `wait' would.
  */
-static ptid_t
-array_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+array_wait (int pid, struct target_waitstatus *status)
 {
   int old_timeout = timeout;
   int result, i;
@@ -755,7 +784,7 @@
 
   timeout = old_timeout;
 
-  return inferior_ptid;
+  return 0;
 }
 
 /*
@@ -765,14 +794,16 @@
 static void
 array_fetch_registers (int ignored)
 {
-  char *reg = alloca (MAX_REGISTER_RAW_SIZE);
-  int regno;
+  int regno, i;
   char *p;
-  char *packet = alloca (PBUFSIZ);
+  unsigned char packet[PBUFSIZ];
+  char regs[REGISTER_BYTES];
 
   debuglogs (1, "array_fetch_registers (ignored=%d)\n", ignored);
 
   memset (packet, 0, PBUFSIZ);
+  /* Unimplemented registers read as all bits zero.  */
+  memset (regs, 0, REGISTER_BYTES);
   make_gdb_packet (packet, "g");
   if (array_send_packet (packet) == 0)
     error ("Couldn't transmit packet\n");
@@ -784,10 +815,10 @@
     {
       /* supply register stores in target byte order, so swap here */
       /* FIXME: convert from ASCII hex to raw bytes */
-      LONGEST i = ascii2hexword (packet + (regno * 8));
+      i = ascii2hexword (packet + (regno * 8));
       debuglogs (5, "Adding register %d = %x\n", regno, i);
-      store_unsigned_integer (&reg, REGISTER_RAW_SIZE (regno), i);
-      supply_register (regno, (char *) &reg);
+      SWAP_TARGET_AND_HOST (&i, 4);
+      supply_register (regno, (char *) &i);
     }
 }
 
diff --git a/gdb/remote-bug.c b/gdb/remote-bug.c
index 3537957..498edc6 100644
--- a/gdb/remote-bug.c
+++ b/gdb/remote-bug.c
@@ -115,7 +115,7 @@
 
   sr_check_open ();
 
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
   abfd = bfd_openr (args, 0);
   if (!abfd)
     {
@@ -232,7 +232,7 @@
 /* Tell the remote machine to resume.  */
 
 void
-bug_resume (ptid_t ptid, int step, enum target_signal sig)
+bug_resume (int pid, int step, enum target_signal sig)
 {
   if (step)
     {
@@ -261,8 +261,8 @@
   NULL,
 };
 
-ptid_t
-bug_wait (ptid_t ptid, struct target_waitstatus *status)
+int
+bug_wait (int pid, struct target_waitstatus *status)
 {
   int old_timeout = sr_get_timeout ();
   int old_immediate_quit = immediate_quit;
@@ -325,7 +325,7 @@
 
   sr_set_timeout (old_timeout);
   immediate_quit = old_immediate_quit;
-  return inferior_ptid;
+  return 0;
 }
 
 /* Return the name of register number REGNO
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index 320584b..0f63703 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -86,6 +86,8 @@
 #define SR_REGNUM 	-1
 #endif
 
+extern void notice_quit (void);
+
 extern void report_transfer_performance (unsigned long, time_t, time_t);
 
 extern char *sh_processor_type;
@@ -258,6 +260,21 @@
   while (1)
     {
       c = readchar (timeout);
+#if 0
+      notice_quit ();
+      if (quit_flag == 1)
+	{
+	  if (ctrl_c)
+	    {
+	      putchar_e7000 (CTRLC);
+	      --ctrl_c;
+	    }
+	  else
+	    {
+	      quit ();
+	    }
+	}
+#endif
 
       if (echo)
 	{
@@ -650,11 +667,7 @@
   if (!e7000_desc)
     perror_with_name (dev_name);
 
-  if (SERIAL_SETBAUDRATE (e7000_desc, baudrate))
-    {
-      SERIAL_CLOSE (dev_name);
-      perror_with_name (dev_name);
-    }
+  SERIAL_SETBAUDRATE (e7000_desc, baudrate);
   SERIAL_RAW (e7000_desc);
 
 #ifdef GDB_TARGET_IS_H8300
@@ -697,7 +710,7 @@
 /* Tell the remote machine to resume.  */
 
 static void
-e7000_resume (ptid_t ptid, int step, enum target_signal sigal)
+e7000_resume (int pid, int step, enum target_signal sigal)
 {
   if (step)
     puts_e7000debug ("S\r");
@@ -1632,7 +1645,7 @@
   if (exec_bfd)
     write_pc (bfd_get_start_address (exec_bfd));
 
-  inferior_ptid = null_ptid;	/* No process now */
+  inferior_pid = 0;		/* No process now */
 
 /* This is necessary because many things were based on the PC at the time that
    we attached to the monitor, which is no longer valid now that we have loaded
@@ -1986,8 +1999,8 @@
 /* Wait until the remote machine stops, then return, storing status in
    STATUS just as `wait' would.  */
 
-static ptid_t
-e7000_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+e7000_wait (int pid, struct target_waitstatus *status)
 {
   int stop_reason;
   int regno;
@@ -2109,7 +2122,7 @@
       internal_error (__FILE__, __LINE__, "failed internal consistency check");
     }
 
-  return inferior_ptid;
+  return 0;
 }
 
 /* Stop the running program.  */
diff --git a/gdb/remote-eb.c b/gdb/remote-eb.c
index fa003c6..aa7608c 100644
--- a/gdb/remote-eb.c
+++ b/gdb/remote-eb.c
@@ -520,7 +520,7 @@
 /* Tell the remote machine to resume.  */
 
 void
-eb_resume (ptid_t ptid, int step, enum target_signal sig)
+eb_resume (int pid, int step, enum target_signal sig)
 {
   if (step)
     {
@@ -559,8 +559,8 @@
 /* Wait until the remote machine stops, then return,
    storing status in STATUS just as `wait' would.  */
 
-ptid_t
-eb_wait (ptid_t ptid, struct target_waitstatus *status)
+int
+eb_wait (struct target_waitstatus *status)
 {
   /* Strings to look for.  '?' means match any single character.  
      Note that with the algorithm we use, the initial character
diff --git a/gdb/remote-es.c b/gdb/remote-es.c
index 6423fe2..11653e9 100644
--- a/gdb/remote-es.c
+++ b/gdb/remote-es.c
@@ -140,9 +140,9 @@
 
 static void es1800_prepare_to_store (void);
 
-static ptid_t es1800_wait (ptid_t, struct target_waitstatus *);
+static int es1800_wait (int, struct target_waitstatus *);
 
-static void es1800_resume (ptid_t, int, enum target_signal);
+static void es1800_resume (int, int, enum target_signal);
 
 static void es1800_detach (char *, int);
 
@@ -500,7 +500,7 @@
    siggnal - the signal value to be given to the target (0 = no signal) */
 
 static void
-es1800_resume (ptid_t ptid, int step, enum target_signal siggnal)
+es1800_resume (int pid, int step, enum target_signal siggnal)
 {
   char buf[PBUFSIZ];
 
@@ -523,8 +523,8 @@
    storing status in STATUS just as `wait' would.
    status -  */
 
-static ptid_t
-es1800_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+es1800_wait (int pid, struct target_waitstatus *status)
 {
   unsigned char buf[PBUFSIZ];
   int old_timeout = timeout;
@@ -589,7 +589,7 @@
     }
   signal (SIGINT, old_sigint);
   timeout = old_timeout;
-  return inferior_ptid;
+  return (0);
 }
 
 
@@ -1206,9 +1206,9 @@
 static void
 es1800_kill (void)
 {
-  if (!ptid_equal (inferior_ptid, null_ptid))
+  if (inferior_pid != 0)
     {
-      inferior_ptid = null_ptid;
+      inferior_pid = 0;
       es1800_mourn_inferior ();
     }
 }
@@ -1273,7 +1273,7 @@
     }
 
   breakpoint_init_inferior ();
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
   if (from_tty)
     {
       printf ("Downloading \"%s\" to the ES 1800\n", filename);
@@ -1374,7 +1374,7 @@
 
 #endif
 
-/* Start an process on the es1800 and set inferior_ptid to the new
+/* Start an process on the es1800 and set inferior_pid to the new
    process' pid.
    execfile - the file to run
    args     - arguments passed to the program
@@ -1427,7 +1427,7 @@
   /* The "process" (board) is already stopped awaiting our commands, and
      the program is already downloaded.  We just set its PC and go.  */
 
-  inferior_ptid = pid_to_ptid (pid);	/* Needed for wait_for_inferior below */
+  inferior_pid = pid;		/* Needed for wait_for_inferior below */
 
   clear_proceed_status ();
 
@@ -1961,7 +1961,7 @@
   pop_target ();
   if (from_tty)
     {
-      printf ("Ending debugging the process %d.\n", PIDGET (inferior_ptid));
+      printf ("Ending debugging the process %d.\n", inferior_pid);
     }
 }
 
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 882cbca..dfde85b 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -85,11 +85,9 @@
 
 static void mips_detach (char *args, int from_tty);
 
-static void mips_resume (ptid_t ptid, int step,
-                         enum target_signal siggnal);
+static void mips_resume (int pid, int step, enum target_signal siggnal);
 
-static ptid_t mips_wait (ptid_t ptid,
-                               struct target_waitstatus *status);
+static int mips_wait (int pid, struct target_waitstatus *status);
 
 static int mips_map_regno (int regno);
 
@@ -1706,7 +1704,7 @@
    where PMON does return a reply.  */
 
 static void
-mips_resume (ptid_t ptid, int step, enum target_signal siggnal)
+mips_resume (int pid, int step, enum target_signal siggnal)
 {
   int err;
 
@@ -1738,8 +1736,8 @@
 
 /* Wait until the remote stops, and return a wait status.  */
 
-static ptid_t
-mips_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+mips_wait (int pid, struct target_waitstatus *status)
 {
   int rstatus;
   int err;
@@ -1759,7 +1757,7 @@
     {
       status->kind = TARGET_WAITKIND_STOPPED;
       status->value.sig = TARGET_SIGNAL_TRAP;
-      return inferior_ptid;
+      return 0;
     }
 
   /* No timeout; we sit here as long as the program continues to execute.  */
@@ -1890,7 +1888,7 @@
       status->value.sig = mips_signal_from_protocol (rstatus & 0x7f);
     }
 
-  return inferior_ptid;
+  return 0;
 }
 
 /* We have to map between the register numbers used by gdb and the
@@ -2232,7 +2230,7 @@
 
   init_wait_for_inferior ();
 
-  /* FIXME: Should we set inferior_ptid here?  */
+  /* FIXME: Should we set inferior_pid here?  */
 
   proceed (entry_pt, TARGET_SIGNAL_DEFAULT, 0);
 }
@@ -3441,7 +3439,7 @@
   if (exec_bfd)
     write_pc (bfd_get_start_address (exec_bfd));
 
-  inferior_ptid = null_ptid;	/* No process now */
+  inferior_pid = 0;		/* No process now */
 
 /* This is necessary because many things were based on the PC at the time that
    we attached to the monitor, which is no longer valid now that we have loaded
diff --git a/gdb/remote-mm.c b/gdb/remote-mm.c
index 67727e2..ccbacc5 100644
--- a/gdb/remote-mm.c
+++ b/gdb/remote-mm.c
@@ -51,7 +51,7 @@
 
 extern int stop_soon_quietly;	/* for wait_for_inferior */
 
-static void mm_resume (ptid_t ptid, int step, enum target_signal sig)
+static void mm_resume ();
 static void mm_fetch_registers ();
 static int fetch_register ();
 static void mm_store_registers ();
@@ -523,7 +523,7 @@
 ** Tell the remote machine to resume.  */
 
 static void
-mm_resume (ptid_t ptid, int step, enum target_signal sig)
+mm_resume (int pid, int step, enum target_signal sig)
 {
   if (sig != TARGET_SIGNAL_0)
     warning ("Can't send signals to a remote MiniMon system.");
@@ -547,8 +547,8 @@
 ** Wait until the remote machine stops, then return,
    storing status in STATUS just as `wait' would.  */
 
-static ptid_t
-mm_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+mm_wait (struct target_waitstatus *status)
 {
   int i, result;
   int old_timeout = timeout;
@@ -692,7 +692,7 @@
 
   timeout = old_timeout;	/* Restore original timeout value */
   immediate_quit = old_immediate_quit;
-  return inferior_ptid;
+  return 0;
 }
 
 /******************************************************* REMOTE_FETCH_REGISTERS
diff --git a/gdb/remote-nindy.c b/gdb/remote-nindy.c
index 9b8dfe8..419a1b1 100644
--- a/gdb/remote-nindy.c
+++ b/gdb/remote-nindy.c
@@ -255,7 +255,7 @@
 /* Tell the remote machine to resume.  */
 
 void
-nindy_resume (ptid_t ptid, int step, enum target_signal siggnal)
+nindy_resume (int pid, int step, enum target_signal siggnal)
 {
   if (siggnal != TARGET_SIGNAL_0 && siggnal != stop_signal)
     warning ("Can't send signals to remote NINDY targets.");
@@ -316,8 +316,8 @@
  * Return to caller, storing status in 'status' just as `wait' would.
  */
 
-static ptid_t
-nindy_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+nindy_wait (int pid, struct target_waitstatus *status)
 {
   fd_set fds;
   int c;
@@ -409,7 +409,7 @@
       status->kind = TARGET_WAITKIND_STOPPED;
       status->value.sig = i960_fault_to_signal (stop_code);
     }
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 /* Read the remote registers into the block REGS.  */
@@ -513,7 +513,7 @@
   /* The "process" (board) is already stopped awaiting our commands, and
      the program is already downloaded.  We just set its PC and go.  */
 
-  inferior_ptid = pid_to_ptid (pid);	/* Needed for wait_for_inferior below */
+  inferior_pid = pid;		/* Needed for wait_for_inferior below */
 
   clear_proceed_status ();
 
diff --git a/gdb/remote-os9k.c b/gdb/remote-os9k.c
index 3302580..08b35fd 100644
--- a/gdb/remote-os9k.c
+++ b/gdb/remote-os9k.c
@@ -431,7 +431,7 @@
  * Tell the remote machine to resume.
  */
 static void
-rombug_resume (ptid_t ptid, int step, enum target_signal sig)
+rombug_resume (int pid, int step, enum target_signal sig)
 {
   if (monitor_log)
     fprintf (log_file, "\nIn Resume (step=%d, sig=%d)\n", step, sig);
@@ -460,8 +460,8 @@
  * storing status in status just as `wait' would.
  */
 
-static ptid *
-rombug_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+rombug_wait (int pid, struct target_waitstatus *status)
 {
   int old_timeout = timeout;
   struct section_offsets *offs;
@@ -499,7 +499,7 @@
       objfile_relocate (symfile_objfile, offs);
     }
 
-  return inferior_ptid;
+  return 0;
 }
 
 /* Return the name of register number regno in the form input and output by
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index 22274b5..fbd176f 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -60,8 +60,7 @@
 
 static void arm_rdi_fetch_registers (int regno);
 
-static void arm_rdi_resume (ptid_t pid, int step,
-                            enum target_signal siggnal);
+static void arm_rdi_resume (int pid, int step, enum target_signal siggnal);
 
 static int arm_rdi_start_remote (char *dummy);
 
@@ -77,7 +76,7 @@
 
 static void arm_rdi_send (char *buf);
 
-static ptid_t arm_rdi_wait (ptid_t ptid, struct target_waitstatus *status);
+static int arm_rdi_wait (int pid, struct target_waitstatus *status);
 
 static void arm_rdi_kill (void);
 
@@ -340,10 +339,10 @@
 
   printf_filtered ("Connected to ARM RDI target.\n");
   closed_already = 0;
-  inferior_ptid = pid_to_ptid (42);
+  inferior_pid = 42;
 }
 
-/* Start an inferior process and set inferior_ptid to its pid.
+/* Start an inferior process and set inferior_pid to its pid.
    EXEC_FILE is the file to run.
    ARGS is a string containing the arguments to the program.
    ENV is the environment vector to pass.  Errors reported with error().
@@ -375,7 +374,7 @@
   strcat (arg_buf, " ");
   strcat (arg_buf, args);
 
-  inferior_ptid = pid_to_ptid (42);
+  inferior_pid = 42;
   insert_breakpoints ();	/* Needed to get correct instruction in cache */
 
   if (env != NULL)
@@ -439,7 +438,7 @@
 	  printf_filtered ("RDI_close: %s\n", rdi_error_message (rslt));
 	}
       closed_already = 1;
-      inferior_ptid = null_ptid;
+      inferior_pid = 0;
       Adp_CloseDevice ();
       generic_mourn_inferior ();
     }
@@ -448,7 +447,7 @@
 /* Tell the remote machine to resume.  */
 
 static void
-arm_rdi_resume (ptid_t ptid, int step, enum target_signal siggnal)
+arm_rdi_resume (int pid, int step, enum target_signal siggnal)
 {
   int rslt;
   PointHandle point;
@@ -513,8 +512,8 @@
    STATUS just as `wait' would.  Returns "pid" (though it's not clear
    what, if anything, that means in the case of this target).  */
 
-static ptid_t
-arm_rdi_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+arm_rdi_wait (int pid, struct target_waitstatus *status)
 {
   status->kind = (execute_status == RDIError_NoError ?
 		  TARGET_WAITKIND_EXITED : TARGET_WAITKIND_STOPPED);
@@ -522,7 +521,7 @@
   /* convert stopped code from target into right signal */
   status->value.sig = rdi_error_signal (execute_status);
 
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 /* Read the remote registers into the block REGS.  */
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index 673e423..f680960 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -1183,7 +1183,7 @@
    to the target, or zero for no signal.  */
 
 static void
-remote_rdp_resume (ptid_t ptid, int step, enum target_signal siggnal)
+remote_rdp_resume (int pid, int step, enum target_signal siggnal)
 {
   if (step)
     rdp_step ();
@@ -1195,8 +1195,8 @@
    or -1 in case of error; store status through argument pointer STATUS,
    just as `wait' would.  */
 
-static ptid_t
-remote_rdp_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+remote_rdp_wait (int pid, struct target_waitstatus *status)
 {
   switch (ds.rdi_stopped_status)
     {
@@ -1222,7 +1222,7 @@
 #endif
     }
 
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 /* Get ready to modify the registers array.  On machines which store
@@ -1348,7 +1348,7 @@
   /* This gives us a chance to set up the command line */
   rdp_set_command_line (exec_file, allargs);
 
-  inferior_ptid = pid_to_ptid (42);
+  inferior_pid = 42;
   insert_breakpoints ();	/* Needed to get correct instruction in cache */
 
   /*
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index 7d2f547..b41ca35 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -62,7 +62,7 @@
 
 static void sds_fetch_registers (int);
 
-static void sds_resume (ptid_t, int, enum target_signal);
+static void sds_resume (int, int, enum target_signal);
 
 static int sds_start_remote (PTR);
 
@@ -86,7 +86,7 @@
 
 static int readchar (int);
 
-static ptid_t sds_wait (ptid_t, struct target_waitstatus *);
+static int sds_wait (int, struct target_waitstatus *);
 
 static void sds_kill (void);
 
@@ -160,7 +160,7 @@
 static int
 sds_start_remote (PTR dummy)
 {
-  int c;
+  char c;
   unsigned char buf[200];
 
   immediate_quit++;		/* Allow user to interrupt it */
@@ -347,7 +347,7 @@
 int last_sent_step;
 
 static void
-sds_resume (ptid_t ptid, int step, enum target_signal siggnal)
+sds_resume (int pid, int step, enum target_signal siggnal)
 {
   unsigned char buf[PBUFSIZ];
 
@@ -416,8 +416,8 @@
    STATUS just as `wait' would.  Returns "pid" (though it's not clear
    what, if anything, that means in the case of this target).  */
 
-static ptid_t
-sds_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+sds_wait (int pid, struct target_waitstatus *status)
 {
   unsigned char buf[PBUFSIZ];
   int retlen;
@@ -433,7 +433,7 @@
     {
       just_started = 0;
       status->kind = TARGET_WAITKIND_STOPPED;
-      return inferior_ptid;
+      return inferior_pid;
     }
 
   while (1)
@@ -457,7 +457,7 @@
 	}
     }
 got_status:
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 static unsigned char sprs[16];
@@ -1001,7 +1001,7 @@
 static void
 sds_create_inferior (char *exec_file, char *args, char **env)
 {
-  inferior_ptid = pid_to_ptid (42000);
+  inferior_pid = 42000;
 
   /* Clean up from the last time we were running.  */
   clear_proceed_status ();
@@ -1015,7 +1015,7 @@
 {
   generic_load (filename, from_tty);
 
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 }
 
 /* The SDS monitor has commands for breakpoint insertion, although it
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 3e515c1..890970f 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -86,9 +86,9 @@
 
 static void gdbsim_detach (char *args, int from_tty);
 
-static void gdbsim_resume (ptid_t ptid, int step, enum target_signal siggnal);
+static void gdbsim_resume (int pid, int step, enum target_signal siggnal);
 
-static ptid_t gdbsim_wait (ptid_t ptid, struct target_waitstatus *status);
+static int gdbsim_wait (int pid, struct target_waitstatus *status);
 
 static void gdbsim_prepare_to_store (void);
 
@@ -359,7 +359,7 @@
 
   /* There is no need to `kill' running simulator - the simulator is
      not running */
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 }
 
 /* Load an executable file into the target process.  This is expected to
@@ -372,7 +372,7 @@
   if (sr_get_debug ())
     printf_filtered ("gdbsim_load: prog \"%s\"\n", prog);
 
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 
   /* FIXME: We will print two messages on error.
      Need error to either not print anything if passed NULL or need
@@ -387,7 +387,7 @@
 }
 
 
-/* Start an inferior process and set inferior_ptid to its pid.
+/* Start an inferior process and set inferior_pid to its pid.
    EXEC_FILE is the file to run.
    ARGS is a string containing the arguments to the program.
    ENV is the environment vector to pass.  Errors reported with error().
@@ -430,7 +430,7 @@
     argv = NULL;
   sim_create_inferior (gdbsim_desc, exec_bfd, argv, env);
 
-  inferior_ptid = pid_to_ptid (42);
+  inferior_pid = 42;
   insert_breakpoints ();	/* Needed to get correct instruction in cache */
 
   clear_proceed_status ();
@@ -572,9 +572,9 @@
 static int resume_step;
 
 static void
-gdbsim_resume (ptid_t ptid, int step, enum target_signal siggnal)
+gdbsim_resume (int pid, int step, enum target_signal siggnal)
 {
-  if (PIDGET (inferior_ptid) != 42)
+  if (inferior_pid != 42)
     error ("The program is not being run.");
 
   if (sr_get_debug ())
@@ -611,6 +611,7 @@
   if (ui_loop_hook != NULL)
     ui_loop_hook (0);
 
+  notice_quit ();
   if (quit_flag)		/* gdb's idea of quit */
     {
       quit_flag = 0;		/* we've stolen it */
@@ -633,8 +634,8 @@
   gdbsim_stop ();
 }
 
-static ptid_t
-gdbsim_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+gdbsim_wait (int pid, struct target_waitstatus *status)
 {
   static RETSIGTYPE (*prev_sigint) ();
   int sigrc = 0;
@@ -696,7 +697,7 @@
       break;
     }
 
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 /* Get ready to modify the registers array.  On machines which store
diff --git a/gdb/remote-st.c b/gdb/remote-st.c
index 55e1392..b341aeb 100644
--- a/gdb/remote-st.c
+++ b/gdb/remote-st.c
@@ -285,11 +285,7 @@
   if (!st2000_desc)
     perror_with_name (dev_name);
 
-  if (SERIAL_SETBAUDRATE (st2000_desc, baudrate))
-    {
-      SERIAL_CLOSE (dev_name);
-      perror_with_name (dev_name);
-    }
+  SERIAL_SETBAUDRATE (st2000_desc, baudrate);
 
   SERIAL_RAW (st2000_desc);
 
@@ -343,7 +339,7 @@
 /* Tell the remote machine to resume.  */
 
 static void
-st2000_resume (ptid_t ptid, int step, enum target_signal sig)
+st2000_resume (int pid, int step, enum target_signal sig)
 {
   if (step)
     {
@@ -362,8 +358,8 @@
 /* Wait until the remote machine stops, then return,
    storing status in STATUS just as `wait' would.  */
 
-static ptid_t
-st2000_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+st2000_wait (struct target_waitstatus *status)
 {
   int old_timeout = timeout;
 
@@ -379,7 +375,7 @@
 
   timeout = old_timeout;
 
-  return inferior_ptid;
+  return 0;
 }
 
 /* Return the name of register number REGNO in the form input and output by
diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c
index 0015e99..aa3b4ba 100644
--- a/gdb/remote-udi.c
+++ b/gdb/remote-udi.c
@@ -54,7 +54,7 @@
 
 extern int stop_soon_quietly;	/* for wait_for_inferior */
 extern struct value *call_function_by_hand ();
-static void udi_resume (ptid_t ptid, int step, enum target_signal sig);
+static void udi_resume (int pid, int step, enum target_signal sig);
 static void udi_fetch_registers (int regno);
 static void udi_load (char *args, int from_tty);
 static void fetch_register (int regno);
@@ -148,7 +148,7 @@
       entry.Offset = 0;
     }
 
-  inferior_ptid = pid_to_ptid (40000);
+  inferior_pid = 40000;
 
   if (!entry.Offset)
     download (execfile, 0);
@@ -318,7 +318,7 @@
 
   /* Do not try to close udi_session_id again, later in the program.  */
   udi_session_id = -1;
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 
   printf_filtered ("  Ending remote debugging\n");
 }
@@ -370,7 +370,7 @@
   /* Don't try to UDIDisconnect it again in udi_close, which is called from
      pop_target.  */
   udi_session_id = -1;
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 
   pop_target ();
 
@@ -383,7 +383,7 @@
 ** Tell the remote machine to resume.  */
 
 static void
-udi_resume (ptid_t ptid, int step, enum target_signal sig)
+udi_resume (int pid, int step, enum target_signal sig)
 {
   UDIError tip_error;
   UDIUInt32 Steps = 1;
@@ -408,8 +408,8 @@
 ** Wait until the remote machine stops, then return,
    storing status in STATUS just as `wait' would.  */
 
-static ptid_t
-udi_wait (int ptid_t, struct target_waitstatus *status)
+static int
+udi_wait (int pid, struct target_waitstatus *status)
 {
   UDIInt32 MaxTime;
   UDIPId PId;
@@ -584,7 +584,7 @@
 
   timeout = old_timeout;	/* Restore original timeout value */
   immediate_quit = old_immediate_quit;
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 #if 0
@@ -1012,7 +1012,7 @@
   UDIStop ();
 
   udi_session_id = -1;
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 
   if (from_tty)
     printf_unfiltered ("Target has been stopped.");
@@ -1032,7 +1032,7 @@
 
   /* Do not try to close udi_session_id again, later in the program.  */
   udi_session_id = -1;
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 }
 
 /* 
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index a441a93..1162b07 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -163,7 +163,7 @@
   break_status = 0;
 
   ptrace_in.addr = addr;
-  ptrace_in.pid = PIDGET (inferior_ptid);
+  ptrace_in.pid = inferior_pid;
 
   status = net_clnt_call (procnum, xdr_rptrace, &ptrace_in, xdr_int,
 			  &break_status);
@@ -192,7 +192,7 @@
   return net_break (addr, VX_BREAK_DELETE);
 }
 
-/* Start an inferior process and sets inferior_ptid to its pid.
+/* Start an inferior process and sets inferior_pid to its pid.
    EXEC_FILE is the file to run.
    ALLARGS is a string containing the arguments to the program.
    ENV is the environment vector to pass.
@@ -227,7 +227,7 @@
 			   strlen (passArgs.arg_array_val[0]));
 
   push_target (&vx_run_ops);
-  inferior_ptid = pid_to_ptid (taskStart.pid);
+  inferior_pid = taskStart.pid;
 
   /* We will get a trace trap after one instruction.
      Insert breakpoints and continue.  */
@@ -338,7 +338,7 @@
 
   memset ((char *) pEvent, '\0', sizeof (RDB_EVENT));
 
-  pid = PIDGET inferior_ptid);
+  pid = inferior_pid;
   status = net_clnt_call (PROCESS_WAIT, xdr_int, &pid, xdr_RDB_EVENT,
 			  pEvent);
 
@@ -365,7 +365,7 @@
 
   /* don't let rdbTask suspend itself by passing a pid of 0 */
 
-  if ((pid = PIDGET (inferior_ptid)) == 0)
+  if ((pid = inferior_pid) == 0)
     return -1;
 
   status = net_clnt_call (VX_TASK_SUSPEND, xdr_int, &pid, xdr_int,
@@ -390,7 +390,7 @@
 
   /* Initialize RPC input argument structure.  */
 
-  ptrace_in.pid = PIDGET (inferior_ptid);
+  ptrace_in.pid = inferior_pid;
   ptrace_in.info.ttype = NOINFO;
 
   /* Initialize RPC return value structure.  */
@@ -438,7 +438,7 @@
   in_data.bytes = reg_buf;
   in_data.len = len;
 
-  ptrace_in.pid = PIDGET (inferior_ptid);
+  ptrace_in.pid = inferior_pid;
   ptrace_in.info.ttype = DATA;
   ptrace_in.info.more_data = (caddr_t) & in_data;
 
@@ -490,7 +490,7 @@
   memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
   memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
 
-  ptrace_in.pid = PIDGET (inferior_ptid); /* XXX pid unnecessary for READDATA */
+  ptrace_in.pid = inferior_pid;	/* XXX pid unnecessary for READDATA */
   ptrace_in.addr = (int) memaddr;	/* Where from */
   ptrace_in.data = len;		/* How many bytes */
 
@@ -565,22 +565,22 @@
 {
   printf_unfiltered ("\tRunning %s VxWorks process %s",
 		     vx_running ? "child" : "attached",
-		     local_hex_string (PIDGET (inferior_ptid)));
+		     local_hex_string (inferior_pid));
   if (vx_running)
     printf_unfiltered (", function `%s'", vx_running);
   printf_unfiltered (".\n");
 }
 
 static void
-vx_resume (ptid_t ptid, int step, enum target_signal siggnal)
+vx_resume (int pid, int step, enum target_signal siggnal)
 {
   int status;
   Rptrace ptrace_in;
   Ptrace_return ptrace_out;
   CORE_ADDR cont_addr;
 
-  if (ptid_equal (ptid, minus_one_ptid))
-    ptid = inferior_ptid;
+  if (pid == -1)
+    pid = inferior_pid;
 
   if (siggnal != 0 && siggnal != stop_signal)
     error ("Cannot send signals to VxWorks processes");
@@ -600,7 +600,7 @@
   memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
   memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
 
-  ptrace_in.pid = PIDGET (ptid);
+  ptrace_in.pid = pid;
   ptrace_in.addr = cont_addr;	/* Target side insists on this, or it panics.  */
 
   if (step)
@@ -709,7 +709,7 @@
   /* Refuse to load the module if a debugged task is running.  Doing so
      can have a number of unpleasant consequences to the running task.  */
 
-  if (PIDGET (inferior_ptid) != 0 && target_has_execution)
+  if (inferior_pid != 0 && target_has_execution)
     {
       if (query ("You may not load a module while the target task is running.\n\
 Kill the target task? "))
@@ -742,7 +742,7 @@
   int step_status;
   SOURCE_STEP source_step;
 
-  source_step.taskId = PIDGET (inferior_ptid);
+  source_step.taskId = inferior_pid;
 
   if (step_range_end)
     {
@@ -930,8 +930,8 @@
     perror_with_name ("select");
 }
 
-static ptid_t
-vx_wait (ptid_t ptid_to_wait_for, struct target_waitstatus *status)
+static int
+vx_wait (int pid_to_wait_for, struct target_waitstatus *status)
 {
   register int pid;
   RDB_EVENT rdbEvent;
@@ -977,7 +977,7 @@
 	{
 	  sleep_ms (200);	/* FIXME Don't kill the network too badly */
 	}
-      else if (pid != PIDGET (inferior_ptid))
+      else if (pid != inferior_pid)
 	internal_error (__FILE__, __LINE__,
 			"Bad pid for debugged task: %s\n",
 			local_hex_string ((unsigned long) pid));
@@ -1035,7 +1035,7 @@
 #endif
       break;
     }				/* switch */
-  return pid_to_ptid (pid);
+  return pid;
 }
 
 static int
@@ -1208,7 +1208,7 @@
 
   /* It worked... */
 
-  inferior_ptid = pid_to_ptid (pid);
+  inferior_pid = pid;
   push_target (&vx_run_ops);
 
   if (vx_running)
@@ -1238,15 +1238,14 @@
 
   if (from_tty)
     printf_unfiltered ("Detaching pid %s.\n",
-		       local_hex_string (
-		         (unsigned long) PIDGET (inferior_ptid)));
+		       local_hex_string ((unsigned long) inferior_pid));
 
   if (args)			/* FIXME, should be possible to leave suspended */
     signal = atoi (args);
 
   memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
   memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
-  ptrace_in.pid = PIDGET (inferior_ptid);
+  ptrace_in.pid = inferior_pid;
 
   status = net_ptrace_clnt_call (PTRACE_DETACH, &ptrace_in, &ptrace_out);
   if (status == -1)
@@ -1257,7 +1256,7 @@
       perror_with_name ("Detaching VxWorks process");
     }
 
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
   pop_target ();		/* go back to non-executing VxWorks connection */
 }
 
@@ -1270,11 +1269,11 @@
   Ptrace_return ptrace_out;
   int status;
 
-  printf_unfiltered ("Killing pid %s.\n", local_hex_string ((unsigned long) PIDGET (inferior_ptid)));
+  printf_unfiltered ("Killing pid %s.\n", local_hex_string ((unsigned long) inferior_pid));
 
   memset ((char *) &ptrace_in, '\0', sizeof (ptrace_in));
   memset ((char *) &ptrace_out, '\0', sizeof (ptrace_out));
-  ptrace_in.pid = PIDGET (inferior_ptid);
+  ptrace_in.pid = inferior_pid;
 
   status = net_ptrace_clnt_call (PTRACE_KILL, &ptrace_in, &ptrace_out);
   if (status == -1)
@@ -1287,7 +1286,7 @@
 
   /* If it gives good status, the process is *gone*, no events remain.
      If the kill failed, assume the process is gone anyhow.  */
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
   pop_target ();		/* go back to non-executing VxWorks connection */
 }
 
@@ -1296,7 +1295,7 @@
 static void
 vx_proc_close (int quitting)
 {
-  inferior_ptid = null_ptid;	/* No longer have a process.  */
+  inferior_pid = 0;		/* No longer have a process.  */
   if (vx_running)
     xfree (vx_running);
   vx_running = 0;
diff --git a/gdb/remote.c b/gdb/remote.c
index 86ba3c1..18712c5 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -79,9 +79,8 @@
 
 static void remote_fetch_registers (int regno);
 
-static void remote_resume (ptid_t ptid, int step,
-                           enum target_signal siggnal);
-static void remote_async_resume (ptid_t ptid, int step,
+static void remote_resume (int pid, int step, enum target_signal siggnal);
+static void remote_async_resume (int pid, int step,
 				 enum target_signal siggnal);
 static int remote_start_remote (PTR);
 
@@ -115,10 +114,8 @@
 
 static int readchar (int timeout);
 
-static ptid_t remote_wait (ptid_t ptid,
-                                 struct target_waitstatus *status);
-static ptid_t remote_async_wait (ptid_t ptid,
-                                       struct target_waitstatus *status);
+static int remote_wait (int pid, struct target_waitstatus *status);
+static int remote_async_wait (int pid, struct target_waitstatus *status);
 
 static void remote_kill (void);
 static void remote_async_kill (void);
@@ -136,7 +133,7 @@
 
 static void set_thread (int, int);
 
-static int remote_thread_alive (ptid_t);
+static int remote_thread_alive (int);
 
 static void get_offsets (void);
 
@@ -180,17 +177,15 @@
 
 static int stub_unpack_int (char *buff, int fieldlength);
 
-static ptid_t remote_current_thread (ptid_t oldptid);
+static int remote_current_thread (int oldpid);
 
 static void remote_find_new_threads (void);
 
 static void record_currthread (int currthread);
 
-static int fromhex (int a);
+/* exported functions */
 
-static int hex2bin (const char *hex, char *bin, int count);
-
-static int bin2hex (const char *bin, char *hex, int count);
+extern int fromhex (int a);
 
 static int putpkt_binary (char *buf, int cnt);
 
@@ -670,22 +665,6 @@
     }
 }
 
-/* Should we try the 'qSymbol' (target symbol lookup service) request? */
-static struct packet_config remote_protocol_qSymbol;
-
-static void
-set_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
-				  struct cmd_list_element *c)
-{
-  update_packet_config (&remote_protocol_qSymbol);
-}
-
-static void
-show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty)
-{
-  show_packet_config_cmd (&remote_protocol_qSymbol);
-}
-
 /* Should we try the 'e' (step over range) request? */
 static struct packet_config remote_protocol_e;
 
@@ -915,16 +894,15 @@
 
   /* If this is a new thread, add it to GDB's thread list.
      If we leave it up to WFI to do this, bad things will happen.  */
-  if (!in_thread_list (pid_to_ptid (currthread)))
+  if (!in_thread_list (currthread))
     {
-      add_thread (pid_to_ptid (currthread));
+      add_thread (currthread);
 #ifdef UI_OUT
       ui_out_text (uiout, "[New ");
-      ui_out_text (uiout, target_pid_to_str (pid_to_ptid (currthread)));
+      ui_out_text (uiout, target_pid_to_str (currthread));
       ui_out_text (uiout, "]\n");
 #else
-      printf_filtered ("[New %s]\n",
-                       target_pid_to_str (pid_to_ptid (currthread)));
+      printf_filtered ("[New %s]\n", target_pid_to_str (currthread));
 #endif
     }
 }
@@ -962,9 +940,8 @@
 /*  Return nonzero if the thread TH is still alive on the remote system.  */
 
 static int
-remote_thread_alive (ptid_t ptid)
+remote_thread_alive (int tid)
 {
-  int tid = PIDGET (ptid);
   char buf[16];
 
   if (tid < 0)
@@ -1638,26 +1615,25 @@
 static int
 remote_newthread_step (threadref *ref, void *context)
 {
-  ptid_t ptid;
+  int pid;
 
-  ptid = pid_to_ptid (threadref_to_int (ref));
-
-  if (!in_thread_list (ptid))
-    add_thread (ptid);
+  pid = threadref_to_int (ref);
+  if (!in_thread_list (pid))
+    add_thread (pid);
   return 1;			/* continue iterator */
 }
 
 #define CRAZY_MAX_THREADS 1000
 
-static ptid_t
-remote_current_thread (ptid_t oldpid)
+static int
+remote_current_thread (int oldpid)
 {
   char *buf = alloca (PBUFSIZ);
 
   putpkt ("qC");
   getpkt (buf, PBUFSIZ, 0);
   if (buf[0] == 'Q' && buf[1] == 'C')
-    return pid_to_ptid (strtol (&buf[2], NULL, 16));
+    return strtol (&buf[2], NULL, 16);
   else
     return oldpid;
 }
@@ -1671,8 +1647,8 @@
 {
   remote_threadlist_iterator (remote_newthread_step, 0,
 			      CRAZY_MAX_THREADS);
-  if (PIDGET (inferior_ptid) == MAGIC_NULL_PID)	/* ack ack ack */
-    inferior_ptid = remote_current_thread (inferior_ptid);
+  if (inferior_pid == MAGIC_NULL_PID)	/* ack ack ack */
+    inferior_pid = remote_current_thread (inferior_pid);
 }
 
 /*
@@ -1704,8 +1680,8 @@
 	      do
 		{
 		  tid = strtol (bufp, &bufp, 16);
-		  if (tid != 0 && !in_thread_list (pid_to_ptid (tid)))
-		    add_thread (pid_to_ptid (tid));
+		  if (tid != 0 && !in_thread_list (tid))
+		    add_thread (tid);
 		}
 	      while (*bufp++ == ',');	/* comma-separated list */
 	      putpkt ("qsThreadInfo");
@@ -1748,14 +1724,22 @@
 
   if (use_threadextra_query)
     {
-      sprintf (bufp, "qThreadExtraInfo,%x", PIDGET (tp->ptid));
+      sprintf (bufp, "qThreadExtraInfo,%x", tp->pid);
       putpkt (bufp);
       getpkt (bufp, PBUFSIZ, 0);
       if (bufp[0] != 0)
 	{
-	  n = min (strlen (bufp) / 2, sizeof (display_buf));
-	  result = hex2bin (bufp, display_buf, n);
-	  display_buf [result] = '\0';
+	  char *p;
+
+	  for (p = display_buf; 
+	       p < display_buf + sizeof(display_buf) - 1 &&
+		 bufp[0] != 0 &&
+		 bufp[1] != 0;
+	       p++, bufp+=2)
+	    {
+	      *p = fromhex (bufp[0]) * 16 + fromhex (bufp[1]);
+	    }
+	  *p = 0;
 	  return display_buf;
 	}
     }
@@ -1764,7 +1748,7 @@
   use_threadextra_query = 0;
   set = TAG_THREADID | TAG_EXISTS | TAG_THREADNAME
     | TAG_MOREDISPLAY | TAG_DISPLAY;
-  int_to_threadref (&id, PIDGET (tp->ptid));
+  int_to_threadref (&id, tp->pid);
   if (remote_get_threadinfo (&id, set, &threadinfo))
     if (threadinfo.active)
       {
@@ -2035,7 +2019,7 @@
   /* Let the stub know that we want it to return the thread.  */
   set_thread (-1, 0);
 
-  inferior_ptid = remote_current_thread (inferior_ptid);
+  inferior_pid = remote_current_thread (inferior_pid);
 
   get_offsets ();		/* Get text, data & bss offsets */
 
@@ -2086,7 +2070,6 @@
   update_packet_config (&remote_protocol_e);
   update_packet_config (&remote_protocol_E);
   update_packet_config (&remote_protocol_P);
-  update_packet_config (&remote_protocol_qSymbol);
   for (i = 0; i < NR_Z_PACKET_TYPES; i++)
     update_packet_config (&remote_protocol_Z[i]);
   /* Force remote_write_bytes to check whether target supports binary
@@ -2094,44 +2077,6 @@
   update_packet_config (&remote_protocol_binary_download);
 }
 
-/* Symbol look-up. */
-
-static void
-remote_check_symbols (struct objfile *objfile)
-{
-  char *msg, *reply, *tmp;
-  struct minimal_symbol *sym;
-  int end;
-
-  if (remote_protocol_qSymbol.support == PACKET_DISABLE)
-    return;
-
-  msg   = alloca (PBUFSIZ);
-  reply = alloca (PBUFSIZ);
-
-  /* Invite target to request symbol lookups. */
-
-  putpkt ("qSymbol::");
-  getpkt (reply, PBUFSIZ, 0);
-  packet_ok (reply, &remote_protocol_qSymbol);
-
-  while (strncmp (reply, "qSymbol:", 8) == 0)
-    {
-      tmp = &reply[8];
-      end = hex2bin (tmp, msg, strlen (tmp) / 2);
-      msg[end] = '\0';
-      sym = lookup_minimal_symbol (msg, NULL, NULL);
-      if (sym == NULL)
-	sprintf (msg, "qSymbol::%s", &reply[8]);
-      else
-	sprintf (msg, "qSymbol:%s:%s", 
-		 paddr_nz (SYMBOL_VALUE_ADDRESS (sym)),
-		 &reply[8]);
-      putpkt (msg);
-      getpkt (reply, PBUFSIZ, 0);
-    }
-}
-
 static void
 remote_open_1 (char *name, int from_tty, struct target_ops *target,
 	       int extended_p)
@@ -2191,12 +2136,7 @@
      be split out into seperate variables, especially since GDB will
      someday have a notion of debugging several processes.  */
 
-  inferior_ptid = pid_to_ptid (MAGIC_NULL_PID);
-#ifdef SOLIB_CREATE_INFERIOR_HOOK
-  /* First delete any symbols previously loaded from shared libraries. */
-  no_shared_libraries (NULL, 0);
-#endif
-
+  inferior_pid = MAGIC_NULL_PID;
   /* Start the remote connection; if error (0), discard this target.
      In particular, if the user quits, be sure to discard it
      (we'd be in an inconsistent state otherwise).  */
@@ -2215,19 +2155,14 @@
       putpkt ("!");
       getpkt (buf, PBUFSIZ, 0);
     }
-#ifdef SOLIB_CREATE_INFERIOR_HOOK
   /* FIXME: need a master target_open vector from which all 
      remote_opens can be called, so that stuff like this can 
      go there.  Failing that, the following code must be copied
      to the open function for any remote target that wants to 
      support svr4 shared libraries.  */
-
-  /* Set up to detect and load shared libraries. */
+#ifdef SOLIB_CREATE_INFERIOR_HOOK
   if (exec_bfd) 	/* No use without an exec file. */
-    {
-      SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
-      remote_check_symbols (symfile_objfile);
-    }
+    SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
 #endif
 }
 
@@ -2288,7 +2223,7 @@
      flag indicating that a target is active.  These functions should
      be split out into seperate variables, especially since GDB will
      someday have a notion of debugging several processes.  */
-  inferior_ptid = pid_to_ptid (MAGIC_NULL_PID);
+  inferior_pid = MAGIC_NULL_PID;
 
   /* With this target we start out by owning the terminal. */
   remote_async_terminal_ours_p = 1;
@@ -2302,11 +2237,6 @@
      implemented. */
   wait_forever_enabled_p = 0;
 
-#ifdef SOLIB_CREATE_INFERIOR_HOOK
-  /* First delete any symbols previously loaded from shared libraries. */
-  no_shared_libraries (NULL, 0);
-#endif
-
   /* Start the remote connection; if error (0), discard this target.
      In particular, if the user quits, be sure to discard it
      (we'd be in an inconsistent state otherwise).  */
@@ -2328,19 +2258,14 @@
       putpkt ("!");
       getpkt (buf, PBUFSIZ, 0);
     }
-#ifdef SOLIB_CREATE_INFERIOR_HOOK
   /* FIXME: need a master target_open vector from which all 
      remote_opens can be called, so that stuff like this can 
      go there.  Failing that, the following code must be copied
      to the open function for any remote target that wants to 
      support svr4 shared libraries.  */
-
-  /* Set up to detect and load shared libraries. */
+#ifdef SOLIB_CREATE_INFERIOR_HOOK
   if (exec_bfd) 	/* No use without an exec file. */
-    {
-      SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
-      remote_check_symbols (symfile_objfile);
-    }
+    SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
 #endif
 }
 
@@ -2391,7 +2316,7 @@
 
 /* Convert hex digit A to a number.  */
 
-static int
+int
 fromhex (int a)
 {
   if (a >= '0' && a <= '9')
@@ -2404,25 +2329,6 @@
     error ("Reply contains invalid hex digit %d", a);
 }
 
-static int
-hex2bin (const char *hex, char *bin, int count)
-{
-  int i;
-
-  for (i = 0; i < count; i++)
-    {
-      if (hex[0] == 0 || hex[1] == 0)
-	{
-	  /* Hex string is short, or of uneven length.
-	     Return the count that has been converted so far. */
-	  return i;
-	}
-      *bin++ = fromhex (hex[0]) * 16 + fromhex (hex[1]);
-      hex += 2;
-    }
-  return i;
-}
-
 /* Convert number NIB to a hex digit.  */
 
 static int
@@ -2433,23 +2339,6 @@
   else
     return 'a' + nib - 10;
 }
-
-static int
-bin2hex (const char *bin, char *hex, int count)
-{
-  int i;
-  /* May use a length, or a nul-terminated string as input. */
-  if (count == 0)
-    count = strlen (bin);
-
-  for (i = 0; i < count; i++)
-    {
-      *hex++ = tohex ((*bin >> 4) & 0xf);
-      *hex++ = tohex (*bin++ & 0xf);
-    }
-  *hex = 0;
-  return i;
-}
 
 /* Tell the remote machine to resume.  */
 
@@ -2458,10 +2347,9 @@
 static int last_sent_step;
 
 static void
-remote_resume (ptid_t ptid, int step, enum target_signal siggnal)
+remote_resume (int pid, int step, enum target_signal siggnal)
 {
   char *buf = alloca (PBUFSIZ);
-  int pid = PIDGET (ptid);
   char *p;
 
   if (pid == -1)
@@ -2508,7 +2396,7 @@
 	      putpkt (buf);
 	      getpkt (buf, PBUFSIZ, 0);
 
-	      if (packet_ok (buf, &remote_protocol_E) == PACKET_OK)
+	      if (packet_ok(buf, &remote_protocol_E) == PACKET_OK)
 		return;
 	    }
 	}
@@ -2526,7 +2414,7 @@
 	      putpkt (buf);
 	      getpkt (buf, PBUFSIZ, 0);
 
-	      if (packet_ok (buf, &remote_protocol_e) == PACKET_OK)
+	      if (packet_ok(buf, &remote_protocol_e) == PACKET_OK)
 		return;
 	    }
 	}
@@ -2547,10 +2435,9 @@
 
 /* Same as remote_resume, but with async support. */
 static void
-remote_async_resume (ptid_t ptid, int step, enum target_signal siggnal)
+remote_async_resume (int pid, int step, enum target_signal siggnal)
 {
   char *buf = alloca (PBUFSIZ);
-  int pid = PIDGET (ptid);
   char *p;
 
   if (pid == -1)
@@ -2596,7 +2483,7 @@
 	      putpkt (buf);
 	      getpkt (buf, PBUFSIZ, 0);
 
-	      if (packet_ok (buf, &remote_protocol_E) == PACKET_OK)
+	      if (packet_ok(buf, &remote_protocol_E) == PACKET_OK)
 		goto register_event_loop;
 	    }
 	}
@@ -2614,7 +2501,7 @@
 	      putpkt (buf);
 	      getpkt (buf, PBUFSIZ, 0);
 
-	      if (packet_ok (buf, &remote_protocol_e) == PACKET_OK)
+	      if (packet_ok(buf, &remote_protocol_e) == PACKET_OK)
 		goto register_event_loop;
 	    }
 	}
@@ -2857,8 +2744,8 @@
    Returns "pid", which in the case of a multi-threaded 
    remote OS, is the thread-id.  */
 
-static ptid_t
-remote_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+remote_wait (int pid, struct target_waitstatus *status)
 {
   unsigned char *buf = alloca (PBUFSIZ);
   int thread_num = -1;
@@ -2902,7 +2789,6 @@
 	      {
 		unsigned char *p1;
 		char *p_temp;
-		int fieldsize;
 
 		/* Read the register number */
 		regno = strtol ((const char *) p, &p_temp, 16);
@@ -2936,10 +2822,13 @@
 Packet: '%s'\n",
 			       regno, p, buf);
 
-		    fieldsize = hex2bin (p, regs, REGISTER_RAW_SIZE (regno));
-		    p += 2 * fieldsize;
-		    if (fieldsize < REGISTER_RAW_SIZE (regno))
-		      warning ("Remote reply is too short: %s", buf);
+		    for (i = 0; i < REGISTER_RAW_SIZE (regno); i++)
+		      {
+			if (p[0] == 0 || p[1] == 0)
+			  warning ("Remote reply is too short: %s", buf);
+			regs[i] = fromhex (p[0]) * 16 + fromhex (p[1]);
+			p += 2;
+		      }
 		    supply_register (regno, regs);
 		  }
 
@@ -3064,14 +2953,14 @@
 got_status:
   if (thread_num != -1)
     {
-      return pid_to_ptid (thread_num);
+      return thread_num;
     }
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 /* Async version of remote_wait. */
-static ptid_t
-remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+remote_async_wait (int pid, struct target_waitstatus *status)
 {
   unsigned char *buf = alloca (PBUFSIZ);
   int thread_num = -1;
@@ -3121,7 +3010,6 @@
 	      {
 		unsigned char *p1;
 		char *p_temp;
-		int fieldsize;
 
 		/* Read the register number */
 		regno = strtol ((const char *) p, &p_temp, 16);
@@ -3155,10 +3043,13 @@
 Packet: '%s'\n",
 			       regno, p, buf);
 
-		    fieldsize = hex2bin (p, regs, REGISTER_RAW_SIZE (regno));
-		    p += 2 * fieldsize;
-		    if (fieldsize < REGISTER_RAW_SIZE (regno))
-		      warning ("Remote reply is too short: %s", buf);
+		    for (i = 0; i < REGISTER_RAW_SIZE (regno); i++)
+		      {
+			if (p[0] == 0 || p[1] == 0)
+			  warning ("Remote reply is too short: %s", buf);
+			regs[i] = fromhex (p[0]) * 16 + fromhex (p[1]);
+			p += 2;
+		      }
 		    supply_register (regno, regs);
 		  }
 
@@ -3286,9 +3177,9 @@
 got_status:
   if (thread_num != -1)
     {
-      return pid_to_ptid (thread_num);
+      return thread_num;
     }
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 /* Number of bytes of registers this stub implements.  */
@@ -3307,7 +3198,7 @@
   char *p;
   char *regs = alloca (REGISTER_BYTES);
 
-  set_thread (PIDGET (inferior_ptid), 1);
+  set_thread (inferior_pid, 1);
 
   sprintf (buf, "g");
   remote_send (buf, PBUFSIZ);
@@ -3408,7 +3299,12 @@
   sprintf (buf, "P%x=", regno);
   p = buf + strlen (buf);
   regp = register_buffer (regno);
-  bin2hex (regp, p, REGISTER_RAW_SIZE (regno));
+  for (i = 0; i < REGISTER_RAW_SIZE (regno); ++i)
+    {
+      *p++ = tohex ((regp[i] >> 4) & 0xf);
+      *p++ = tohex (regp[i] & 0xf);
+    }
+  *p = '\0';
   remote_send (buf, PBUFSIZ);
 
   return buf[0] != '\0';
@@ -3426,7 +3322,7 @@
   char *p;
   char *regs;
 
-  set_thread (PIDGET (inferior_ptid), 1);
+  set_thread (inferior_pid, 1);
 
   if (regno >= 0)
     {
@@ -3465,7 +3361,13 @@
   regs = register_buffer (-1);
   p = buf + 1;
   /* remote_prepare_to_store insures that register_bytes_found gets set.  */
-  bin2hex (regs, p, register_bytes_found);
+  for (i = 0; i < register_bytes_found; i++)
+    {
+      *p++ = tohex ((regs[i] >> 4) & 0xf);
+      *p++ = tohex (regs[i] & 0xf);
+    }
+  *p = '\0';
+
   remote_send (buf, PBUFSIZ);
 }
 
@@ -3692,8 +3594,12 @@
       /* Normal mode: Send target system values byte by byte, in
 	 increasing byte addresses.  Each byte is encoded as a two hex
 	 value.  */
-      nr_bytes = bin2hex (myaddr, p, todo);
-      p += 2 * nr_bytes;
+      for (nr_bytes = 0; nr_bytes < todo; nr_bytes++)
+	{
+	  *p++ = tohex ((myaddr[nr_bytes] >> 4) & 0xf);
+	  *p++ = tohex (myaddr[nr_bytes] & 0xf);
+	}
+      *p = '\0';
       break;
     case PACKET_SUPPORT_UNKNOWN:
       internal_error (__FILE__, __LINE__,
@@ -3784,11 +3690,14 @@
          each byte encoded as two hex characters.  */
 
       p = buf;
-      if ((i = hex2bin (p, myaddr, todo)) < todo)
+      for (i = 0; i < todo; i++)
 	{
-	  /* Reply is short.  This means that we were able to read
-	     only part of what we wanted to. */
-	  return i + (origlen - len);
+	  if (p[0] == 0 || p[1] == 0)
+	    /* Reply is short.  This means that we were able to read
+	       only part of what we wanted to.  */
+	    return i + (origlen - len);
+	  myaddr[i] = fromhex (p[0]) * 16 + fromhex (p[1]);
+	  p += 2;
 	}
       myaddr += todo;
       memaddr += todo;
@@ -4988,7 +4897,12 @@
     error ("\"monitor\" command ``%s'' is too long\n", command);
 
   /* Encode the actual command */
-  bin2hex (command, p, 0);
+  for (i = 0; command[i]; i++)
+    {
+      *p++ = tohex ((command[i] >> 4) & 0xf);
+      *p++ = tohex (command[i] & 0xf);
+    }
+  *p = '\0';
 
   if (putpkt (buf) < 0)
     error ("Communication problem with target\n");
@@ -5082,7 +4996,7 @@
 {
   int sample_thread = SAMPLE_THREAD;
 
-  if (remote_thread_alive (pid_to_ptid (sample_thread)))
+  if (remote_thread_alive (sample_thread))
     printf_filtered ("PASS: Thread alive test\n");
   else
     printf_filtered ("FAIL: Thread alive test\n");
@@ -5193,11 +5107,11 @@
    buffer.  */
 
 static char *
-remote_pid_to_str (ptid_t ptid)
+remote_pid_to_str (int pid)
 {
   static char buf[30];
 
-  sprintf (buf, "Thread %d", PIDGET (ptid));
+  sprintf (buf, "Thread %d", pid);
   return buf;
 }
 
@@ -5368,7 +5282,7 @@
      flag indicating that a target is active.  These functions should
      be split out into seperate variables, especially since GDB will
      someday have a notion of debugging several processes.  */
-  inferior_ptid = pid_to_ptid (MAGIC_NULL_PID);
+  inferior_pid = MAGIC_NULL_PID;
 
   /* Start the remote connection; if error (0), discard this target. */
 
@@ -5600,15 +5514,15 @@
     }
 }
 
-static ptid_t
-remote_cisco_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+remote_cisco_wait (int pid, struct target_waitstatus *status)
 {
   if (minitelnet () != ENTER_DEBUG)
     {
       error ("Debugging session terminated by protocol error");
     }
   putpkt ("?");
-  return remote_wait (ptid, status);
+  return remote_wait (pid, status);
 }
 
 static void
@@ -5766,6 +5680,7 @@
 static void
 set_remote_cmd (char *args, int from_tty)
 {
+  
 }
 
 static void
@@ -5776,7 +5691,6 @@
   show_remote_protocol_e_packet_cmd (args, from_tty);
   show_remote_protocol_E_packet_cmd (args, from_tty);
   show_remote_protocol_P_packet_cmd (args, from_tty);
-  show_remote_protocol_qSymbol_packet_cmd (args, from_tty);
   show_remote_protocol_binary_download_cmd (args, from_tty);
 }
 
@@ -5790,23 +5704,6 @@
   remote_address_size = TARGET_ADDR_BIT;
 }
 
-/* Saved pointer to previous owner of the new_objfile event. */
-static void (*remote_new_objfile_chain) (struct objfile *);
-
-/* Function to be called whenever a new objfile (shlib) is detected. */
-static void
-remote_new_objfile (struct objfile *objfile)
-{
-  if (remote_desc != 0)		/* Have a remote connection */
-    {
-      remote_check_symbols (objfile);
-    }
-  /* Call predecessor on chain, if any. */
-  if (remote_new_objfile_chain != 0 &&
-      remote_desc == 0)
-    remote_new_objfile_chain (objfile);
-}
-
 void
 _initialize_remote (void)
 {
@@ -5837,10 +5734,6 @@
   init_remote_cisco_ops ();
   add_target (&remote_cisco_ops);
 
-  /* Hook into new objfile notification.  */
-  remote_new_objfile_chain = target_new_objfile_hook;
-  target_new_objfile_hook  = remote_new_objfile;
-
 #if 0
   init_remote_threadtests ();
 #endif
@@ -5941,13 +5834,6 @@
   add_info ("remote-process", remote_info_process,
 	    "Query the remote system for process info.");
 
-  add_packet_config_cmd (&remote_protocol_qSymbol,
-			 "qSymbol", "symbol-lookup",
-			 set_remote_protocol_qSymbol_packet_cmd,
-			 show_remote_protocol_qSymbol_packet_cmd,
-			 &remote_set_cmdlist, &remote_show_cmdlist,
-			 0);
-
   add_packet_config_cmd (&remote_protocol_e,
 			 "e", "step-over-range",
 			 set_remote_protocol_e_packet_cmd,
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index e6693cc..7db0ba0 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -201,7 +201,7 @@
   if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
     {
       nr = regno - FP0_REGNUM + FPR0;
-      ptrace32 (PT_READ_FPR, PIDGET (inferior_ptid), addr, nr, 0);
+      ptrace32 (PT_READ_FPR, inferior_pid, addr, nr, 0);
     }
 
   /* Bogus register number. */
@@ -219,13 +219,13 @@
 	nr = regno;
 
       if (!ARCH64 ())
-	*addr = ptrace32 (PT_READ_GPR, PIDGET (inferior_ptid), (int *)nr, 0, 0);
+	*addr = ptrace32 (PT_READ_GPR, inferior_pid, (int *)nr, 0, 0);
       else
 	{
 	  /* PT_READ_GPR requires the buffer parameter to point to long long,
 	     even if the register is really only 32 bits. */
 	  long long buf;
-	  ptrace64 (PT_READ_GPR, PIDGET (inferior_ptid), nr, 0, (int *)&buf);
+	  ptrace64 (PT_READ_GPR, inferior_pid, nr, 0, (int *)&buf);
 	  if (REGISTER_RAW_SIZE (regno) == 8)
 	    memcpy (addr, &buf, 8);
 	  else
@@ -260,7 +260,7 @@
   if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
     {
       nr = regno - FP0_REGNUM + FPR0;
-      ptrace32 (PT_WRITE_FPR, PIDGET (inferior_ptid), addr, nr, 0);
+      ptrace32 (PT_WRITE_FPR, inferior_pid, addr, nr, 0);
     }
 
   /* Bogus register number. */
@@ -289,7 +289,7 @@
 	nr = regno;
 
       if (!ARCH64 ())
-	ptrace32 (PT_WRITE_GPR, PIDGET (inferior_ptid), (int *)nr, *addr, 0);
+	ptrace32 (PT_WRITE_GPR, inferior_pid, (int *)nr, *addr, 0);
       else
 	{
 	  /* PT_WRITE_GPR requires the buffer parameter to point to an 8-byte
@@ -299,7 +299,7 @@
 	    memcpy (&buf, addr, 8);
 	  else
 	    buf = *addr;
-	  ptrace64 (PT_WRITE_GPR, PIDGET (inferior_ptid), nr, 0, (int *)&buf);
+	  ptrace64 (PT_WRITE_GPR, inferior_pid, nr, 0, (int *)&buf);
 	}
     }
 
@@ -373,10 +373,9 @@
   errno = 0;
 
   if (arch64)
-    *to = ptrace64 (PT_READ_I, PIDGET (inferior_ptid), from, 0, NULL);
+    *to = ptrace64 (PT_READ_I, inferior_pid, from, 0, NULL);
   else
-    *to = ptrace32 (PT_READ_I, PIDGET (inferior_ptid), (int *)(long) from,
-                    0, NULL);
+    *to = ptrace32 (PT_READ_I, inferior_pid, (int *)(long) from, 0, NULL);
 
   return !errno;
 }
@@ -442,9 +441,9 @@
       for (i = 0, errno = 0; i < count; i++, addr += sizeof (int))
 	{
 	  if (arch64)
-	    ptrace64 (PT_WRITE_D, PIDGET (inferior_ptid), addr, buf[i], NULL);
+	    ptrace64 (PT_WRITE_D, inferior_pid, addr, buf[i], NULL);
 	  else
-	    ptrace32 (PT_WRITE_D, PIDGET (inferior_ptid), (int *)(long) addr,
+	    ptrace32 (PT_WRITE_D, inferior_pid, (int *)(long) addr,
 		      buf[i], NULL);
 
 	  if (errno)
@@ -483,9 +482,9 @@
   prev_pc = read_pc ();
   write_pc (DUMMY_INSN_ADDR);
   if (ARCH64 ())
-    ret = ptrace64 (PT_CONTINUE, PIDGET (inferior_ptid), 1, 0, NULL);
+    ret = ptrace64 (PT_CONTINUE, inferior_pid, 1, 0, NULL);
   else
-    ret = ptrace32 (PT_CONTINUE, PIDGET (inferior_ptid), (int *)1, 0, NULL);
+    ret = ptrace32 (PT_CONTINUE, inferior_pid, (int *)1, 0, NULL);
 
   if (ret != 0)
     perror ("pt_continue");
@@ -494,7 +493,7 @@
     {
       pid = wait (&status);
     }
-  while (pid != PIDGET (inferior_ptid));
+  while (pid != inferior_pid);
 
   write_pc (prev_pc);
   target_remove_breakpoint (DUMMY_INSN_ADDR, shadow_contents);
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 864345d..3c0a7b9 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2210,7 +2210,7 @@
 
   if (!from_xcoff_exec)
     {
-      arch = info.bfd_arch_info->arch;
+      arch = info.bfd_architecture;
       mach = info.bfd_arch_info->mach;
     }
   else
diff --git a/gdb/ser-e7kpc.c b/gdb/ser-e7kpc.c
index 209765e..c529c14 100644
--- a/gdb/ser-e7kpc.c
+++ b/gdb/ser-e7kpc.c
@@ -24,8 +24,13 @@
 #include "serial.h"
 #include "gdb_string.h"
 
-#ifdef _WIN32
+/* MSVC uses strnicmp instead of strncasecmp */
+#ifdef _MSC_VER
+#define strncasecmp strnicmp
 #define WIN32_LEAN_AND_MEAN
+#endif
+
+#ifdef _WIN32
 #include <windows.h>
 #endif
 
@@ -124,7 +129,36 @@
     0
 };
 
+#ifdef _MSC_VER
+/* Get the base of the data segment.  This is needed to calculate the offset
+   between data segment addresses and the base of linear memory, which is where
+   device registers reside.  Note that this is really only necessary for
+   Win32s, since Win95 and NT keep the data segment at linear 0.  */
+
+static unsigned long
+get_ds_base (void)
+{
+  unsigned short dsval;
+  LDT_ENTRY ldt;
+  unsigned long dsbase;
+
+  __asm
+  {
+    mov dsval, ds
+  }
+
+  dsbase = 0;
+
+  GetThreadSelectorEntry (GetCurrentThread (), dsval, &ldt);
+
+  dsbase = ldt.HighWord.Bits.BaseHi << 24 | ldt.HighWord.Bits.BaseMid << 16
+    | ldt.BaseLow;
+
+  return dsbase;
+}
+#else /* !_MSC_VER */
 #define get_ds_base() 0
+#endif /* _MSC_VER */
 
 static int
 e7000pc_init (void)
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c
index a8521f2..3d336f7 100644
--- a/gdb/ser-go32.c
+++ b/gdb/ser-go32.c
@@ -623,6 +623,7 @@
     {
       if (timeout >= 0 && (rawclock () - then) >= 0)
 	return SERIAL_TIMEOUT;
+      notice_quit ();
     }
 
   return c;
diff --git a/gdb/ser-ocd.c b/gdb/ser-ocd.c
new file mode 100644
index 0000000..88ba1d1
--- /dev/null
+++ b/gdb/ser-ocd.c
@@ -0,0 +1,186 @@
+/* Remote serial interface for Macraigor Systems implementation of
+   On-Chip Debugging using serial target box or serial wiggler
+
+   Copyright 1994, 1997, 1998, 1999, 2000, 2001
+   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.  */
+
+#include "defs.h"
+#include "serial.h"
+
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
+#ifdef _WIN32
+/* On Windows, this function pointer is initialized to a function in
+   the wiggler DLL.  */
+static int (*dll_do_command) (const char *, char *);
+#endif
+
+static int
+ocd_open (serial_t scb, const char *name)
+{
+#ifdef _WIN32
+  /* Find the wiggler DLL which talks to the board.  */
+  if (dll_do_command == NULL)
+    {
+      HINSTANCE handle;
+
+      /* FIXME: Should the user be able to configure this?  */
+      handle = LoadLibrary ("Wigglers.dll");
+      if (handle == NULL)
+	error ("Can't load Wigglers.dll");
+
+      dll_do_command = ((int (*) (const char *, char *))
+			GetProcAddress (handle, "do_command"));
+      if (dll_do_command == NULL)
+	error ("Can't find do_command function in Wigglers.dll");
+    }
+#else
+  /* No wiggler DLLs on Unix yet, fail.  */
+  error ("Wiggler library not available for this type of host.");
+#endif /* _WIN32 */
+  return 0;
+}
+
+static int
+ocd_noop (serial_t scb)
+{
+  return 0;
+}
+
+static void
+ocd_raw (serial_t scb)
+{
+  /* Always in raw mode */
+}
+
+/* We need a buffer to store responses from the Wigglers.dll */
+#define WIGGLER_BUFF_SIZE 512
+unsigned char from_wiggler_buffer[WIGGLER_BUFF_SIZE];
+unsigned char *wiggler_buffer_ptr;	/* curr spot in buffer */
+
+static int
+ocd_readchar (serial_t scb, int timeout)
+{
+  /* Catch attempts at reading past the end of the buffer */
+  if (wiggler_buffer_ptr >
+      (from_wiggler_buffer + (sizeof (char *) * WIGGLER_BUFF_SIZE)))
+      error ("ocd_readchar asked to read past the end of the buffer!");
+
+  return (int) *wiggler_buffer_ptr++;	/* return curr char and increment ptr */
+}
+
+struct ocd_ttystate
+{
+  int dummy;
+};
+
+/* ocd_{get set}_tty_state() are both dummys to fill out the function
+   vector.  Someday, they may do something real... */
+
+static serial_ttystate
+ocd_get_tty_state (serial_t scb)
+{
+  struct ocd_ttystate *state;
+
+  state = (struct ocd_ttystate *) xmalloc (sizeof *state);
+
+  return (serial_ttystate) state;
+}
+
+static int
+ocd_set_tty_state (serial_t scb, serial_ttystate ttystate)
+{
+  return 0;
+}
+
+static int
+ocd_noflush_set_tty_state (serial_t scb, serial_ttystate new_ttystate,
+			   serial_ttystate old_ttystate)
+{
+  return 0;
+}
+
+static void
+ocd_print_tty_state (serial_t scb,
+		     serial_ttystate ttystate,
+		     struct ui_file *stream)
+{
+  /* Nothing to print.  */
+  return;
+}
+
+static int
+ocd_setbaudrate (serial_t scb, int rate)
+{
+  return 0;
+}
+
+static int
+ocd_setstopbits (serial_t scb, int rate)
+{
+  return 0;
+}
+
+static int
+ocd_write (serial_t scb, const char *str, int len)
+{
+#ifdef _WIN32
+  /* send packet to Wigglers.dll and store response so we can give it to
+     remote-wiggler.c when get_packet is run */
+  dll_do_command (str, from_wiggler_buffer);
+  wiggler_buffer_ptr = from_wiggler_buffer;
+#endif
+
+  return 0;
+}
+
+static void
+ocd_close (serial_t scb)
+{
+}
+
+static struct serial_ops ocd_ops =
+{
+  "ocd",
+  0,
+  ocd_open,
+  ocd_close,
+  ocd_readchar,
+  ocd_write,
+  ocd_noop,			/* flush output */
+  ocd_noop,			/* flush input */
+  ocd_noop,			/* send break -- currently used only for nindy */
+  ocd_raw,
+  ocd_get_tty_state,
+  ocd_set_tty_state,
+  ocd_print_tty_state,
+  ocd_noflush_set_tty_state,
+  ocd_setbaudrate,
+  ocd_setstopbits,
+  ocd_noop,			/* wait for output to drain */
+};
+
+void
+_initialize_ser_ocd_bdm (void)
+{
+  serial_add_interface (&ocd_ops);
+}
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index 30281cd..d7eb9cb 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -29,7 +29,9 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <sys/socket.h>
+#ifndef __CYGWIN__
 #include <netinet/tcp.h>
+#endif
 
 #include <signal.h>
 #include "gdb_string.h"
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index ee17c12..4daf11f 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -741,33 +741,9 @@
   int i;
 
   for (i = 0; baudtab[i].rate != -1; i++)
-    {
-      /* test for perfect macth. */
-      if (rate == baudtab[i].rate)
-        return baudtab[i].code;
-      else
-        {
-	  /* check if it is in between valid values. */
-          if (rate < baudtab[i].rate)
-	    {
-	      if (i)
-	        {
-	          warning ("Invalid baud rate %d.  Closest values are %d and %d.",
-	                    rate, baudtab[i - 1].rate, baudtab[i].rate);
-		}
-	      else
-	        {
-	          warning ("Invalid baud rate %d.  Minimum value is %d.",
-	                    rate, baudtab[0].rate);
-		}
-	      return -1;
-	    }
-        }
-    }
- 
-  /* The requested speed was too large. */
-  warning ("Invalid baud rate %d.  Maximum value is %d.",
-            rate, baudtab[i - 1].rate);
+    if (rate == baudtab[i].rate)
+      return baudtab[i].code;
+
   return -1;
 }
 
@@ -775,22 +751,13 @@
 hardwire_setbaudrate (serial_t scb, int rate)
 {
   struct hardwire_ttystate state;
-  int baud_code = rate_to_code (rate);
-  
-  if (baud_code < 0)
-    {
-      /* The baud rate was not valid.
-         A warning has already been issued. */
-      errno = EINVAL;
-      return -1;
-    }
 
   if (get_tty_state (scb, &state))
     return -1;
 
 #ifdef HAVE_TERMIOS
-  cfsetospeed (&state.termios, baud_code);
-  cfsetispeed (&state.termios, baud_code);
+  cfsetospeed (&state.termios, rate_to_code (rate));
+  cfsetispeed (&state.termios, rate_to_code (rate));
 #endif
 
 #ifdef HAVE_TERMIO
@@ -799,12 +766,12 @@
 #endif
 
   state.termio.c_cflag &= ~(CBAUD | CIBAUD);
-  state.termio.c_cflag |= baud_code;
+  state.termio.c_cflag |= rate_to_code (rate);
 #endif
 
 #ifdef HAVE_SGTTY
-  state.sgttyb.sg_ispeed = baud_code;
-  state.sgttyb.sg_ospeed = baud_code;
+  state.sgttyb.sg_ispeed = rate_to_code (rate);
+  state.sgttyb.sg_ospeed = rate_to_code (rate);
 #endif
 
   return set_tty_state (scb, &state);
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 78a4a25..0475b43 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -59,6 +59,14 @@
   int f_offset;
 };
 
+#if 0
+#ifdef _WIN32_WCE
+char **sh_register_names = sh3_reg_names;
+#else
+char **sh_register_names = sh_generic_reg_names;
+#endif
+#endif
+
 static char *
 sh_generic_register_name (int reg_nr)
 {
diff --git a/gdb/sh3-rom.c b/gdb/sh3-rom.c
index c0f26df..fc3b7b8 100644
--- a/gdb/sh3-rom.c
+++ b/gdb/sh3-rom.c
@@ -350,11 +350,16 @@
   sh3_ops.to_longname = "Hitachi SH-3 rom monitor";
 
   sh3_ops.to_doc =
-  /* We can download through the parallel port too. */
-    "Debug on a Hitachi eval board running the SH-3E rom monitor.\n"
-    "Specify the serial device it is connected to.\n"
+#ifdef _WINDOWS
+  /* On windows we can talk through the parallel port too. */
+    "Debug on a Hitachi eval board running the SH-3 rom monitor.\n"
+    "Specify the serial device it is connected to (e.g. com2).\n"
     "If you want to use the parallel port to download to it, specify that\n"
-    "as an additional second argument.";
+    "as the second argument. (e.g. lpt1)";
+#else
+    "Debug on a Hitachi eval board running the SH-3 rom monitor.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).";
+#endif
 
   sh3_ops.to_open = sh3_open;
   sh3_ops.to_close = sh3_close;
@@ -369,11 +374,16 @@
   sh3e_ops.to_longname = "Hitachi SH-3E rom monitor";
 
   sh3e_ops.to_doc =
-  /* We can download through the parallel port too. */
+#ifdef _WINDOWS
+  /* On windows we can talk through the parallel port too. */
     "Debug on a Hitachi eval board running the SH-3E rom monitor.\n"
-    "Specify the serial device it is connected to.\n"
+    "Specify the serial device it is connected to (e.g. com2).\n"
     "If you want to use the parallel port to download to it, specify that\n"
-    "as an additional second argument.";
+    "as the second argument. (e.g. lpt1)";
+#else
+    "Debug on a Hitachi eval board running the SH-3E rom monitor.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).";
+#endif
 
   sh3e_ops.to_open = sh3e_open;
   sh3e_ops.to_close = sh3_close;
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index f92c49e..cc1e20c 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -73,7 +73,7 @@
 extern int procfs_suppress_run;
 extern struct target_ops procfs_ops;	/* target vector for procfs.c */
 extern struct target_ops core_ops;	/* target vector for corelow.c */
-extern char *procfs_pid_to_str (ptid_t ptid);
+extern char *procfs_pid_to_str (int pid);
 
 /* Prototypes for supply_gregset etc. */
 #include "gregset.h"
@@ -84,7 +84,7 @@
 
 struct ps_prochandle
   {
-    ptid_t ptid;
+    pid_t pid;
   };
 
 struct string_map
@@ -97,12 +97,14 @@
 static td_thragent_t *main_ta;
 static int sol_thread_active = 0;
 
+static struct cleanup *save_inferior_pid (void);
+static void restore_inferior_pid (void *pid);
 static char *td_err_string (td_err_e errcode);
 static char *td_state_string (td_thr_state_e statecode);
-static ptid_t thread_to_lwp (ptid_t thread_id, int default_lwp);
-static void sol_thread_resume (ptid_t ptid, int step, enum target_signal signo);
-static ptid_t lwp_to_thread (ptid_t lwp);
-static int sol_thread_alive (ptid_t ptid);
+static int thread_to_lwp (int thread_id, int default_lwp);
+static void sol_thread_resume (int pid, int step, enum target_signal signo);
+static int lwp_to_thread (int lwp);
+static int sol_thread_alive (int pid);
 static void sol_core_close (int quitting);
 
 static void init_sol_thread_ops (void);
@@ -111,15 +113,14 @@
 /* Default definitions: These must be defined in tm.h 
    if they are to be shared with a process module such as procfs.  */
 
-#define GET_PID(ptid)		ptid_get_pid (ptid)
-#define GET_LWP(ptid)		ptid_get_lwp (ptid)
-#define GET_THREAD(ptid)	ptid_get_tid (ptid)
+#define THREAD_FLAG		0x80000000
+#define is_thread(ARG)		(((ARG) & THREAD_FLAG) != 0)
+#define is_lwp(ARG)		(((ARG) & THREAD_FLAG) == 0)
+#define GET_LWP(PID)		TIDGET (PID)
+#define GET_THREAD(PID)		TIDGET (PID)
+#define BUILD_LWP(TID, PID)	MERGEPID (PID, TID)
 
-#define is_lwp(ptid)		(GET_LWP (ptid) != 0)
-#define is_thread(ptid)		(GET_THREAD (ptid) != 0)
-
-#define BUILD_LWP(lwp, pid)	ptid_build (pid, lwp, 0)
-#define BUILD_THREAD(tid, pid)	ptid_build (pid, 0, tid)
+#define BUILD_THREAD(TID, PID)	(MERGEPID (PID, TID) | THREAD_FLAG)
 
 /* Pointers to routines from lithread_db resolved by dlopen() */
 
@@ -287,7 +288,7 @@
 
    SYNOPSIS
 
-   tpid_t thread_to_lwp (thread_id, default_lwp)
+   int thread_to_lwp (thread_id, default_lwp)
 
    DESCRIPTION
 
@@ -301,8 +302,8 @@
 
  */
 
-static ptid_t
-thread_to_lwp (ptid_t thread_id, int default_lwp)
+static int
+thread_to_lwp (int thread_id, int default_lwp)
 {
   td_thrinfo_t ti;
   td_thrhandle_t th;
@@ -315,20 +316,20 @@
 
   val = p_td_ta_map_id2thr (main_ta, GET_THREAD (thread_id), &th);
   if (val == TD_NOTHR)
-    return pid_to_ptid (-1);		/* thread must have terminated */
+    return -1;			/* thread must have terminated */
   else if (val != TD_OK)
     error ("thread_to_lwp: td_ta_map_id2thr %s", td_err_string (val));
 
   val = p_td_thr_get_info (&th, &ti);
   if (val == TD_NOTHR)
-    return pid_to_ptid (-1);		/* thread must have terminated */
+    return -1;			/* thread must have terminated */
   else if (val != TD_OK)
     error ("thread_to_lwp: td_thr_get_info: %s", td_err_string (val));
 
   if (ti.ti_state != TD_THR_ACTIVE)
     {
       if (default_lwp != -1)
-	return pid_to_ptid (default_lwp);
+	return default_lwp;
       error ("thread_to_lwp: thread state not active: %s",
 	     td_state_string (ti.ti_state));
     }
@@ -357,8 +358,8 @@
 
  */
 
-static ptid_t
-lwp_to_thread (ptid_t lwp)
+static int
+lwp_to_thread (int lwp)
 {
   td_thrinfo_t ti;
   td_thrhandle_t th;
@@ -370,11 +371,11 @@
   /* It's an lwp.  Convert it to a thread id.  */
 
   if (!sol_thread_alive (lwp))
-    return pid_to_ptid (-1);	/* defunct lwp */
+    return -1;			/* defunct lwp */
 
   val = p_td_ta_map_lwp2thr (main_ta, GET_LWP (lwp), &th);
   if (val == TD_NOTHR)
-    return pid_to_ptid (-1);	/* thread must have terminated */
+    return -1;			/* thread must have terminated */
   else if (val != TD_OK)
     error ("lwp_to_thread: td_ta_map_lwp2thr: %s.", td_err_string (val));
 
@@ -387,13 +388,57 @@
 
   val = p_td_thr_get_info (&th, &ti);
   if (val == TD_NOTHR)
-    return pid_to_ptid (-1);	/* thread must have terminated */
+    return -1;			/* thread must have terminated */
   else if (val != TD_OK)
     error ("lwp_to_thread: td_thr_get_info: %s.", td_err_string (val));
 
   return BUILD_THREAD (ti.ti_tid, PIDGET (lwp));
 }
 
+/*
+
+   LOCAL FUNCTION
+
+   save_inferior_pid - Save inferior_pid on the cleanup list
+   restore_inferior_pid - Restore inferior_pid from the cleanup list
+
+   SYNOPSIS
+
+   struct cleanup *save_inferior_pid ()
+   void restore_inferior_pid (int pid)
+
+   DESCRIPTION
+
+   These two functions act in unison to restore inferior_pid in
+   case of an error.
+
+   NOTES
+
+   inferior_pid is a global variable that needs to be changed by many of
+   these routines before calling functions in procfs.c.  In order to
+   guarantee that inferior_pid gets restored (in case of errors), you
+   need to call save_inferior_pid before changing it.  At the end of the
+   function, you should invoke do_cleanups to restore it.
+
+ */
+
+
+static struct cleanup *
+save_inferior_pid (void)
+{
+  int *saved_pid = xmalloc (sizeof (int));
+  *saved_pid = inferior_pid;
+  return make_cleanup (restore_inferior_pid, saved_pid);
+}
+
+static void
+restore_inferior_pid (void *data)
+{
+  int *saved_pid = data;
+  inferior_pid = *saved_pid;
+  xfree (saved_pid);
+}
+
 
 /* Most target vector functions from here on actually just pass through to
    procfs.c, as they don't need to do anything specific for threads.  */
@@ -420,13 +465,13 @@
   if (sol_thread_active)
     {
       printf_filtered ("sol-thread active.\n");
-      main_ph.ptid = inferior_ptid;		/* Save for xfer_memory */
+      main_ph.pid = inferior_pid;	/* Save for xfer_memory */
       push_target (&sol_thread_ops);
-      inferior_ptid = lwp_to_thread (inferior_ptid);
-      if (PIDGET (inferior_ptid) == -1)
-	inferior_ptid = main_ph.ptid;
+      inferior_pid = lwp_to_thread (inferior_pid);
+      if (inferior_pid == -1)
+	inferior_pid = main_ph.pid;
       else
-	add_thread (inferior_ptid);
+	add_thread (inferior_pid);
     }
   /* XXX - might want to iterate over all the threads and register them. */
 }
@@ -442,7 +487,7 @@
 static void
 sol_thread_detach (char *args, int from_tty)
 {
-  inferior_ptid = pid_to_ptid (PIDGET (main_ph.ptid));
+  inferior_pid = PIDGET (main_ph.pid);
   unpush_target (&sol_thread_ops);
   procfs_ops.to_detach (args, from_tty);
 }
@@ -453,29 +498,29 @@
    for procfs.  */
 
 static void
-sol_thread_resume (ptid_t ptid, int step, enum target_signal signo)
+sol_thread_resume (int pid, int step, enum target_signal signo)
 {
   struct cleanup *old_chain;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  inferior_ptid = thread_to_lwp (inferior_ptid, PIDGET (main_ph.ptid));
-  if (PIDGET (inferior_ptid) == -1)
-    inferior_ptid = procfs_first_available ();
+  inferior_pid = thread_to_lwp (inferior_pid, main_ph.pid);
+  if (inferior_pid == -1)
+    inferior_pid = procfs_first_available ();
 
-  if (PIDGET (ptid) != -1)
+  if (pid != -1)
     {
-      ptid_t save_ptid = ptid;
+      int save_pid = pid;
 
-      ptid = thread_to_lwp (ptid, -2);
-      if (PIDGET (ptid) == -2)		/* Inactive thread */
+      pid = thread_to_lwp (pid, -2);
+      if (pid == -2)		/* Inactive thread */
 	error ("This version of Solaris can't start inactive threads.");
-      if (info_verbose && PIDGET (ptid) == -1)
-	warning ("Specified thread %ld seems to have terminated",
-		 GET_THREAD (save_ptid));
+      if (info_verbose && pid == -1)
+	warning ("Specified thread %d seems to have terminated",
+		 GET_THREAD (save_pid));
     }
 
-  procfs_ops.to_resume (ptid, step, signo);
+  procfs_ops.to_resume (pid, step, signo);
 
   do_cleanups (old_chain);
 }
@@ -483,44 +528,44 @@
 /* Wait for any threads to stop.  We may have to convert PID from a thread id
    to a LWP id, and vice versa on the way out.  */
 
-static ptid_t
-sol_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+static int
+sol_thread_wait (int pid, struct target_waitstatus *ourstatus)
 {
-  ptid_t rtnval;
-  ptid_t save_ptid;
+  int rtnval;
+  int save_pid;
   struct cleanup *old_chain;
 
-  save_ptid = inferior_ptid;
-  old_chain = save_inferior_ptid ();
+  save_pid = inferior_pid;
+  old_chain = save_inferior_pid ();
 
-  inferior_ptid = thread_to_lwp (inferior_ptid, PIDGET (main_ph.ptid));
-  if (PIDGET (inferior_ptid) == -1)
-    inferior_ptid = procfs_first_available ();
+  inferior_pid = thread_to_lwp (inferior_pid, main_ph.pid);
+  if (inferior_pid == -1)
+    inferior_pid = procfs_first_available ();
 
-  if (PIDGET (ptid) != -1)
+  if (pid != -1)
     {
-      ptid_t save_ptid = ptid;
+      int save_pid = pid;
 
-      ptid = thread_to_lwp (ptid, -2);
-      if (PIDGET (ptid) == -2)		/* Inactive thread */
+      pid = thread_to_lwp (pid, -2);
+      if (pid == -2)		/* Inactive thread */
 	error ("This version of Solaris can't start inactive threads.");
-      if (info_verbose && PIDGET (ptid) == -1)
-	warning ("Specified thread %ld seems to have terminated",
-		 GET_THREAD (save_ptid));
+      if (info_verbose && pid == -1)
+	warning ("Specified thread %d seems to have terminated",
+		 GET_THREAD (save_pid));
     }
 
-  rtnval = procfs_ops.to_wait (ptid, ourstatus);
+  rtnval = procfs_ops.to_wait (pid, ourstatus);
 
   if (ourstatus->kind != TARGET_WAITKIND_EXITED)
     {
       /* Map the LWP of interest back to the appropriate thread ID */
       rtnval = lwp_to_thread (rtnval);
-      if (PIDGET (rtnval) == -1)
-	rtnval = save_ptid;
+      if (rtnval == -1)
+	rtnval = save_pid;
 
       /* See if we have a new thread */
       if (is_thread (rtnval)
-	  && !ptid_equal (rtnval, save_ptid)
+	  && rtnval != save_pid
 	  && !in_thread_list (rtnval))
 	{
 	  printf_filtered ("[New %s]\n", target_pid_to_str (rtnval));
@@ -550,7 +595,7 @@
   caddr_t xregset;
 #endif
 
-  if (!is_thread (inferior_ptid))
+  if (!is_thread (inferior_pid))
     {				/* LWP: pass the request on to procfs.c */
       if (target_has_execution)
 	procfs_ops.to_fetch_registers (regno);
@@ -559,9 +604,9 @@
       return;
     }
 
-  /* Solaris thread: convert inferior_ptid into a td_thrhandle_t */
+  /* Solaris thread: convert inferior_pid into a td_thrhandle_t */
 
-  thread = GET_THREAD (inferior_ptid);
+  thread = GET_THREAD (inferior_pid);
 
   if (thread == 0)
     error ("sol_thread_fetch_registers:  thread == 0");
@@ -628,15 +673,15 @@
   caddr_t xregset;
 #endif
 
-  if (!is_thread (inferior_ptid))
+  if (!is_thread (inferior_pid))
     {				/* LWP: pass the request on to procfs.c */
       procfs_ops.to_store_registers (regno);
       return;
     }
 
-  /* Solaris thread: convert inferior_ptid into a td_thrhandle_t */
+  /* Solaris thread: convert inferior_pid into a td_thrhandle_t */
 
-  thread = GET_THREAD (inferior_ptid);
+  thread = GET_THREAD (inferior_pid);
 
   val = p_td_ta_map_id2thr (main_ta, thread, &thandle);
   if (val != TD_OK)
@@ -729,11 +774,11 @@
   int retval;
   struct cleanup *old_chain;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  if (is_thread (inferior_ptid) ||	/* A thread */
-      !target_thread_alive (inferior_ptid))	/* An lwp, but not alive */
-    inferior_ptid = procfs_first_available ();	/* Find any live lwp.  */
+  if (is_thread (inferior_pid) ||	/* A thread */
+      !target_thread_alive (inferior_pid))	/* An lwp, but not alive */
+    inferior_pid = procfs_first_available ();	/* Find any live lwp.  */
   /* Note: don't need to call switch_to_thread; we're just reading memory.  */
 
   if (target_has_execution)
@@ -763,9 +808,9 @@
 }
 
 static void
-sol_thread_notice_signals (ptid_t ptid)
+sol_thread_notice_signals (int pid)
 {
-  procfs_ops.to_notice_signals (pid_to_ptid (PIDGET (ptid)));
+  procfs_ops.to_notice_signals (PIDGET (pid));
 }
 
 /* Fork an inferior process, and start debugging it with /proc.  */
@@ -775,18 +820,18 @@
 {
   procfs_ops.to_create_inferior (exec_file, allargs, env);
 
-  if (sol_thread_active && !ptid_equal (inferior_ptid, null_ptid))
+  if (sol_thread_active && inferior_pid != 0)
     {
-      main_ph.ptid = inferior_ptid;	/* Save for xfer_memory */
+      main_ph.pid = inferior_pid;	/* Save for xfer_memory */
 
       push_target (&sol_thread_ops);
 
-      inferior_ptid = lwp_to_thread (inferior_ptid);
-      if (PIDGET (inferior_ptid) == -1)
-	inferior_ptid = main_ph.ptid;
+      inferior_pid = lwp_to_thread (inferior_pid);
+      if (inferior_pid == -1)
+	inferior_pid = main_ph.pid;
 
-      if (!in_thread_list (inferior_ptid))
-	add_thread (inferior_ptid);
+      if (!in_thread_list (inferior_pid))
+	add_thread (inferior_pid);
     }
 }
 
@@ -870,7 +915,7 @@
 
    SYNOPSIS
 
-   static bool sol_thread_alive (ptid_t ptid);
+   static bool sol_thread_alive (int pid);
 
    DESCRIPTION
 
@@ -879,15 +924,14 @@
  */
 
 static int
-sol_thread_alive (ptid_t ptid)
+sol_thread_alive (int pid)
 {
-  if (is_thread (ptid))		/* non-kernel thread */
+  if (is_thread (pid))		/* non-kernel thread */
     {
       td_err_e val;
       td_thrhandle_t th;
-      int pid;
 
-      pid = GET_THREAD (ptid);
+      pid = GET_THREAD (pid);
       if ((val = p_td_ta_map_id2thr (main_ta, pid, &th)) != TD_OK)
 	return 0;		/* thread not found */
       if ((val = p_td_thr_validate (&th)) != TD_OK)
@@ -898,9 +942,9 @@
     /* kernel thread (LWP): let procfs test it */
     {
       if (target_has_execution)
-	return procfs_ops.to_thread_alive (ptid);
+	return procfs_ops.to_thread_alive (pid);
       else
-	return orig_core_ops.to_thread_alive (ptid);
+	return orig_core_ops.to_thread_alive (pid);
     }
 }
 
@@ -1006,11 +1050,11 @@
 {
   struct cleanup *old_chain;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  if (is_thread (inferior_ptid) ||	/* A thread */
-      !target_thread_alive (inferior_ptid))	/* An lwp, but not alive */
-    inferior_ptid = procfs_first_available ();	/* Find any live lwp.  */
+  if (is_thread (inferior_pid) ||	/* A thread */
+      !target_thread_alive (inferior_pid))	/* An lwp, but not alive */
+    inferior_pid = procfs_first_available ();	/* Find any live lwp.  */
   /* Note: don't need to call switch_to_thread; we're just reading memory.  */
 
 #if defined (__sparcv9)
@@ -1110,9 +1154,9 @@
 {
   struct cleanup *old_chain;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
+  inferior_pid = BUILD_LWP (lwpid, PIDGET (inferior_pid));
 
   if (target_has_execution)
     procfs_ops.to_fetch_registers (-1);
@@ -1133,9 +1177,9 @@
 {
   struct cleanup *old_chain;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
+  inferior_pid = BUILD_LWP (lwpid, PIDGET (inferior_pid));
 
   supply_gregset ((gdb_gregset_t *) gregset);
   if (target_has_execution)
@@ -1242,9 +1286,9 @@
 {
   struct cleanup *old_chain;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
+  inferior_pid = BUILD_LWP (lwpid, PIDGET (inferior_pid));
 
   if (target_has_execution)
     procfs_ops.to_fetch_registers (-1);
@@ -1265,9 +1309,9 @@
 {
   struct cleanup *old_chain;
 
-  old_chain = save_inferior_ptid ();
+  old_chain = save_inferior_pid ();
 
-  inferior_ptid = BUILD_LWP (lwpid, PIDGET (inferior_ptid));
+  inferior_pid = BUILD_LWP (lwpid, PIDGET (inferior_pid));
 
   supply_fpregset ((gdb_fpregset_t *) fpregset);
   if (target_has_execution)
@@ -1309,16 +1353,16 @@
 	    struct ssd *pldt)
 {
   /* NOTE: only used on Solaris, therefore OK to refer to procfs.c */
-  extern struct ssd *procfs_find_LDT_entry (ptid_t);
+  extern struct ssd *procfs_find_LDT_entry (int);
   struct ssd *ret;
 
   /* FIXME: can't I get the process ID from the prochandle or something?
    */
 
-  if (PIDGET (inferior_ptid) <= 0 || lwpid <= 0)
+  if (inferior_pid <= 0 || lwpid <= 0)
     return PS_BADLID;
 
-  ret = procfs_find_LDT_entry (BUILD_LWP (lwpid, PIDGET (inferior_ptid)));
+  ret = procfs_find_LDT_entry (BUILD_LWP (lwpid, PIDGET (inferior_pid)));
   if (ret)
     {
       memcpy (pldt, ret, sizeof (struct ssd));
@@ -1332,31 +1376,31 @@
 /* Convert a pid to printable form. */
 
 char *
-solaris_pid_to_str (ptid_t ptid)
+solaris_pid_to_str (int pid)
 {
   static char buf[100];
 
   /* in case init failed to resolve the libthread_db library */
   if (!procfs_suppress_run)
-    return procfs_pid_to_str (ptid);
+    return procfs_pid_to_str (pid);
 
-  if (is_thread (ptid))
+  if (is_thread (pid))
     {
-      ptid_t lwp;
+      int lwp;
 
-      lwp = thread_to_lwp (ptid, -2);
+      lwp = thread_to_lwp (pid, -2);
 
-      if (PIDGET (lwp) == -1)
-	sprintf (buf, "Thread %ld (defunct)", GET_THREAD (ptid));
-      else if (PIDGET (lwp) != -2)
-	sprintf (buf, "Thread %ld (LWP %ld)", GET_THREAD (ptid), GET_LWP (lwp));
+      if (lwp == -1)
+	sprintf (buf, "Thread %d (defunct)", GET_THREAD (pid));
+      else if (lwp != -2)
+	sprintf (buf, "Thread %d (LWP %d)", GET_THREAD (pid), GET_LWP (lwp));
       else
-	sprintf (buf, "Thread %ld        ", GET_THREAD (ptid));
+	sprintf (buf, "Thread %d        ", GET_THREAD (pid));
     }
-  else if (GET_LWP (ptid) != 0)
-    sprintf (buf, "LWP    %ld        ", GET_LWP (ptid));
+  else if (GET_LWP (pid) != 0)
+    sprintf (buf, "LWP    %d        ", GET_LWP (pid));
   else
-    sprintf (buf, "process %d    ", PIDGET (ptid));
+    sprintf (buf, "process %d    ", PIDGET (pid));
 
   return buf;
 }
@@ -1371,15 +1415,15 @@
 {
   td_err_e retval;
   td_thrinfo_t ti;
-  ptid_t ptid;
+  int pid;
 
   if ((retval = p_td_thr_get_info (th, &ti)) != TD_OK)
     {
       return -1;
     }
-  ptid = BUILD_THREAD (ti.ti_tid, PIDGET (inferior_ptid));
-  if (!in_thread_list (ptid))
-    add_thread (ptid);
+  pid = BUILD_THREAD (ti.ti_tid, PIDGET (inferior_pid));
+  if (!in_thread_list (pid))
+    add_thread (pid);
 
   return 0;
 }
@@ -1391,12 +1435,12 @@
   if (!procfs_suppress_run)
     return;
 
-  if (PIDGET (inferior_ptid) == -1)
+  if (inferior_pid == -1)
     {
       printf_filtered ("No process.\n");
       return;
     }
-  procfs_ops.to_find_new_threads ();	/* first find new kernel threads */
+  procfs_find_new_threads ();	/* first find new kernel threads. */
   p_td_ta_thr_iter (main_ta, sol_find_new_threads_callback, (void *) 0,
 		    TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
 		    TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS);
diff --git a/gdb/solib-aix5.c b/gdb/solib-aix5.c
index 54cb16f..a48d4ae 100644
--- a/gdb/solib-aix5.c
+++ b/gdb/solib-aix5.c
@@ -329,7 +329,7 @@
   struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
   struct so_list *sos;
 
-  sos = build_so_list_from_mapfile (PIDGET (inferior_ptid),
+  sos = build_so_list_from_mapfile (PIDGET (inferior_pid),
                                     MA_MAINEXEC, MA_MAINEXEC);
 
 
@@ -374,7 +374,7 @@
   struct so_list *sos;
 
   /* Fetch the list of mappings, excluding the main executable. */
-  sos = build_so_list_from_mapfile (PIDGET (inferior_ptid), MA_MAINEXEC, 0);
+  sos = build_so_list_from_mapfile (PIDGET (inferior_pid), MA_MAINEXEC, 0);
 
   /* Reverse the list; it looks nicer when we print it if the mappings
      are in the same order as in the map file.  */
@@ -701,7 +701,7 @@
   struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
 
   /* Fetch the mappings for the main executable from the map file.  */
-  so = build_so_list_from_mapfile (PIDGET (inferior_ptid),
+  so = build_so_list_from_mapfile (PIDGET (inferior_pid),
                                    MA_MAINEXEC, MA_MAINEXEC);
 
   /* Make sure we actually have some mappings to work with.  */
@@ -858,7 +858,7 @@
   CORE_ADDR global_pointer = 0;
   struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
 
-  sos = build_so_list_from_mapfile (PIDGET (inferior_ptid), 0, 0);
+  sos = build_so_list_from_mapfile (PIDGET (inferior_pid), 0, 0);
 
   for (so = sos; so != NULL; so = so->next)
     {
@@ -902,7 +902,7 @@
   struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
 
   /* Fetch the mappings for the main executable from the map file.  */
-  so = build_so_list_from_mapfile (PIDGET (inferior_ptid),
+  so = build_so_list_from_mapfile (PIDGET (inferior_pid),
                                    MA_KERNTEXT, MA_KERNTEXT);
 
   /* Make sure we actually have some mappings to work with.  */
diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c
deleted file mode 100644
index eb78a41..0000000
--- a/gdb/solib-osf.c
+++ /dev/null
@@ -1,617 +0,0 @@
-/* Handle OSF/1, Digital UNIX, and Tru64 shared libraries
-   for GDB, the GNU Debugger.
-   Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-   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.  */
-
-/* When handling shared libraries, GDB has to find out the pathnames
-   of all shared libraries that are currently loaded (to read in their
-   symbols) and where the shared libraries are loaded in memory
-   (to relocate them properly from their prelinked addresses to the
-   current load address).
-
-   Under OSF/1 there are two possibilities to get at this information:
-
-   1) Peek around in the runtime loader structures.
-   These are not documented, and they are not defined in the system
-   header files. The definitions below were obtained by experimentation,
-   but they seem stable enough.
-
-   2) Use the libxproc.a library, which contains the equivalent ldr_*
-   routines.  The library is documented in Tru64 5.x, but as of 5.1, it
-   only allows a process to examine itself.  On earlier versions, it
-   may require that the GDB executable be dynamically linked and that
-   NAT_CLIBS include -lxproc -Wl,-expect_unresolved,ldr_process_context
-   for GDB and all applications that are using libgdb.
-
-   We will use the peeking approach until libxproc.a works for other
-   processes.  */
-
-#include "defs.h"
-
-#include <sys/types.h>
-#include <signal.h>
-#include "gdb_string.h"
-
-#include "bfd.h"
-#include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "target.h"
-#include "inferior.h"
-#include "solist.h"
-
-#ifdef USE_LDR_ROUTINES
-# include <loader.h>
-#endif
-
-#ifndef USE_LDR_ROUTINES
-/* Definition of runtime loader structures, found by experimentation.  */
-#define RLD_CONTEXT_ADDRESS	0x3ffc0000000
-
-/* Per-module information structure referenced by ldr_context_t.head.  */
-
-typedef struct
-  {
-    CORE_ADDR next;
-    CORE_ADDR previous;
-    CORE_ADDR unknown1;
-    CORE_ADDR module_name;
-    CORE_ADDR modinfo_addr;	/* used by next_link_map_member() to detect
-				   the end of the shared module list */
-    long module_id;
-    CORE_ADDR unknown2;
-    CORE_ADDR unknown3;
-    long region_count;
-    CORE_ADDR regioninfo_addr;
-  }
-ldr_module_info_t;
-
-/* Per-region structure referenced by ldr_module_info_t.regioninfo_addr.  */
-
-typedef struct
-  {
-    long unknown1;
-    CORE_ADDR regionname_addr;
-    long protection;
-    CORE_ADDR vaddr;
-    CORE_ADDR mapaddr;
-    long size;
-    long unknown2[5];
-  }
-ldr_region_info_t;
-
-/* Structure at RLD_CONTEXT_ADDRESS specifying the start and finish addresses
-   of the shared module list.  */
-
-typedef struct
-  {
-    CORE_ADDR unknown1;
-    CORE_ADDR unknown2;
-    CORE_ADDR head;
-    CORE_ADDR tail;
-  }
-ldr_context_t;
-#endif   /* !USE_LDR_ROUTINES */
-
-/* Per-section information, stored in struct lm_info.secs.  */
-
-struct lm_sec
-  {
-    CORE_ADDR offset;		/* difference between default and actual
-				   virtual addresses of section .name */
-    CORE_ADDR nameaddr;		/* address in inferior of section name */
-    const char *name;		/* name of section, null if not fetched */
-  };
-
-/* Per-module information, stored in struct so_list.lm_info.  */
-
-struct lm_info
-  {
-    int isloader;		/* whether the module is /sbin/loader */
-    int nsecs;			/* length of .secs */
-    struct lm_sec secs[1];	/* variable-length array of sections, sorted
-				   by name */
-  };
-
-/* Context for iterating through the inferior's shared module list.  */
-
-struct read_map_ctxt
-  {
-#ifdef USE_LDR_ROUTINES
-    ldr_process_t proc;
-    ldr_module_t next;
-#else
-    CORE_ADDR next;		/* next element in module list */
-    CORE_ADDR tail;		/* last element in module list */
-#endif
-  };
-
-/* Forward declaration for this module's autoinit function.  */
-
-extern void _initialize_osf_solib (void);
-
-#ifdef USE_LDR_ROUTINES
-# if 0
-/* This routine is intended to be called by ldr_* routines to read memory from
-   the current target.  Usage:
-
-     ldr_process = ldr_core_process ();
-     ldr_set_core_reader (ldr_read_memory);
-     ldr_xdetach (ldr_process);
-     ldr_xattach (ldr_process);
-
-   ldr_core_process() and ldr_read_memory() are neither documented nor
-   declared in system header files.  They work with OSF/1 2.x, and they might
-   work with later versions as well.  */
-
-static int
-ldr_read_memory (CORE_ADDR memaddr, char *myaddr, int len, int readstring)
-{
-  int result;
-  char *buffer;
-
-  if (readstring)
-    {
-      target_read_string (memaddr, &buffer, len, &result);
-      if (result == 0)
-	strcpy (myaddr, buffer);
-      xfree (buffer);
-    }
-  else
-    result = target_read_memory (memaddr, myaddr, len);
-
-  if (result != 0)
-    result = -result;
-  return result;
-}
-# endif   /* 0 */
-#endif   /* USE_LDR_ROUTINES */
-
-/* Comparison for qsort() and bsearch(): return -1, 0, or 1 according to
-   whether lm_sec *P1's name is lexically less than, equal to, or greater
-   than that of *P2.  */
-
-static int
-lm_sec_cmp (const void *p1, const void *p2)
-{
-  const struct lm_sec *lms1 = p1, *lms2 = p2;
-  return strcmp (lms1->name, lms2->name);
-}
-
-/* Sort LMI->secs so that osf_relocate_section_addresses() can binary-search
-   it.  */
-
-static void
-lm_secs_sort (struct lm_info *lmi)
-{
-  qsort (lmi->secs, lmi->nsecs, sizeof *lmi->secs, lm_sec_cmp);
-}
-
-/* Populate name fields of LMI->secs.  */
-
-static void
-fetch_sec_names (struct lm_info *lmi)
-{
-#ifndef USE_LDR_ROUTINES
-  int i, errcode;
-  struct lm_sec *lms;
-  char *name;
-
-  for (i = 0; i < lmi->nsecs; i++)
-    {
-      lms = lmi->secs + i;
-      target_read_string (lms->nameaddr, &name, PATH_MAX, &errcode);
-      if (errcode != 0)
-	{
-	  warning ("unable to read shared sec name at 0x%lx", lms->nameaddr);
-	  name = xstrdup ("");
-	}
-      lms->name = name;
-    }
-  lm_secs_sort (lmi);
-#endif
-}
-
-/* target_so_ops callback.  Adjust SEC's addresses after it's been mapped into
-   the process.  */
-
-static void
-osf_relocate_section_addresses (struct so_list *so,
-				struct section_table *sec)
-{
-  struct lm_info *lmi;
-  struct lm_sec lms_key, *lms;
-
-  /* Fetch SO's section names if we haven't done so already.  */
-  lmi = so->lm_info;
-  if (lmi->nsecs && !lmi->secs[0].name)
-    fetch_sec_names (lmi);
-
-  /* Binary-search for offset information corresponding to SEC.  */
-  lms_key.name = sec->the_bfd_section->name;
-  lms = bsearch (&lms_key, lmi->secs, lmi->nsecs, sizeof *lms, lm_sec_cmp);
-  if (lms)
-    {
-      sec->addr += lms->offset;
-      sec->endaddr += lms->offset;
-    }
-}
-
-/* target_so_ops callback.  Free parts of SO allocated by this file.  */
-
-static void
-osf_free_so (struct so_list *so)
-{
-  int i;
-  const char *name;
-
-  for (i = 0; i < so->lm_info->nsecs; i++)
-    {
-      name = so->lm_info->secs[i].name;
-      if (name)
-	xfree ((void *) name);
-    }
-  xfree (so->lm_info);
-}
-
-/* target_so_ops callback.  Discard information accumulated by this file and
-   not freed by osf_free_so().  */
-
-static void
-osf_clear_solib (void)
-{
-  return;
-}
-
-/* target_so_ops callback.  Prepare to handle shared libraries after the
-   inferior process has been created but before it's executed any
-   instructions.
-
-   For a statically bound executable, the inferior's first instruction is the
-   one at "_start", or a similar text label. No further processing is needed
-   in that case.
-
-   For a dynamically bound executable, this first instruction is somewhere
-   in the rld, and the actual user executable is not yet mapped in.
-   We continue the inferior again, rld then maps in the actual user
-   executable and any needed shared libraries and then sends
-   itself a SIGTRAP.
-
-   At that point we discover the names of all shared libraries and
-   read their symbols in.
-
-   FIXME
-
-   This code does not properly handle hitting breakpoints which the
-   user might have set in the rld itself.  Proper handling would have
-   to check if the SIGTRAP happened due to a kill call.
-
-   Also, what if child has exit()ed?  Must exit loop somehow.  */
-
-static void
-osf_solib_create_inferior_hook (void)
-{
-  /* Nothing to do for statically bound executables.  */
-
-  if (symfile_objfile == NULL
-      || symfile_objfile->obfd == NULL
-      || ((bfd_get_file_flags (symfile_objfile->obfd) & DYNAMIC) == 0))
-    return;
-
-  /* Now run the target.  It will eventually get a SIGTRAP, at
-     which point all of the libraries will have been mapped in and we
-     can go groveling around in the rld structures to find
-     out what we need to know about them. */
-
-  clear_proceed_status ();
-  stop_soon_quietly = 1;
-  stop_signal = TARGET_SIGNAL_0;
-  do
-    {
-      target_resume (minus_one_ptid, 0, stop_signal);
-      wait_for_inferior ();
-    }
-  while (stop_signal != TARGET_SIGNAL_TRAP);
-
-  /*  solib_add will call reinit_frame_cache.
-     But we are stopped in the runtime loader and we do not have symbols
-     for the runtime loader. So heuristic_proc_start will be called
-     and will put out an annoying warning.
-     Delaying the resetting of stop_soon_quietly until after symbol loading
-     suppresses the warning.  */
-  if (auto_solib_add)
-    solib_add ((char *) 0, 0, (struct target_ops *) 0);
-  stop_soon_quietly = 0;
-
-  /* Enable breakpoints disabled (unnecessarily) by clear_solib().  */
-  re_enable_breakpoints_in_shlibs ();
-}
-
-/* target_so_ops callback.  Do additional symbol handling, lookup, etc. after
-   symbols for a shared object have been loaded.  */
-
-static void
-osf_special_symbol_handling (void)
-{
-  return;
-}
-
-/* Initialize CTXT in preparation for iterating through the inferior's module
-   list using read_map().  Return success.  */
-
-static int
-open_map (struct read_map_ctxt *ctxt)
-{
-#ifdef USE_LDR_ROUTINES
-  ctxt->proc = ldr_my_process ();
-  if (ldr_xattach (ctxt->proc) != 0)
-    return 0;
-  ctxt->next = LDR_NULL_MODULE;
-#else
-  CORE_ADDR ldr_context_addr, prev, next;
-  ldr_context_t ldr_context;
-
-  if (target_read_memory ((CORE_ADDR) RLD_CONTEXT_ADDRESS,
-			  (char *) &ldr_context_addr,
-			  sizeof (CORE_ADDR)) != 0)
-    return 0;
-  if (target_read_memory (ldr_context_addr,
-			  (char *) &ldr_context,
-			  sizeof (ldr_context_t)) != 0)
-    return 0;
-  ctxt->next = ldr_context.head;
-  ctxt->tail = ldr_context.tail;
-#endif
-  return 1;
-}
-
-/* Initialize SO to have module NAME, /sbin/loader indicator ISLOADR, and
-   space for NSECS sections.  */
-
-static void
-init_so (struct so_list *so, char *name, int isloader, int nsecs)
-{
-  int namelen, i;
-
-  /* solib.c requires various fields to be initialized to 0.  */
-  memset (so, 0, sizeof *so);
-
-  /* Copy the name.  */
-  namelen = strlen (name);
-  if (namelen >= SO_NAME_MAX_PATH_SIZE)
-    namelen = SO_NAME_MAX_PATH_SIZE - 1;
-
-  memcpy (so->so_original_name, name, namelen);
-  so->so_original_name[namelen] = '\0';
-  memcpy (so->so_name, so->so_original_name, namelen + 1);
-
-  /* Allocate section space.  */
-  so->lm_info = xmalloc ((unsigned) &(((struct lm_info *)0)->secs) +
-			 nsecs * sizeof *so->lm_info);
-  so->lm_info->isloader = isloader;
-  so->lm_info->nsecs = nsecs;
-  for (i = 0; i < nsecs; i++)
-    so->lm_info->secs[i].name = NULL;
-}
-
-/* Initialize SO's section SECIDX with name address NAMEADDR, name string
-   NAME, default virtual address VADDR, and actual virtual address
-   MAPADDR.  */
-
-static void
-init_sec (struct so_list *so, int secidx, CORE_ADDR nameaddr,
-	  const char *name, CORE_ADDR vaddr, CORE_ADDR mapaddr)
-{
-  struct lm_sec *lms;
-
-  lms = so->lm_info->secs + secidx;
-  lms->nameaddr = nameaddr;
-  lms->name = name;
-  lms->offset = mapaddr - vaddr;
-}
-
-/* If there are more elements starting at CTXT in inferior's module list,
-   store the next element in SO, advance CTXT to the next element, and return
-   1, else return 0.  */
-
-static int
-read_map (struct read_map_ctxt *ctxt, struct so_list *so)
-{
-  ldr_module_info_t minf;
-  ldr_region_info_t rinf;
-
-#ifdef USE_LDR_ROUTINES
-  size_t size;
-  ldr_region_t i;
-
-  /* Retrieve the next element.  */
-  if (ldr_next_module (ctxt->proc, &ctxt->next) != 0)
-    return 0;
-  if (ctxt->next == LDR_NULL_MODULE)
-    return 0;
-  if (ldr_inq_module (ctxt->proc, ctxt->next, &minf, sizeof minf, &size) != 0)
-    return 0;
-
-  /* Initialize the module name and section count.  */
-  init_so (so, minf.lmi_name, 0, minf.lmi_nregion);
-
-  /* Retrieve section names and offsets.  */
-  for (i = 0; i < minf.lmi_nregion; i++)
-    {
-      if (ldr_inq_region (ctxt->proc, ctxt->next, i, &rinf,
-			  sizeof rinf, &size) != 0)
-	goto err;
-      init_sec (so, (int) i, 0, xstrdup (rinf.lri_name),
-		(CORE_ADDR) rinf.lri_vaddr, (CORE_ADDR) rinf.lri_mapaddr);
-    }
-  lm_secs_sort (so->lm_info);
-#else
-  char *name;
-  int errcode, i;
-
-  /* Retrieve the next element.  */
-  if (!ctxt->next)
-    return 0;
-  if (target_read_memory (ctxt->next, (char *) &minf, sizeof minf) != 0)
-    return 0;
-  if (ctxt->next == ctxt->tail)
-    ctxt->next = 0;
-  else
-    ctxt->next = minf.next;
-
-  /* Initialize the module name and section count.  */
-  target_read_string (minf.module_name, &name, PATH_MAX, &errcode);
-  if (errcode != 0)
-    return 0;
-  init_so (so, name, !minf.modinfo_addr, minf.region_count);
-  xfree (name);
-
-  /* Retrieve section names and offsets.  */
-  for (i = 0; i < minf.region_count; i++)
-    {
-      if (target_read_memory (minf.regioninfo_addr + i * sizeof rinf,
-			      (char *) &rinf, sizeof rinf) != 0)
-	goto err;
-      init_sec (so, i, rinf.regionname_addr, NULL, rinf.vaddr, rinf.mapaddr);
-    }
-#endif   /* !USE_LDR_ROUTINES */
-  return 1;
-
- err:
-  osf_free_so (so);
-  return 0;
-}
-
-/* Free resources allocated by open_map (CTXT).  */
-
-static void
-close_map (struct read_map_ctxt *ctxt)
-{
-#ifdef USE_LDR_ROUTINES
-  ldr_xdetach (ctxt->proc);
-#endif
-}
-
-/* target_so_ops callback.  Return a list of shared objects currently loaded
-   in the inferior.  */
-
-static struct so_list *
-osf_current_sos (void)
-{
-  struct so_list *head = NULL, *tail, *newtail, so;
-  struct read_map_ctxt ctxt;
-  int skipped_main;
-
-  if (!open_map (&ctxt))
-    return NULL;
-
-  /* Read subsequent elements.  */
-  for (skipped_main = 0;;)
-    {
-      if (!read_map (&ctxt, &so))
-	break;
-
-      /* Skip the main program module, which is first in the list after
-         /sbin/loader.  */
-      if (!so.lm_info->isloader && !skipped_main)
-	{
-	  osf_free_so (&so);
-	  skipped_main = 1;
-	  continue;
-	}
-
-      newtail = xmalloc (sizeof *newtail);
-      if (!head)
-	head = newtail;
-      else
-	tail->next = newtail;
-      tail = newtail;
-
-      memcpy (tail, &so, sizeof so);
-      tail->next = NULL;
-    }
-
- done:
-  close_map (&ctxt);
-  return head;
-}
-
-/* target_so_ops callback.  Attempt to locate and open the main symbol
-   file.  */
-
-static int
-osf_open_symbol_file_object (void *from_ttyp)
-{
-  struct read_map_ctxt ctxt;
-  struct so_list so;
-  int found;
-
-  if (symfile_objfile)
-    if (!query ("Attempt to reload symbols from process? "))
-      return 0;
-
-  /* The first module after /sbin/loader is the main program.  */
-  if (!open_map (&ctxt))
-    return 0;
-  for (found = 0; !found;)
-    {
-      if (!read_map (&ctxt, &so))
-	break;
-      found = !so.lm_info->isloader;
-      osf_free_so (&so);
-    }
-  close_map (&ctxt);
-
-  if (found)
-    symbol_file_add_main (so.so_name, *(int *) from_ttyp);
-  return found;
-}
-
-/* target_so_ops callback.  Return whether PC is in the dynamic linker.  */
-
-static int
-osf_in_dynsym_resolve_code (CORE_ADDR pc)
-{
-  /* This function currently always return False. This is a temporary
-     solution which only consequence is to introduce a minor incovenience
-     for the user: When stepping inside a subprogram located in a shared
-     library, gdb might stop inside the dynamic loader code instead of
-     inside the subprogram itself. See the explanations in infrun.c about
-     the IN_SOLIB_DYNSYM_RESOLVE_CODE macro for more details. */
-  return 0;
-}
-
-static struct target_so_ops osf_so_ops;
-
-void
-_initialize_osf_solib (void)
-{
-  osf_so_ops.relocate_section_addresses = osf_relocate_section_addresses;
-  osf_so_ops.free_so = osf_free_so;
-  osf_so_ops.clear_solib = osf_clear_solib;
-  osf_so_ops.solib_create_inferior_hook = osf_solib_create_inferior_hook;
-  osf_so_ops.special_symbol_handling = osf_special_symbol_handling;
-  osf_so_ops.current_sos = osf_current_sos;
-  osf_so_ops.open_symbol_file_object = osf_open_symbol_file_object;
-  osf_so_ops.in_dynsym_resolve_code = osf_in_dynsym_resolve_code;
-
-  /* FIXME: Don't do this here.  *_gdbarch_init() should set so_ops. */
-  current_target_so_ops = &osf_so_ops;
-}
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 7da1481..79bbcdc 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -37,7 +37,6 @@
 #else
 #include "elf/external.h"
 #include "elf/common.h"
-#include "elf/mips.h"
 #endif
 
 #include "symtab.h"
@@ -624,6 +623,7 @@
 				      (bfd_byte *) x_dynp->d_un.d_ptr);
 	      return dyn_ptr;
 	    }
+#ifdef DT_MIPS_RLD_MAP
 	  else if (dyn_tag == DT_MIPS_RLD_MAP)
 	    {
 	      char *pbuf;
@@ -637,6 +637,7 @@
 		return 0;
 	      return extract_unsigned_integer (pbuf, sizeof (pbuf));
 	    }
+#endif
 	}
     }
   else /* 64-bit elf */
@@ -743,7 +744,7 @@
 	debug_base = elf_locate_base ();
 #ifdef HANDLE_SVR4_EXEC_EMULATORS
       /* Try it the hard way for emulated executables.  */
-      else if (!ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
+      else if (inferior_pid != 0 && target_has_execution)
 	proc_iterate_over_mappings (look_for_base);
 #endif
     }
@@ -1570,7 +1571,7 @@
   stop_signal = TARGET_SIGNAL_0;
   do
     {
-      target_resume (pid_to_ptid (-1), 0, stop_signal);
+      target_resume (-1, 0, stop_signal);
       wait_for_inferior ();
     }
   while (stop_signal != TARGET_SIGNAL_TRAP);
diff --git a/gdb/solib.c b/gdb/solib.c
index dfcca0c..8da44df 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -39,7 +39,6 @@
 #include "language.h"
 #include "gdbcmd.h"
 #include "completer.h"
-#include "filenames.h"		/* for DOSish file names */
 
 #include "solist.h"
 
@@ -102,14 +101,10 @@
 {
   int found_file = -1;
   char *temp_pathname = NULL;
-  char *p = in_pathname;
 
-  while (*p && !IS_DIR_SEPARATOR (*p))
-    p++;
-
-  if (*p)
+  if (strchr (in_pathname, SLASH_CHAR))
     {
-      if (! IS_ABSOLUTE_PATH (in_pathname) || solib_absolute_prefix == NULL)
+      if (! ROOTED_P (in_pathname) || solib_absolute_prefix == NULL)
         temp_pathname = in_pathname;
       else
 	{
@@ -117,7 +112,7 @@
 
 	  /* Remove trailing slashes from absolute prefix.  */
 	  while (prefix_len > 0
-		 && IS_DIR_SEPARATOR (solib_absolute_prefix[prefix_len - 1]))
+		 && SLASH_P (solib_absolute_prefix[prefix_len - 1]))
 	    prefix_len--;
 
 	  /* Cat the prefixed pathname together.  */
@@ -466,20 +461,30 @@
 	  catch_errors (solib_map_sections, i,
 			"Error while mapping shared library sections:\n",
 			RETURN_MASK_ALL);
+	}
 
-	  /* If requested, add the shared object's sections to the TARGET's
-	     section table.  Do this immediately after mapping the object so
-	     that later nodes in the list can query this object, as is needed
-	     in solib-osf.c.  */
-	  if (target)
+      /* If requested, add the shared objects' sections to the the
+	 TARGET's section table.  */
+      if (target)
+	{
+	  int new_sections;
+
+	  /* Figure out how many sections we'll need to add in total.  */
+	  new_sections = 0;
+	  for (i = inferior; i; i = i->next)
+	    new_sections += (i->sections_end - i->sections);
+
+	  if (new_sections > 0)
 	    {
-	      int count = (i->sections_end - i->sections);
-	      if (count > 0)
+	      int space = target_resize_to_sections (target, new_sections);
+
+	      for (i = inferior; i; i = i->next)
 		{
-		  int space = target_resize_to_sections (target, count);
+		  int count = (i->sections_end - i->sections);
 		  memcpy (target->to_sections + space,
 			  i->sections,
 			  count * sizeof (i->sections[0]));
+		  space += count;
 		}
 	    }
 	}
@@ -600,10 +605,7 @@
     }
 
   arch_size = bfd_get_arch_size (exec_bfd);
-  if (arch_size == -1)
-    arch_size = bfd_arch_bits_per_address(exec_bfd);
-
-  /* Default to 32-bit in case of failure.  */
+  /* Default to 32-bit in case of failure (non-elf). */
   if (arch_size == 32 || arch_size == -1)
     {
       addr_width = 8 + 4;
@@ -807,18 +809,6 @@
   solib_add (args, from_tty, (struct target_ops *) 0);
 }
 
-/* LOCAL FUNCTION
-
-   no_shared_libraries -- handle command to explicitly discard symbols
-   from shared libraries.
-
-   DESCRIPTION
-
-   Implements the command "nosharedlibrary", which discards symbols
-   that have been auto-loaded from shared libraries.  Symbols from
-   shared libraries that were added by explicit request of the user
-   are not discarded.  Also called from remote.c.  */
-
 void
 no_shared_libraries (char *ignored, int from_tty)
 {
diff --git a/gdb/solib.h b/gdb/solib.h
index 56a4a40..e99aba9 100644
--- a/gdb/solib.h
+++ b/gdb/solib.h
@@ -193,7 +193,3 @@
 #define IN_SOLIB_DYNSYM_RESOLVE_CODE(pc) in_solib_dynsym_resolve_code (pc)
 
 extern int in_solib_dynsym_resolve_code (CORE_ADDR);	/* solib.c */
-
-/* Discard symbols that were auto-loaded from shared libraries. */
-
-extern void no_shared_libraries (char *ignored, int from_tty);
diff --git a/gdb/solist.h b/gdb/solist.h
index fa00aaf..52fe9a8 100644
--- a/gdb/solist.h
+++ b/gdb/solist.h
@@ -52,9 +52,7 @@
 
     /* The following fields of the structure are built from
        information gathered from the shared object file itself, and
-       are set when we actually add it to our symbol tables.
-
-       current_sos must initialize these fields to 0.  */
+       are initialized when we actually add it to our symbol tables.  */
 
     bfd *abfd;
     char symbols_loaded;	/* flag: symbols read in yet? */
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index fe188ca..cabb3a1 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -878,7 +878,7 @@
     }
 
   anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
-  store_unsigned_integer (buf, 4, PIDGET (inferior_ptid));
+  store_unsigned_integer (buf, 4, inferior_pid);
   status = target_write_memory (anaddr, buf, 4);
   if (status != 0)
     {
@@ -1031,6 +1031,14 @@
   clear_symtab_users ();
 }
 
+
+static void
+reset_inferior_pid (int saved_inferior_pid)
+{
+  inferior_pid = saved_inferior_pid;
+}
+
+
 /* This operation removes the "hook" between GDB and the dynamic linker,
    which causes the dld to notify GDB of shared library events.
 
@@ -1049,10 +1057,11 @@
   int status;
   char dld_flags_buffer[TARGET_INT_BIT / TARGET_CHAR_BIT];
   unsigned int dld_flags_value;
-  struct cleanup *old_cleanups = save_inferior_ptid ();
+  int saved_inferior_pid = inferior_pid;
+  struct cleanup *old_cleanups = make_cleanup (reset_inferior_pid, saved_inferior_pid);
 
   /* Ensure that we're really operating on the specified process. */
-  inferior_ptid = pid_to_ptid (pid);
+  inferior_pid = pid;
 
   /* We won't bother to remove the solib breakpoints from this process.
 
diff --git a/gdb/source.c b/gdb/source.c
index 2895dd3..c96202a 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -40,7 +40,6 @@
 #include "annotate.h"
 #include "gdbtypes.h"
 #include "linespec.h"
-#include "filenames.h"		/* for DOSish file names */
 #ifdef UI_OUT
 #include "ui-out.h"
 #endif
@@ -331,12 +330,12 @@
 	  }
       }
 
-      if (!(IS_DIR_SEPARATOR (*name) && p <= name + 1)	 /* "/" */
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+      if (!(SLASH_P (*name) && p <= name + 1)	/* "/" */
+#if defined(_WIN32) || defined(__MSDOS__) || defined(__CYGWIN__)
       /* On MS-DOS and MS-Windows, h:\ is different from h: */
-	  && !(p == name + 3 && name[1] == ':') 	 /* "d:/" */
+	  && !(!SLASH_P (*name) && ROOTED_P (name) && p <= name + 3)	/* d:/ */
 #endif
-	  && IS_DIR_SEPARATOR (p[-1]))
+	  && SLASH_P (p[-1]))
 	/* Sigh. "foo/" => "foo" */
 	--p;
       *p = '\0';
@@ -349,7 +348,7 @@
 	      name = current_directory;
 	      goto append;
 	    }
-	  else if (p > name + 1 && IS_DIR_SEPARATOR (p[-2]))
+	  else if (p > name + 1 && SLASH_P (p[-2]))
 	    {
 	      if (p - name == 2)
 		{
@@ -371,11 +370,11 @@
 
       if (name[0] == '~')
 	name = tilde_expand (name);
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
-      else if (IS_ABSOLUTE_PATH (name) && p == name + 2) /* "d:" => "d:." */
+#if defined(_WIN32) || defined(__MSDOS__) || defined(__CYGWIN__)
+      else if (ROOTED_P (name) && p == name + 2)	/* "d:" => "d:." */
 	name = concat (name, ".", NULL);
 #endif
-      else if (!IS_ABSOLUTE_PATH (name) && name[0] != '$')
+      else if (!ROOTED_P (name) && name[0] != '$')
 	name = concat (current_directory, SLASH_STRING, name, NULL);
       else
 	name = savestring (name, p - name);
@@ -515,14 +514,12 @@
 /*  >>>> This should only allow files of certain types,
    >>>>  eg executable, non-directory */
 int
-openp (const char *path, int try_cwd_first, const char *string,
-       int mode, int prot,
+openp (char *path, int try_cwd_first, char *string, int mode, int prot,
        char **filename_opened)
 {
   register int fd;
   register char *filename;
-  const char *p;
-  const char *p1;
+  register char *p, *p1;
   register int len;
   int alloclen;
 
@@ -533,29 +530,28 @@
   mode |= O_BINARY;
 #endif
 
-  if (try_cwd_first || IS_ABSOLUTE_PATH (string))
+  if (try_cwd_first || ROOTED_P (string))
     {
       int i;
-      filename = alloca (strlen (string) + 1);
-      strcpy (filename, string);
+      filename = string;
       fd = open (filename, mode, prot);
       if (fd >= 0)
 	goto done;
       for (i = 0; string[i]; i++)
-	if (IS_DIR_SEPARATOR (string[i]))
+	if (SLASH_P (string[i]))
 	  goto done;
     }
 
   /* ./foo => foo */
-  while (string[0] == '.' && IS_DIR_SEPARATOR (string[1]))
+  while (string[0] == '.' && SLASH_P (string[1]))
     string += 2;
 
   alloclen = strlen (path) + strlen (string) + 2;
-  filename = alloca (alloclen);
+  filename = (char *) alloca (alloclen);
   fd = -1;
   for (p = path; p; p = p1 ? p1 + 1 : 0)
     {
-      p1 = strchr (p, DIRNAME_SEPARATOR);
+      p1 = (char *) strchr (p, DIRNAME_SEPARATOR);
       if (p1)
 	len = p1 - p;
       else
@@ -573,7 +569,7 @@
 	  if (newlen > alloclen)
 	    {
 	      alloclen = newlen;
-	      filename = alloca (alloclen);
+	      filename = (char *) alloca (alloclen);
 	    }
 	  strcpy (filename, current_directory);
 	}
@@ -585,7 +581,7 @@
 	}
 
       /* Remove trailing slashes */
-      while (len > 0 && IS_DIR_SEPARATOR (filename[len - 1]))
+      while (len > 0 && SLASH_P (filename[len - 1]))
 	filename[--len] = 0;
 
       strcat (filename + len, SLASH_STRING);
@@ -600,15 +596,15 @@
   if (filename_opened)
     {
       if (fd < 0)
-	*filename_opened = NULL;
-      else if (IS_ABSOLUTE_PATH (filename))
+	*filename_opened = (char *) 0;
+      else if (ROOTED_P (filename))
 	*filename_opened = savestring (filename, strlen (filename));
       else
 	{
 	  /* Beware the // my son, the Emacs barfs, the botch that catch... */
 
 	  *filename_opened = concat (current_directory,
-           IS_DIR_SEPARATOR (current_directory[strlen (current_directory) - 1])
+		 SLASH_P (current_directory[strlen (current_directory) - 1])
 				     ? "" : SLASH_STRING,
 				     filename, NULL);
 	}
@@ -670,7 +666,7 @@
 open_source_file (struct symtab *s)
 {
   char *path = source_path;
-  const char *p;
+  char *p;
   int result;
   char *fullname;
 
@@ -710,7 +706,7 @@
   if (result < 0)
     {
       /* Didn't work.  Try using just the basename. */
-      p = lbasename (s->filename);
+      p = basename (s->filename);
       if (p != s->filename)
 	result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname);
     }
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index feee2cc..ec3f91f 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -74,7 +74,7 @@
       || regno >= Y_REGNUM
       || (!register_valid[SP_REGNUM] && regno < I7_REGNUM))
     {
-      if (0 != ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
+      if (0 != ptrace (PTRACE_GETREGS, inferior_pid,
 		       (PTRACE_ARG3_TYPE) & inferior_registers, 0))
 	perror ("ptrace_getregs");
 
@@ -104,7 +104,7 @@
       regno == FPS_REGNUM ||
       (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 31))
     {
-      if (0 != ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
+      if (0 != ptrace (PTRACE_GETFPREGS, inferior_pid,
 		       (PTRACE_ARG3_TYPE) & inferior_fp_registers,
 		       0))
 	perror ("ptrace_getfpregs");
@@ -230,7 +230,7 @@
       inferior_registers.r_y =
 	*(int *) &registers[REGISTER_BYTE (Y_REGNUM)];
 
-      if (0 != ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
+      if (0 != ptrace (PTRACE_SETREGS, inferior_pid,
 		       (PTRACE_ARG3_TYPE) & inferior_registers, 0))
 	perror ("ptrace_setregs");
     }
@@ -244,7 +244,7 @@
       memcpy (&inferior_fp_registers.Fpu_fsr,
 	      &registers[REGISTER_BYTE (FPS_REGNUM)], sizeof (FPU_FSR_TYPE));
       if (0 !=
-	  ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
+	  ptrace (PTRACE_SETFPREGS, inferior_pid,
 		  (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0))
 	perror ("ptrace_setfpregs");
     }
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index ef9ae07..2cb27db 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -2931,7 +2931,7 @@
     return arches->gdbarch;
 
   /* None found: is the request for a sparc architecture? */
-  if (info.bfd_arch_info->arch != bfd_arch_sparc)
+  if (info.bfd_architecture != bfd_arch_sparc)
     return NULL;	/* No; then it's not for us.  */
 
   /* Yes: create a new gdbarch for the specified machine type.  */
diff --git a/gdb/stack.c b/gdb/stack.c
index 7426e0a..07bea73 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -531,7 +531,8 @@
   annotate_frame_begin (level == -1 ? 0 : level, fi->pc);
 
 #ifdef UI_OUT
-  list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "frame");
+  ui_out_list_begin (uiout, "frame");
+  list_chain = make_cleanup_ui_out_list_end (uiout);
 #endif
 
   if (level >= 0)
@@ -586,11 +587,12 @@
       args.func = func;
       args.stream = gdb_stdout;
 #ifdef UI_OUT
-      args_list_chain = make_cleanup_ui_out_list_begin_end (uiout, "args");
+      ui_out_list_begin (uiout, "args");
+      args_list_chain = make_cleanup_ui_out_list_end (uiout);
       catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
       /* FIXME: args must be a list. If one argument is a string it will
 		 have " that will not be properly escaped.  */
-      /* Invoke ui_out_tuple_end.  */
+      /* Invoke ui_out_list_end.  */
       do_cleanups (args_list_chain);
 #else
       catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
@@ -647,7 +649,7 @@
 #endif /* PC_SOLIB */
 
 #ifdef UI_OUT
-  /* do_cleanups will call ui_out_tuple_end() for us.  */
+  /* do_cleanups will call ui_out_list_end() for us.  */
   do_cleanups (list_chain);
   ui_out_text (uiout, "\n");
   do_cleanups (old_chain);
diff --git a/gdb/standalone.c b/gdb/standalone.c
index 6ae8f53..2395189 100644
--- a/gdb/standalone.c
+++ b/gdb/standalone.c
@@ -336,7 +336,7 @@
 
 kill_command (void)
 {
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 }
 
 terminal_inferior (void)
@@ -531,7 +531,7 @@
 wait (WAITTYPE *w)
 {
   WSETSTOP (*w, fault_table[fault_code / FAULT_CODE_UNITS]);
-  return PIDGET (inferior_ptid);
+  return inferior_pid;
 }
 
 /* Allocate a big space in which files for kdb to read will be stored.
diff --git a/gdb/sun3-nat.c b/gdb/sun3-nat.c
index 988ed37..1110547 100644
--- a/gdb/sun3-nat.c
+++ b/gdb/sun3-nat.c
@@ -38,11 +38,11 @@
 
   registers_fetched ();
 
-  ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_GETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers);
 
   if (FP0_REGNUM >= 0)
-    ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
+    ptrace (PTRACE_GETFPREGS, inferior_pid,
 	    (PTRACE_ARG3_TYPE) & inferior_fp_registers);
 
   memcpy (registers, &inferior_registers, 16 * 4);
@@ -83,10 +83,10 @@
 	    sizeof inferior_fp_registers - 
 	    sizeof inferior_fp_registers.fps_regs);
 
-  ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
+  ptrace (PTRACE_SETREGS, inferior_pid,
 	  (PTRACE_ARG3_TYPE) & inferior_registers);
   if (FP0_REGNUM >= 0)
-    ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
+    ptrace (PTRACE_SETFPREGS, inferior_pid,
 	    (PTRACE_ARG3_TYPE) & inferior_fp_registers);
 }
 
diff --git a/gdb/sun386-nat.c b/gdb/sun386-nat.c
index eef89fc..b0909f5 100644
--- a/gdb/sun386-nat.c
+++ b/gdb/sun386-nat.c
@@ -187,9 +187,9 @@
 /* OBSOLETE  */
 /* OBSOLETE   registers_fetched (); */
 /* OBSOLETE  */
-/* OBSOLETE   ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid), */
+/* OBSOLETE   ptrace (PTRACE_GETREGS, inferior_pid, */
 /* OBSOLETE 	  (PTRACE_ARG3_TYPE) & inferior_registers); */
-/* OBSOLETE   ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid), */
+/* OBSOLETE   ptrace (PTRACE_GETFPREGS, inferior_pid, */
 /* OBSOLETE 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers); */
 /* OBSOLETE  */
 /* OBSOLETE   memcpy (registers, &inferior_registers, sizeof inferior_registers); */
@@ -226,25 +226,25 @@
 /* OBSOLETE        instruction that moves eax into ebp gets single-stepped.  */ */
 /* OBSOLETE     { */
 /* OBSOLETE       int stack = inferior_registers.r_reg[SP_REGNUM]; */
-/* OBSOLETE       int stuff = ptrace (PTRACE_PEEKDATA, PIDGET (inferior_ptid), */
+/* OBSOLETE       int stuff = ptrace (PTRACE_PEEKDATA, inferior_pid, */
 /* OBSOLETE 			  (PTRACE_ARG3_TYPE) stack); */
 /* OBSOLETE       int reg = inferior_registers.r_reg[EAX]; */
 /* OBSOLETE       inferior_registers.r_reg[EAX] = */
 /* OBSOLETE 	inferior_registers.r_reg[FP_REGNUM]; */
-/* OBSOLETE       ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid), */
+/* OBSOLETE       ptrace (PTRACE_SETREGS, inferior_pid, */
 /* OBSOLETE 	      (PTRACE_ARG3_TYPE) & inferior_registers); */
-/* OBSOLETE       ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) stack, */
+/* OBSOLETE       ptrace (PTRACE_POKEDATA, inferior_pid, (PTRACE_ARG3_TYPE) stack, */
 /* OBSOLETE 	      0xc589); */
-/* OBSOLETE       ptrace (PTRACE_SINGLESTEP, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) stack, */
+/* OBSOLETE       ptrace (PTRACE_SINGLESTEP, inferior_pid, (PTRACE_ARG3_TYPE) stack, */
 /* OBSOLETE 	      0); */
 /* OBSOLETE       wait (0); */
-/* OBSOLETE       ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) stack, */
+/* OBSOLETE       ptrace (PTRACE_POKEDATA, inferior_pid, (PTRACE_ARG3_TYPE) stack, */
 /* OBSOLETE 	      stuff); */
 /* OBSOLETE       inferior_registers.r_reg[EAX] = reg; */
 /* OBSOLETE     } */
 /* OBSOLETE #endif */
-/* OBSOLETE   ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid), */
+/* OBSOLETE   ptrace (PTRACE_SETREGS, inferior_pid, */
 /* OBSOLETE 	  (PTRACE_ARG3_TYPE) & inferior_registers); */
-/* OBSOLETE   ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid), */
+/* OBSOLETE   ptrace (PTRACE_SETFPREGS, inferior_pid, */
 /* OBSOLETE 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers); */
 /* OBSOLETE } */
diff --git a/gdb/symfile.c b/gdb/symfile.c
index ee4d65c..b644af8 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -109,14 +109,16 @@
 
 static void load_command (char *, int);
 
-static void symbol_file_add_main_1 (char *args, int from_tty, int flags);
-
 static void add_symbol_file_command (char *, int);
 
 static void add_shared_symbol_files_command (char *, int);
 
 static void cashier_psymtab (struct partial_symtab *);
 
+static int compare_psymbols (const void *, const void *);
+
+static int compare_symbols (const void *, const void *);
+
 bfd *symfile_bfd_open (char *);
 
 static void find_sym_fns (struct objfile *);
@@ -204,7 +206,7 @@
    comparison function takes two "void *" pointers. */
 
 static int
-compare_symbols (const void *s1p, const void *s2p)
+compare_symbols (const PTR s1p, const PTR s2p)
 {
   register struct symbol **s1, **s2;
 
@@ -236,7 +238,7 @@
  */
 
 static int
-compare_psymbols (const void *s1p, const void *s2p)
+compare_psymbols (const PTR s1p, const PTR s2p)
 {
   register struct partial_symbol **s1, **s2;
   register char *st1, *st2;
@@ -894,34 +896,13 @@
   return (objfile);
 }
 
-/* Call symbol_file_add() with default values and update whatever is
-   affected by the loading of a new main().
-   Used when the file is supplied in the gdb command line
-   and by some targets with special loading requirements.
-   The auxiliary function, symbol_file_add_main_1(), has the flags
-   argument for the switches that can only be specified in the symbol_file
-   command itself.  */
+/* Just call the above with default values.
+   Used when the file is supplied in the gdb command line. */
    
 void
 symbol_file_add_main (char *args, int from_tty)
 {
-  symbol_file_add_main_1 (args, from_tty, 0);
-}
-
-static void
-symbol_file_add_main_1 (char *args, int from_tty, int flags)
-{
-  symbol_file_add (args, from_tty, NULL, 1, flags);
-
-#ifdef HPUXHPPA
-  RESET_HP_UX_GLOBALS ();
-#endif
-
-  /* Getting new symbols may change our opinion about
-     what is frameless.  */
-  reinit_frame_cache ();
-
-  set_initial_language ();
+  symbol_file_add (args, from_tty, NULL, 1, 0);
 }
 
 void
@@ -998,8 +979,15 @@
 	      else
 		{
                   name = *argv;
+		  symbol_file_add (name, from_tty, NULL, 1, flags);
+#ifdef HPUXHPPA
+		  RESET_HP_UX_GLOBALS ();
+#endif
+		  /* Getting new symbols may change our opinion about
+		     what is frameless.  */
+		  reinit_frame_cache ();
 
-		  symbol_file_add_main_1 (name, from_tty, flags);
+		  set_initial_language ();
 		}
 	  argv++;
 	}
diff --git a/gdb/symm-nat.c b/gdb/symm-nat.c
index 844e915..f5e01a0 100644
--- a/gdb/symm-nat.c
+++ b/gdb/symm-nat.c
@@ -66,7 +66,7 @@
      might cause problems when calling functions in the inferior.
      At least fpu_control and fpa_pcr (probably more) should be added 
      to the registers array to solve this properly.  */
-  mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
+  mptrace (XPT_RREGS, inferior_pid, (PTRACE_ARG3_TYPE) & regs, 0);
 
   regs.pr_eax = *(int *) &registers[REGISTER_BYTE (0)];
   regs.pr_ebx = *(int *) &registers[REGISTER_BYTE (5)];
@@ -91,7 +91,7 @@
   memcpy (regs.pr_fpu.fpu_stack[5], &registers[REGISTER_BYTE (ST5_REGNUM)], 10);
   memcpy (regs.pr_fpu.fpu_stack[6], &registers[REGISTER_BYTE (ST6_REGNUM)], 10);
   memcpy (regs.pr_fpu.fpu_stack[7], &registers[REGISTER_BYTE (ST7_REGNUM)], 10);
-  mptrace (XPT_WREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
+  mptrace (XPT_WREGS, inferior_pid, (PTRACE_ARG3_TYPE) & regs, 0);
 }
 
 void
@@ -102,7 +102,7 @@
 
   registers_fetched ();
 
-  mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
+  mptrace (XPT_RREGS, inferior_pid, (PTRACE_ARG3_TYPE) & regs, 0);
   *(int *) &registers[REGISTER_BYTE (EAX_REGNUM)] = regs.pr_eax;
   *(int *) &registers[REGISTER_BYTE (EBX_REGNUM)] = regs.pr_ebx;
   *(int *) &registers[REGISTER_BYTE (ECX_REGNUM)] = regs.pr_ecx;
@@ -375,7 +375,7 @@
 
   if (have_inferior_p ())
     {
-      PTRACE_READ_REGS (PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regset);
+      PTRACE_READ_REGS (inferior_pid, (PTRACE_ARG3_TYPE) & regset);
     }
   else
     {
@@ -424,8 +424,8 @@
 /*
  * Thanks to XPT_MPDEBUGGER, we have to mange child_wait().
  */
-ptid_t
-child_wait (ptid_t ptid, struct target_waitstatus *status)
+int
+child_wait (int pid, struct target_waitstatus *status)
 {
   int save_errno, rv, xvaloff, saoff, sa_hand;
   struct pt_stop pt;
@@ -437,7 +437,6 @@
 #ifdef SVR4_SHARED_LIBS		/* use this to distinguish ptx 2 vs ptx 4 */
   prstatus_t pstatus;
 #endif
-  int pid = PIDGET (ptid);
 
   do
     {
@@ -465,7 +464,7 @@
 
       pid = pt.ps_pid;
 
-      if (pid != PIDGET (inferior_ptid))
+      if (pid != inferior_pid)
 	{
 	  /* NOTE: the mystery fork in csh/tcsh needs to be ignored.
 	   * We should not return new children for the initial run
@@ -578,9 +577,9 @@
 	}
 
     }
-  while (pid != PIDGET (inferior_ptid));	/* Some other child died or stopped */
+  while (pid != inferior_pid);	/* Some other child died or stopped */
 
-  return pid_to_ptid (pid);
+  return pid;
 }
 #else /* !ATTACH_DETACH */
 /*
@@ -588,12 +587,10 @@
  * the MPDEBUGGER child_wait() works properly.  This will go away when
  * that is fixed.
  */
-ptid_t
-child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+child_wait (int pid, struct target_waitstatus *ourstatus)
 {
   int save_errno;
   int status;
-  int pid = PIDGET (ptid);
 
   do
     {
@@ -608,12 +605,12 @@
 		   safe_strerror (save_errno));
 	  ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
 	  ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
-	  return pid_to_ptid (-1);
+	  return -1;
 	}
     }
-  while (pid != PIDGET (inferior_ptid));	/* Some other child died or stopped */
+  while (pid != inferior_pid);	/* Some other child died or stopped */
   store_waitstatus (ourstatus, status);
-  return pid_to_ptid (pid);
+  return pid;
 }
 #endif /* ATTACH_DETACH */
 
@@ -644,18 +641,18 @@
 void
 kill_inferior (void)
 {
-  if (ptid_equal (inferior_ptid, null_ptid))
+  if (inferior_pid == 0)
     return;
 
   /* For MPDEBUGGER, don't use PT_KILL, since the child will stop
      again with a PTS_EXIT.  Just hit him with SIGKILL (so he stops)
      and detach. */
 
-  kill (PIDGET (inferior_ptid), SIGKILL);
+  kill (inferior_pid, SIGKILL);
 #ifdef ATTACH_DETACH
   detach (SIGKILL);
 #else /* ATTACH_DETACH */
-  ptrace (PT_KILL, PIDGET (inferior_ptid), 0, 0);
+  ptrace (PT_KILL, inferior_pid, 0, 0);
   wait ((int *) NULL);
 #endif /* ATTACH_DETACH */
   target_mourn_inferior ();
@@ -666,14 +663,12 @@
    If SIGNAL is nonzero, give it that signal.  */
 
 void
-child_resume (ptid_t ptid, int step, enum target_signal signal)
+child_resume (int pid, int step, enum target_signal signal)
 {
-  int pid = PIDGET (ptid);
-
   errno = 0;
 
   if (pid == -1)
-    pid = PIDGET (inferior_ptid);
+    pid = inferior_pid;
 
   /* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
      it was.  (If GDB wanted it to start some other way, we have already
@@ -720,7 +715,7 @@
 {
   int rv;
 
-  rv = mptrace (XPT_UNDEBUG, PIDGET (inferior_ptid), 1, signo);
+  rv = mptrace (XPT_UNDEBUG, inferior_pid, 1, signo);
   if (-1 == rv)
     {
       error ("mptrace(XPT_UNDEBUG): %s", safe_strerror (errno));
@@ -774,14 +769,14 @@
       if (addr != memaddr || len < (int) sizeof (PTRACE_XFER_TYPE))
 	{
 	  /* Need part of initial word -- fetch it.  */
-	  buffer[0] = ptrace (PT_RTEXT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr,
+	  buffer[0] = ptrace (PT_RTEXT, inferior_pid, (PTRACE_ARG3_TYPE) addr,
 			      0);
 	}
 
       if (count > 1)		/* FIXME, avoid if even boundary */
 	{
 	  buffer[count - 1]
-	    = ptrace (PT_RTEXT, PIDGET (inferior_ptid),
+	    = ptrace (PT_RTEXT, inferior_pid,
 		      ((PTRACE_ARG3_TYPE)
 		       (addr + (count - 1) * sizeof (PTRACE_XFER_TYPE))),
 		      0);
@@ -798,14 +793,14 @@
       for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
 	{
 	  errno = 0;
-	  ptrace (PT_WDATA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr,
+	  ptrace (PT_WDATA, inferior_pid, (PTRACE_ARG3_TYPE) addr,
 		  buffer[i]);
 	  if (errno)
 	    {
 	      /* Using the appropriate one (I or D) is necessary for
 	         Gould NP1, at least.  */
 	      errno = 0;
-	      ptrace (PT_WTEXT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr,
+	      ptrace (PT_WTEXT, inferior_pid, (PTRACE_ARG3_TYPE) addr,
 		      buffer[i]);
 	    }
 	  if (errno)
@@ -818,7 +813,7 @@
       for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
 	{
 	  errno = 0;
-	  buffer[i] = ptrace (PT_RTEXT, PIDGET (inferior_ptid),
+	  buffer[i] = ptrace (PT_RTEXT, inferior_pid,
 			      (PTRACE_ARG3_TYPE) addr, 0);
 	  if (errno)
 	    return 0;
diff --git a/gdb/symtab.c b/gdb/symtab.c
index a16393e..aecf362 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -37,7 +37,6 @@
 #include "demangle.h"
 #include "inferior.h"
 #include "linespec.h"
-#include "filenames.h"		/* for FILENAME_CMP */
 
 #include "obstack.h"
 
@@ -79,7 +78,7 @@
 						     const char *, int,
 						     namespace_enum);
 
-static struct symtab *lookup_symtab_1 (const char *);
+static struct symtab *lookup_symtab_1 (char *);
 
 static struct symbol *lookup_symbol_aux (const char *name, const
 					 struct block *block, const
@@ -138,10 +137,11 @@
    in the symtab filename will also work.  */
 
 static struct symtab *
-lookup_symtab_1 (const char *name)
+lookup_symtab_1 (char *name)
 {
   register struct symtab *s;
   register struct partial_symtab *ps;
+  register char *slash;
   register struct objfile *objfile;
 
 got_symtab:
@@ -149,15 +149,23 @@
   /* First, search for an exact match */
 
   ALL_SYMTABS (objfile, s)
-    if (FILENAME_CMP (name, s->filename) == 0)
-      return s;
+    if (STREQ (name, s->filename))
+    return s;
+
+  slash = strchr (name, '/');
 
   /* Now, search for a matching tail (only if name doesn't have any dirs) */
 
-  if (lbasename (name) == name)
+  if (!slash)
     ALL_SYMTABS (objfile, s)
     {
-      if (FILENAME_CMP (lbasename (s->filename), name) == 0)
+      char *p = s->filename;
+      char *tail = strrchr (p, '/');
+
+      if (tail)
+	p = tail + 1;
+
+      if (STREQ (p, name))
 	return s;
     }
 
@@ -192,7 +200,7 @@
    of variations if the first lookup doesn't work.  */
 
 struct symtab *
-lookup_symtab (const char *name)
+lookup_symtab (char *name)
 {
   register struct symtab *s;
 #if 0
@@ -229,14 +237,14 @@
    in the psymtab filename will also work.  */
 
 struct partial_symtab *
-lookup_partial_symtab (const char *name)
+lookup_partial_symtab (char *name)
 {
   register struct partial_symtab *pst;
   register struct objfile *objfile;
 
   ALL_PSYMTABS (objfile, pst)
   {
-    if (FILENAME_CMP (name, pst->filename) == 0)
+    if (STREQ (name, pst->filename))
       {
 	return (pst);
       }
@@ -244,10 +252,16 @@
 
   /* Now, search for a matching tail (only if name doesn't have any dirs) */
 
-  if (lbasename (name) == name)
+  if (!strchr (name, '/'))
     ALL_PSYMTABS (objfile, pst)
     {
-      if (FILENAME_CMP (lbasename (pst->filename), name) == 0)
+      char *p = pst->filename;
+      char *tail = strrchr (p, '/');
+
+      if (tail)
+	p = tail + 1;
+
+      if (STREQ (p, name))
 	return (pst);
     }
 
@@ -2153,72 +2167,50 @@
 }
 
 
-/* If FILE is not already in the table of files, return zero;
-   otherwise return non-zero.  Optionally add FILE to the table if ADD
-   is non-zero.  If *FIRST is non-zero, forget the old table
-   contents.  */
-static int
-filename_seen (const char *file, int add, int *first)
-{
-  /* Table of files seen so far.  */
-  static const char **tab = NULL;
-  /* Allocated size of tab in elements.
-     Start with one 256-byte block (when using GNU malloc.c).
-     24 is the malloc overhead when range checking is in effect.  */
-  static int tab_alloc_size = (256 - 24) / sizeof (char *);
-  /* Current size of tab in elements.  */
-  static int tab_cur_size;
-  const char **p;
-
-  if (*first)
-    {
-      if (tab == NULL)
-	tab = (const char **) xmalloc (tab_alloc_size * sizeof (*tab));
-      tab_cur_size = 0;
-    }
-
-  /* Is FILE in tab?  */
-  for (p = tab; p < tab + tab_cur_size; p++)
-    if (strcmp (*p, file) == 0)
-      return 1;
-
-  /* No; maybe add it to tab.  */
-  if (add)
-    {
-      if (tab_cur_size == tab_alloc_size)
-	{
-	  tab_alloc_size *= 2;
-	  tab = (const char **) xrealloc ((char *) tab,
-					  tab_alloc_size * sizeof (*tab));
-	}
-      tab[tab_cur_size++] = file;
-    }
-
-  return 0;
-}
-
 /* Slave routine for sources_info.  Force line breaks at ,'s.
    NAME is the name to print and *FIRST is nonzero if this is the first
    name printed.  Set *FIRST to zero.  */
 static void
 output_source_filename (char *name, int *first)
 {
-  /* Since a single source file can result in several partial symbol
-     tables, we need to avoid printing it more than once.  Note: if
-     some of the psymtabs are read in and some are not, it gets
-     printed both under "Source files for which symbols have been
-     read" and "Source files for which symbols will be read in on
-     demand".  I consider this a reasonable way to deal with the
-     situation.  I'm not sure whether this can also happen for
+  /* Table of files printed so far.  Since a single source file can
+     result in several partial symbol tables, we need to avoid printing
+     it more than once.  Note: if some of the psymtabs are read in and
+     some are not, it gets printed both under "Source files for which
+     symbols have been read" and "Source files for which symbols will
+     be read in on demand".  I consider this a reasonable way to deal
+     with the situation.  I'm not sure whether this can also happen for
      symtabs; it doesn't hurt to check.  */
+  static char **tab = NULL;
+  /* Allocated size of tab in elements.
+     Start with one 256-byte block (when using GNU malloc.c).
+     24 is the malloc overhead when range checking is in effect.  */
+  static int tab_alloc_size = (256 - 24) / sizeof (char *);
+  /* Current size of tab in elements.  */
+  static int tab_cur_size;
 
-  /* Was NAME already seen?  */
-  if (filename_seen (name, 1, first))
+  char **p;
+
+  if (*first)
     {
+      if (tab == NULL)
+	tab = (char **) xmalloc (tab_alloc_size * sizeof (*tab));
+      tab_cur_size = 0;
+    }
+
+  /* Is NAME in tab?  */
+  for (p = tab; p < tab + tab_cur_size; p++)
+    if (STREQ (*p, name))
       /* Yes; don't print it again.  */
       return;
+  /* No; add it to tab.  */
+  if (tab_cur_size == tab_alloc_size)
+    {
+      tab_alloc_size *= 2;
+      tab = (char **) xrealloc ((char *) tab, tab_alloc_size * sizeof (*tab));
     }
-  /* No; print it and reset *FIRST.  */
+  tab[tab_cur_size++] = name;
+
   if (*first)
     {
       *first = 0;
@@ -2276,7 +2268,7 @@
     {
       for (i = 0; i < nfiles; i++)
 	{
-	  if (strcmp (files[i], lbasename (file)) == 0)
+	  if (strcmp (files[i], basename (file)) == 0)
 	    return 1;
 	}
     }
@@ -2666,17 +2658,9 @@
 static void
 print_msymbol_info (struct minimal_symbol *msymbol)
 {
-  char *tmp;
-
-  if (TARGET_ADDR_BIT <= 32)
-    tmp = longest_local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol)
-					   & (CORE_ADDR) 0xffffffff,
-					   "08l");
-  else
-    tmp = longest_local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol),
-					   "016l");
-  printf_filtered ("%s  %s\n",
-		   tmp, SYMBOL_SOURCE_NAME (msymbol));
+  printf_filtered ("	%08lx  %s\n",
+		   (unsigned long) SYMBOL_VALUE_ADDRESS (msymbol),
+		   SYMBOL_SOURCE_NAME (msymbol));
 }
 
 /* This is the guts of the commands "info functions", "info types", and
@@ -2893,9 +2877,9 @@
   }
 }
 
-/* Return a NULL terminated array of all symbols (regardless of class)
-   which begin by matching TEXT.  If the answer is no symbols, then
-   the return value is an array which contains only a NULL pointer.
+/* Return a NULL terminated array of all symbols (regardless of class) which
+   begin by matching TEXT.  If the answer is no symbols, then the return value
+   is an array which contains only a NULL pointer.
 
    Problem: All of the symbols have to be copied because readline frees them.
    I'm not going to worry about this; hopefully there won't be that many.  */
@@ -2949,11 +2933,7 @@
     else if (quote_found == '"')
       /* A double-quoted string is never a symbol, nor does it make sense
          to complete it any other way.  */
-      {
-	return_val = (char **) xmalloc (sizeof (char *));
-	return_val[0] = NULL;
-	return return_val;
-      }
+      return NULL;
     else
       {
 	/* It is not a quoted string.  Break it based on the characters
@@ -3085,277 +3065,6 @@
   return (return_val);
 }
 
-/* Like make_symbol_completion_list, but returns a list of symbols
-   defined in a source file FILE.  */
-
-char **
-make_file_symbol_completion_list (char *text, char *word, char *srcfile)
-{
-  register struct symbol *sym;
-  register struct symtab *s;
-  register struct block *b;
-  register int i;
-  /* The symbol we are completing on.  Points in same buffer as text.  */
-  char *sym_text;
-  /* Length of sym_text.  */
-  int sym_text_len;
-
-  /* Now look for the symbol we are supposed to complete on.
-     FIXME: This should be language-specific.  */
-  {
-    char *p;
-    char quote_found;
-    char *quote_pos = NULL;
-
-    /* First see if this is a quoted string.  */
-    quote_found = '\0';
-    for (p = text; *p != '\0'; ++p)
-      {
-	if (quote_found != '\0')
-	  {
-	    if (*p == quote_found)
-	      /* Found close quote.  */
-	      quote_found = '\0';
-	    else if (*p == '\\' && p[1] == quote_found)
-	      /* A backslash followed by the quote character
-	         doesn't end the string.  */
-	      ++p;
-	  }
-	else if (*p == '\'' || *p == '"')
-	  {
-	    quote_found = *p;
-	    quote_pos = p;
-	  }
-      }
-    if (quote_found == '\'')
-      /* A string within single quotes can be a symbol, so complete on it.  */
-      sym_text = quote_pos + 1;
-    else if (quote_found == '"')
-      /* A double-quoted string is never a symbol, nor does it make sense
-         to complete it any other way.  */
-      {
-	return_val = (char **) xmalloc (sizeof (char *));
-	return_val[0] = NULL;
-	return return_val;
-      }
-    else
-      {
-	/* It is not a quoted string.  Break it based on the characters
-	   which are in symbols.  */
-	while (p > text)
-	  {
-	    if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0')
-	      --p;
-	    else
-	      break;
-	  }
-	sym_text = p;
-      }
-  }
-
-  sym_text_len = strlen (sym_text);
-
-  return_val_size = 10;
-  return_val_index = 0;
-  return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *));
-  return_val[0] = NULL;
-
-  /* Find the symtab for SRCFILE (this loads it if it was not yet read
-     in).  */
-  s = lookup_symtab (srcfile);
-  if (s == NULL)
-    {
-      /* Maybe they typed the file with leading directories, while the
-	 symbol tables record only its basename.  */
-      const char *tail = lbasename (srcfile);
-
-      if (tail > srcfile)
-	s = lookup_symtab (tail);
-    }
-
-  /* If we have no symtab for that file, return an empty list.  */
-  if (s == NULL)
-    return (return_val);
-
-  /* Go through this symtab and check the externs and statics for
-     symbols which match.  */
-
-  b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
-  for (i = 0; i < BLOCK_NSYMS (b); i++)
-    {
-      sym = BLOCK_SYM (b, i);
-      COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
-    }
-
-  b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
-  for (i = 0; i < BLOCK_NSYMS (b); i++)
-    {
-      sym = BLOCK_SYM (b, i);
-      COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
-    }
-
-  return (return_val);
-}
-
-/* A helper function for make_source_files_completion_list.  It adds
-   another file name to a list of possible completions, growing the
-   list as necessary.  */
-
-static void
-add_filename_to_list (const char *fname, char *text, char *word,
-		      char ***list, int *list_used, int *list_alloced)
-{
-  char *new;
-  size_t fnlen = strlen (fname);
-
-  if (*list_used + 1 >= *list_alloced)
-    {
-      *list_alloced *= 2;
-      *list = (char **) xrealloc ((char *) *list,
-				  *list_alloced * sizeof (char *));
-    }
-
-  if (word == text)
-    {
-      /* Return exactly fname.  */
-      new = xmalloc (fnlen + 5);
-      strcpy (new, fname);
-    }
-  else if (word > text)
-    {
-      /* Return some portion of fname.  */
-      new = xmalloc (fnlen + 5);
-      strcpy (new, fname + (word - text));
-    }
-  else
-    {
-      /* Return some of TEXT plus fname.  */
-      new = xmalloc (fnlen + (text - word) + 5);
-      strncpy (new, word, text - word);
-      new[text - word] = '\0';
-      strcat (new, fname);
-    }
-  (*list)[*list_used] = new;
-  (*list)[++*list_used] = NULL;
-}
-
-static int
-not_interesting_fname (const char *fname)
-{
-  static const char *illegal_aliens[] = {
-    "_globals_",	/* inserted by coff_symtab_read */
-    NULL
-  };
-  int i;
-
-  for (i = 0; illegal_aliens[i]; i++)
-    {
-      if (strcmp (fname, illegal_aliens[i]) == 0)
-	return 1;
-    }
-  return 0;
-}
-
-/* Return a NULL terminated array of all source files whose names
-   begin with matching TEXT.  The file names are looked up in the
-   symbol tables of this program.  If the answer is no matchess, then
-   the return value is an array which contains only a NULL pointer.  */
-
-char **
-make_source_files_completion_list (char *text, char *word)
-{
-  register struct symtab *s;
-  register struct partial_symtab *ps;
-  register struct objfile *objfile;
-  int first = 1;
-  int list_alloced = 1;
-  int list_used = 0;
-  size_t text_len = strlen (text);
-  char **list = (char **) xmalloc (list_alloced * sizeof (char *));
-  const char *base_name;
-
-  list[0] = NULL;
-
-  if (!have_full_symbols () && !have_partial_symbols ())
-    return list;
-
-  ALL_SYMTABS (objfile, s)
-    {
-      if (not_interesting_fname (s->filename))
-	continue;
-      if (!filename_seen (s->filename, 1, &first)
-#if HAVE_DOS_BASED_FILE_SYSTEM
-	  && strncasecmp (s->filename, text, text_len) == 0
-#else
-	  && strncmp (s->filename, text, text_len) == 0
-#endif
-	  )
-	{
-	  /* This file matches for a completion; add it to the current
-	     list of matches.  */
-	  add_filename_to_list (s->filename, text, word,
-				&list, &list_used, &list_alloced);
-	}
-      else
-	{
-	  /* NOTE: We allow the user to type a base name when the
-	     debug info records leading directories, but not the other
-	     way around.  This is what subroutines of breakpoint
-	     command do when they parse file names.  */
-	  base_name = lbasename (s->filename);
-	  if (base_name != s->filename
-	      && !filename_seen (base_name, 1, &first)
-#if HAVE_DOS_BASED_FILE_SYSTEM
-	      && strncasecmp (base_name, text, text_len) == 0
-#else
-	      && strncmp (base_name, text, text_len) == 0
-#endif
-	      )
-	    add_filename_to_list (base_name, text, word,
-				  &list, &list_used, &list_alloced);
-	}
-    }
-
-  ALL_PSYMTABS (objfile, ps)
-    {
-      if (not_interesting_fname (ps->filename))
-	continue;
-      if (!ps->readin)
-	{
-	  if (!filename_seen (ps->filename, 1, &first)
-#if HAVE_DOS_BASED_FILE_SYSTEM
-	      && strncasecmp (ps->filename, text, text_len) == 0
-#else
-	      && strncmp (ps->filename, text, text_len) == 0
-#endif
-	      )
-	    {
-	      /* This file matches for a completion; add it to the
-		 current list of matches.  */
-	      add_filename_to_list (ps->filename, text, word,
-				    &list, &list_used, &list_alloced);
-
-	    }
-	  else
-	    {
-	      base_name = lbasename (ps->filename);
-	      if (base_name != ps->filename
-		  && !filename_seen (base_name, 1, &first)
-#if HAVE_DOS_BASED_FILE_SYSTEM
-		  && strncasecmp (base_name, text, text_len) == 0
-#else
-		  && strncmp (base_name, text, text_len) == 0
-#endif
-		  )
-		add_filename_to_list (base_name, text, word,
-				      &list, &list_used, &list_alloced);
-	    }
-	}
-    }
-
-  return list;
-}
-
 /* Determine if PC is in the prologue of a function.  The prologue is the area
    between the first instruction of a function, and the first executable line.
    Returns 1 if PC *might* be in prologue, 0 if definately *not* in prologue.
diff --git a/gdb/symtab.h b/gdb/symtab.h
index d85add3..bbde658 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1072,7 +1072,7 @@
 
 /* lookup a symbol table by source file name */
 
-extern struct symtab *lookup_symtab (const char *);
+extern struct symtab *lookup_symtab (char *);
 
 /* lookup a symbol by name (optional block, optional symtab) */
 
@@ -1122,7 +1122,7 @@
 
 /* lookup partial symbol table by filename */
 
-extern struct partial_symtab *lookup_partial_symtab (const char *);
+extern struct partial_symtab *lookup_partial_symtab (char *);
 
 /* lookup partial symbol table by address */
 
@@ -1359,12 +1359,8 @@
 
 extern char **make_symbol_completion_list (char *, char *);
 
-extern char **make_file_symbol_completion_list (char *, char *, char *);
-
 extern struct symbol **make_symbol_overload_list (struct symbol *);
 
-extern char **make_source_files_completion_list (char *, char *);
-
 /* symtab.c */
 
 extern struct partial_symtab *find_main_psymtab (void);
diff --git a/gdb/target.c b/gdb/target.c
index 3430a5f..7151542 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -71,7 +71,7 @@
 
 static void nosupport_runtime (void);
 
-static void normal_target_post_startup_inferior (ptid_t ptid);
+static void normal_target_post_startup_inferior (int pid);
 
 /* Transfer LEN bytes between target address MEMADDR and GDB address
    MYADDR.  Returns 0 for success, errno code for failure (which
@@ -92,9 +92,9 @@
 
 static void debug_to_detach (char *, int);
 
-static void debug_to_resume (ptid_t, int, enum target_signal);
+static void debug_to_resume (int, int, enum target_signal);
 
-static ptid_t debug_to_wait (ptid_t, struct target_waitstatus *);
+static int debug_to_wait (int, struct target_waitstatus *);
 
 static void debug_to_fetch_registers (int);
 
@@ -134,9 +134,9 @@
 
 static int debug_to_can_run (void);
 
-static void debug_to_notice_signals (ptid_t);
+static void debug_to_notice_signals (int);
 
-static int debug_to_thread_alive (ptid_t);
+static int debug_to_thread_alive (int);
 
 static void debug_to_stop (void);
 
@@ -271,7 +271,7 @@
 static void
 nosupport_runtime (void)
 {
-  if (ptid_equal (inferior_ptid, null_ptid))
+  if (!inferior_pid)
     noprocess ();
   else
     error ("No run-time support for this");
@@ -363,13 +363,13 @@
 	    (void (*) (int, char *, int)) 
 	    target_ignore);
   de_fault (to_resume, 
-	    (void (*) (ptid_t, int, enum target_signal)) 
+	    (void (*) (int, int, enum target_signal)) 
 	    noprocess);
   de_fault (to_wait, 
-	    (ptid_t (*) (ptid_t, struct target_waitstatus *)) 
+	    (int (*) (int, struct target_waitstatus *)) 
 	    noprocess);
   de_fault (to_post_wait, 
-	    (void (*) (ptid_t, int)) 
+	    (void (*) (int, int)) 
 	    target_ignore);
   de_fault (to_fetch_registers, 
 	    (void (*) (int)) 
@@ -416,7 +416,7 @@
   de_fault (to_create_inferior, 
 	    maybe_kill_then_create_inferior);
   de_fault (to_post_startup_inferior, 
-	    (void (*) (ptid_t)) 
+	    (void (*) (int)) 
 	    target_ignore);
   de_fault (to_acknowledge_created_inferior, 
 	    (void (*) (int)) 
@@ -474,10 +474,10 @@
   de_fault (to_can_run, 
 	    return_zero);
   de_fault (to_notice_signals, 
-	    (void (*) (ptid_t)) 
+	    (void (*) (int)) 
 	    target_ignore);
   de_fault (to_thread_alive, 
-	    (int (*) (ptid_t)) 
+	    (int (*) (int)) 
 	    return_zero);
   de_fault (to_find_new_threads, 
 	    (void (*) (void)) 
@@ -1376,7 +1376,7 @@
 {
   extern int show_breakpoint_hit_counts;
 
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
   attach_flag = 0;
   breakpoint_init_inferior (inf_exited);
   registers_changed ();
@@ -1487,69 +1487,6 @@
   {"SIGCANCEL", "LWP internal signal"},
   {"SIG32", "Real-time event 32"},
   {"SIG64", "Real-time event 64"},
-  {"SIG65", "Real-time event 65"},
-  {"SIG66", "Real-time event 66"},
-  {"SIG67", "Real-time event 67"},
-  {"SIG68", "Real-time event 68"},
-  {"SIG69", "Real-time event 69"},
-  {"SIG70", "Real-time event 70"},
-  {"SIG71", "Real-time event 71"},
-  {"SIG72", "Real-time event 72"},
-  {"SIG73", "Real-time event 73"},
-  {"SIG74", "Real-time event 74"},
-  {"SIG75", "Real-time event 75"},
-  {"SIG76", "Real-time event 76"},
-  {"SIG77", "Real-time event 77"},
-  {"SIG78", "Real-time event 78"},
-  {"SIG79", "Real-time event 79"},
-  {"SIG80", "Real-time event 80"},
-  {"SIG81", "Real-time event 81"},
-  {"SIG82", "Real-time event 82"},
-  {"SIG83", "Real-time event 83"},
-  {"SIG84", "Real-time event 84"},
-  {"SIG85", "Real-time event 85"},
-  {"SIG86", "Real-time event 86"},
-  {"SIG87", "Real-time event 87"},
-  {"SIG88", "Real-time event 88"},
-  {"SIG89", "Real-time event 89"},
-  {"SIG90", "Real-time event 90"},
-  {"SIG91", "Real-time event 91"},
-  {"SIG92", "Real-time event 92"},
-  {"SIG93", "Real-time event 93"},
-  {"SIG94", "Real-time event 94"},
-  {"SIG95", "Real-time event 95"},
-  {"SIG96", "Real-time event 96"},
-  {"SIG97", "Real-time event 97"},
-  {"SIG98", "Real-time event 98"},
-  {"SIG99", "Real-time event 99"},
-  {"SIG100", "Real-time event 100"},
-  {"SIG101", "Real-time event 101"},
-  {"SIG102", "Real-time event 102"},
-  {"SIG103", "Real-time event 103"},
-  {"SIG104", "Real-time event 104"},
-  {"SIG105", "Real-time event 105"},
-  {"SIG106", "Real-time event 106"},
-  {"SIG107", "Real-time event 107"},
-  {"SIG108", "Real-time event 108"},
-  {"SIG109", "Real-time event 109"},
-  {"SIG110", "Real-time event 110"},
-  {"SIG111", "Real-time event 111"},
-  {"SIG112", "Real-time event 112"},
-  {"SIG113", "Real-time event 113"},
-  {"SIG114", "Real-time event 114"},
-  {"SIG115", "Real-time event 115"},
-  {"SIG116", "Real-time event 116"},
-  {"SIG117", "Real-time event 117"},
-  {"SIG118", "Real-time event 118"},
-  {"SIG119", "Real-time event 119"},
-  {"SIG120", "Real-time event 120"},
-  {"SIG121", "Real-time event 121"},
-  {"SIG122", "Real-time event 122"},
-  {"SIG123", "Real-time event 123"},
-  {"SIG124", "Real-time event 124"},
-  {"SIG125", "Real-time event 125"},
-  {"SIG126", "Real-time event 126"},
-  {"SIG127", "Real-time event 127"},
 
 #if defined(MACH) || defined(__MACH__)
   /* Mach exceptions */
@@ -1852,9 +1789,6 @@
 	  (hostsig - 33 + (int) TARGET_SIGNAL_REALTIME_33);
       else if (hostsig == 32)
 	return TARGET_SIGNAL_REALTIME_32;
-      else if (64 <= hostsig && hostsig <= 127)
-	return (enum target_signal)
-	  (hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64);
       else
 	error ("GDB bug: target.c (target_signal_from_host): unrecognized real-time signal");
     }
@@ -2127,19 +2061,6 @@
 	  return 32;
 	}
 #endif
-#if (REALTIME_HI > 64)
-      if (oursig >= TARGET_SIGNAL_REALTIME_64
-	  && oursig <= TARGET_SIGNAL_REALTIME_127)
-	{
-	  /* This block of signals is continuous, and
-             TARGET_SIGNAL_REALTIME_64 is 64 by definition.  */
-	  int retsig =
-	    (int) oursig - (int) TARGET_SIGNAL_REALTIME_64 + 64;
-	  if (retsig >= REALTIME_LO && retsig < REALTIME_HI)
-	    return retsig;
-	}
-      
-#endif
 #endif
 
 #if defined (SIGRTMIN)
@@ -2241,11 +2162,11 @@
    buffer.  */
 
 char *
-normal_pid_to_str (ptid_t ptid)
+normal_pid_to_str (int pid)
 {
   static char buf[30];
 
-  sprintf (buf, "process %d", PIDGET (ptid));
+  sprintf (buf, "process %d", pid);
   return buf;
 }
 
@@ -2262,7 +2183,7 @@
    target_acknowledge_forked_child.
  */
 static void
-normal_target_post_startup_inferior (ptid_t ptid)
+normal_target_post_startup_inferior (int pid)
 {
   /* This space intentionally left blank. */
 }
@@ -2349,25 +2270,24 @@
 }
 
 static void
-debug_to_resume (ptid_t ptid, int step, enum target_signal siggnal)
+debug_to_resume (int pid, int step, enum target_signal siggnal)
 {
-  debug_target.to_resume (ptid, step, siggnal);
+  debug_target.to_resume (pid, step, siggnal);
 
-  fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n", PIDGET (ptid),
+  fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n", pid,
 		      step ? "step" : "continue",
 		      target_signal_to_name (siggnal));
 }
 
-static ptid_t
-debug_to_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+debug_to_wait (int pid, struct target_waitstatus *status)
 {
-  ptid_t retval;
+  int retval;
 
-  retval = debug_target.to_wait (ptid, status);
+  retval = debug_target.to_wait (pid, status);
 
   fprintf_unfiltered (gdb_stdlog,
-		      "target_wait (%d, status) = %d,   ", PIDGET (ptid),
-		      PIDGET (retval));
+		      "target_wait (%d, status) = %d,   ", pid, retval);
   fprintf_unfiltered (gdb_stdlog, "status->kind = ");
   switch (status->kind)
     {
@@ -2407,12 +2327,12 @@
 }
 
 static void
-debug_to_post_wait (ptid_t ptid, int status)
+debug_to_post_wait (int pid, int status)
 {
-  debug_target.to_post_wait (ptid, status);
+  debug_target.to_post_wait (pid, status);
 
   fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n",
-		      PIDGET (ptid), status);
+		      pid, status);
 }
 
 static void
@@ -2601,12 +2521,12 @@
 }
 
 static void
-debug_to_post_startup_inferior (ptid_t ptid)
+debug_to_post_startup_inferior (int pid)
 {
-  debug_target.to_post_startup_inferior (ptid);
+  debug_target.to_post_startup_inferior (pid);
 
   fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n",
-		      PIDGET (ptid));
+		      pid);
 }
 
 static void
@@ -2856,23 +2776,22 @@
 }
 
 static void
-debug_to_notice_signals (ptid_t ptid)
+debug_to_notice_signals (int pid)
 {
-  debug_target.to_notice_signals (ptid);
+  debug_target.to_notice_signals (pid);
 
-  fprintf_unfiltered (gdb_stdlog, "target_notice_signals (%d)\n",
-                      PIDGET (ptid));
+  fprintf_unfiltered (gdb_stdlog, "target_notice_signals (%d)\n", pid);
 }
 
 static int
-debug_to_thread_alive (ptid_t ptid)
+debug_to_thread_alive (int pid)
 {
   int retval;
 
-  retval = debug_target.to_thread_alive (ptid);
+  retval = debug_target.to_thread_alive (pid);
 
   fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n",
-		      PIDGET (ptid), retval);
+		      pid, retval);
 
   return retval;
 }
diff --git a/gdb/target.h b/gdb/target.h
index 457308c..6d41029 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -196,9 +196,9 @@
     void (*to_require_attach) (char *, int);
     void (*to_detach) (char *, int);
     void (*to_require_detach) (int, char *, int);
-    void (*to_resume) (ptid_t, int, enum target_signal);
-    ptid_t (*to_wait) (ptid_t, struct target_waitstatus *);
-    void (*to_post_wait) (ptid_t, int);
+    void (*to_resume) (int, int, enum target_signal);
+    int (*to_wait) (int, struct target_waitstatus *);
+    void (*to_post_wait) (int, int);
     void (*to_fetch_registers) (int);
     void (*to_store_registers) (int);
     void (*to_prepare_to_store) (void);
@@ -261,7 +261,7 @@
     void (*to_load) (char *, int);
     int (*to_lookup_symbol) (char *, CORE_ADDR *);
     void (*to_create_inferior) (char *, char *, char **);
-    void (*to_post_startup_inferior) (ptid_t);
+    void (*to_post_startup_inferior) (int);
     void (*to_acknowledge_created_inferior) (int);
     void (*to_clone_and_follow_inferior) (int, int *);
     void (*to_post_follow_inferior_by_clone) (void);
@@ -281,10 +281,10 @@
     int (*to_has_exited) (int, int, int *);
     void (*to_mourn_inferior) (void);
     int (*to_can_run) (void);
-    void (*to_notice_signals) (ptid_t ptid);
-    int (*to_thread_alive) (ptid_t ptid);
+    void (*to_notice_signals) (int pid);
+    int (*to_thread_alive) (int pid);
     void (*to_find_new_threads) (void);
-    char *(*to_pid_to_str) (ptid_t);
+    char *(*to_pid_to_str) (int);
     char *(*to_extra_thread_info) (struct thread_info *);
     void (*to_stop) (void);
     int (*to_query) (int /*char */ , char *, char *, int *);
@@ -421,18 +421,18 @@
 #define target_require_detach(pid, args, from_tty)	\
      (*current_target.to_require_detach) (pid, args, from_tty)
 
-/* Resume execution of the target process PTID.  STEP says whether to
+/* Resume execution of the target process PID.  STEP says whether to
    single-step or to run free; SIGGNAL is the signal to be given to
    the target, or TARGET_SIGNAL_0 for no signal.  The caller may not
    pass TARGET_SIGNAL_DEFAULT.  */
 
-#define	target_resume(ptid, step, siggnal)				\
+#define	target_resume(pid, step, siggnal)				\
   do {									\
     dcache_invalidate(target_dcache);					\
-    (*current_target.to_resume) (ptid, step, siggnal);			\
+    (*current_target.to_resume) (pid, step, siggnal);			\
   } while (0)
 
-/* Wait for process pid to do something.  PTID = -1 to wait for any pid
+/* Wait for process pid to do something.  Pid = -1 to wait for any pid
    to do something.  Return pid of child, or -1 in case of error;
    store status through argument pointer STATUS.  Note that it is
    *not* OK to return_to_top_level out of target_wait without popping
@@ -440,8 +440,8 @@
    to the prompt with a debugging target but without the frame cache,
    stop_pc, etc., set up.  */
 
-#define	target_wait(ptid, status)		\
-     (*current_target.to_wait) (ptid, status)
+#define	target_wait(pid, status)		\
+     (*current_target.to_wait) (pid, status)
 
 /* The target_wait operation waits for a process event to occur, and
    thereby stop the process.
@@ -453,8 +453,8 @@
    This operation provides a target-specific hook that allows the
    necessary bookkeeping to be performed to track such sequences.  */
 
-#define target_post_wait(ptid, status) \
-     (*current_target.to_post_wait) (ptid, status)
+#define target_post_wait(pid, status) \
+     (*current_target.to_post_wait) (pid, status)
 
 /* Fetch at least register REGNO, or all regs if regno == -1.  No result.  */
 
@@ -514,9 +514,9 @@
 extern void child_post_attach (int);
 #endif
 
-extern void child_post_wait (ptid_t, int);
+extern void child_post_wait (int, int);
 
-extern void child_post_startup_inferior (ptid_t);
+extern void child_post_startup_inferior (int);
 
 extern void child_acknowledge_created_inferior (int);
 
@@ -554,7 +554,7 @@
 
 extern int child_has_exited (int, int, int *);
 
-extern int child_thread_alive (ptid_t);
+extern int child_thread_alive (int);
 
 /* From exec.c */
 
@@ -640,7 +640,7 @@
 #define target_lookup_symbol(name, addrp) \
      (*current_target.to_lookup_symbol) (name, addrp)
 
-/* Start an inferior process and set inferior_ptid to its pid.
+/* Start an inferior process and set inferior_pid to its pid.
    EXEC_FILE is the file to run.
    ALLARGS is a string containing the arguments to the program.
    ENV is the environment vector to pass.  Errors reported with error().
@@ -660,8 +660,8 @@
 
    Such targets will supply an appropriate definition for this function.  */
 
-#define target_post_startup_inferior(ptid) \
-     (*current_target.to_post_startup_inferior) (ptid)
+#define target_post_startup_inferior(pid) \
+     (*current_target.to_post_startup_inferior) (pid)
 
 /* On some targets, the sequence of starting up an inferior requires
    some synchronization between gdb and the new inferior process, PID.  */
@@ -803,13 +803,13 @@
 
 /* post process changes to signal handling in the inferior.  */
 
-#define target_notice_signals(ptid) \
-     (*current_target.to_notice_signals) (ptid)
+#define target_notice_signals(pid) \
+     (*current_target.to_notice_signals) (pid)
 
 /* Check to see if a thread is still alive.  */
 
-#define target_thread_alive(ptid) \
-     (*current_target.to_thread_alive) (ptid)
+#define target_thread_alive(pid) \
+     (*current_target.to_thread_alive) (pid)
 
 /* Query for new threads and add them to the thread list.  */
 
@@ -944,7 +944,7 @@
 #ifndef target_tid_to_str
 #define target_tid_to_str(PID) \
      target_pid_to_str (PID)
-extern char *normal_pid_to_str (ptid_t ptid);
+extern char *normal_pid_to_str (int pid);
 #endif
 
 /* Return a short string describing extra information about PID,
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 40eef96..0667682 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,186 +1,3 @@
-2001-07-03  Michael Snyder  <msnyder@redhat.com>
-
-	* gdb.c++/classes.exp: Accept both "foo(void)" and "foo()" in
-	the output of the ptype command.
-
-2001-07-02  Michael Snyder  <msnyder@redhat.com>
-
-	* gdb.base/corefile.exp: Quote the curly braces in regexp.
-
-2001-06-28  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdb.disasm/Makefile.in (clean mostlyclean): Add h8300s to list
-	of files to delete.
-
-	From 2000-06-15 Kazu Hirata <kazu@hxi.com>:
-	* gdb.disasm/h8300s.exp: New file.
-	gdb.disasm/h8300s.s: Likewise.
-
-2001-06-27  Andrew Cagney  <ac131313@redhat.com>
-
-	* lib/mi-support.exp (mi_delete_breakpoints): Accept mi1 format
-	empty breakpoint tables.
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* lib/mi-support.exp: Update args=... part of stop-reason
-	patterns. Accept either a list or a tuple.
-
-2001-06-23  Andrew Cagney  <ac131313@redhat.com>
-
-	* lib/mi-support.exp: Remove local emacs variable defining
-	change-log-default-name.
-
-2001-06-22  Michael Chastain  <chastain@redhat.com>
-
-	* gdb.base/arithmet.exp: Use gdb_test instead of send_gdb/gdb_expect.
-	This is operationally compatible with the previous version.
-
-2001-06-13  Jim Blandy  <jimb@redhat.com>
-
-	* lib/gdb.exp (gdb_test): Doc fix.
-
-2001-06-10  Michael Chastain  <chastain@redhat.com>
-
-	* gdb.base/exprs.exp: Remove a duplicate test.
-
-2001-06-06  Jim Blandy  <jimb@redhat.com>
-
-	* gdb.base/return2.exp (main): Use values to test float and double
-	returns that are not NaN's, to avoid being confused by IEEE
-	comparison rules.
-
-2001-06-04  Michael Snyder  <msnyder@redhat.com>
-
-	* gdb.threads/pthreads.exp (check_control_c): Return 0 for success,
-	non-zero if control_c fails.  Terminate the test on failure, 
-	rather than wait for 12 more tests to time out.
-
-2001-06-06  Jim Blandy  <jimb@redhat.com>
-
-	* gdb.base/exprs.exp ("sizeof (long long) > sizeof (long) (true)"):
-	Don't forget to match the GDB prompt. 
-
-	* gdb.trace/gdb_c_test.c, actions.c: Fix misspellings.
-
-2001-06-04  Jim Blandy  <jimb@redhat.com>
-
-	* gdb.base/help.exp: Update pattern to exclude `print-load-map'
-	command.
-
-2001-05-31  Kevin Buettner  <kevinb@redhat.com>
-
-	* gdb.base/annota1.exp (info break): Match four or more spaces
-	after "Address".
-
-2001-05-31  Michael Chastain  <chastain@redhat.com>
-
-	* gdb.c++/cplusfuncs.cc (dm_type_char_star): Remove superfluous cast.
-	(dm_type_int_star): Likewise.
-	(dm_type_long_star): Likewise.
-	(dm_type_void_star): Likewise.
-
-2001-05-29  Kevin Buettner  <kevinb@redhat.com>
-
-	* gdb.base/completion.exp (INPUTRC): Set this environment variable
-	to a known value in order to get consistent results regardless
-	of the setting of INPUTRC or the presence or contents of .inputrc.
-
-2001-05-24  Michael Snyder  <msnyder@redhat.com>
-
-	* gdb.threads/linux-dp.exp: Remove assumptions about thread ordering.
-	Don't require that the main thread and the manager thread are the
-	first in the list.
-
-	* gdb.threads/pthreads.exp (test_startup): Relax test for thread
-	debugging.  If test fails, issue an "unsupported" not a "fail".
-
-2001-05-24  Jim Blandy  <jimb@redhat.com>
-
-	Don't assume that short is shorter than int.
-	* gdb.base/exprs.exp ("print unsigned short == (~0)"): Don't
-	assume that shorts are smaller than ints.  On a 16-bit machine,
-	this isn't true. 
-	("print unsigned char == (~0)"): Add test that verifies that ~0,
-	an int, is not equal to ~0 stored in an unsigned char.  This tests
-	the same thing that the previous test meant to, but works on
-	16-bit machines, too.
-	("print unsigned char != (~0)"): Same test, complemented.
-
-2001-05-24  Michael Snyder  <msnyder@redhat.com>
-
-	* gdb.threads/pthreads.exp (all_threads_running): Add an explicit
-	test for (full_coverage == 0).  This makes the test run faster, 
-	and prevents dejagnu getting out of step.
-
-2001-05-23  Kevin Buettner  <kevinb@redhat.com>
-
-	* gdb.base/finish.exp (finish_void): Revise pattern for
-	stopping on the call statement to not permit stopping at
-	the start of the instructions comprising the call sequence.
-
-2001-05-19  Michael Chastain  <chastain@redhat.com>
-
-	* gdb.base/callfuncs.exp: Make all test names unique.
-	* gdb.base/commands.exp: Make all test names unique.
-	* gdb.base/condbreak.exp: Make all test names unique.
-	* gdb.base/dbx.exp: Make all test names unique.
-	* gdb.base/default.exp: Make all test names unique.
-	* gdb.base/define.exp: Make all test names unique.  Conform some FAIL
-	and TIMEOUT messages to their corresponding PASS message.
-	* gdb.base/ending-run.exp: Make all test names unique.
-	* gdb.base/long_long.exp: Remove duplicate test.
-
-2001-05-21  Kevin Buettner  <kevinb@redhat.com>
-
-	* gdb.base/finish.exp (finish_void): Allow "finish" command to
-	stop on the call statement as well as the statement after the
-	call.
-
-2001-05-21  Michael Snyder  <msnyder@redhat.com>
-
-	* gdb.base/long_long.exp: Allow for targets with 4-byte short.
-
-2001-05-10  Elena Zannoni  <ezannoni@redhat.com>
-
-        * gdb.base/completion.exp: Revamp test. Make it execute on all
-        platforms.
-
-2001-05-10  Elena Zannoni  <ezannoni@redhat.com>
-
-        * config/gdbserver.exp (gdb_load): Handle the case
-        in which the arguments to gdbserver are given in the
-        baseboard configuration file.
-        Also handle the case in which the server needs to do a
-        load.
-
-2001-05-07  Keith Seitz <keiths@cygnus.com>
-
-        * lib/gdb.exp (gdbtk_initialize_display): New proc which will
-        set up the display for testing.
-        (gdbtk_start): Convert all paths to paths that tcl will like.
-        Export target information to environment.
-        (_gdbtk_xvfb_init): New proc to start Xvfb if available and
-        necessary.
-        (_gdbtk_xvfb_exit): New proc to kill Xvfb if necessary.
-        (to_tcl_path): New proc to convert a given pathname into
-        a path acceptible as an argument to a tcl command.
-        (_gdbtk_export_target_info): New proc to export target info
-        into the environment for gdbtk testing.
-        (gdbtk_done): New proc to signal end-of-test.
-
-2001-05-06  Jim Blandy  <jimb@redhat.com>
-
-	* restore.c: Make the code of caller0 correspond to its comment.
-
-2001-05-03  Michael Snyder  <msnyder@redhat.com>
-
-	* config/sid.exp (gdb_target_sid): Check for error messages.
-	On error or timeout, don't make expect exit (which will terminate
-	all subsequent tests); instead just make gdb exit.
-	(gdb_load): Check for error messages.  On error or timeout, 
-	return a negative value.
-
 2001-04-24  Jim Blandy  <jimb@redhat.com>
 
 	* gdb.c++/templates.exp: If we see the prompt for the overload
@@ -411,48 +228,6 @@
 
 	* gdb.c++/templates.cc (printf): Remove unused function definition.
 
-2001-01-26  Felix Lee  <flee@redhat.com>
-
-	* sid.exp (sid_exit): Pass host, not target, to remote_close.
-
-2001-01-25  matthew green  <mrg@redhat.com>
-
-	* config/sid.exp (sid_start): Call `remote_push_conn' after firing
-	up sid.
-	(sid_exit): Call `remote_pop_conn' after GDB is gone.
-
-2001-01-25  matthew green  <mrg@redhat.com>
-
-	* config/sid.exp (sid_start): Use `remote_spawn' instead of `spawn.'
-	Deprecate $sid_spawn_id. 
-	(sid_exit): Remove code necessary only for `spawn.'
-
-2001-01-25  matthew green  <mrg@redhat.com>
-
-	* config/sid.exp (sid_start): Handle sim,protocol of `sid.'
-
-2001-01-28  Michael Chastain  <chastain@redhat.com>
-
-	* gdb.c++/ovldbreak.exp (take_gdb_out_of_choice_menu): New proc
-	to call when tests fail.  It takes gdb out of the overloaded
-	function choice menu back to the main prompt, so that the test
-	program stays synchronized.
-	(set_bp_overloaded): New proc to collect all the common
-	code for setting a breakpoint on an overloaded name.  Calls
-	take_gdb_out_of_choice_menu when needed.
-	(menu_overload1arg): New variable to collect the repeated
-	instances of the expected menu for an overloaded name.  Change
-	the regular expression to handle changes in g++ type encoding:
-	"void" can be either "void" or "", and "unsigned int" can be
-	either "unsigned int" or "unsigned".
-	(continue_to_bp_overloaded): Change regular expressions to handle
-	changes in g++ type encoding.
-	(no proc): Call take_gdb_out_of_choice_menu when needed.
-	Remove redundant calls to "info break".  Accept either "canceled"
-	or "cancelled".  Change regular expressions in "info break"
-	calls to handle changes in g++ type encoding.  Give all tests
-	unique strings.
-
 2001-01-17  Ben Elliston  <bje@redhat.com>
 
 	* config/sid.exp: New file.
@@ -1877,18 +1652,79 @@
  	commands.  They're not germane to this test, and they don't work
  	that way on remote targets.
 
+1999-03-03  James Ingham  <jingham@cygnus.com>
+
+	* browser.test: Fixed up to match the new function browser.
+	This is not done yet...
+
+	* srcwin.test: Check for errors when the bbox is called for a text 
+	item that is not on screen (so bbox is "").  Return something more 
+	useful.
+
 1999-03-01  James Ingham  <jingham@cygnus.com>
 
 	* Changelog entries merged over from gdb development branch.
 
+       1999-01-12  Martin Hunt  <hunt@cygnus.com>
+
+	       * gdb.gdbtk/srcwin.test: Add a bunch of tests for the source
+	       window filename and function comboboxes.  Add in stack tests.
+
+       1999-01-11  Martin Hunt  <hunt@cygnus.com>
+
+	       * gdb.gdbtk/srcwin.test: New file. Source Window tests.
+	       * gdb.gdbtk/srcwin.exp: New file. Source Window tests.
+
+       Wed Jan  6 09:22:52 1999  Keith Seitz  <keiths@cygnus.com>
+
+	       * gdb.gdbtk/c_variable.test (c_variable-1.9): Add new
+	       test to check for creation of a variable that is really a type.
+	       (c_variable-7.81): Use "output" instead of "print" to get PC.
+	       Include missing bits of test.
+
+	       * gdb.gdbtk/cpp_variable.test (cpp_variable-1.6): Default format
+	       is now "natural", not "hexadecimal"
+	       (cpp_variable-2.22): Ditto.
+	       (cpp_variable-2.24): Force format to hex before getting value.
+
+	       * gdb.gdbtk/cpp_variable.exp: Supply missing arg to gdbtk_analyze_results.
+
+       Tue Jan  5 12:40:52 1999  Keith Seitz  <keiths@cygnus.com>
+
+	       * gdb.gdbtk/c_variable.c, c_variable.test, c_variable.exp: New C
+	       language tests for variable object interface.
+
+	       * gdb.gdbtk/cpp_variable.h, cpp_variable.cc, cpp_variable.test,
+	       cpp_variable.exp: New C++ language tests for variable object
+	       interface.
+
+	       * gdb.gdbtk/Makefile.in (EXECUTABLES): Add c_variable and cpp_variable.
+
        Tue Jan  5 12:33:47 1999  Keith Seitz  <keiths@cygnus.com>
 
 	       * lib/gdb.exp (gdbtk_analyze_results): Generic function
 	       for outputting results of test run.
 
-	1998-12-07  Martin M. Hunt  <hunt@cygnus.com>
+	       * gdb.gdbtk/defs (gdbtk_test): Handle xpass and xfail.
+	       (gdbtk_test_error): New proc which handles error aborts.
+
+	       * gdb.gdbtk/console.exp: Use gdbtk_analyze_results.
+	       Check if we have a valid DISPLAY before running.
+	       * gdb.gdbtk/browser.exp: Ditto.
+
+       1998-12-07  Martin M. Hunt  <hunt@cygnus.com>
 
 	       * lib/gdb.exp (gdbtk_start): Fix path for itcl library.
+	       * gdb.gdbtk/browser.test: Change "manage open" to ManagedWin::open.
+	       * gdb.gdbtk/console.test: Same.
+	       * gdb.gdbtk/*: Update from devo.
+
+       Fri Jul 24 14:57:19 1998  Keith Seitz  <keiths@cygnus.com>
+
+	       * gdb.gdbtk/Makefile.in: Add new example program "stack".
+	       * gdb.gdbtk/browser.test,browser.exp: Add browser window
+		 tests.
+	       * gdb.gdbtk/stack1.c,stack2.c: Test case for browser window.
 
 1999-02-25  Felix Lee  <flee@cygnus.com>
 
@@ -2418,6 +2254,11 @@
 	* gdb.base/commands.exp: Break up infrun_breakpoint_command_test 
 	into two parts to get around a synchronization problem in expect.
 
+Sun Jun 28 22:34:34 1998  Martin M. Hunt  <hunt@cygnus.com>
+
+	* gdb.gdbtk/simple.c (main): Make main return an
+	int so compiler will stop complaining.
+
 Fri Jun 26 14:27:13 1998  Keith Seitz  <keiths@cygnus.com>
 
 	* lib/gdb.exp (gdbtk_start): Add startup for gdbtk.
@@ -2428,6 +2269,9 @@
 
 	* gdb.gdbtk: New directory to hold gdbtk tests.
 
+	* gdb.gdbtk/console.{exp, test}: New console window tests.
+
+
 Fri Jun 26 14:52:47 1998  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
 
 	* gdb.fortran/types.exp:  Escape brackets in expect patterns
diff --git a/gdb/testsuite/config/gdbserver.exp b/gdb/testsuite/config/gdbserver.exp
index 2c63729..e4dabca 100644
--- a/gdb/testsuite/config/gdbserver.exp
+++ b/gdb/testsuite/config/gdbserver.exp
@@ -92,8 +92,6 @@
 proc gdb_load { args } {
     global server_exec;
     global portnum;
-    global verbose;
-    global gdb_prompt;
 
     # Port id -- either specified in baseboard file, or managed here.
     if [target_info exists gdb,socketport] {
@@ -156,20 +154,10 @@
     set server_exec $args;
 
     # Fire off the debug agent
-    if [target_info exists gdb_server_args] {
-        # This flavour of gdbserver takes as arguments those specified
-        # in the board configuration file
-        set custom_args [target_info gdb_server_args];
-        remote_spawn host \
-               "$gdbserver $custom_args >& /dev/null < /dev/null &" \
-               writeonly
-    } else {
-        # This flavour of gdbserver takes as arguments the port information
-        # and the name of the executable file to be debugged.
-        remote_spawn host \
+    remote_spawn host \
 	    "$gdbserver $sockethost$portnum $args >& /dev/null < /dev/null &" \
 	    writeonly 
-    } 
+    
     # Give it a little time to establish
     sleep 2
 
@@ -181,32 +169,6 @@
     # attach to the "serial port"
     gdb_target_cmd $protocol $gdbport;
 
-    # do the real load if needed
-    if [target_info exists gdb_server_do_load] {
-        send_gdb "load\n"
-        set timeout 2400
-        verbose "Timeout is now $timeout seconds" 2
-        gdb_expect {
-            -re ".*$gdb_prompt $" {
-                if $verbose>1 then {
-                    send_user "Loaded $arg into $GDB\n"
-                }
-                set timeout 30
-                verbose "Timeout is now $timeout seconds" 2
-                return 1
-            }
-            -re "$gdb_prompt $"     {
-                if $verbose>1 then {
-                    perror "GDB couldn't load."
-                }
-            }
-            timeout {
-                if $verbose>1 then {
-                    perror "Timed out trying to load $arg."
-                }
-            }
-        }
-    }
-
     return 0;
 }
+
diff --git a/gdb/testsuite/config/sid.exp b/gdb/testsuite/config/sid.exp
index 7a73162..60cb0c9 100644
--- a/gdb/testsuite/config/sid.exp
+++ b/gdb/testsuite/config/sid.exp
@@ -18,6 +18,7 @@
 load_lib gdb.exp
 
 proc sid_start {} {
+    global sid_spawn_id
     global verbose
 
     set port [lindex [split [target_info netport] ":"] 1]
@@ -49,11 +50,7 @@
 	    set env(MKSID) "../../sid/main/static/mksid"
 	    if {! [file exists $env(SID)]} then { error "Cannot find sid in build tree" }
 	}
-	if { [board_info target sim,protocol] == "sid" } {
-	    set spawncmd "[target_info sim] [target_info sim,options] -e \"set gdb-socket sockaddr-local 0.0.0.0:$port\""
-	} else {
-	    set spawncmd "../../sid/bsp/[target_info sim] $sidverbose $sidendian --gdb=$port [target_info sim,options]"
-	}
+	set spawncmd "../../sid/bsp/[target_info sim] $sidverbose $sidendian --persistent --gdb=$port [target_info sim,options]"
 	set post_spawn {
 	    global env
 	    unset env(SID_LIBRARY_PATH)
@@ -61,21 +58,13 @@
 	    unset env(SID)
 	}
     } else {
-	global find_rawsid;
-
 	set pre_spawn {}
-	if { [board_info target sim,protocol] == "sid" } {
-	    # FIXME: sim,options may be from the build tree, should find
-	    # it in the install tree.
-	    set spawncmd "sid [target_info sim,options] -e \"set gdb-socket sockaddr-local 0.0.0.0:$port\""
-	} else {
-	    set spawncmd "[target_info sim] $sidverbose $sidendian --gdb=$port [target_info sim,options]"
-	}
+	set spawncmd "[target_info sim] $sidverbose $sidendian --persistent --gdb=$port [target_info sim,options]"
 	set post_spawn {}
     }
 
     eval $pre_spawn
-    if {[catch [list remote_spawn host $spawncmd] msg]} {
+    if {[catch "spawn $spawncmd" msg]} {
 	perror $msg
 	exit 1
     }
@@ -92,9 +81,7 @@
     # GDB would wait for a fair while for the stub to respond.
     sleep 4
 
-    if ![target_info exists gdb,no_push_conn] {
-        remote_push_conn host;
-    }
+    set sid_spawn_id $spawn_id
 }
 
 #
@@ -107,9 +94,12 @@
 }
 
 proc sid_exit {} {
-    if ![target_info exists gdb,no_push_conn] {
-	remote_close host;
-	remote_pop_conn host;
+    global sid_spawn_id 
+    if {[info exists sid_spawn_id]} {
+	catch {exec kill [exp_pid -i $sid_spawn_id]}
+	catch {wait -i $sid_spawn_id}
+	unset sid_spawn_id
+        sleep 4
     }
 }
 
@@ -141,18 +131,13 @@
     set timeout 60
     verbose "Timeout is now $timeout seconds" 2
     gdb_expect {
-	-re ".*\[Ee\]rror.*$gdb_prompt $" {
-	    perror "Couldn't set target for remote simulator."
-	    cleanup
-	    gdb_exit
-	}
 	-re "Remote debugging using.*$gdb_prompt"	{
 	    verbose "Set target to sid"
 	}
 	timeout { 
 	    perror "Couldn't set target for remote simulator."
 	    cleanup
-	    gdb_exit
+	    exit $exit_status
 	}
     }
     set timeout $prev_timeout
@@ -169,7 +154,6 @@
     global loadfile
     global GDB
     global gdb_prompt
-    global retval
 
     gdb_unload
     if [gdb_file_cmd $arg] then { return -1 }
@@ -181,32 +165,24 @@
     set timeout 2400
     verbose "Timeout is now $timeout seconds" 2
     gdb_expect {
-	-re ".*\[Ee\]rror.*$gdb_prompt $" {
-	    if $verbose>1 then {
-		perror "Error during download."
-	    }
-	    set retval -1;
-	}
 	-re ".*$gdb_prompt $" {
 	    if $verbose>1 then {
 		send_user "Loaded $arg into $GDB\n"
 	    }
-	    set retval 1;
+	    set timeout 30
+	    verbose "Timeout is now $timeout seconds" 2
+	    return 1
 	}
 	-re "$gdb_prompt $"     {
 	    if $verbose>1 then {
 		perror "GDB couldn't load."
 	    }
-	    set retval -1;
 	}
 	timeout {
 	    if $verbose>1 then {
 		perror "Timed out trying to load $arg."
 	    }
-	    set retval -1;
 	}
     }
     set timeout $prev_timeout
-    verbose "Timeout is now $timeout seconds" 2
-    return $retval;
 }
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 3b297e4..4848c67 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -115,7 +115,7 @@
 #
 send_gdb "info break\n" 
 gdb_expect {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType           \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress    +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1   \r\n\032\032field 1\r\nbreakpoint     \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny   \r\n\032\032field 4\r\n$hex \r\n\032\032field 5\r\nin main at ${srcdir}/${subdir}/${srcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \
+ -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType           \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress    \r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1   \r\n\032\032field 1\r\nbreakpoint     \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny   \r\n\032\032field 4\r\n$hex \r\n\032\032field 5\r\nin main at ${srcdir}/${subdir}/${srcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \
 	{pass "breakpoint info"}
    -re ".*$gdb_prompt$" { fail "breakpoint info" }
    timeout { fail "breakpoint info (timeout)" }
diff --git a/gdb/testsuite/gdb.base/arithmet.exp b/gdb/testsuite/gdb.base/arithmet.exp
index 57afc8d..16f2cda 100644
--- a/gdb/testsuite/gdb.base/arithmet.exp
+++ b/gdb/testsuite/gdb.base/arithmet.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1998, 1999 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
@@ -18,7 +18,6 @@
 # bug-gdb@prep.ai.mit.edu
 
 # This file was written by Elena Zannoni (ezannoni@cygnus.com)
-# Rewritten to use gdb_test by Michael Chastain (chastain@redhat.com)
 
 # This file is part of the gdb testsuite
 #
@@ -63,71 +62,314 @@
 # test expressions with "int" types
 #
 
-gdb_test "set variable x=14" ""
-gdb_test "set variable y=2"  ""
-gdb_test "set variable z=2"  ""
-gdb_test "set variable w=3"  ""
+gdb_test "set variable x=14" "" "set variable x=14"
+gdb_test "set variable y=2" "" "set variable y=2"
+gdb_test "set variable z=2" "" "set variable z=2"
+gdb_test "set variable w=3" "" "set variable w=3"
 
-gdb_test "print x" "14"
-gdb_test "print y"  "2"
-gdb_test "print z"  "2"
-gdb_test "print w"  "3"
- 
-gdb_test "print x+y" "16"
-gdb_test "print x-y" "12"
-gdb_test "print x*y" "28"
-gdb_test "print x/y"  "7"
-gdb_test "print x%y"  "0"
+send_gdb "print x\n"
+gdb_expect {
+    -re ".*14.*$gdb_prompt $" {
+        pass "print value of x"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x" }
+    timeout           { fail "(timeout) print value of x" }    
+  }
 
-#  x  y  z  w
-# 14  2  2  3
+
+send_gdb "print y\n"
+gdb_expect {
+    -re ".*2.*$gdb_prompt $" {
+        pass "print value of y"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of y" }
+    timeout           { fail "(timeout) print value of y" }    
+  }
+
+send_gdb "print z\n"
+gdb_expect {
+    -re ".*2.*$gdb_prompt $" {
+        pass "print value of z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of z" }
+    timeout           { fail "(timeout) print value of z" }    
+  }
+
+send_gdb "print w\n"
+gdb_expect {
+    -re ".*3.*$gdb_prompt $" {
+        pass "print value of w"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of w" }
+    timeout           { fail "(timeout) print value of w" }    
+  }
+
+
+
+send_gdb "print x+y\n"
+gdb_expect {
+    -re ".*16.*$gdb_prompt $" {
+        pass "print value of x+y"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x+y" }
+    timeout           { fail "(timeout) print value of x+y" }    
+  }
+
+send_gdb "print x-y\n"
+gdb_expect {
+    -re ".*12.*$gdb_prompt $" {
+        pass "print value of x-y"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x-y" }
+    timeout           { fail "(timeout) print value of x-y" }    
+  }
+
+send_gdb "print x*y\n"
+gdb_expect {
+    -re ".*28.*$gdb_prompt $" {
+        pass "print value of x*y"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x*y" }
+    timeout           { fail "(timeout) print value of x*y" }    
+  }
+
+send_gdb "print x/y\n"
+gdb_expect {
+    -re ".*7.*$gdb_prompt $" {
+        pass "print value of x/y"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x/y" }
+    timeout           { fail "(timeout) print value of x/y" }    
+  }
+
+send_gdb "print x%y\n"
+gdb_expect {
+    -re ".*0.*$gdb_prompt $" {
+        pass "print value of x%y"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x%y" }
+    timeout           { fail "(timeout) print value of x%y" }    
+  }
+
+
 
 # Test associativity of +, -, *, % ,/
 
-gdb_test "print x+y+z" "18"
-gdb_test "print x-y-z" "10"
-gdb_test "print x*y*z" "56"
-gdb_test "print x/y/z"  "3"
-gdb_test "print x%y%z"  "0"
+
+send_gdb "print x+y+z\n"
+gdb_expect {
+    -re ".*18.*$gdb_prompt $" {
+        pass "print value of x+y"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x+y" }
+    timeout           { fail "(timeout) print value of x+y" }    
+  }
+
+send_gdb "print x-y-z\n"
+gdb_expect {
+    -re ".*10.*$gdb_prompt $" {
+        pass "print value of x-y"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x-y" }
+    timeout           { fail "(timeout) print value of x-y" }    
+  }
+
+send_gdb "print x*y*z\n"
+gdb_expect {
+    -re ".*56.*$gdb_prompt $" {
+        pass "print value of x*y"
+      }
+    -re 8".*$gdb_prompt $" { fail "print value of x*y" }
+    timeout           { fail "(timeout) print value of x*y" }    
+  }
+
+send_gdb "print x/y/z\n"
+gdb_expect {
+    -re ".*3.*$gdb_prompt $" {
+        pass "print value of x/y"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x/y" }
+    timeout           { fail "(timeout) print value of x/y" }    
+  }
+
+send_gdb "print x%y%z\n"
+gdb_expect {
+    -re ".*0.*$gdb_prompt $" {
+        pass "print value of x%y"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x%y" }
+    timeout           { fail "(timeout) print value of x%y" }    
+  }
+
 
 # test precedence rules on pairs of arithmetic operators
 
-gdb_test "set variable x=10" ""
-gdb_test "set variable y=4"  ""
-gdb_test "set variable z=2"  ""
+gdb_test "set variable x=10" "" "set variable x"
+gdb_test "set variable y=4" ""  "set variable y"
+gdb_test "set variable z=2" ""  "set variable z"
 
-#  x  y  z  w
-# 10  4  2  3
 
-gdb_test "print x+y-z" "12"
-gdb_test "print x+y*z" "18"
 
-#  x  y  z  w
-# 10  4  3  3
+# x  y z
+# 10 4 2
+send_gdb "print x+y-z\n"
+gdb_expect {
+    -re ".*12.*$gdb_prompt $" {
+        pass "print value of x+y-z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x+y-z" }
+    timeout           { fail "(timeout) print value of x+y-z" }    
+  }
 
-gdb_test "set variable z=3"  ""
-gdb_test "print x+y%z" "11"
-gdb_test "print x+y/z" "11"
+# 10 4 2
+send_gdb "print x+y*z\n"
+gdb_expect {
+    -re ".*18.*$gdb_prompt $" {
+        pass "print value of x+y*z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x+y*z" }
+    timeout           { fail "(timeout) print value of x+y*z" }    
+  }
 
-#  x  y  z  w
-# 10  4  2  3
 
-gdb_test "set variable z=2"  ""
-gdb_test "print x-y*z"  "2"
-gdb_test "print x-y%z" "10"
-gdb_test "print x-y/z"  "8"
-gdb_test "print x*y/z" "20"
+gdb_test "set variable z=3" "" "set variable z"
 
-#  x  y  z  w
-# 10  4  3  3
 
-gdb_test "set variable z=3"  ""
-gdb_test "print x*y%z"  "1"
-gdb_test "print x/y%z"  "2"
+# 10 4 3
+send_gdb "print x+y%z\n"
+gdb_expect {
+    -re ".*11.*$gdb_prompt $" {
+        pass "print value of x+y%z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x+y%z" }
+    timeout           { fail "(timeout) print value of x+y%z" }    
+  }
 
-# test use of parentheses to enforce different order of evaluation
 
-gdb_test "print x-(y+z)"  "3"
-gdb_test "print x/(y*z)"  "0"
-gdb_test "print x-(y/z)"  "9"
-gdb_test "print (x+y)*z" "42"
+# 10 4 3
+send_gdb "print x+y/z\n"
+gdb_expect {
+    -re ".*11.*$gdb_prompt $" {
+        pass "print value of x+y/z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x+y/z" }
+    timeout           { fail "(timeout) print value of x+y/z" }    
+  }
+
+gdb_test "set variable z=2" "" " set variable z"
+
+
+# 10 4 2
+send_gdb "print x-y*z\n"
+gdb_expect {
+    -re ".*2.*$gdb_prompt $" {
+        pass "print value of x-y*z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x-y*z" }
+    timeout           { fail "(timeout) print value of x-y*z" }    
+  }
+
+# 10 4 2
+send_gdb "print x-y%z\n"
+gdb_expect {
+    -re ".*10.*$gdb_prompt $" {
+        pass "print value of x-y%z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x-y%z" }
+    timeout           { fail "(timeout) print value of x-y%z" }    
+  }
+
+
+# 10 4 2
+send_gdb "print x-y/z\n"
+gdb_expect {
+    -re ".*8.*$gdb_prompt $" {
+        pass "print value of x-y/z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x-y/z" }
+    timeout           { fail "(timeout) print value of x-y/z" }    
+  }
+
+# 10 4 2
+send_gdb "print x*y/z\n"
+gdb_expect {
+    -re ".*20.*$gdb_prompt $" {
+        pass "print value of x*y/z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x*y/z" }
+    timeout           { fail "(timeout) print value of x*y/z" }    
+  }
+
+gdb_test "set variable z=3" "" "set z to 3"
+
+# 10 4 3
+send_gdb "print x*y%z\n"
+gdb_expect {
+    -re ".*1.*$gdb_prompt $" {
+        pass "print value of x*y%z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x*y%z" }
+    timeout           { fail "(timeout) print value of x*y%z" }    
+  }
+
+# 10 4 3
+send_gdb "print x/y%z\n"
+gdb_expect {
+    -re ".*2\r\n$gdb_prompt $" {
+        pass "print value of x/y%z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x/y%z" }
+    timeout           { fail "(timeout) print value of x/y%z" }    
+  }
+
+        
+
+# test use of parenthesis to enforce different order of evaluation
+
+# 10 4 3 
+send_gdb "print x-(y+z)\n"
+gdb_expect {
+    -re ".*3\r\n$gdb_prompt $" {
+        pass "print value of x-(y+z)"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x-(y+z)" }
+    timeout           { fail "(timeout) print value of x-(y+z)" }    
+  }
+
+
+# 10 4 3
+send_gdb "print x/(y*z)\n"
+gdb_expect {
+    -re ".*0\r\n$gdb_prompt $" {
+        pass "print value of x/(y*z)"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x/(y*z)" }
+    timeout           { fail "(timeout) print value of x/(y*z)" }    
+  }
+
+# 10 4 3
+send_gdb "print x-(y/z)\n"
+gdb_expect {
+    -re ".*9\r\n$gdb_prompt $" {
+        pass "print value of x-(y/z)"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of x-(y/z)" }
+    timeout           { fail "(timeout) print value of x-(y/z)" }    
+  }
+
+
+# 10 4 3
+send_gdb "print (x+y)*z\n"
+gdb_expect {
+    -re ".*42\r\n$gdb_prompt $" {
+        pass "print value of (x+y)*z"
+      }
+    -re ".*$gdb_prompt $" { fail "print value of (x+y)*z" }
+    timeout           { fail "(timeout) print value of (x+y)*z" }    
+  }
+
+
+
+
+
+
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index e66f9fd..dd7897d 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -292,10 +292,8 @@
 
 # Make sure that malloc gets called and that the floating point unit
 # is initialized via a call to t_double_values.
-gdb_test "next" "t_double_values\\(double_val1, double_val2\\);.*" \
-  "next to t_double_values"
-gdb_test "next" "t_structs_c\\(struct_val1\\);.*" \
-  "next to t_structs_c"
+gdb_test "next" "t_double_values\\(double_val1, double_val2\\);.*"
+gdb_test "next" "t_structs_c\\(struct_val1\\);.*"
 
 # Save all register contents.
 do_get_all_registers
diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp
index 266948c..31e85f6 100644
--- a/gdb/testsuite/gdb.base/commands.exp
+++ b/gdb/testsuite/gdb.base/commands.exp
@@ -184,7 +184,7 @@
         return
     }
 
-    gdb_test "set args 6" "" "set args in infrun_breakpoint_command_test"
+    gdb_test "set args 6" "" "set args in progvar_simple_while_test"
     if { ![runto factorial] } then { gdb_suppress_tests }
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
@@ -326,8 +326,8 @@
     }
     send_gdb "end\n"
     gdb_expect {
-	-re "$gdb_prompt $"   {pass "end commands on watch"}
-	timeout               {fail "(timeout) end commands on watch"}
+	-re "$gdb_prompt $"   {pass "begin commands on watch"}
+	timeout               {fail "(timeout) begin commands on watch"}
     }
     send_gdb "continue\n"
     gdb_expect {
@@ -351,7 +351,7 @@
     # Don't depend upon argument passing, since most simulators don't
     # currently support it.  Bash value variable to be what we want.
     delete_breakpoints
-    gdb_test "break factorial" "Breakpoint.*at.*" "break factorial #3"
+    gdb_test "break factorial" "Breakpoint.*at.*" "break factorial #2"
     gdb_test "p value=5" "" "set value to 5 in test_command_prompt_position"
     # All this test should do is print 0xdeadbeef once.
     gdb_test "if value == 1\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
@@ -406,34 +406,34 @@
 
 proc deprecated_command_test {} {
     gdb_test "maintenance deprecate blah" "Can't find command.*" \
-          "tried to deprecate non-existing command"
+          "tried to deprecate non-existsing command"
 
-    gdb_test "maintenance deprecate p \"new_p\"" "" "maintenance deprecate p \"new_p\" /1/"
+    gdb_test "maintenance deprecate p \"new_p\"" ""
     gdb_test "p 5" \
 	    "Warning: 'p', an alias for the command 'print' is deprecated.*Use 'new_p'.*" \
 	    "p deprecated warning, with replacement"
-    gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away /1/"
+    gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away"
 
-    gdb_test "maintenance deprecate p \"new_p\"" "" "maintenance deprecate p \"new_p\" /2/"
+    gdb_test "maintenance deprecate p \"new_p\"" ""
     gdb_test "maintenance deprecate print \"new_print\"" ""
     gdb_test "p 5" \
 	    "Warning: command 'print' \\(p\\) is deprecated.*Use 'new_print'.*" \
 	    "both alias and command are deprecated"
-    gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away /2/"
+    gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away"
 
     gdb_test "maintenance deprecate set remote memory-read-packet-size \"srm\" " \
 	    "" \
-	    "deprecate long command /1/"
+	    "deprecate long comamnd"
     gdb_test "set remote memory-read-packet-size" \
 	    "Warning: command 'set remote memory-read-packet-size' is deprecated.*Use 'srm'.*" \
-	    "long command deprecated /1/"
+	    "long command deprecated"
 
     gdb_test "maintenance deprecate set remote memory-read-packet-size" \
 	    "" \
-	    "deprecate long command /2/"
+	    "deprecate long comamnd"
     gdb_test "set remote memory-read-packet-size" \
 	    "Warning: command 'set remote memory-read-packet-size' is deprecated.*No alternative known.*" \
-	    "long command deprecated with no alternative /2/"
+	    "long command deprecated with no alternative."
 
     gdb_test "maintenance deprecate" \
 	    "\"maintenance deprecate\".*" \
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 8c8f676..b08c8a0 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -52,6 +52,11 @@
         }
 
 
+if { ![istarget "hppa*-hp-hpux*"] } {
+    #skip all these tests for now (FIXME)
+    continue
+}
+
 global usestubs
 
 #
@@ -72,19 +77,6 @@
 }
 
 gdb_exit
-
-# Don't let a .inputrc file or an existing setting of INPUTRC mess up
-# the test results.  Even if /dev/null doesn't exist on the particular
-# platform, the readline library will use the default setting just by
-# failing to open the file.  OTOH, opening /dev/null successfully will
-# also result in the default settings being used since nothing will be
-# read from this file.
-global env
-if [info exists env(INPUTRC)] {
-    set old_inputrc $env(INPUTRC)
-}
-set env(INPUTRC) "/dev/null"
-
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
@@ -387,7 +379,7 @@
     -re "^p 'a\\\x07$" {
 	send_gdb "\t"
 	gdb_expect {
-	    -re "a64l.*argv.*$gdb_prompt p .a$" {
+	    -re "a64l.*atol.*$gdb_prompt p .a$" {
 		send_gdb "\n"
 		gdb_expect {
 		    -re "Invalid character constant\\..*$gdb_prompt $" {
@@ -447,7 +439,7 @@
     -re "^p b-a\\\x07$" {
 	send_gdb "\t"
 	gdb_expect {
-	    -re "a64l.*argv.*$gdb_prompt p b-a$" {
+	    -re "a64l.*atol.*$gdb_prompt p b-a$" {
 		send_gdb "\n"
 		gdb_expect {
 		    -re "No symbol \"b\" in current context\\..*$gdb_prompt $" {
@@ -541,10 +533,10 @@
         }
 
 
-send_gdb "file ${srcdir}/gdb.base/compl\t"
+send_gdb "file ${srcdir}/gdb.base/self\t"
 sleep 1
 gdb_expect  {
-        -re "^file ${srcdir}/gdb.base/completion\\.exp $"\
+        -re "^file ${srcdir}/gdb.base/.*'selftest\\.exp' $"\
             { send_gdb "\n"
               gdb_expect {
                       -re "\r\nA program is being debugged already\\.  Kill it\\? \\(y or n\\) $"
@@ -552,19 +544,20 @@
                       { send_gdb "n\n"
                         gdb_expect {
                                 -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
-                                        { pass "complete 'file gdb.base/compl'"}
-                                -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
-                                timeout           {fail "(timeout) complete 'file gdb.base/compl'"}
+                                        { pass "complete 'file gdb.base/self'"}
+                                -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/self'"}
+                                timeout           {fail "(timeout) complete 'file gdb.base/self'"}
                                }
                       }
-                      -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
-                      timeout           {fail "(timeout) complete 'file gdb.base/compl'"}
+                      -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/self'"}
+                      timeout           {fail "(timeout) complete 'file gdb.base/self'"}
                      }
             }
-        -re ".*$gdb_prompt $"       { fail "complete 'file gdb.base/compl'" }
-        timeout         { fail "(timeout) complete 'file gdb.base/compl'" }
+        -re ".*$gdb_prompt $"       { fail "complete 'file gdb.base/self'" }
+        timeout         { fail "(timeout) complete 'file gdb.base/self'" }
         }
 
+
 send_gdb "info func mark\t"
 sleep 1
 gdb_expect  {
@@ -576,7 +569,7 @@
                       -re "marker1.*$gdb_prompt info func marker$"\
                       { send_gdb "\n"
                         gdb_expect {
-                                -re "All functions matching regular expression \"marker\":\r\n\r\nFile.*break.c:\r\nint marker1\\(\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);\r\n$gdb_prompt $"\
+                                -re "All functions matching regular expression \"marker\":\r\n\r\nFile.*break.c:\r\nint marker1\\(.*\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long\\);\r\n$gdb_prompt $"\
                                                   { pass "complete 'info func mar'"}
                                 -re ".*$gdb_prompt $" { fail "complete 'info func mar'"}
                                 timeout           {fail "(timeout) complete 'info func mar'"}
@@ -597,7 +590,7 @@
         -re "ask.*child.*parent.*$gdb_prompt set follow-fork-mode $"\
             { send_gdb "\n"
               gdb_expect {
-                      -re "Requires an argument.*ask.*child.*parent.*$gdb_prompt $"\
+                      -re "Requires an argument.*parent.*child.*ask.*$gdb_prompt $"\
                                         { pass "complete 'set follow-fork-mode'"}
                       -re "Ambiguous item \"\"\\..*$gdb_prompt $"\
                                         { pass "complete 'set follow-fork-mode'"}
@@ -609,12 +602,19 @@
         timeout         { fail "(timeout) complete 'set follow-fork-mode'" }
         }
 
-# Restore globals modified in this test...
-if [info exists old_inputrc] {
-    set env(INPUTRC) $old_inputrc
-} else {
-    unset env(INPUTRC)
-}
 set timeout $oldtimeout1
-
 return 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gdb/testsuite/gdb.base/condbreak.exp b/gdb/testsuite/gdb.base/condbreak.exp
index c234431..92d6880 100644
--- a/gdb/testsuite/gdb.base/condbreak.exp
+++ b/gdb/testsuite/gdb.base/condbreak.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000 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
@@ -66,32 +66,41 @@
 # test conditional break at function
 #
 gdb_test "break marker1 if 1==1" \
-    "Breakpoint.*at.* file .*$srcfile, line.*"
+    "Breakpoint.*at.* file .*$srcfile, line.*" \
+    "break function if condition"
 
-gdb_test "delete 2" ""
+gdb_test "delete 2" \
+    "" \
+    "delete break"
 
 #
 # test conditional break at line number
 #
 gdb_test "break 79 if 1==1" \
-    "Breakpoint.*at.* file .*$srcfile, line 79\\."
+    "Breakpoint.*at.* file .*$srcfile, line 79\\." \
+    "break line if condition"
 
-gdb_test "delete 3" ""
+gdb_test "delete 3" \
+    "" \
+    "delete break"
 
 # 
 # test conditional break at function
 #
 gdb_test "break marker1 if (1==1)" \
-    "Breakpoint.*at.* file .*$srcfile, line.*"
+    "Breakpoint.*at.* file .*$srcfile, line.*" \
+    "break function if (condition)"
 
 #
 # test conditional break at line number
 #
 gdb_test "break 79 if (1==1)" \
-    "Breakpoint.*at.* file .*$srcfile, line 79\\."
+    "Breakpoint.*at.* file .*$srcfile, line 79\\." \
+    "break line if (condition)"
 
 gdb_test "break marker2 if (a==43)" \
-    "Breakpoint.*at.* file .*$srcfile, line.*"
+    "Breakpoint.*at.* file .*$srcfile, line.*" \
+    "break function if (condition)"
 
 #
 # check to see what breakpoints are set
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index 3d6bf5b..97ecd9b 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -189,7 +189,7 @@
 gdb_test "print coremaker_bss" "\\\$$decimal = 10"
 gdb_test "print coremaker_ro" "\\\$$decimal = 201"
 
-gdb_test "print func2::coremaker_local" "\\\$$decimal = \\{0, 1, 2, 3, 4\\}"
+gdb_test "print func2::coremaker_local" "\\\$$decimal = {0, 1, 2, 3, 4}"
 
 # Somehow we better test the ability to read the registers out of the core
 # file correctly.  I don't think the other tests do this.
diff --git a/gdb/testsuite/gdb.base/dbx.exp b/gdb/testsuite/gdb.base/dbx.exp
index 9df3bda..08c3cd4 100644
--- a/gdb/testsuite/gdb.base/dbx.exp
+++ b/gdb/testsuite/gdb.base/dbx.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1998, 1999 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
@@ -306,13 +306,13 @@
 #test_func
 #
 proc test_func { } {
-    gdb_test "cont" "" "cont 1"
+    gdb_test "cont" ""
     gdb_test "step" ""
     # This always fails, but it's not clear why. -sts 1999-08-17
     setup_xfail "*-*-*"
     gdb_test "func sum" "'sum' not within current stack frame\."
     gdb_test "stop in sum" "Breakpoint.*at.*: file.*sum\.c, line 11\."
-    gdb_test "cont" "" "cont 2"
+    gdb_test "cont"
     # This always fails, but it's not clear why. -sts 1999-08-17
     setup_xfail "*-*-*"
     gdb_test "func print_average" ".*in print_average.*\\(list=.*, low=0, high=6\\).*at.*average\.c:24\r\n24\[ \t\]+total = sum\\(list, low, high\\);"
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index bc43143..3df0368 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -1,5 +1,5 @@
 #   Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001
+#   2000
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -328,8 +328,6 @@
 gdb_test "info stack" "No stack." "info stack"
 #test info set
 # FIXME -- needs to match the entire output
-# FIXME -- on native solaris 2.8, this test fails due to this line:
-#  prompt:  Gdb's prompt is "(gdb) ".^M
 gdb_test "info set" "confirm:  Whether to confirm potentially dangerous operations is o\[a-z\]*..*\[\r\n\]+history filename:  The filename in which to record the command history is .*\[\r\n\]+listsize:  Number of source lines gdb will list by default is 10.*" "info set"
 gdb_test "info symbol" "Argument required .address.."
 #test info source
@@ -389,7 +387,7 @@
 gdb_test "overlay off"    ""
 gdb_test "overlay list"   "No sections are mapped."
 gdb_test "overlay map"    "Overlay debugging not enabled.*" "overlay map #1"
-gdb_test "overlay unmap"  "Overlay debugging not enabled.*" "overlay unmap #1"
+gdb_test "overlay unmap"  "Overlay debugging not enabled.*" "overlay unmap #2"
 gdb_test "overlay manual" "" "overlay manual #2"
 gdb_test "overlay map"    "Argument required: name of an overlay section." "overlay map #2"
 gdb_test "overlay unmap"  "Argument required: name of an overlay section." "overlay unmap #2"
diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp
index 06ea1c0..2793c4b 100644
--- a/gdb/testsuite/gdb.base/define.exp
+++ b/gdb/testsuite/gdb.base/define.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
+# Copyright 1998, 1999 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
@@ -160,8 +160,8 @@
            }
           }
   -re "$gdb_prompt $"\
-          {fail "document user command: nextwhere"}
-  timeout {fail "(timeout) document user command: nextwhere"}
+          {fail "documenting user command: nextwhere"}
+  timeout {fail "(timeout) documenting user command: nextwhere"}
 }
 
 send_gdb "document nextwhere\n"
@@ -170,13 +170,13 @@
           {send_gdb "A next command that first shows you where you're stepping from.\nend\n"
            gdb_expect {
              -re "$gdb_prompt $"\
-                     {pass "re-document user command: nextwhere"}
-             timeout {fail "(timeout) re-document user command: nextwhere"}
+                     {pass "document user command: nextwhere"}
+             timeout {fail "(timeout) document user command: nextwhere"}
            }
           }
   -re "$gdb_prompt $"\
-          {fail "re-document user command: nextwhere"}
-  timeout {fail "(timeout) re-document user command: nextwhere"}
+          {fail "documenting user command: nextwhere"}
+  timeout {fail "(timeout) documenting user command: nextwhere"}
 }
 
 send_gdb "help nextwhere\n"
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
index 1552d36..714c0ed 100644
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -56,8 +56,7 @@
 	"bpt at line before routine"
 
 gdb_test "b ending-run.c:13" \
-	".*Note.*also.*Breakpoint 2.*ending-run.c, line 13.*" \
-	"b ending-run.c:13, one"
+	".*Note.*also.*Breakpoint 2.*ending-run.c, line 13.*"
 
 # Set up to go to the next-to-last line of the program
 #
@@ -82,7 +81,7 @@
 # Test some other "clear" combinations
 #
 gdb_test "b ending-run.c:1" ".*Breakpoint.*4.*"
-gdb_test "b ending-run.c:13" ".*Note.*also.*Breakpoint.*5.*" "b ending-run.c:13, two"
+gdb_test "b ending-run.c:13" ".*Note.*also.*Breakpoint.*5.*"
 gdb_test "cle ending-run.c:13" \
 	".*Deleted breakpoint 5.*" "Only cleared 1 by line"
 
diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp
index 49df15a..1bffd0a 100644
--- a/gdb/testsuite/gdb.base/exprs.exp
+++ b/gdb/testsuite/gdb.base/exprs.exp
@@ -1,4 +1,4 @@
-#   Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000, 2001
+#   Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -101,11 +101,11 @@
 # FIXME:  gdb mishandles the cast (unsigned char) on the i960, so I've
 # set up an expected failure for this case.
 setup_xfail "i960-*-*" 1821
-test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_char == ~0" "\\$\[0-9\]* = $false"  "print v_unsigned_char == (unsigned char)~0" "\\$\[0-9\]* = $true" "print unsigned char == (~0)"
+test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_char == ~0" "\\$\[0-9\]* = $false"  "print v_unsigned_char == (unsigned char)~0" "\\$\[0-9\]* = $true"  "print unsigned char == (~0)"
 # FIXME:  gdb mishandles the cast (unsigned char) on the i960, so I've
 # set up an expected failure for this case.
 setup_xfail "i960-*-*" 1821
-test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_char != (unsigned char)~0" "\\$\[0-9\]* = $false"  "print v_unsigned_char != ~0" "\\$\[0-9\]* = $true" "print unsigned char != (~0)"
+test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_char != (unsigned char)~0" "\\$\[0-9\]* = $false"  "print unsigned char != (~0)"
 test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_char < 127" "\\$\[0-9\]* = $false"  "print unsigned char < (~0)"
 test_expr "set variable v_unsigned_char=~0" "print v_unsigned_char > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_char > 127" "\\$\[0-9\]* = $true"  "print unsigned char > (~0)"
 #
@@ -140,7 +140,7 @@
 test_expr "set variable v_unsigned_short=0x7FFF" "print v_unsigned_short < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_short < 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned short <"
 test_expr "set variable v_unsigned_short=0x7FFF" "print v_unsigned_short > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_short > 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned short >"
 # make short a minus
-test_expr "set variable v_unsigned_short=~0" "print v_unsigned_short == 0" "\\$\[0-9\]* = $false"  "print sizeof (v_unsigned_short) < sizeof (~0) && v_unsigned_short == ~0" "\\$\[0-9\]* = $false"  "print v_unsigned_short == (unsigned short)~0" "\\$\[0-9\]* = $true"  "print unsigned short == (~0)"
+test_expr "set variable v_unsigned_short=~0" "print v_unsigned_short == 0" "\\$\[0-9\]* = $false"  "print v_unsigned_short == ~0" "\\$\[0-9\]* = $false"  "print v_unsigned_short == (unsigned short)~0" "\\$\[0-9\]* = $true"  "print unsigned short == (~0)"
 test_expr "set variable v_unsigned_short=~0" "print v_unsigned_short != 0" "\\$\[0-9\]* = $true"  "print v_unsigned_short != (unsigned short)~0" "\\$\[0-9\]* = $false"  "print unsigned short != (~0)"
 test_expr "set variable v_unsigned_short=~0" "print v_unsigned_short < 0" "\\$\[0-9\]* = $false"  "print v_unsigned_short < 0x7FFF" "\\$\[0-9\]* = $false"  "print unsigned short < (~0)"
 test_expr "set variable v_unsigned_short=~0" "print v_unsigned_short > 0" "\\$\[0-9\]* = $true"  "print v_unsigned_short > 0x7FFF" "\\$\[0-9\]* = $true"  "print unsigned short > (~0)"
@@ -238,11 +238,11 @@
 #
 send_gdb "print sizeof (long long) > sizeof (long)\n"
 gdb_expect {
-    -re "\\$\[0-9\]* = $true.*$gdb_prompt" {
+    -re "\\$\[0-9\]* = $true" {
 	set ok 1
 	pass "sizeof (long long) > sizeof (long) (true)"
     }
-    -re "\\$\[0-9\]* = $false.*$gdb_prompt" {
+    -re "\\$\[0-9\]* = $false" {
 	set ok 0
 	pass "sizeof (long long) > sizeof (long) (false)"
     }
diff --git a/gdb/testsuite/gdb.base/finish.exp b/gdb/testsuite/gdb.base/finish.exp
index 064f26e..abb35ed 100644
--- a/gdb/testsuite/gdb.base/finish.exp
+++ b/gdb/testsuite/gdb.base/finish.exp
@@ -77,17 +77,10 @@
     gdb_test "continue" "Breakpoint.* void_func.*" \
 	    "continue to void_func"
     send_gdb "finish\n"
-    # Some architectures will have one or more instructions after the
-    # call instruction which still is part of the call sequence, so we
-    # must be prepared for a "finish" to show us the void_func call
-    # again as well as the statement after.
     gdb_expect {
 	-re ".*void_checkpoint.*$gdb_prompt $" {
 	    pass "finish from void_func"
 	}
-	-re "0x\[0-9a-fA-F\]+ in main.*call to void_func.*$gdb_prompt $" {
-	    pass "finish from void_func"
-	}
 	-re ".*$gdb_prompt $" {
 	    fail "finish from void_func"
 	}
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp
index a09f8da..e3c94c6 100644
--- a/gdb/testsuite/gdb.base/help.exp
+++ b/gdb/testsuite/gdb.base/help.exp
@@ -542,7 +542,7 @@
 # test help gotcha
 gdb_test "help gotcha" "Undefined command: \"gotcha\".  Try \"help\"."  "help gotcha"
 # test apropos regex
-gdb_test "apropos \\\(print\[\^ bsiedf\\\".-\]\\\)" "handle -- Specify how to handle a signal"
+gdb_test "apropos \\\(print\[\^ bsiedf\\\".\]\\\)" "handle -- Specify how to handle a signal"
 # test apropos >1 word string
 gdb_test "apropos handle a signal" "handle -- Specify how to handle a signal"
 # test apropos apropos
diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp
index 69a456b..a7f9af9 100644
--- a/gdb/testsuite/gdb.base/long_long.exp
+++ b/gdb/testsuite/gdb.base/long_long.exp
@@ -85,16 +85,6 @@
     default { }
 }
 
-# Detect targets with 4-byte shorts.  Assume all others use 2-bytes.
-
-set sizeof_short 2
-send_gdb "print sizeof(short)\n"
-gdb_expect {
-    -re ".* = 4.*$gdb_prompt $" { set sizeof_short 4 }
-    -re ".*$gdb_prompt $" { }
-    default { }
-}
-
 # Detect targets with 4-byte doubles.
 
 set sizeof_double 8
@@ -182,23 +172,14 @@
 
     }
 
-    if { $sizeof_short == 2 } {
-	gdb_test "p/d *(short *)&oct" ".*-22738.*"
-	gdb_test "p/u *(short *)&oct" ".*42798.*"
-	gdb_test "p/o *(short *)&oct" ".*0123456.*"
-	gdb_test "p/t *(short *)&oct" ".*1010011100101110.*"
-	gdb_test "p/a *(short *)&oct" ".*0xf*ffffa72e.*"
-	gdb_test "p/c *(short *)&oct" ".* 46 '.'.*"
-	gdb_test "p/f *(short *)&oct" ".*-22738.*"
-    } else {
-	gdb_test "p/d *(short *)&oct" ".*-1490098887.*"
-	gdb_test "p/u *(short *)&oct" ".*2804868409.*"
-	gdb_test "p/o *(short *)&oct" ".*024713562471.*"
-	gdb_test "p/t *(short *)&oct" ".*10100111001011101110010100111001.*"
-	gdb_test "p/a *(short *)&oct" ".*0xf*a72ee539.*"
-	gdb_test "p/c *(short *)&oct" ".* 57 '9'.*"
-	gdb_test "p/f *(short *)&oct" ".*-2.42716126e-15.*"
-    }
+    gdb_test "p/d *(short *)&oct" ".*-22738.*"
+    gdb_test "p/u *(short *)&oct" ".*42798.*"
+    gdb_test "p/o *(short *)&oct" ".*0123456.*"
+    gdb_test "p/t *(short *)&oct" ".*1010011100101110.*"
+    gdb_test "p/a *(short *)&oct" ".*0xf*ffffa72e.*"
+    gdb_test "p/c *(short *)&oct" ".* 46 '.'.*"
+    gdb_test "p/a *(short *)&oct" ".*0xf*ffffa72e.*"
+    gdb_test "p/f *(short *)&oct" ".*-22738.*"
 
     gdb_test "x/x &oct" ".*0xa72ee539.*"
     gdb_test "x/d &oct" ".*.-1490098887*"
diff --git a/gdb/testsuite/gdb.base/restore.c b/gdb/testsuite/gdb.base/restore.c
index e05d68c..974e944 100644
--- a/gdb/testsuite/gdb.base/restore.c
+++ b/gdb/testsuite/gdb.base/restore.c
@@ -14,12 +14,11 @@
    (defun caller (n) (format "caller%d" n))
    (defun local  (n) (format "l%d"  n))
    (defun local-sum (n)
-     (if (zerop n) (insert "0")
-       (let ((j 1))
-         (while (<= j n)
-           (insert (local j))
-           (if (< j n) (insert "+"))
-           (setq j (1+ j))))))
+     (let ((j 1))
+       (while (<= j n)
+         (insert (local j))
+	 (if (< j n) (insert "+"))
+         (setq j (1+ j)))))
    (defun local-chain (n previous first-end)
      (let ((j 1))
        (while (<= j n)
@@ -54,7 +53,8 @@
 	   (insert "{\n")
 	   (local-chain i "n" (callee i))
 	   (insert "  return ")
-	   (local-sum i)
+	   (if (<= i 0) (insert "n")
+	     (local-sum i))
 	   (insert ";\n")
 	   (insert "}\n\n")
 	   (setq i (1+ i))))
@@ -103,7 +103,7 @@
 int
 callee0 (int n)
 {
-  return 0;
+  return n;
 }
 
 /* Returns n * 1 + 1 */
diff --git a/gdb/testsuite/gdb.base/return2.c b/gdb/testsuite/gdb.base/return2.c
index 58d85ec..cddbb97 100644
--- a/gdb/testsuite/gdb.base/return2.c
+++ b/gdb/testsuite/gdb.base/return2.c
@@ -84,27 +84,8 @@
   int_resultval       = int_func ();		/* short_checkpoint */
   long_resultval      = long_func ();		/* int_checkpoint */
   long_long_resultval = long_long_func ();	/* long_checkpoint */
-
-  /* On machines using IEEE floating point, the test pattern of all
-     1-bits established above turns out to be a floating-point NaN
-     ("Not a Number").  According to the IEEE rules, NaN's aren't even
-     equal to themselves.  This can lead to stupid conversations with
-     GDB like:
-
-       (gdb) p testval.float_testval == testval.float_testval
-       $7 = 0
-       (gdb)
-
-     This is the correct answer, but it's not the sort of thing
-     return2.exp wants to see.  So to make things work the way they
-     ought, we'll set aside the `union' cleverness and initialize the
-     test values explicitly here.  These values have interesting bits
-     throughout the value, so we'll still detect truncated values.  */
-
-  testval.float_testval = 2.7182818284590452354;/* long_long_checkpoint */
-  float_resultval     = float_func ();		
-  testval.double_testval = 3.14159265358979323846; /* float_checkpoint */
-  double_resultval    = double_func ();		
+  float_resultval     = float_func ();		/* long_long_checkpoint */
+  double_resultval    = double_func ();		/* float_checkpoint */
   main_test = 1;				/* double_checkpoint */
   return 0;
 }
diff --git a/gdb/testsuite/gdb.c++/classes.exp b/gdb/testsuite/gdb.c++/classes.exp
index 5b559d7..2e2e89c 100644
--- a/gdb/testsuite/gdb.c++/classes.exp
+++ b/gdb/testsuite/gdb.c++/classes.exp
@@ -224,7 +224,7 @@
     # it to print as "struct".
     send_gdb "ptype class A\n"
     gdb_expect {
-	-re "type = (class|struct) A \{(${ws}public:|)${ws}int a;${ws}int x;((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(A const ?&\\);)|(${ws}A\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
+	-re "type = (class|struct) A \{(${ws}public:|)${ws}int a;${ws}int x;((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(A const ?&\\);)|(${ws}A\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class A"
 	}
 	-re ".*$gdb_prompt $" {
@@ -239,10 +239,10 @@
     setup_xfail_format "DWARF 1"
     send_gdb "ptype class B\n"
     gdb_expect {
-	-re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;${ws}B & operator=\\(B const &\\);${ws}B\\(B const &\\);${ws}B\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+	-re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;${ws}B & operator=\\(B const &\\);${ws}B\\(B const &\\);${ws}B\\(void\\);${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class B"
 	}
-	-re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(B const &\\);)|(${ws}B\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
+	-re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;((${ws}B & operator=\\(B const &\\);)|(${ws}B\\(B const &\\);)|(${ws}B\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class B (obsolescent gcc or gdb)"
 	}
 	-re ".*$gdb_prompt $" {
@@ -257,10 +257,10 @@
     setup_xfail_format "DWARF 1"
     send_gdb "ptype class C\n"
     gdb_expect {
-	-re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;${ws}C & operator=\\(C const &\\);${ws}C\\(C const &\\);${ws}C\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+	-re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;${ws}C & operator=\\(C const &\\);${ws}C\\(C const &\\);${ws}C\\(void\\);${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class C"
 	}
-	-re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(C const &\\);)|(${ws}C\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
+	-re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(C const &\\);)|(${ws}C\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class C (obsolescent gcc or gdb)"
 	}
 	-re ".*$gdb_prompt $" {
@@ -275,10 +275,10 @@
     setup_xfail_format "DWARF 1"
     send_gdb "ptype class D\n"
     gdb_expect {
-	-re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;${ws}D & operator=\\(D const &\\);${ws}D\\(D const &\\);${ws}D\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+	-re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;${ws}D & operator=\\(D const &\\);${ws}D\\(D const &\\);${ws}D\\(void\\);${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class D"
 	}
-	-re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(D const &\\);)|(${ws}D\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
+	-re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(D const &\\);)|(${ws}D\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class D (obsolescent gcc or gdb)"
 	}
 	-re ".*$gdb_prompt $" {
@@ -293,10 +293,10 @@
     setup_xfail_format "DWARF 1"
     send_gdb "ptype class E\n"
     gdb_expect {
-	-re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;${ws}E & operator=\\(E const &\\);${ws}E\\(E const &\\);${ws}E\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+	-re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;${ws}E & operator=\\(E const &\\);${ws}E\\(E const &\\);${ws}E\\(void\\);${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class E"
 	}
-	-re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(E const &\\);)|(${ws}E\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
+	-re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;((${ws}E & operator=\\(E const &\\);)|(${ws}E\\(E const &\\);)|(${ws}E\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class E"
 	}
 	-re ".*$gdb_prompt $" {
@@ -310,10 +310,10 @@
 
     send_gdb "ptype class vA\n"
     gdb_expect {
-	-re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;${ws}vA & operator=\\(vA const &\\);${ws}vA\\(vA const &\\);${ws}vA\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
+	-re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;${ws}vA & operator=\\(vA const &\\);${ws}vA\\(vA const &\\);${ws}vA\\(void\\);${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class vA"
 	}
-	-re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;((${ws}vA & operator=\\(vA const &\\);)|(${ws}vA\\(vA const &\\);)|(${ws}vA\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
+	-re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;((${ws}vA & operator=\\(vA const &\\);)|(${ws}vA\\(vA const &\\);)|(${ws}vA\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class vA (obsolescent gcc or gdb)"
 	}
 	-re ".*$gdb_prompt $" {
@@ -460,10 +460,10 @@
         -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;\r\n${ws}Foo\\(int, int\\);${ws}int operator!.void.;${ws}operator int.void.;${ws}int times.int.;$nl\}$nl$gdb_prompt $" {
             pass "ptype class Foo(aCC)"
         }
-	-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo & operator=\\(Foo const &\\);${ws}Foo\\(Foo const &\\);${ws}Foo\\(int, int\\);${ws}int operator!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);${ws}\}$nl$gdb_prompt $" {
+	-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo & operator=\\(Foo const &\\);${ws}Foo\\(Foo const &\\);${ws}Foo\\(int, int\\);${ws}int operator!\\(void\\);${ws}operator int\\(void\\);${ws}int times\\(int\\);${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class Foo"
 	}
-	-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;((${ws}Foo & operator=\\(Foo const &\\);)|(${ws}Foo\\(Foo const &\\);)|(${ws}Foo\\(int, int\\);)|(${ws}int operator!\\((void|)\\);)|(${ws}int operator int\\((void|)\\);)|(${ws}int times\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
+	-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;((${ws}Foo & operator=\\(Foo const &\\);)|(${ws}Foo\\(Foo const &\\);)|(${ws}Foo\\(int, int\\);)|(${ws}int operator!\\(void\\);)|(${ws}int operator int\\(void\\);)|(${ws}int times\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
 	    pass "ptype class Foo (obsolescent gcc or gdb)"
 	}
 	-re ".*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.c++/cplusfuncs.cc b/gdb/testsuite/gdb.c++/cplusfuncs.cc
index 7f033d6..ed555aa 100644
--- a/gdb/testsuite/gdb.c++/cplusfuncs.cc
+++ b/gdb/testsuite/gdb.c++/cplusfuncs.cc
@@ -187,10 +187,10 @@
 /* gdb has two demanglers (one for g++ 2.95, one for g++ 3).
    These marker functions help me figure out which demangler is in use. */
 
-char *	dm_type_char_star (char * p)		{ return p; }
+int	dm_type_char_star (char * p)		{ return (int) p; }
 int	dm_type_foo_ref (foo & foo)		{ return foo.ifoo; }
-int *	dm_type_int_star (int * p)		{ return p; }
-long *	dm_type_long_star (long * p)		{ return p; }
+int	dm_type_int_star (int * p)		{ return (int) p; }
+int	dm_type_long_star (long * p)		{ return (int) p; }
 int	dm_type_unsigned_int (unsigned int i)	{ return i; }
 int	dm_type_void (void)			{ return 0; }
-void *	dm_type_void_star (void * p)		{ return p; }
+int	dm_type_void_star (void * p)		{ return (int) p; }
diff --git a/gdb/testsuite/gdb.disasm/Makefile.in b/gdb/testsuite/gdb.disasm/Makefile.in
index 7bb5eef..ab228dd 100644
--- a/gdb/testsuite/gdb.disasm/Makefile.in
+++ b/gdb/testsuite/gdb.disasm/Makefile.in
@@ -9,10 +9,12 @@
 	@echo "Nothing to be done for all..."	
 
 clean mostlyclean:
-	-rm -f *.o *.diff *~ *.bad core h8300s hppa mn10200 mn10300 sh3
+	-rm -f *.o *.diff *~ *.bad core sh3 hppa mn10200 mn10300
 
 distclean maintainer-clean realclean: clean
 	-rm -f Makefile config.status config.log
 
 Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
 	$(SHELL) ./config.status --recheck
+
+
diff --git a/gdb/testsuite/gdb.disasm/h8300s.exp b/gdb/testsuite/gdb.disasm/h8300s.exp
deleted file mode 100644
index eeaf23b..0000000
--- a/gdb/testsuite/gdb.disasm/h8300s.exp
+++ /dev/null
@@ -1,698 +0,0 @@
-# Copyright (C) 2000 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
-
-# This file was written by Kazu Hirata. (kazu@hxi.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if ![istarget "h8300*-*-*"] {
-    verbose "Tests ignored for all but h8300s based targets."
-    return
-}
-
-set prms_id 0
-set bug_id 0
-
-set testfile "h8300s"
-set srcfile ${srcdir}/${subdir}/${testfile}.s
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcfile}" "${binfile}" executable {debug additional_flags=-ms}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-proc all_set_machine_h8300s { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "set machine h8300s\n"
-    gdb_expect {
-	-re "$gdb_prompt $" {}
-    }
-}
-
-proc all_movb_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/9i movb_tests\n"
-    gdb_expect {
-	-re "
-.*mov.b\tr0l,r0h.*
-.*mov.b\t#0x12,r1l.*
-.*mov.b\t@er0,r1h.*
-.*mov.b\t@\\(0x1234:16,er0\\),r2l.*
-.*mov.b\t@\\(0x12345678:32,er0\\),r2h.*
-.*mov.b\t@er0\\+,r3l.*
-.*mov.b\t@0x12:8,r3h.*
-.*mov.b\t@0x1234:16,r4l.*
-.*mov.b\t@0x12345678:32,r4h.*
-.*$gdb_prompt $" { pass "movb_tests" }
-	-re "$gdb_prompt $" { fail "movb_tests" }
-	timeout { fail "(timeout) movb_tests" }
-    }
-}
-
-proc all_movw_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/8i movw_tests\n"
-    gdb_expect {
-	-re "
-.*mov.w\te0,r0.*
-.*mov.w\t#0x1234,r1.*
-.*mov.w\t@er0,r2.*
-.*mov.w\t@\\(0x1234:16,er0\\),r3.*
-.*mov.w\t@\\(0x12345678:32,er0\\),r4.*
-.*mov.w\t@er0\\+,r5.*
-.*mov.w\t@0x1234:16,r6.*
-.*mov.w\t@0x12345678:32,r7.*
-.*$gdb_prompt $" { pass "movw_tests" }
-	-re "$gdb_prompt $" { fail "movw_tests" }
-	timeout { fail "(timeout) movw_tests" }
-    }
-}
-
-proc all_movl_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/8i movl_tests\n"
-    gdb_expect {
-	-re "
-.*mov.l\ter0,er1.*
-.*mov.l\t#0x12345678,er1.*
-.*mov.l\t@er0,er2.*
-.*mov.l\t@\\(0x1234:16,er0\\),er3.*
-.*mov.l\t@\\(0x12345678:32,er0\\),er4.*
-.*mov.l\t@er0\\+,er5.*
-.*mov.l\t@0x1234:16,er6.*
-.*mov.l\t@0x12345678:32,er7.*
-.*$gdb_prompt $" { pass "movl_tests" }
-	-re "$gdb_prompt $" { fail "movl_tests" }
-	timeout { fail "(timeout) movl_tests" }
-    }
-}
-
-proc all_ldm_stm_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/6i ldm_stm_tests\n"
-    gdb_expect {
-	-re "
-.*ldm.l\t@sp\\+,er0-er1.*
-.*ldm.l\t@sp\\+,er0-er2.*
-.*ldm.l\t@sp\\+,er0-er3.*
-.*stm.l\ter0\\-er1,@-sp.*
-.*stm.l\ter0\\-er2,@-sp.*
-.*stm.l\ter0\\-er3,@-sp.*
-.*$gdb_prompt $" { pass "ldm_stm_tests" }
-	-re "$gdb_prompt $" { fail "ldm_stm_tests" }
-	timeout { fail "(timeout) ldm_stm_tests" }
-    }
-}
-
-proc all_movfpe_movtpe_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/2i movfpe_movtpe_tests\n"
-    gdb_expect {
-	-re "
-.*movfpe\t@0x1234:16,r2l.*
-.*movtpe\tr2l,@0x1234:16.*
-.*$gdb_prompt $" { pass "movfpe_movtpe_tests" }
-	-re "$gdb_prompt $" { fail "movfpe_movtpe_tests" }
-	timeout { fail "(timeout) movfpe_movtpe_tests" }
-    }
-}
-
-proc all_add_sub_addx_subx_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/15i add_sub_addx_subx_tests\n"
-    gdb_expect {
-	-re "
-.*add.b\t#0x12,r0l.*
-.*add.b\tr1l,r1h.*
-.*add.w\t#0x1234,r2.*
-.*add.w\tr3,r4.*
-.*add.l\t#0x12345678,er5.*
-.*add.l\ter6,er7.*
-.*sub.b\tr1l,r1h.*
-.*sub.w\t#0x1234,r2.*
-.*sub.w\tr3,r4.*
-.*sub.l\t#0x12345678,er5.*
-.*sub.l\ter6,er7.*
-.*addx\t#0x12,r0l.*
-.*addx\tr1l,r1h.*
-.*subx\t#0x12,r0l.*
-.*subx\tr1l,r1h.*
-.*$gdb_prompt $" { pass "add_sub_addx_subx_tests" }
-	-re "$gdb_prompt $" { fail "add_sub_addx_subx_tests" }
-	timeout { fail "(timeout) add_sub_addx_subx_tests" }
-    }
-}
-
-proc all_inc_dec_adds_subs_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/16i inc_dec_adds_subs_tests\n"
-    gdb_expect {
-	-re "
-.*inc.b\tr0l.*
-.*inc.w\t#0x1,r4.*
-.*inc.w\t#0x2,r3.*
-.*inc.l\t#0x1,er2.*
-.*inc.l\t#0x2,er1.*
-.*dec.b\tr0l.*
-.*dec.w\t#0x1,r4.*
-.*dec.w\t#0x2,r3.*
-.*dec.l\t#0x1,er2.*
-.*dec.l\t#0x2,er1.*
-.*adds\t#0x1,er7.*
-.*adds\t#0x2,er6.*
-.*adds\t#0x4,er5.*
-.*subs\t#0x1,er7.*
-.*subs\t#0x2,er6.*
-.*subs\t#0x4,er5.*
-.*$gdb_prompt $" { pass "inc_dec_adds_subs_tests" }
-	-re "$gdb_prompt $" { fail "inc_dec_adds_subs_tests" }
-	timeout { fail "(timeout) inc_dec_adds_subs_tests" }
-    }
-}
-
-proc all_daa_das_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/2i daa_das_tests\n"
-    gdb_expect {
-	-re "
-.*daa\tr0l.*
-.*das\tr0h.*
-.*$gdb_prompt $" { pass "daa_das_tests" }
-	-re "$gdb_prompt $" { fail "daa_das_tests" }
-	timeout { fail "(timeout) daa_das_tests" }
-    }
-}
-
-proc all_mul_div_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/8i mul_div_tests\n"
-    gdb_expect {
-	-re "
-.*mulxs.b\tr0l,r1.*
-.*mulxs.w\tr2,er3.*
-.*mulxu.b\tr0l,e1.*
-.*mulxu.w\te2,er3.*
-.*divxs.b\tr0l,r1.*
-.*divxs.w\tr2,er3.*
-.*divxu.b\tr0l,e1.*
-.*divxu.w\te2,er3.*
-.*$gdb_prompt $" { pass "mul_div_tests" }
-	-re "$gdb_prompt $" { fail "mul_div_tests" }
-	timeout { fail "(timeout) mul_div_tests" }
-    }
-}
-
-proc all_cmp_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/8i cmp_tests\n"
-    gdb_expect {
-	-re "
-.*cmp.b\t#0x12,r0l.*
-.*cmp.b\tr1l,r1h.*
-.*cmp.w\t#0x1234,r2.*
-.*cmp.w\tr3,e3.*
-.*cmp.l\t#0x12345678,er4.*
-.*cmp.l\ter5,er6.*
-.*$gdb_prompt $" { pass "cmp_tests" }
-	-re "$gdb_prompt $" { fail "cmp_tests" }
-	timeout { fail "(timeout) cmp_tests" }
-    }
-}
-
-proc all_neg_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/3i neg_tests\n"
-    gdb_expect {
-	-re "
-.*neg.b\tr0l.*
-.*neg.w\tr2.*
-.*neg.l\ter3.*
-.*$gdb_prompt $" { pass "neg_tests" }
-	-re "$gdb_prompt $" { fail "neg_tests" }
-	timeout { fail "(timeout) neg_tests" }
-    }
-}
-
-proc all_ext_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/4i ext_tests\n"
-    gdb_expect {
-	-re "
-.*exts.w\tr0.*
-.*exts.l\ter1.*
-.*extu.w\tr2.*
-.*extu.l\ter3.*
-.*$gdb_prompt $" { pass "ext_tests" }
-	-re "$gdb_prompt $" { fail "ext_tests" }
-	timeout { fail "(timeout) ext_tests" }
-    }
-}
-
-proc all_tas_mac_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/7i tas_mac_tests\n"
-    gdb_expect {
-	-re "
-.*tas\t@er0.*
-.*mac\t@er1+,@er2+.*
-.*clrmac.*
-.*ldmac\ter4,mach.*
-.*ldmac\ter5,macl.*
-.*stmac\tmach,er6.*
-.*stmac\tmacl,er7.*
-.*$gdb_prompt $" { pass "tas_mac_tests" }
-	-re "$gdb_prompt $" { fail "tas_mac_tests" }
-	timeout { fail "(timeout) tas_mac_tests" }
-    }
-}
-
-proc all_logic_operations_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/21i logic_operations_tests\n"
-    gdb_expect {
-	-re "
-.*and.b\t#0x12,r0l.*
-.*and.b\tr1l,r2h.*
-.*and.w\t#0x1234,r0.*
-.*and.w\tr1,r2.*
-.*and.l\t#0x12345678,er0.*
-.*and.l\ter1,er2.*
-.*or.b\t#0x12,r0l.*
-.*or.b\tr1l,r2h.*
-.*or.w\t#0x1234,r0.*
-.*or.w\tr1,r2.*
-.*or.l\t#0x12345678,er0.*
-.*or.l\ter1,er2.*
-.*xor.b\t#0x12,r0l.*
-.*xor.b\tr1l,r2h.*
-.*xor.w\t#0x1234,r0.*
-.*xor.w\tr1,r2.*
-.*xor.l\t#0x12345678,er0.*
-.*xor.l\ter1,er2.*
-.*not.b\tr0l.*
-.*not.w\tr1.*
-.*not.l\ter2.*
-.*$gdb_prompt $" { pass "logic_operations_tests" }
-	-re "$gdb_prompt $" { fail "logic_operations_tests" }
-	timeout { fail "(timeout) logic_operations_tests" }
-    }
-}
-
-proc all_sha_shl_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/12i sha_shl_tests\n"
-    gdb_expect {
-	-re "
-.*shal\tr0l.*
-.*shal\tr1.*
-.*shal\ter2.*
-.*shar\tr3l.*
-.*shar\tr4.*
-.*shar\ter5.*
-.*shll\tr0l.*
-.*shll\tr1.*
-.*shll\ter2.*
-.*shlr\tr3l.*
-.*shlr\tr4.*
-.*shlr\ter5.*
-.*$gdb_prompt $" { pass "sha_shl_tests" }
-	-re "$gdb_prompt $" { fail "sha_shl_tests" }
-	timeout { fail "(timeout) sha_shl_tests" }
-    }
-}
-
-proc all_rot_rotx_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/12i rot_rotx_tests\n"
-    gdb_expect {
-	-re "
-.*rotl\tr0l.*
-.*rotl\tr1.*
-.*rotl\ter2.*
-.*rotr\tr3l.*
-.*rotr\tr4.*
-.*rotr\ter5.*
-.*rotxl\tr0l.*
-.*rotxl\tr1.*
-.*rotxl\ter2.*
-.*rotxr\tr3l.*
-.*rotxr\tr4.*
-.*rotxr\ter5.*
-.*$gdb_prompt $" { pass "rot_rotx_tests" }
-	-re "$gdb_prompt $" { fail "rot_rotx_tests" }
-	timeout { fail "(timeout) rot_rotx_tests" }
-    }
-}
-
-proc all_bset_bclr_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/20i bset_bclr_tests\n"
-    gdb_expect {
-	-re "
-.*bset\t#0x7,r0l.*
-.*bset\t#0x6,@er1.*
-.*bset\t#0x5,@0x12:8.*
-.*bset\t#0x4,@0x1234:16.*
-.*bset\t#0x3,@0x12345678:32.*
-.*bset\tr7l,r0h.*
-.*bset\tr6l,@er1.*
-.*bset\tr5l,@0x12:8.*
-.*bset\tr4l,@0x1234:16.*
-.*bset\tr3l,@0x12345678:32.*
-.*bclr\t#0x7,r0l.*
-.*bclr\t#0x6,@er1.*
-.*bclr\t#0x5,@0x12:8.*
-.*bclr\t#0x4,@0x1234:16.*
-.*bclr\t#0x3,@0x12345678:32.*
-.*bclr\tr7h,r0h.*
-.*bclr\tr6h,@er1.*
-.*bclr\tr5h,@0x12:8.*
-.*bclr\tr4h,@0x1234:16.*
-.*bclr\tr3h,@0x12345678:32.*
-.*$gdb_prompt $" { pass "bset_bclr_tests" }
-	-re "$gdb_prompt $" { fail "bset_bclr_tests" }
-	timeout { fail "(timeout) bset_bclr_tests" }
-    }
-}
-
-proc all_bnot_btst_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/20i bnot_btst_tests\n"
-    gdb_expect {
-	-re "
-.*bnot\t#0x7,r0l.*
-.*bnot\t#0x6,@er1.*
-.*bnot\t#0x5,@0x12:8.*
-.*bnot\t#0x4,@0x1234:16.*
-.*bnot\t#0x3,@0x12345678:32.*
-.*bnot\tr7l,r0h.*
-.*bnot\tr6l,@er1.*
-.*bnot\tr5l,@0x12:8.*
-.*bnot\tr4l,@0x1234:16.*
-.*bnot\tr3l,@0x12345678:32.*
-.*btst\t#0x7,r0l.*
-.*btst\t#0x6,@er1.*
-.*btst\t#0x5,@0x12:8.*
-.*btst\t#0x4,@0x1234:16.*
-.*btst\t#0x3,@0x12345678:32.*
-.*btst\tr7h,r0h.*
-.*btst\tr6h,@er1.*
-.*btst\tr5h,@0x12:8.*
-.*btst\tr4h,@0x1234:16.*
-.*btst\tr3h,@0x12345678:32.*
-.*$gdb_prompt $" { pass "bnot_btst_tests" }
-	-re "$gdb_prompt $" { fail "bnot_btst_tests" }
-	timeout { fail "(timeout) bnot_btst_tests" }
-    }
-}
-
-proc all_band_bor_bxor_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/15i band_bor_bxor_tests\n"
-    gdb_expect {
-	-re "
-.*band\t#0x7,r0l.*
-.*band\t#0x6,@er1.*
-.*band\t#0x5,@0x12:8.*
-.*band\t#0x4,@0x1234:16.*
-.*band\t#0x3,@0x12345678:32.*
-.*bor\t#0x7,r0l.*
-.*bor\t#0x6,@er1.*
-.*bor\t#0x5,@0x12:8.*
-.*bor\t#0x4,@0x1234:16.*
-.*bor\t#0x3,@0x12345678:32.*
-.*bxor\t#0x7,r0l.*
-.*bxor\t#0x6,@er1.*
-.*bxor\t#0x5,@0x12:8.*
-.*bxor\t#0x4,@0x1234:16.*
-.*bxor\t#0x3,@0x12345678:32.*
-.*$gdb_prompt $" { pass "band_bor_bxor_tests" }
-	-re "$gdb_prompt $" { fail "band_bor_bxor_tests" }
-	timeout { fail "(timeout) band_bor_bxor_tests" }
-    }
-}
-
-proc all_bld_bst_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/20i bld_bst_tests\n"
-    gdb_expect {
-	-re "
-.*bld\t#0x7,r0l.*
-.*bld\t#0x6,@er1.*
-.*bld\t#0x5,@0x12:8.*
-.*bld\t#0x4,@0x1234:16.*
-.*bld\t#0x3,@0x12345678:32.*
-.*bild\t#0x7,r0l.*
-.*bild\t#0x6,@er1.*
-.*bild\t#0x5,@0x12:8.*
-.*bild\t#0x4,@0x1234:16.*
-.*bild\t#0x3,@0x12345678:32.*
-.*bst\t#0x7,r0l.*
-.*bst\t#0x6,@er1.*
-.*bst\t#0x5,@0x12:8.*
-.*bst\t#0x4,@0x1234:16.*
-.*bst\t#0x3,@0x12345678:32.*
-.*bist\t#0x7,r0l.*
-.*bist\t#0x6,@er1.*
-.*bist\t#0x5,@0x12:8.*
-.*bist\t#0x4,@0x1234:16.*
-.*bist\t#0x3,@0x12345678:32.*
-.*$gdb_prompt $" { pass "bld_bst_tests" }
-	-re "$gdb_prompt $" { fail "bld_bst_tests" }
-	timeout { fail "(timeout) bld_bst_tests" }
-    }
-}
-
-proc all_branch_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/25i branch_tests\n"
-    gdb_expect {
-	-re "
-.*bra\tbranch_tests.*
-.*brn\tbranch_tests.*
-.*bhi\tbranch_tests.*
-.*bls\tbranch_tests.*
-.*bcc\tbranch_tests.*
-.*bcs\tbranch_tests.*
-.*bne\tbranch_tests.*
-.*beq\tbranch_tests.*
-.*bvc\tbranch_tests.*
-.*bvs\tbranch_tests.*
-.*bpl\tbranch_tests.*
-.*bmi\tbranch_tests.*
-.*bge\tbranch_tests.*
-.*blt\tbranch_tests.*
-.*bgt\tbranch_tests.*
-.*ble\tbranch_tests.*
-.*jmp\t@er0.*
-.*jmp\t@branch_tests.*
-.*jmp\t@@0 (0).*
-.*bsr\tbranch_tests.*
-.*bsr\tbranch_tests.*
-.*jsr\t@er0.*
-.*jsr\t@branch_tests.*
-.*jsr\t@@0 (0).*
-.*rts.*
-.*$gdb_prompt $" { pass "branch_tests" }
-	-re "$gdb_prompt $" { fail "branch_tests" }
-	timeout { fail "(timeout) branch_tests" }
-    }
-}
-
-proc all_system_control_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/40i system_control_tests\n"
-    gdb_expect {
-	-re "
-.*trapa\t#0x2.*
-.*rte.*
-.*sleep.*
-.*ldc\t#0x12,ccr*.
-.*ldc\tr3l,ccr.*
-.*ldc\t@er0,ccr.*
-.*ldc\t@\\(0x1234:16,er0\\),ccr.*
-.*ldc\t@\\(0x12345678:32,er0\\),ccr.*
-.*ldc\t@er1\\+,ccr.*
-.*ldc\t@0x1234:16,ccr.*
-.*ldc\t@0x12345678:32,ccr.*
-.*stc\tccr,r3l.*
-.*stc\tccr,@er0.*
-.*stc\tccr,@\\(0x1234:16,er0\\).*
-.*stc\tccr,@\\(0x12345678:32,er0\\).*
-.*stc\tccr,@\\-er1.*
-.*stc\tccr,@0x1234:16.*
-.*stc\tccr,@0x12345678:32.*
-.*andc\t#0x12,ccr.*
-.*orc\t#0x34,ccr.*
-.*xorc\t#0x56,ccr.*
-.*ldc\t#0x12,exr*.
-.*ldc\tr3l,exr.*
-.*ldc\t@er0,exr.*
-.*ldc\t@\\(0x1234:16,er0\\),exr.*
-.*ldc\t@\\(0x12345678:32,er0\\),exr.*
-.*ldc\t@er1\\+,exr.*
-.*ldc\t@0x1234:16,exr.*
-.*ldc\t@0x12345678:32,exr.*
-.*stc\texr,r3l.*
-.*stc\texr,@er0.*
-.*stc\texr,@\\(0x1234:16,er0\\).*
-.*stc\texr,@\\(0x12345678:32,er0\\).*
-.*stc\texr,@\\-er1.*
-.*stc\texr,@0x1234:16.*
-.*stc\texr,@0x12345678:32.*
-.*andc\t#0x12,exr.*
-.*orc\t#0x34,exr.*
-.*xorc\t#0x56,exr.*
-.*nop.*
-.*$gdb_prompt $" { pass "system_control_tests" }
-	-re "$gdb_prompt $" { fail "system_control_tests" }
-	timeout { fail "(timeout) system_control_tests" }
-    }
-}
-
-proc all_block_data_transfer_tests { } {
-    global gdb_prompt
-    global hex
-    global decimal
-
-    send_gdb "x/2i block_data_transfer_tests\n"
-    gdb_expect {
-	-re "
-.*eepmov.b.*
-.*eepmov.w.*
-.*$gdb_prompt $" { pass "block_data_transfer_tests" }
-	-re "$gdb_prompt $" { fail "block_data_transfer_tests" }
-	timeout { fail "(timeout) block_data_transfer_tests" }
-    }
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-all_set_machine_h8300s
-gdb_load $binfile
-
-# Data transfer
-all_movb_tests
-all_movw_tests
-all_movl_tests
-all_ldm_stm_tests
-all_movfpe_movtpe_tests
-
-# Arithmetic operations
-all_add_sub_addx_subx_tests
-all_inc_dec_adds_subs_tests
-all_daa_das_tests
-all_mul_div_tests
-all_cmp_tests
-all_neg_tests
-all_ext_tests
-all_tas_mac_tests
-
-# Logic operations
-all_logic_operations_tests
-
-# Shift
-all_sha_shl_tests
-all_rot_rotx_tests
-
-# Bit manipulation
-all_bset_bclr_tests
-all_bnot_btst_tests
-all_band_bor_bxor_tests
-all_bld_bst_tests
-
-# Branch
-all_branch_tests
-
-# System control
-all_system_control_tests
-
-# Block data transfer
-all_block_data_transfer_tests
diff --git a/gdb/testsuite/gdb.disasm/h8300s.s b/gdb/testsuite/gdb.disasm/h8300s.s
deleted file mode 100644
index ec66a55..0000000
--- a/gdb/testsuite/gdb.disasm/h8300s.s
+++ /dev/null
@@ -1,356 +0,0 @@
-	.h8300s
-	.section .text
-	.align 2
-	.global _main
-	.global movb_tests
-	.global movw_tests
-	.global movl_tests
-	.global ldm_stm_tests
-	.global movfpe_movtpe_tests
-	.global add_sub_addx_subx_tests
-	.global inc_dec_adds_subs_tests
-	.global daa_das_tests
-	.global mul_div_tests
-	.global cmp_tests
-	.global neg_tests
-	.global ext_tests
-	.global tas_mac_tests
-	.global logic_operations_tests
-	.global sha_shl_tests
-	.global rot_rotx_tests
-	.global bset_bclr_tests
-	.global bnot_btst_tests
-	.global band_bor_bxor_tests
-	.global bld_bst_tests
-	.global branch_tests
-	.global system_control_tests
-	.global block_data_transfer_tests
-_main:
-	nop
-
-movb_tests:
-	mov.b	r0l,r0h
-	mov.b	#0x12,r1l
-	mov.b	@er0,r1h
-	mov.b	@(0x1234:16,er0),r2l
-	mov.b	@(0x12345678:32,er0),r2h
-	mov.b	@er0+,r3l
-	mov.b	@0x12:8,r3h
-	mov.b	@0x1234:16,r4l
-	mov.b	@0x12345678:32,r4h
-
-movw_tests:
-	mov.w	e0,r0
-	mov.w	#0x1234,r1
-	mov.w	@er0,r2
-	mov.w	@(0x1234:16,er0),r3
-	mov.w	@(0x12345678:32,er0),r4
-	mov.w	@er0+,r5
-	mov.w	@0x1234:16,r6
-	mov.w	@0x12345678:32,r7
-
-movl_tests:
-	mov.l	er0,er1
-	mov.l	#0x12345678,er1
-	mov.l	@er0,er2
-	mov.l	@(0x1234:16,er0),er3
-	mov.l	@(0x12345678:32,er0),er4
-	mov.l	@er0+,er5
-	mov.l	@0x1234:16,er6
-	mov.l	@0x12345678:32,er7
-
-ldm_stm_tests:
-	ldm.l	@sp+,er0-er1
-	ldm.l	@sp+,er0-er2
-	ldm.l	@sp+,er0-er3
-	stm.l	er0-er1,@-sp
-	stm.l	er0-er2,@-sp
-	stm.l	er0-er3,@-sp
-
-movfpe_movtpe_tests:
-	movfpe	@0x1234:16,r2l
-	movtpe	r2l,@0x1234:16
-
-add_sub_addx_subx_tests:
-	add.b	#0x12,r0l
-	add.b	r1l,r1h
-	add.w	#0x1234,r2
-	add.w	r3,r4
-	add.l	#0x12345678,er5
-	add.l	er6,er7
-	sub.b	r1l,r1h
-	sub.w	#0x1234,r2
-	sub.w	r3,r4
-	sub.l	#0x12345678,er5
-	sub.l	er6,er7
-	addx	#0x12,r0l
-	addx	r1l,r1h
-	subx	#0x12,r0l
-	subx	r1l,r1h
-
-inc_dec_adds_subs_tests:
-	inc.b	r0l
-	inc.w	#0x1,r4
-	inc.w	#0x2,r3
-	inc.l	#0x1,er2
-	inc.l	#0x2,er1
-	dec.b	r0l
-	dec.w	#0x1,r4
-	dec.w	#0x2,r3
-	dec.l	#0x1,er2
-	dec.l	#0x2,er1
-	adds	#0x1,er7
-	adds	#0x2,er6
-	adds	#0x4,er5
-	subs	#0x1,er7
-	subs	#0x2,er6
-	subs	#0x4,er5
-
-daa_das_tests:
-	daa	r0l
-	das	r0h
-
-mul_div_tests:
-	mulxs.b	r0l,r1
-	mulxs.w	r2,er3
-	mulxu.b	r0l,e1
-	mulxu.w	e2,er3
-	divxs.b	r0l,r1
-	divxs.w	r2,er3
-	divxu.b	r0l,e1
-	divxu.w	e2,er3
-
-cmp_tests:
-	cmp.b	#0x12,r0l
-	cmp.b	r1l,r1h
-	cmp.w	#0x1234,r2
-	cmp.w	r3,e3
-	cmp.l	#0x12345678,er4
-	cmp.l	er5,er6
-
-neg_tests:
-	neg.b	r0l
-	neg.w	r2
-	neg.l	er3
-
-ext_tests:
-	exts.w	r0
-	exts.l	er1
-	extu.w	r2
-	extu.l	er3
-
-tas_mac_tests:
-	tas	@er0
-	mac	@er1+,@er2+
-	clrmac
-	ldmac	er4,mach
-	ldmac	er5,macl
-	stmac	mach,er6
-	stmac	macl,er7
-
-logic_operations_tests:
-	and.b	#0x12,r0l
-	and.b	r1l,r2h
-	and.w	#0x1234,r0
-	and.w	r1,r2
-	and.l	#0x12345678,er0
-	and.l	er1,er2
-	or.b	#0x12,r0l
-	or.b	r1l,r2h
-	or.w	#0x1234,r0
-	or.w	r1,r2
-	or.l	#0x12345678,er0
-	or.l	er1,er2
-	xor.b	#0x12,r0l
-	xor.b	r1l,r2h
-	xor.w	#0x1234,r0
-	xor.w	r1,r2
-	xor.l	#0x12345678,er0
-	xor.l	er1,er2
-	not.b	r0l
-	not.w	r1
-	not.l	er2
-
-sha_shl_tests:
-	shal	r0l
-	shal	r1
-	shal	er2
-	shar	r3l
-	shar	r4
-	shar	er5
-	shll	r0l
-	shll	r1
-	shll	er2
-	shlr	r3l
-	shlr	r4
-	shlr	er5
-
-rot_rotx_tests:
-	rotl	r0l
-	rotl	r1
-	rotl	er2
-	rotr	r3l
-	rotr	r4
-	rotr	er5
-	rotxl	r0l
-	rotxl	r1
-	rotxl	er2
-	rotxr	r3l
-	rotxr	r4
-	rotxr	er5
-
-bset_bclr_tests:
-	bset	#0x7,r0l
-	bset	#0x6,@er1
-	bset	#0x5,@0x12:8
-	bset	#0x4,@0x1234:16
-	bset	#0x3,@0x12345678:32
-	bset	r7l,r0h
-	bset	r6l,@er1
-	bset	r5l,@0x12:8
-	bset	r4l,@0x1234:16
-	bset	r3l,@0x12345678:32
-	bclr	#0x7,r0l
-	bclr	#0x6,@er1
-	bclr	#0x5,@0x12:8
-	bclr	#0x4,@0x1234:16
-	bclr	#0x3,@0x12345678:32
-	bclr	r7h,r0h
-	bclr	r6h,@er1
-	bclr	r5h,@0x12:8
-	bclr	r4h,@0x1234:16
-	bclr	r3h,@0x12345678:32
-
-bnot_btst_tests:
-	bnot	#0x7,r0l
-	bnot	#0x6,@er1
-	bnot	#0x5,@0x12:8
-	bnot	#0x4,@0x1234:16
-	bnot	#0x3,@0x12345678:32
-	bnot	r7l,r0h
-	bnot	r6l,@er1
-	bnot	r5l,@0x12:8
-	bnot	r4l,@0x1234:16
-	bnot	r3l,@0x12345678:32
-	btst	#0x7,r0l
-	btst	#0x6,@er1
-	btst	#0x5,@0x12:8
-	btst	#0x4,@0x1234:16
-	btst	#0x3,@0x12345678:32
-	btst	r7h,r0h
-	btst	r6h,@er1
-	btst	r5h,@0x12:8
-	btst	r4h,@0x1234:16
-	btst	r3h,@0x12345678:32
-
-band_bor_bxor_tests:
-	band	#0x7,r0l
-	band	#0x6,@er1
-	band	#0x5,@0x12:8
-	band	#0x4,@0x1234:16
-	band	#0x3,@0x12345678:32
-	bor	#0x7,r0l
-	bor	#0x6,@er1
-	bor	#0x5,@0x12:8
-	bor	#0x4,@0x1234:16
-	bor	#0x3,@0x12345678:32
-	bxor	#0x7,r0l
-	bxor	#0x6,@er1
-	bxor	#0x5,@0x12:8
-	bxor	#0x4,@0x1234:16
-	bxor	#0x3,@0x12345678:32
-
-bld_bst_tests:
-	bld	#0x7,r0l
-	bld	#0x6,@er1
-	bld	#0x5,@0x12:8
-	bld	#0x4,@0x1234:16
-	bld	#0x3,@0x12345678:32
-	bild	#0x7,r0l
-	bild	#0x6,@er1
-	bild	#0x5,@0x12:8
-	bild	#0x4,@0x1234:16
-	bild	#0x3,@0x12345678:32
-	bst	#0x7,r0l
-	bst	#0x6,@er1
-	bst	#0x5,@0x12:8
-	bst	#0x4,@0x1234:16
-	bst	#0x3,@0x12345678:32
-	bist	#0x7,r0l
-	bist	#0x6,@er1
-	bist	#0x5,@0x12:8
-	bist	#0x4,@0x1234:16
-	bist	#0x3,@0x12345678:32
-
-branch_tests:
-	bra	branch_tests
-	brn	branch_tests
-	bhi	branch_tests
-	bls	branch_tests
-	bcc	branch_tests
-	bcs	branch_tests
-	bne	branch_tests
-	beq	branch_tests
-	bvc	branch_tests
-	bvs	branch_tests
-	bpl	branch_tests
-	bmi	branch_tests
-	bge	branch_tests
-	blt	branch_tests
-	bgt	branch_tests
-	ble	branch_tests
-	jmp	@er0
-	jmp	@branch_tests
-	jmp	@@0 (0)
-	bsr	@branch_tests:8
-	bsr	@branch_tests:16
-	jsr	@er0
-	jsr	@branch_tests
-	jsr	@@0 (0)
-	rts
-
-system_control_tests:
-	trapa	#0x2
-	rte
-	sleep
-	ldc	#0x12,ccr
-	ldc	r3l,ccr
-	ldc	@er0,ccr
-	ldc	@(0x1234:16,er0),ccr
-	ldc	@(0x12345678:32,er0),ccr
-	ldc	@er1+,ccr
-	ldc	@0x1234:16,ccr
-	ldc	@0x12345678:32,ccr
-	stc	ccr,r3l
-	stc	ccr,@er0
-	stc	ccr,@(0x1234:16,er0)
-	stc	ccr,@(0x12345678:32,er0)
-	stc	ccr,@-er1
-	stc	ccr,@0x1234:16
-	stc	ccr,@0x12345678:32
-	andc	#0x12,ccr
-	orc	#0x34,ccr
-	xorc	#0x56,ccr
-	ldc	#0x12,exr
-	ldc	r3l,exr
-	ldc	@er0,exr
-	ldc	@(0x1234:16,er0),exr
-	ldc	@(0x12345678:32,er0),exr
-	ldc	@er1+,exr
-	ldc	@0x1234:16,exr
-	ldc	@0x12345678:32,exr
-	stc	exr,r3l
-	stc	exr,@er0
-	stc	exr,@(0x1234:16,er0)
-	stc	exr,@(0x12345678:32,er0)
-	stc	exr,@-er1
-	stc	exr,@0x1234:16
-	stc	exr,@0x12345678:32
-	andc	#0x12,exr
-	orc	#0x34,exr
-	xorc	#0x56,exr
-	nop
-
-block_data_transfer_tests:
-	eepmov.b
-	eepmov.w
diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog-mi
similarity index 77%
rename from gdb/testsuite/gdb.mi/ChangeLog
rename to gdb/testsuite/gdb.mi/ChangeLog-mi
index cbd4462..e055bb1 100644
--- a/gdb/testsuite/gdb.mi/ChangeLog
+++ b/gdb/testsuite/gdb.mi/ChangeLog-mi
@@ -1,125 +1,3 @@
-2001-06-27  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-disassemble.exp: Update to accept mi1 breakpoint tables.
-	* mi-basics.exp: Ditto.
-	* mi-simplerun.exp: Ditto.
-	* mi-watch.exp: Ditto. Add check for full header.
-	* mi-break.exp: Ditto. Add check for full header.
-
-2001-06-26  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-stack.exp: Update.  Output for args=... and
-	locals=... changed to a list.
-	
-2001-06-26  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-stack.exp: Update. Output for stack=..., args=... and
-	stack-args=... changed to a list.
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-console.exp: Update args=... part of stop-reason
-	patterns. Output changed to a list of arguments.
-	* mi-disassemble.exp: Ditto.
-	* mi-simplerun.exp: Ditto.
-	* mi-return.exp: Ditto.
-	* mi-read-memory.exp: Ditto.
-	* mi-eval.exp: Ditto.
-	* mi-watch.exp: Ditto.
-	* mi-var-display.exp: Ditto.
-	* mi-var-cmd.exp: Ditto.
-	* mi-var-child.exp: Ditto.
-	* mi-var-block.exp: Ditto.
-	* mi-until.exp: Ditto.
-	* mi-stepi.exp: Ditto.
-	* mi-stack.exp: Ditto.
-	* mi-regs.exp: Ditto.
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-read-memory.exp: Update patterns matching data-read-memory.
-	Outputs a list.
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-regs.exp: Update patterns matching register-values.  Outputs a
-	list.
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-regs.exp: Update patters matching register-names.  Now
-	outputs a list.
-
-2001-06-25  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-regs.exp: Update patterns matching changed-registers.  Now
-	outputs a list.
-
-2001-06-23  Andrew Cagney  <ac131313@redhat.com>
-
-	* ChangeLog-mi: Rename to ChangeLog.
-	* mi-basics.exp: Remove local emacs variable defining
-	change-log-default-name.
-	* mi-break.exp, mi-console.exp, mi-disassemble.exp: Ditto.
-	* mi-eval.exp, mi-hack-cli.exp, mi-read-memory.exp: Ditto.
-	* mi-regs.exp, mi-return.exp, mi-simplerun.exp: Ditto.
-	* mi-stack.exp, mi-stepi.exp, mi-until.exp: Ditto.
-	* mi-var-block.exp, mi-var-child.exp, mi-var-cmd.exp: Ditto.
-	* mi-var-display.exp, mi-watch.exp, mi0-basics.exp: Ditto.
-	* mi0-break.exp, mi0-console.exp, mi0-disassemble.exp: Ditto.
-	* mi0-eval.exp, mi0-hack-cli.exp, mi0-read-memory.exp: Ditto.
-	* mi0-regs.exp, mi0-return.exp, mi0-simplerun.exp: Ditto.
-	* mi0-stack.exp, mi0-stepi.exp, mi0-until.exp: Ditto.
-	* mi0-var-block.exp, mi0-var-child.exp, mi0-var-cmd.exp: Ditto.
-	* mi0-var-display.exp, mi0-watch.exp: Ditto.
-
-2001-06-23  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-disassemble.exp: Update patterns matching data-disassemble
-	output.  Now produces a list of instructions and a list of
-	source/assembly lines.
-
-2001-06-18  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-basics.exp, mi-break.exp, mi-console.exp, mi-disassemble.exp,
-	mi-eval.exp, mi-hack-cli.exp, mi-read-memory.exp, mi-regs.exp,
-	mi-return.exp, mi-simplerun.exp, mi-stack.exp, mi-stepi.exp,
-	mi-until.exp, mi-var-block.exp, mi-var-child.exp, mi-var-cmd.exp,
-	mi-var-display.exp, mi-watch.exp, mi0-basics.exp, mi0-break.exp,
-	mi0-console.exp, mi0-disassemble.exp, mi0-eval.exp,
-	mi0-hack-cli.exp, mi0-read-memory.exp, mi0-regs.exp,
-	mi0-return.exp, mi0-simplerun.exp, mi0-stack.exp, mi0-stepi.exp,
-	mi0-until.exp, mi0-var-block.exp, mi0-var-child.exp,
-	mi0-var-cmd.exp, mi0-var-display.exp, mi0-watch.exp: Use MIFLAGS
-	to explictly select an interpreter.
-
-2001-06-16  Andrew Cagney  <ac131313@redhat.com>
-
-	MI0 was the never enabled MI interface included in GDB 5.0.
-	* mi0-basics.exp: Copy mi-basics.exp.
-	* mi0-break.exp: Copy mi-break.exp.
-	* mi0-console.exp: Copy mi-console.exp.
-	* mi0-disassemble.exp: Copy mi-disassemble.exp.
-	* mi0-eval.exp: Copy mi-eval.exp.
-	* mi0-hack-cli.exp: Copy mi-hack-cli.exp.
-	* mi0-read-memory.exp: Copy mi-read-memory.exp.
-	* mi0-regs.exp: Copy mi-regs.exp.
-	* mi0-return.exp: Copy mi-return.exp.
-	* mi0-simplerun.exp: Copy mi-simplerun.exp.
-	* mi0-stack.exp: Copy mi-stack.exp.
-	* mi0-stepi.exp: Copy mi-stepi.exp.
-	* mi0-until.exp: Copy mi-until.exp.
-	* mi0-var-block.exp: Copy mi-var-block.exp.
-	* mi0-var-child.exp: Copy mi-var-child.exp.
-	* mi0-var-cmd.exp: Copy mi-var-cmd.exp.
-	* mi0-var-display.exp: Copy mi-var-display.exp.
-	* mi0-watch.exp: Copy mi-watch.exp.
-	
-2001-05-11  Fernando Nasser  <fnasser@redhat.com>
-
-	* mi-var-child.exp: Adjust for the fact that now (char *) can be
-	dereferenced.
-
 2001-03-06  Kevin Buettner  <kevinb@redhat.com>
 
 	* mi-basics.exp, mi-break.exp, mi-disassemble.exp,
diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp
index 4913d8f..41ce792 100644
--- a/gdb/testsuite/gdb.mi/mi-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi-basics.exp
@@ -30,7 +30,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -139,7 +138,7 @@
              "break-delete (all) operation"
 
     mi_gdb_test "201-break-list" \
-             ".*\\\^done,BreakpointTable=\\\{.*,body=\\\[\\\]\\\}" \
+             ".*\\\^done,BreakpointTable=\\\{\\\}" \
              "all breakpoints removed"
 }
 
@@ -172,3 +171,7 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp
index 5cbe4e4..8ac38ea 100644
--- a/gdb/testsuite/gdb.mi/mi-break.exp
+++ b/gdb/testsuite/gdb.mi/mi-break.exp
@@ -29,7 +29,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -79,7 +78,7 @@
              "insert temp breakpoint at \"<fullfilename>\":6 (callee4)"
 
     mi_gdb_test "666-break-list" \
-	    "666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}.*\\\]\}" \
+                "666\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
                 "list of breakpoints"
 
     mi_gdb_test "777-break-delete" \
@@ -123,7 +122,7 @@
 
     setup_xfail "*-*-*"
     mi_gdb_test "166-break-list" \
-	    "1\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
+                "166\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
                 "list of breakpoints"
 
     mi_gdb_test "177-break-delete" \
@@ -136,3 +135,7 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
index 11d9cb3..04ee841 100644
--- a/gdb/testsuite/gdb.mi/mi-console.exp
+++ b/gdb/testsuite/gdb.mi/mi-console.exp
@@ -33,7 +33,6 @@
 # remote target.
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -57,7 +56,7 @@
 	"break-insert operation"
 mi_run_cmd
 gdb_expect {
-    -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*mi-console.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
+    -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*mi-console.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
 	    pass "run to main"
     }
     timeout {
@@ -107,3 +106,7 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
diff --git a/gdb/testsuite/gdb.mi/mi-disassemble.exp b/gdb/testsuite/gdb.mi/mi-disassemble.exp
index 9d6fbc5..75f097d 100644
--- a/gdb/testsuite/gdb.mi/mi-disassemble.exp
+++ b/gdb/testsuite/gdb.mi/mi-disassemble.exp
@@ -25,7 +25,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -61,7 +60,7 @@
              "break-insert operation"
 
     mi_gdb_test "204-break-list" \
-                "204\\^done,BreakpointTable=\{.*,body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\\\]\}" \
+                "204\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\}" \
                 "list of breakpoints"
 }
 
@@ -80,7 +79,7 @@
     mi_run_cmd
     # The running part has been checked already by mi_run_cmd
         gdb_expect {
-	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
+	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
             pass "run to main"
           }
           -re ".*$mi_gdb_prompt$" {fail "run to main (2)"}
@@ -100,11 +99,11 @@
 
     mi_gdb_test "print/x \$pc" "" ""
     mi_gdb_test "111-data-disassemble -s \$pc -e \"\$pc + 12\" -- 0" \
-	    "111\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\]" \
+	    "111\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\}" \
              "data-disassemble from pc to pc+12 assembly only"
 
     mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -- 0" \
-	    "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
+	    "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \
               "data-disassemble file & line, assembly only"
 }
 
@@ -121,15 +120,15 @@
 
     mi_gdb_test "print/x \$pc" "" ""
     mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 20 -- 0" \
-	    "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
+	    "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \
               "data-disassemble file, line, number assembly only"
 
     mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 0 -- 0" \
-	    "222\\^done,asm_insns=\\\[\\\]" \
+	    "222\\^done,asm_insns=\{\}" \
               "data-disassemble file, line, number (zero lines) assembly only"
 
     mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 50 -- 0" \
-	    "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
+	    "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \
               "data-disassemble file, line, number (more than main lines) assembly only"
 }
 
@@ -145,7 +144,7 @@
     # -data-disassembly -s $pc -e "$pc+8" -- 1
 
     mi_gdb_test "002-data-disassemble -f basics.c -l 21 -- 1" \
-	    "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"21\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
+	    "002\\^done,asm_insns=\{src_and_asm_line=\{line=\"21\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\}\},.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\}\}\}" \
              "data-disassemble file, line assembly mixed"
 
     #
@@ -154,7 +153,7 @@
     # which we are now, even if we have specified that the range is only 2 insns.
     #
     mi_gdb_test "003-data-disassemble -s \$pc -e \"\$pc+4\" -- 1" \
-	    "003\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
+	    "003\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}\}\}" \
              "data-disassemble range assembly mixed"
 }
 
@@ -171,15 +170,15 @@
 
     mi_gdb_test "print/x \$pc" "" ""
     mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 20 -- 1" \
-	    "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
+	    "222\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\}" \
               "data-disassemble file, line, number assembly mixed"
 
     mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 0 -- 1" \
-	    "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"31\",file=\".*basics.c\",line_asm_insn=\\\[\\\]\}\\\]" \
+	    "222\\^done,asm_insns=\{src_and_asm_line=\{line=\"31\",file=\".*basics.c\",line_asm_insn=\{\}\}\}" \
               "data-disassemble file, line, number (zero lines) assembly mixed"
 
     mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 50 -- 1" \
-	    "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\}.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
+	    "222\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\}" \
               "data-disassemble file, line, number (more than main lines) assembly mixed"
 }
 
@@ -222,3 +221,7 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
diff --git a/gdb/testsuite/gdb.mi/mi-eval.exp b/gdb/testsuite/gdb.mi/mi-eval.exp
index 641d768..542d31d 100644
--- a/gdb/testsuite/gdb.mi/mi-eval.exp
+++ b/gdb/testsuite/gdb.mi/mi-eval.exp
@@ -27,7 +27,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -64,7 +63,7 @@
     mi_run_cmd
     # The running part has been checked already by mi_run_cmd
         gdb_expect {
-	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \
+	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \
 		    { pass "run to callee4" }
           -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
           timeout {fail "run to callee4 (timeout 2)"}
@@ -74,7 +73,7 @@
         gdb_expect {
 	    -re "101\\^running\r\n$mi_gdb_prompt" {
 		gdb_expect {
-		    -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"9\"\}\r\n$mi_gdb_prompt$" \
+		    -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"9\"\}\r\n$mi_gdb_prompt$" \
 		    { pass "next in callee4" }
 	    -re ".*$mi_gdb_prompt$" {fail "next in callee4 (2)"}
 	    timeout {fail "next in callee4 (timeout 2)"}
@@ -99,3 +98,8 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
+
diff --git a/gdb/testsuite/gdb.mi/mi-hack-cli.exp b/gdb/testsuite/gdb.mi/mi-hack-cli.exp
index 54b789f..44b7ff3 100644
--- a/gdb/testsuite/gdb.mi/mi-hack-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi-hack-cli.exp
@@ -21,7 +21,6 @@
 # Some basic checks for the CLI.
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -38,3 +37,7 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
diff --git a/gdb/testsuite/gdb.mi/mi-read-memory.exp b/gdb/testsuite/gdb.mi/mi-read-memory.exp
index 5185f5d..871b129 100644
--- a/gdb/testsuite/gdb.mi/mi-read-memory.exp
+++ b/gdb/testsuite/gdb.mi/mi-read-memory.exp
@@ -30,7 +30,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -52,7 +51,7 @@
 gdb_expect {
     -re "101\\^running\r\n$mi_gdb_prompt" {
 	gdb_expect {
-	    -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*mi-read-memory.c\",line=\"20\"\}.*$mi_gdb_prompt$" \
+	    -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*mi-read-memory.c\",line=\"20\"\}.*$mi_gdb_prompt$" \
 		    { pass "do initialization" }
 	    -re ".*$mi_gdb_prompt$" {fail "do initialization (2)"}
 	    timeout {fail "do initialization (timeout 2)"}
@@ -68,33 +67,37 @@
 
 
 mi_gdb_test "2-data-read-memory bytes x 1 3 2" \
-	"2\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x00\",\"0x01\"\\\]},{addr=\"$hex\",data=\\\[\"0x02\",\"0x03\"\\\]},{addr=\"$hex\",data=\\\[\"0x04\",\"0x05\"\\\]}\\\]" \
+	"2\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"0x00\",\"0x01\"}},{addr=\"$hex\",data={\"0x02\",\"0x03\"}},{addr=\"$hex\",data={\"0x04\",\"0x05\"}}}" \
 	"3x2, one byte"
 
 
 mi_gdb_test "9-data-read-memory -o -6 -- -0+bytes+6 x 1 3 2" \
-	"9\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x00\",\"0x01\"\\\]},{addr=\"$hex\",data=\\\[\"0x02\",\"0x03\"\\\]},{addr=\"$hex\",data=\\\[\"0x04\",\"0x05\"\\\]}\\\]" \
+	"9\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"0x00\",\"0x01\"}},{addr=\"$hex\",data={\"0x02\",\"0x03\"}},{addr=\"$hex\",data={\"0x04\",\"0x05\"}}}" \
 	"3x2, one byte offset by -6"
 
 
 mi_gdb_test "3-data-read-memory \"(shorts + 128)\" x 2 1 2" \
-	"3\\^done,addr=\"$hex\",nr-bytes=\"4\",total-bytes=\"4\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x0100\",\"0x0102\"\\\]}\\\]" \
+	"3\\^done,addr=\"$hex\",nr-bytes=\"4\",total-bytes=\"4\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"0x0100\",\"0x0102\"}}}" \
 	"expression in quotes"
 
 
 mi_gdb_test "4-data-read-memory bytes+16 x 1 8 4 x" \
-	"4\\^done,addr=\"$hex\",nr-bytes=\"32\",total-bytes=\"32\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x10\",\"0x11\",\"0x12\",\"0x13\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x14\",\"0x15\",\"0x16\",\"0x17\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x18\",\"0x19\",\"0x1a\",\"0x1b\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x1c\",\"0x1d\",\"0x1e\",\"0x1f\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x20\",\"0x21\",\"0x22\",\"0x23\"\\\],ascii=\" !\\\\\"#\"},{addr=\"$hex\",data=\\\[\"0x24\",\"0x25\",\"0x26\",\"0x27\"\\\],ascii=\"\\$%&'\"},{addr=\"$hex\",data=\\\[\"0x28\",\"0x29\",\"0x2a\",\"0x2b\"\\\],ascii=\"().+\"},{addr=\"$hex\",data=\\\[\"0x2c\",\"0x2d\",\"0x2e\",\"0x2f\"\\\],ascii=\",-\./\"}\\\]" \
+	"4\\^done,addr=\"$hex\",nr-bytes=\"32\",total-bytes=\"32\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"0x10\",\"0x11\",\"0x12\",\"0x13\"},ascii=\"xxxx\"},{addr=\"$hex\",data={\"0x14\",\"0x15\",\"0x16\",\"0x17\"},ascii=\"xxxx\"},{addr=\"$hex\",data={\"0x18\",\"0x19\",\"0x1a\",\"0x1b\"},ascii=\"xxxx\"},{addr=\"$hex\",data={\"0x1c\",\"0x1d\",\"0x1e\",\"0x1f\"},ascii=\"xxxx\"},{addr=\"$hex\",data={\"0x20\",\"0x21\",\"0x22\",\"0x23\"},ascii=\" !\\\\\"#\"},{addr=\"$hex\",data={\"0x24\",\"0x25\",\"0x26\",\"0x27\"},ascii=\"\\$%&'\"},{addr=\"$hex\",data={\"0x28\",\"0x29\",\"0x2a\",\"0x2b\"},ascii=\"().+\"},{addr=\"$hex\",data={\"0x2c\",\"0x2d\",\"0x2e\",\"0x2f\"},ascii=\",-\./\"}}" \
 	"ascii and data"
 
 
 mi_gdb_test "5-data-read-memory shorts+64 d 2 1 1" \
-	"5\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"128\"\\\]}\\\]" \
+	"5\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"128\"}}}" \
 	"decimal"
 
 mi_gdb_test "6-data-read-memory shorts+64 o 2 1 1" \
-	"6\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0200\"\\\]}\\\]" \
+	"6\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"0200\"}}}" \
 	"octal"
 
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-regs.exp
index edb2b23..089b767 100644
--- a/gdb/testsuite/gdb.mi/mi-regs.exp
+++ b/gdb/testsuite/gdb.mi/mi-regs.exp
@@ -27,7 +27,6 @@
 
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -82,7 +81,7 @@
     mi_run_cmd
     # The running part has been checked already by mi_run_cmd
         gdb_expect {
-	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
+	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
             pass "run to main"
           }
           -re ".*$mi_gdb_prompt$" {fail "run to main (2)"}
@@ -116,51 +115,51 @@
     set float2 "\-?\[0-9\]+"
 
     mi_gdb_test "111-data-list-register-names" \
-	    "111\\^done,register-names=\\\[\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\\\]" \
+	    "111\\^done,register-names=\{\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\}" \
 	    "list register names"
 
     mi_gdb_test "222-data-list-register-values x" \
-	    "222\\^done,register-values=\\\[\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\\\]" \
+	    "222\\^done,register-values=\{\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\}" \
 	    "register values x"
 
     mi_gdb_test "333-data-list-register-values f" \
-	    "333\\^done,register-values=\\\[\{number=\"0\",value=\"$float\"\},\{number=\"1\",value=\"$float\"\},.*\{number=\"71\",value=\"$float\"\}\\\]" \
+	    "333\\^done,register-values=\{\{number=\"0\",value=\"$float\"\},\{number=\"1\",value=\"$float\"\},.*\{number=\"71\",value=\"$float\"\}\}" \
 	    "register values f"
 
     mi_gdb_test "444-data-list-register-values d" \
-	    "444\\^done,register-values=\\\[\{number=\"0\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\\\]" \
+	    "444\\^done,register-values=\{\{number=\"0\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\}" \
 	    "register values d"
 
     mi_gdb_test "555-data-list-register-values o" \
-	    "555\\^done,register-values=\\\[\{number=\"0\",value=\"$octal\"\}.*\{number=\"71\",value=\"$octal\"\}\\\]" \
+	    "555\\^done,register-values=\{\{number=\"0\",value=\"$octal\"\}.*\{number=\"71\",value=\"$octal\"\}\}" \
 	    "register values o"
 
     mi_gdb_test "666-data-list-register-values t" \
-	    "666\\^done,register-values=\\\[\{number=\"0\",value=\"$binary\"\}.*\{number=\"71\",value=\"$binary\"\}\\\]" \
+	    "666\\^done,register-values=\{\{number=\"0\",value=\"$binary\"\}.*\{number=\"71\",value=\"$binary\"\}\}" \
 	    "register values t"
 
     # On the sparc, registers 0-31 are int, 32-63 float, 64-71 int
 
     mi_gdb_test "777-data-list-register-values N" \
-	    "777\\^done,register-values=\\\[\{number=\"0\",value=\"$decimal\"\}.*\{number=\"31\",value=\"$decimal\"\},\{number=\"32\",value=\"$float\"\}.*\{number=\"63\",value=\"$float\"\},\{number=\"64\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\\\]" \
+	    "777\\^done,register-values=\{\{number=\"0\",value=\"$decimal\"\}.*\{number=\"31\",value=\"$decimal\"\},\{number=\"32\",value=\"$float\"\}.*\{number=\"63\",value=\"$float\"\},\{number=\"64\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\}" \
 	    "register values N"
 
     mi_gdb_test "888-data-list-register-values r" \
-	    "888\\^done,register-values=\\\[\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\\\]" \
+	    "888\\^done,register-values=\{\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\}" \
 	    "register values r"
 
     mi_gdb_test "999-data-list-register-names 68 69 70 71" \
-	    "999\\^done,register-names=\\\[\"pc\",\"npc\",\"fpsr\",\"cpsr\"\\\]" \
+	    "999\\^done,register-names=\{\"pc\",\"npc\",\"fpsr\",\"cpsr\"\}" \
 	    "list names of some regs"
 
     mi_gdb_test "001-data-list-register-values x 68 69 70 71" \
-	    "001\\^done,register-values=\\\[\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\\\]" \
+	    "001\\^done,register-values=\{\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\}" \
 	    "list values of some regs"
 
     # Don't know how useful this test is
 
     mi_gdb_test "002-data-list-changed-registers" \
-	    "002\\^done,changed-registers=\\\[\"1\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"30\",\"31\",\"65\",\"68\",\"69\"\\\]" \
+	    "002\\^done,changed-registers=\{\"1\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"30\",\"31\",\"65\",\"68\",\"69\"\}" \
 	    "list changed registers"
 }
 
@@ -175,3 +174,10 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
+
+
+
diff --git a/gdb/testsuite/gdb.mi/mi-return.exp b/gdb/testsuite/gdb.mi/mi-return.exp
index f1cb609..57ea05e 100644
--- a/gdb/testsuite/gdb.mi/mi-return.exp
+++ b/gdb/testsuite/gdb.mi/mi-return.exp
@@ -27,7 +27,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -57,7 +56,7 @@
     mi_run_cmd
 
     gdb_expect {
-	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
+	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
 	    pass "run to callee4"
 	}
 	timeout {
@@ -77,7 +76,7 @@
 
     send_gdb "111-exec-return\n"
     gdb_expect {
-	-re "111\\^done,frame=\{level=\"0 \",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"}
+	-re "111\\^done,frame=\{level=\"0 \",addr=\"$hex\",func=\"callee3\",args=\{.*\},file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"}
 	-re ".*\r\n$mi_gdb_prompt$" { fail "return from callee4 now" }
 	timeout { fail "return from callee4 now (timeout)"
 	}
@@ -89,3 +88,7 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End:
diff --git a/gdb/testsuite/gdb.mi/mi-simplerun.exp b/gdb/testsuite/gdb.mi/mi-simplerun.exp
index 20ee341..636f60d 100644
--- a/gdb/testsuite/gdb.mi/mi-simplerun.exp
+++ b/gdb/testsuite/gdb.mi/mi-simplerun.exp
@@ -29,7 +29,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -78,7 +77,7 @@
              "insert breakpoint at \"<fullfilename>\":6 (callee4)"
 
     mi_gdb_test "204-break-list" \
-	    "204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
+                "204\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
                 "list of breakpoints"
 
     mi_gdb_test "205-break-disable 2 3 4" \
@@ -86,7 +85,7 @@
                 "disabling of breakpoints"
 
     mi_gdb_test "206-break-info 2" \
-	    "206\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"2\",.*,enabled=\"n\",.*\}\\\]\}" \
+                "206\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"2\",.*,enabled=\"n\",.*\}\}" \
                 "list of breakpoints, 16 disabled"
 }
 
@@ -104,7 +103,7 @@
     # The following is equivalent to a send_gdb "000-exec-run\n"
     mi_run_cmd
     gdb_expect {
-	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
+	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
 	    pass "run to main"
 	}
 	timeout {
@@ -130,7 +129,7 @@
     # two prompts involved and this can lead to a race condition.
     send_gdb "220-exec-next\n"
     gdb_expect {
-	-re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"33\"\}\r\n$mi_gdb_prompt$" {
+	-re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"33\"\}\r\n$mi_gdb_prompt$" {
 	    pass "next at main"
 	}
 	timeout {
@@ -143,7 +142,7 @@
     # NOTE: The ``\\\\\"'' is for \".
     send_gdb "221-exec-step\n"
     gdb_expect {
-	-re "221\\^running\r\n${mi_gdb_prompt}221\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee1\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\],file=\".*basics.c\",line=\"27\"\}\r\n$mi_gdb_prompt$" {
+	-re "221\\^running\r\n${mi_gdb_prompt}221\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee1\",args=\{\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\},file=\".*basics.c\",line=\"27\"\}\r\n$mi_gdb_prompt$" {
             pass "step at main"
 	}
 	timeout {
@@ -155,7 +154,7 @@
     #        we should look for the right thing here.
     send_gdb "222-exec-step 3\n"
     gdb_expect 30 {
-	-re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
+	-re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
             pass "step to callee4"
 	}
 	timeout {
@@ -168,7 +167,7 @@
     # NOTE: The ``.'' is part of ``gdb-result-var="$1"''
     send_gdb "223-exec-finish\n"
     gdb_expect 30 {
-	-re "223\\^running\r\n${mi_gdb_prompt}223\\*stopped,reason=\"function-finished\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\},gdb-result-var=\".1\",return-value=\"0\"\r\n$mi_gdb_prompt$" {
+	-re "223\\^running\r\n${mi_gdb_prompt}223\\*stopped,reason=\"function-finished\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee3\",args=\{.*\},file=\".*basics.c\",line=\"18\"\},gdb-result-var=\".1\",return-value=\"0\"\r\n$mi_gdb_prompt$" {
             pass "exec-finish"
 	}
 	timeout {
@@ -225,3 +224,9 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
+
+
diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp
index 8b41551..045e981 100644
--- a/gdb/testsuite/gdb.mi/mi-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi-stack.exp
@@ -27,7 +27,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -54,7 +53,7 @@
 mi_run_cmd
 # The running part has been checked already by mi_run_cmd
 gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
+    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
 	pass "run to callee4"
     }
     -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
@@ -73,13 +72,13 @@
     # -stack-list-frames 1 3
 
     mi_gdb_test "231-stack-list-frames" \
-	    "231\\^done,stack=\\\[frame=\{level=\"0 \",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4 \",addr=\"$hex\",func=\"main\",.*\}\\\]" \
+	    "231\\^done,stack=\{frame=\{level=\"0 \",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4 \",addr=\"$hex\",func=\"main\",.*\}\}" \
                 "stack frame listing"
     mi_gdb_test "232-stack-list-frames 1 1" \
-	    "232\\^done,stack=\\\[frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \
+	    "232\\^done,stack=\{frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\}\}" \
                 "stack frame listing 1 1"
     mi_gdb_test "233-stack-list-frames 1 3" \
-	    "233\\^done,stack=\\\[frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \
+	    "233\\^done,stack=\{frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\}\}" \
                 "stack frame listing 1 3"
 
     mi_gdb_test "234-stack-list-frames 1" \
@@ -102,27 +101,27 @@
     # -stack-list-arguments 
 
     mi_gdb_test "231-stack-list-arguments 0" \
-	    "231\\^done,stack-args=\\\[frame=\{level=\"0\",args=\\\[\\\]\},frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\},frame=\{level=\"2\",args=\\\[name=\"intarg\",name=\"strarg\"\\\]\},frame=\{level=\"3\",args=\\\[name=\"intarg\",name=\"strarg\",name=\"fltarg\"\\\]\},frame=\{level=\"4\",args=\\\[\\\]\}\\\]" \
+	    "231\\^done,stack-args=\{frame=\{level=\"0\",args=\{\}\},frame=\{level=\"1\",args=\{name=\"strarg\"\}\},frame=\{level=\"2\",args=\{name=\"intarg\",name=\"strarg\"\}\},frame=\{level=\"3\",args=\{name=\"intarg\",name=\"strarg\",name=\"fltarg\"\}\},frame=\{level=\"4\",args=\{\}\}\}" \
                 "stack args listing 0"
 
     mi_gdb_test "232-stack-list-arguments 0 1 1" \
-	    "232\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\}\\\]" \
+	    "232\\^done,stack-args=\{frame=\{level=\"1\",args=\{name=\"strarg\"\}\}\}" \
                 "stack args listing 0 1 1"
 
     mi_gdb_test "233-stack-list-arguments 0 1 3" \
-	    "233\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\},frame=\{level=\"2\",args=\\\[name=\"intarg\",name=\"strarg\"\\\]\},frame=\{level=\"3\",args=\\\[name=\"intarg\",name=\"strarg\",name=\"fltarg\"\\\]\}\\\]" \
+	    "233\\^done,stack-args=\{frame=\{level=\"1\",args=\{name=\"strarg\"\}\},frame=\{level=\"2\",args=\{name=\"intarg\",name=\"strarg\"\}\},frame=\{level=\"3\",args=\{name=\"intarg\",name=\"strarg\",name=\"fltarg\"\}\}\}" \
                 "stack args listing 0 1 3"
 
     mi_gdb_test "231-stack-list-arguments 1" \
-	    "231\\^done,stack-args=\\\[frame=\{level=\"0\",args=\\\[\\\]\},frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\},frame=\{level=\"4\",args=\\\[\\\]\}\\\]" \
+	    "231\\^done,stack-args=\{frame=\{level=\"0\",args=\{\}\},frame=\{level=\"1\",args=\{\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\},frame=\{level=\"2\",args=\{\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\},frame=\{level=\"3\",args=\{\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\}\},frame=\{level=\"4\",args=\{\}\}\}" \
                 "stack args listing 1"
 
     mi_gdb_test "232-stack-list-arguments 1 1 1" \
-	    "232\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\}\\\]" \
+	    "232\\^done,stack-args=\{frame=\{level=\"1\",args=\{\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\}\}" \
                 "stack args listing 1 1 1"
 
     mi_gdb_test "233-stack-list-arguments 1 1 3" \
-	    "233\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\}\\\]" \
+	    "233\\^done,stack-args=\{frame=\{level=\"1\",args=\{\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\},frame=\{level=\"2\",args=\{\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\},frame=\{level=\"3\",args=\{\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\}\}\}" \
                 "stack args listing 1 1 3"
 
     mi_gdb_test "234-stack-list-arguments" \
@@ -168,20 +167,20 @@
     # -stack-list-arguments 
 
     mi_gdb_test "232-stack-list-locals 0" \
-	    "232\\^done,locals=\\\[name=\"A\",name=\"B\",name=\"C\"\\\]" \
+	    "232\\^done,locals=\{name=\"A\",name=\"B\",name=\"C\"\}" \
                 "stack locals listing 0"
 
 # step until A, B, C, have some reasonable values.
 send_gdb "-exec-next 3\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
 	pass "next's in callee4"
     }
     timeout { fail "next in callee4 (timeout)" }
 }
 
     mi_gdb_test "232-stack-list-locals 1" \
-	    "232\\^done,locals=\\\[\{name=\"A\",value=\"1\"\},\{name=\"B\",value=\"2\"\},\{name=\"C\",value=\"3\"\}\\\]" \
+	    "232\\^done,locals=\{\{name=\"A\",value=\"1\"\},\{name=\"B\",value=\"2\"\},\{name=\"C\",value=\"3\"\}\}" \
                 "stack locals listing 1"
 
     mi_gdb_test "234-stack-list-locals" \
@@ -193,7 +192,7 @@
                 "stack select frame 1"
 
     mi_gdb_test "232-stack-list-locals 1" \
-	    "232\\^done,locals=\\\[\\\]" \
+	    "232\\^done,locals=\{\}" \
                 "stack locals listing for new frame"
 
 # this should be a no-op
@@ -203,7 +202,7 @@
                 "stack select same frame"
 
     mi_gdb_test "232-stack-list-locals 1" \
-	    "232\\^done,locals=\\\[\\\]" \
+	    "232\\^done,locals=\{\}" \
                 "stack locals for same frame (level 1)"
 
 }
@@ -216,3 +215,8 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
+
diff --git a/gdb/testsuite/gdb.mi/mi-stepi.exp b/gdb/testsuite/gdb.mi/mi-stepi.exp
index 87c93af..a67d742 100644
--- a/gdb/testsuite/gdb.mi/mi-stepi.exp
+++ b/gdb/testsuite/gdb.mi/mi-stepi.exp
@@ -27,7 +27,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -57,7 +56,7 @@
     mi_run_cmd
 
     gdb_expect {
-	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
+	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
 	    pass "run to main"
 	}
 	timeout {
@@ -72,7 +71,7 @@
 
     send_gdb "111-exec-step-instruction\n"
     gdb_expect {
-	-re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
+	-re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
 	    pass "step-instruction at main"
 	}
 	timeout {
@@ -81,7 +80,7 @@
     }
     send_gdb "222-exec-next-instruction\n"
     gdb_expect {
-	-re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
+	-re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
 	    pass "next-instruction at main"
 	}
 	timeout {
@@ -90,7 +89,7 @@
     }
     send_gdb "333-exec-next-instruction\n"
     gdb_expect {
-	-re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
+	-re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
 	    pass "next-instruction at main"
 	}
 	timeout {
@@ -104,3 +103,8 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End:
+
diff --git a/gdb/testsuite/gdb.mi/mi-until.exp b/gdb/testsuite/gdb.mi/mi-until.exp
index 57b92e2..cf3c21d 100644
--- a/gdb/testsuite/gdb.mi/mi-until.exp
+++ b/gdb/testsuite/gdb.mi/mi-until.exp
@@ -27,7 +27,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -57,7 +56,7 @@
     mi_run_cmd
 
     gdb_expect {
-	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"10\"\}\r\n$mi_gdb_prompt$" {
+	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\{\},file=\".*until.c\",line=\"10\"\}\r\n$mi_gdb_prompt$" {
 	    pass "run to main"
 	}
 	timeout {
@@ -75,7 +74,7 @@
 
     send_gdb "111-exec-until\n"
     gdb_expect {
-	-re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"12\"\}\r\n$mi_gdb_prompt$" {
+	-re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\{\},file=\".*until.c\",line=\"12\"\}\r\n$mi_gdb_prompt$" {
 	    pass "until after while loop"
 	}
 	timeout {
@@ -85,7 +84,7 @@
 
     send_gdb "222-exec-until 15\n"
     gdb_expect {
-	-re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"location-reached\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"15\"\}\r\n$mi_gdb_prompt$" {
+	-re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"location-reached\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\{\},file=\".*until.c\",line=\"15\"\}\r\n$mi_gdb_prompt$" {
 	    pass "until line number"
 	}
 	timeout {
@@ -95,7 +94,7 @@
 
     send_gdb "333-exec-until until.c:17\n"
     gdb_expect {
-	-re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"location-reached\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"17\"\}\r\n$mi_gdb_prompt$" {
+	-re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"location-reached\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\{\},file=\".*until.c\",line=\"17\"\}\r\n$mi_gdb_prompt$" {
 	    pass "until line number:file"
 	}
 	timeout {
@@ -107,7 +106,7 @@
 
     send_gdb "444-exec-until until.c:25\n"
     gdb_expect {
-	-re "444\\^running\r\n${mi_gdb_prompt}444\\*stopped,reason=\"location-reached\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*until.c\",line=\"24\"\}\r\n$mi_gdb_prompt$" {
+	-re "444\\^running\r\n${mi_gdb_prompt}444\\*stopped,reason=\"location-reached\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*until.c\",line=\"24\"\}\r\n$mi_gdb_prompt$" {
 	    pass "until after current function"
 	}
 	timeout {
@@ -122,3 +121,7 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End:
diff --git a/gdb/testsuite/gdb.mi/mi-var-block.exp b/gdb/testsuite/gdb.mi/mi-var-block.exp
index 4b8eb95..539a58d 100644
--- a/gdb/testsuite/gdb.mi/mi-var-block.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-block.exp
@@ -24,7 +24,6 @@
 
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -49,7 +48,7 @@
 mi_run_cmd
 # The running part has been checked already by mi_run_cmd
 gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"154\"\}\r\n$mi_gdb_prompt$" {
+    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"154\"\}\r\n$mi_gdb_prompt$" {
 	pass "run to do_block_tests"
     }
     -re ".*$mi_gdb_prompt$" {fail "run to do_block_tests (2)"}
@@ -69,7 +68,7 @@
 # step to "foo = 123;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"158\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"158\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_block_tests"
     }
     timeout {
@@ -93,7 +92,7 @@
 # step to "foo2 = 123;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"161\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"161\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_block_tests"
     }
     timeout {
@@ -110,7 +109,7 @@
 # step to "foo = 321;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"164\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"164\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_block_tests"
     }
     timeout {
@@ -127,7 +126,7 @@
 # step to "foo2 = 0;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"166\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"166\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_block_tests"
     }
     timeout { fail "step at do_block_tests (timeout)" }
@@ -165,7 +164,7 @@
 # step to "foo = 0;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"168\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"168\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_block_tests"
     }
     timeout { fail "step at do_block_tests (timeout)" }
@@ -182,7 +181,7 @@
 # step to "cb = 21;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"171\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"171\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_block_tests"
     }
     timeout { fail "step at do_block_tests (timeout)" }
@@ -226,3 +225,9 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End:
+
+
diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp
index 3970168..9aafced 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child.exp
@@ -24,7 +24,6 @@
 
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -49,7 +48,7 @@
 mi_run_cmd
 # The running part has been checked already by mi_run_cmd
 gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"190\"\}\r\n$mi_gdb_prompt$" {
+    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"190\"\}\r\n$mi_gdb_prompt$" {
 	pass "run to do_children_tests"
     }
     -re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
@@ -72,7 +71,7 @@
 # Test: c_variable-4.3
 # Desc: children of struct_declarations
 mi_gdb_test "-var-list-children struct_declarations" \
-	"\\^done,numchild=\"11\",children=\{child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
+	"\\^done,numchild=\"11\",children=\{child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
 	"get children of struct_declarations"
 
 #gdbtk_test c_variable-4.3 {children of struct_declarations} {
@@ -112,13 +111,13 @@
 # Test: c_variable-4.9
 # Desc: children of struct_declarations.char_ptr
 mi_gdb_test "-var-list-children struct_declarations.char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
+	"\\^done,numchild=\"0\"" \
 	"get children of struct_declarations.char_ptr"
 
 # Test: c_variable-4.10
 # Desc: number of children of struct_declarations.char_ptr
 mi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \
-	"\\^done,numchild=\"1\"" \
+	"\\^done,numchild=\"0\"" \
 	"get number of children of struct_declarations.char_ptr"
 
 # Test: c_variable-4.11
@@ -205,7 +204,7 @@
 # Test: c_variable-4.23
 # Desc: children of struct_declarations.u1
 mi_gdb_test "-var-list-children struct_declarations.u1" \
-	"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\}" \
+	"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\}" \
 	"get children of struct_declarations.u1"
 
 # Test: c_variable-4.24
@@ -354,13 +353,13 @@
 # Test: c_variable-4.47
 # Desc: children of struct_declarations.u1.b
 mi_gdb_test "-var-list-children struct_declarations.u1.b" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.u1.b.\\*b\",exp=\"\\*b\",numchild=\"0\",type=\"char\"\}\}" \
+	"\\^done,numchild=\"0\"" \
 	"get children of struct_declarations.u1.b"
 
 # Test: c_variable-4.48
 # Desc: number of children of struct_declarations.u1.b
 mi_gdb_test "-var-info-num-children struct_declarations.u1.b" \
-	"\\^done,numchild=\"1\"" \
+	"\\^done,numchild=\"0\"" \
 	"get number of children of struct_declarations.u1.b"
 
 # Test: c_variable-4.49
@@ -567,7 +566,7 @@
 # Step to "struct_declarations.integer = 123;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"192\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"192\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -585,7 +584,7 @@
 # Test: c_variable-4.82
 # Desc: children of weird
 mi_gdb_test "-var-list-children weird" \
-	"\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
+	"\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
 	"get children of weird"
 
 # Test: c_variable-4.83
@@ -774,7 +773,7 @@
 # Step over "struct_declarations.integer = 123;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"193\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"193\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -795,7 +794,7 @@
 
 send_gdb "-exec-step 3\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"196\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"196\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -806,13 +805,13 @@
 # Test: c_variable-5.3
 # Desc: check that char_ptr changed
 mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+	"\\^done,changelist=\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
 	"update all vars struct_declarations.char_ptr"
 
 # Step over "struct_declarations.int_ptr_ptr = &foo;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"197\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"197\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -829,7 +828,7 @@
 # Step over "weird->long_array[0] = 1234;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"198\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"198\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -846,7 +845,7 @@
 # Step over "struct_declarations.long_array[1] = 2345;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"199\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"199\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -863,7 +862,7 @@
 # Step over "weird->long_array[2] = 3456;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"200\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"200\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -887,7 +886,7 @@
 #    struct_declarations.long_array[9] = 1234;
 send_gdb "-exec-step 7\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"208\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"208\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -905,7 +904,7 @@
 # Step over "weird->func_ptr = nothing;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"211\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"211\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -921,7 +920,7 @@
 
 # Delete all variables
 mi_gdb_test "-var-delete struct_declarations" \
-	"\\^done,ndeleted=\"65\"" \
+	"\\^done,ndeleted=\"63\"" \
 	"delete var struct_declarations"
 
 mi_gdb_test "-var-delete weird->int_ptr_ptr" \
@@ -933,7 +932,7 @@
 #   psnp = &snp0;
 send_gdb "-exec-step 43\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"254\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"254\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -974,13 +973,7 @@
 # Test: c_variable-5.15
 # Desc: children of *(*(psnp->char_ptr))
 mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \
-	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
-
-# Test: c_variable-5.15B
-# Desc: children of *(*(*(psnp->char_ptr)))
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
+	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char \\*\"\}\}" \
 	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
 
 # Test: c_variable-5.16
@@ -992,27 +985,15 @@
 # Test: c_variable-5.17
 # Desc: children of *(*(*(psnp->char_ptr)))
 mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
+	"\\^done,numchild=\"0\"" \
 	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
 
 # Test: c_variable-5.18
 # Desc: number of children of *(*(*(psnp->char_ptr)))
 mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
-	"\\^done,numchild=\"1\"" \
+	"\\^done,numchild=\"0\"" \
 	"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
 
-# Test: c_variable-5.17B
-# Desc: children of *(*(*(*(psnp->char_ptr))))
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"
-
-# Test: c_variable-5.18B
-# Desc: number of children of *(*(*(*(psnp->char_ptr))))
-mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"
-
 
 # Test: c_variable-5.19
 # Desc: create psnp->long_ptr
@@ -1157,13 +1138,7 @@
 # Test: c_variable-5.41
 # Desc: children of **psnp->ptrs[0]->next->char_ptr
 mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \
-	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
-
-# Test: c_variable-5.41B
-# Desc: children of ***psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
+	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char \\*\"\}\}" \
 	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
 
 # Test: c_variable-5.42
@@ -1175,24 +1150,12 @@
 # Test: c_variable-5.43
 # Desc: children of ***psnp->ptrs[0]->next->char_ptr
 mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
+	"\\^done,numchild=\"0\"" \
 	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
 
 # Test: c_variable-5.44
 # Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
 mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
-
-# Test: c_variable-5.43B
-# Desc: children of ****psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
-
-# Test: c_variable-5.44B
-# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
 	"\\^done,numchild=\"0\"" \
 	"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
 
@@ -1211,7 +1174,7 @@
 #  Step over "snp0.char_ptr = &b3;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"255\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"255\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -1222,13 +1185,13 @@
 # Test: c_variable-5.47
 # Desc: check that psnp->char_ptr (and [0].char_ptr) changed
 mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+	"\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
 	"update all vars psnp->char_ptr (and 0.char_ptr) changed"
 
 #  Step over "snp1.char_ptr = &c3;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"256\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"256\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -1240,14 +1203,14 @@
 # Test: c_variable-5.48
 # Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
 mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
+	"\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
 	"update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
 
 
 #  Step over "snp2.char_ptr = &a3;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"257\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"257\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -1266,7 +1229,7 @@
 #  Step over "snp0.long_ptr = &y3;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"258\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"258\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -1284,7 +1247,7 @@
 #  Step over "snp1.long_ptr = &x3;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"259\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"259\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -1309,7 +1272,7 @@
 #  Step over "snp2.long_ptr = &z3;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_children_tests"
     }
     timeout {
@@ -1329,3 +1292,7 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End:
diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
index 66b8cb6..f1fcedd 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
@@ -24,7 +24,6 @@
 
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -77,7 +76,7 @@
 mi_run_cmd
 # The running part has been checked already by mi_run_cmd
 gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"106\"\}\r\n$mi_gdb_prompt$" {
+    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"106\"\}\r\n$mi_gdb_prompt$" {
 	pass "run to do_locals_tests"
     }
     -re ".*$mi_gdb_prompt$" {fail "run todo_locals_tests (2)"}
@@ -182,7 +181,7 @@
 # Step over "linteger = 1234;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"107\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"107\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_locals_tests"
     }
     timeout {
@@ -199,7 +198,7 @@
 # Step over "lpinteger = &linteger;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"108\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"108\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_locals_tests"
     }
     timeout {
@@ -216,7 +215,7 @@
 # Step over "lcharacter = 'a';"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"109\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"109\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_locals_tests"
     }
     timeout {
@@ -233,7 +232,7 @@
 # Step over "lpcharacter = &lcharacter;"
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"110\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"110\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_locals_tests"
     }
     timeout {
@@ -261,7 +260,7 @@
 
 send_gdb "-exec-step 9\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"119\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"119\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_locals_tests"
     }
     timeout {
@@ -284,7 +283,7 @@
 
 send_gdb "-exec-step 4\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"125\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"125\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_locals_tests"
     }
     timeout {
@@ -310,7 +309,7 @@
 
 send_gdb "-exec-step 8\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"133\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"133\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at do_locals_tests"
     }
     timeout {
@@ -434,7 +433,7 @@
 	"break-insert subroutine1"
 send_gdb "-exec-continue\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\\\[\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}\\\],file=\".*var-cmd.c\",line=\"146\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\{\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}\},file=\".*var-cmd.c\",line=\"146\"\}\r\n$mi_gdb_prompt$" {
 	pass "continue to subroutine1"
     }
     timeout {
@@ -460,7 +459,7 @@
 
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\\\[\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}\\\],file=\".*var-cmd.c\",line=\"147\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\{\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}\},file=\".*var-cmd.c\",line=\"147\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at subroutine1"
     }
     timeout {
@@ -483,7 +482,7 @@
 
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\\\[\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}\\\],file=\".*var-cmd.c\",line=\"148\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\{\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}\},file=\".*var-cmd.c\",line=\"148\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at subroutine1"
     }
     timeout { fail "step at subroutine1 (timeout)" }
@@ -497,7 +496,7 @@
 
 send_gdb "-exec-step\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\\\[\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}\\\],file=\".*var-cmd.c\",line=\"149\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\{\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}\},file=\".*var-cmd.c\",line=\"149\"\}\r\n$mi_gdb_prompt$" {
 	pass "step at subroutine1"
     }
     timeout { fail "step at subroutine1 (timeout)" }
@@ -511,7 +510,7 @@
 
 send_gdb "-exec-next\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"136\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"136\"\}\r\n$mi_gdb_prompt$" {
 	pass "next out of subroutine1"
     }
     timeout { fail "next out of subroutine1 (timeout)" }
@@ -603,3 +602,8 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End:
+
diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp
index e84a1b7..4f231d0 100644
--- a/gdb/testsuite/gdb.mi/mi-var-display.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-display.exp
@@ -24,7 +24,6 @@
 
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -49,7 +48,7 @@
 mi_run_cmd
 # The running part has been checked already by mi_run_cmd
 gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
+    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
 	pass "run to do_children_tests"
     }
     -re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
@@ -330,7 +329,7 @@
 
 send_gdb "-exec-continue\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\{\},file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" {
 	pass "continue to do_special_tests"
     }
     timeout {
@@ -588,7 +587,7 @@
 	"break-insert operation"
 send_gdb "-exec-continue\n"
 gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
+    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\{\{name=\"a\",value=\"2\.*\"\}\},file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
 	pass "continue to incr_a"
     }
     timeout {
@@ -619,3 +618,11 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End:
+
+
+
+
diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp
index 7a09bd8..5b8908a 100644
--- a/gdb/testsuite/gdb.mi/mi-watch.exp
+++ b/gdb/testsuite/gdb.mi/mi-watch.exp
@@ -29,7 +29,6 @@
 #
 
 load_lib mi-support.exp
-set MIFLAGS "-i=mi"
 
 gdb_exit
 if [mi_gdb_start] {
@@ -62,7 +61,7 @@
              "break-watch operation"
 
     mi_gdb_test "222-break-list" \
-	    "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\\\]\}" \
+                "222\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\}" \
                 "list of watchpoints"
 
 }
@@ -83,7 +82,7 @@
              "break-watch -a operation"
 
     mi_gdb_test "444-break-list" \
-	    "444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \
+                "444\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
                 "list of watchpoints awatch"
 
     mi_gdb_test "777-break-delete 3" \
@@ -107,7 +106,7 @@
              "break-insert -r operation"
 
     mi_gdb_test "300-break-list" \
-	    "300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\}\}" \
+                "300\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
                 "list of breakpoints"
 
     mi_gdb_test "177-break-delete 4" \
@@ -133,7 +132,7 @@
     mi_run_cmd
     # The running part has been checked already by mi_run_cmd
         gdb_expect {
-	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \
+	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \
 		    { pass "run to callee4" }
           -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
           timeout {fail "run to callee4 (timeout 2)"}
@@ -154,7 +153,7 @@
     gdb_expect {
       -re "222\\^running\r\n$mi_gdb_prompt" {
         gdb_expect {
-	    -re "222\\*stopped,reason=\"watchpoint-trigger\",wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\},thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
+	    -re "222\\*stopped,reason=\"watchpoint-trigger\",wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\},thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
             pass "watchpoint trigger"
           }
           -re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (2)"}
@@ -169,7 +168,7 @@
     gdb_expect {
       -re "223\\^running\r\n$mi_gdb_prompt" {
         gdb_expect {
-	    -re "\[\r\n\]*223\\*stopped,reason=\"watchpoint-scope\",wpnum=\"2\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {
+	    -re "\[\r\n\]*223\\*stopped,reason=\"watchpoint-scope\",wpnum=\"2\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee3\",args=\{.*\},file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {
             pass "wp out of scope"
           }
           -re ".*$mi_gdb_prompt$" {fail "wp out of scope (2)"}
@@ -189,3 +188,8 @@
 
 mi_gdb_exit
 return 0
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
+
diff --git a/gdb/testsuite/gdb.mi/mi0-basics.exp b/gdb/testsuite/gdb.mi/mi0-basics.exp
deleted file mode 100644
index d463244..0000000
--- a/gdb/testsuite/gdb.mi/mi0-basics.exp
+++ /dev/null
@@ -1,174 +0,0 @@
-#   Copyright 1999, 2000 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 basic Machine interface (MI) operations
-#
-# Verify that, using the MI, we can load a program and do
-# other basic things that are used by all test files through  mi_gdb_exit,
-# mi_gdb_start, mi_delete_breakpoints, mi_gdb_reinitialize_dir and
-# mi_gdb_load, so we can safely use those.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but the command syntax and correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-# In this file we want to test if the operations needed by the following
-# procedures work, so it makes no sense using them here.
-
-# mi_delete_breakpoints
-# mi_gdb_reinitialize_dir $srcdir/$subdir
-# mi_gdb_load ${binfile}
-
-# Test if the MI interpreter has been configured
-
-proc test_mi_interpreter_selection {} {
-    global mi_gdb_prompt
-    global gdb_prompt
-
-    # All this test expects is to get the prompt back
-    # with no syntax error message
-    send_gdb "-gdb-version\n"
-    gdb_expect {
-           -re "GNU gdb .*\r\n$mi_gdb_prompt$" \
-               { pass "acceptance of MI operations" 
-                 return 1}
-           -re ".*\r\n$mi_gdb_prompt$" \
-               { fail "acceptance of MI operations"
-                 note "Skipping all other MI tests." }
-           -re "Undefined command.*$gdb_prompt $" \
-               { fail "acceptance of MI operations"
-                 note "Skipping all other MI tests." }
-           -re ".*$gdb_prompt $" \
-               { fail "acceptance of MI operations"
-                 note "Skipping all other MI tests." }
-           timeout { fail "acceptance of MI operations (timeout)"
-                     note "Skipping all other MI tests." }
-    }
-    return 0
-}
-
-proc test_exec_and_symbol_mi_operatons {} {
-    global mi_gdb_prompt
-    global binfile
-
-    # Load symbols and specify executable on a single operation
-    # Tests:
-    # -file-exec-and-symbols
-
-    # Can't use mi_gdb_test as if this doesn't work,
-    #  we must give up on the whole test file
-    send_gdb "-file-exec-and-symbols ${binfile}\n"
-    gdb_expect {
-           -re "\[\r\n\]*\\\^done\r\n$mi_gdb_prompt$" \
-               { pass "file-exec-and-symbols operation" }
-           timeout { fail "file-exec-and-symbols operation (timeout)"
-                     note "Skipping all other MI tests."
-                     return 0}
-    }
-
-    # The following is not used by mi-support.exp, but we test here so
-    # we get done with loading a program basics.
-
-    # Do it again, but now load symbols and specify executable with
-    # two separate operations
-    # Tests:
-    # -file-clear
-    # -file-exec-file
-    # -file-symbol-file
-
-    # FIXME: file-clear is not implemented yet.
-#   mi_gdb_test "-file-clear" \
-#            "\\\^done" \
-#            "file-clear operation"
-
-    mi_gdb_test "-file-exec-file ${binfile}" \
-             "\\\^done" \
-             "file-exec-file operation"
-
-    mi_gdb_test "-file-symbol-file ${binfile}" \
-             "\\\^done" \
-             "file-symbol-file operation"
-
-    # FIXME: if we cannot load we have to skip all other tests.
-}
-
-proc test_breakpoints_deletion {} {
-    global mi_gdb_prompt
-    global srcfile
-
-    # Clear all breakpoints and list to confirm
-    # Tests:
-    # -break-delete (all)
-    # -break-list
-
-    # The all parameter is actually no parameter.
-    mi_gdb_test "200-break-delete" \
-             "\\\^done" \
-             "break-delete (all) operation"
-
-    mi_gdb_test "201-break-list" \
-             ".*\\\^done,BreakpointTable=\\\{\\\}" \
-             "all breakpoints removed"
-}
-
-proc test_dir_specification {} {
-    global mi_gdb_prompt
-    global srcdir
-    global subdir
-
-    # Clear the search directories, then specify one to be searched
-    # Tests:
-    # -environment-directory
-    # -environment-directory arg
-
-#exp_internal 1
-    mi_gdb_test "202-environment-directory" \
-             "\\\^done" \
-             "environment-directory operation"
-
-    mi_gdb_test "203-environment-directory ${srcdir}/${subdir}" \
-             "\\\^done" \
-             "environment-directory arg operation"
-#exp_internal 0
-}
-
-if [test_mi_interpreter_selection] {
-  test_exec_and_symbol_mi_operatons
-  test_breakpoints_deletion
-  test_dir_specification
-}
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-break.exp b/gdb/testsuite/gdb.mi/mi0-break.exp
deleted file mode 100644
index b763587..0000000
--- a/gdb/testsuite/gdb.mi/mi0-break.exp
+++ /dev/null
@@ -1,138 +0,0 @@
-#   Copyright 1999 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 essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_tbreak_creation_and_listing {} {
-    global mi_gdb_prompt
-    global srcfile
-    global hex
-
-    # Insert some breakpoints and list them
-    # Also, disable some so they do not interfere with other tests
-    # Tests:
-    # -break-insert -t main
-    # -break-insert -t basics.c:callee2
-    # -break-insert -t basics.c:15
-    # -break-insert -t srcfile:6
-    # -break-list
-
-    mi_gdb_test "222-break-insert -t main" \
-             "222\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
-             "break-insert -t operation"
-
-    mi_gdb_test "333-break-insert -t basics.c:callee2" \
-             "333\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \
-             "insert temp breakpoint at basics.c:callee2"
-
-    mi_gdb_test "444-break-insert -t basics.c:15" \
-             "444\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \
-             "insert temp breakpoint at basics.c:15 (callee3)"
-
-    # Getting the quoting right is tricky.  That is "\"<file>\":6"
-    mi_gdb_test "555-break-insert -t \"\\\"${srcfile}\\\":6\"" \
-             "555\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \
-             "insert temp breakpoint at \"<fullfilename>\":6 (callee4)"
-
-    mi_gdb_test "666-break-list" \
-                "666\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
-                "list of breakpoints"
-
-    mi_gdb_test "777-break-delete" \
-	    "777\\^done" \
-	    "delete temp breakpoints"
-}
-
-proc test_rbreak_creation_and_listing {} {
-    global mi_gdb_prompt
-    global srcfile
-    global hex
-
-    # Insert some breakpoints and list them
-    # Also, disable some so they do not interfere with other tests
-    # Tests:
-    # -break-insert -r main
-    # -break-insert -r callee2
-    # -break-insert -r callee
-    # -break-insert -r .*llee
-    # -break-list
-
-    setup_xfail "*-*-*"
-    mi_gdb_test "122-break-insert -r main" \
-             "122\\^done,bkpt=\{number=\"5\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \
-             "break-insert -r operation"
-
-    setup_xfail "*-*-*"
-    mi_gdb_test "133-break-insert -r callee2" \
-             "133\\^done,bkpt=\{number=\"6\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\}" \
-             "insert breakpoint with regexp callee2"
-
-    setup_xfail "*-*-*"
-    mi_gdb_test "144-break-insert -r callee" \
-	    "144\\^done,bkpt=\{number=\"7\",addr=\"$hex\",file=\".*basics.c\",line=\"27\"\},bkpt=\{number=\"8\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\},bkpt=\{number=\"9\",addr=\"$hex\",file=\".*basics.c\",line=\"17\"\},bkpt=\{number=\"10\",addr=\"$hex\",file=\".*basics.c\",line=\"8\"\}" \
-             "insert breakpoint with regexp callee"
-
-    setup_xfail "*-*-*"
-    mi_gdb_test "155-break-insert -r \.\*llee" \
-	    "155\\^done,bkpt=\{number=\"11\",addr=\"$hex\",file=\".*basics.c\",line=\"27\"\},bkpt=\{number=\"12\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\},bkpt=\{number=\"13\",addr=\"$hex\",file=\".*basics.c\",line=\"17\"\},bkpt=\{number=\"14\",addr=\"$hex\",file=\".*basics.c\",line=\"8\"\}" \
-             "insert breakpoint with regexp .*llee"
-
-    setup_xfail "*-*-*"
-    mi_gdb_test "166-break-list" \
-                "166\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
-                "list of breakpoints"
-
-    mi_gdb_test "177-break-delete" \
-	    "177\\^done" \
-	    "delete temp breakpoints"
-}
-
-test_tbreak_creation_and_listing
-test_rbreak_creation_and_listing
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-console.exp b/gdb/testsuite/gdb.mi/mi0-console.exp
deleted file mode 100644
index 4735dc4..0000000
--- a/gdb/testsuite/gdb.mi/mi0-console.exp
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright 1999, 2000, 2001 Cygnus Solutions.
-
-# 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 essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-# This test only works when talking to a target that routes its output
-# through GDB.  Check that we're either talking to a simulator or a
-# remote target.
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "mi-console"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-# Halt in main
-mi_gdb_test "200-break-insert main" \
-	"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*mi-console.c\",line=\"13\",times=\"0\"\}" \
-	"break-insert operation"
-mi_run_cmd
-gdb_expect {
-    -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*mi-console.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
-	    pass "run to main"
-    }
-    timeout {
-	fail "run to main (timeout)"
-    }
-}
-
-# Next over the hello() call which will produce lots of output
-send_gdb "47-exec-next\n"
-gdb_expect {
-    -re "47\\^running\r\n$mi_gdb_prompt" {
-	pass "Started step over hello"
-    }
-    timeout {
-	fail "Started step over hello (timeout)"
-    }
-}
-
-gdb_expect {
-    -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" {
-	pass "Hello message"
-    }
-    -re "Hello" {
-
-	# Probably a native system where GDB doesn't have direct
-	# control over the inferior console.
-	# For this to work, GDB would need to run the inferior process
-	# under a PTY and then use the even-loops ability to wait on
-	# multiple event sources to channel the output back through the
-	# MI.
-
-	fail "Hello message (known bug)"
-    }
-    timeout {
-	fail "Hello message (timeout)"
-    }
-}
-    
-gdb_expect {
-    -re "47\\*stopped.*$mi_gdb_prompt$" {
-	pass "Finished step over hello"
-    }
-    timeout {
-	fail "Finished step over hello (timeout)"
-    }
-}
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-disassemble.exp b/gdb/testsuite/gdb.mi/mi0-disassemble.exp
deleted file mode 100644
index 3c9cf19..0000000
--- a/gdb/testsuite/gdb.mi/mi0-disassemble.exp
+++ /dev/null
@@ -1,224 +0,0 @@
-#   Copyright 1999, 2000 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 Machine interface (MI) operations for disassembly.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_breakpoints_creation_and_listing {} {
-    global mi_gdb_prompt
-    global srcfile
-    global hex
-
-    # Insert some breakpoints and list them
-    # Also, disable some so they do not interfere with other tests
-    # Tests:
-    # -break-insert
-    # -break-list
-    # -break-disable
-    # -break-info
-
-    mi_gdb_test "200-break-insert main" \
-             "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
-             "break-insert operation"
-
-    mi_gdb_test "204-break-list" \
-                "204\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\}" \
-                "list of breakpoints"
-}
-
-proc test_running_the_program {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Run the program without args
-    # Tests:
-    # -exec-run
-
-    # mi_gdb_test cannot be used for asynchronous commands because there are
-    # two prompts involved and this can lead to a race condition.
-    # FIXME: We are accepting a duplicate file and line info temporarely.
-    # The following is equivalent to a send_gdb "000-exec-run\n"
-    mi_run_cmd
-    # The running part has been checked already by mi_run_cmd
-        gdb_expect {
-	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
-            pass "run to main"
-          }
-          -re ".*$mi_gdb_prompt$" {fail "run to main (2)"}
-          timeout {fail "run to main (timeout 2)"}
-        }
-}
-
-proc test_disassembly_only {} {
-    global mi_gdb_prompt
-    global hex
-    global decimal
-
-    # Test disassembly more only for the current function.
-    # Tests:
-    # -data-disassemble -s $pc -e "$pc+8" -- 0
-    # -data-disassembly -f basics.c -l 32 -- 0
-
-    mi_gdb_test "print/x \$pc" "" ""
-    mi_gdb_test "111-data-disassemble -s \$pc -e \"\$pc + 12\" -- 0" \
-	    "111\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\}" \
-             "data-disassemble from pc to pc+12 assembly only"
-
-    mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -- 0" \
-	    "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \
-              "data-disassemble file & line, assembly only"
-}
-
-proc test_disassembly_lines_limit {} {
-    global mi_gdb_prompt
-    global hex
-    global decimal
-
-    # Test disassembly more only for the current function.
-    # Tests:
-    # -data-disassembly -f basics.c -l 32 -n 20 -- 0
-    # -data-disassembly -f basics.c -l 32 -n 0 -- 0
-    # -data-disassembly -f basics.c -l 32 -n 50 -- 0
-
-    mi_gdb_test "print/x \$pc" "" ""
-    mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 20 -- 0" \
-	    "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \
-              "data-disassemble file, line, number assembly only"
-
-    mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 0 -- 0" \
-	    "222\\^done,asm_insns=\{\}" \
-              "data-disassemble file, line, number (zero lines) assembly only"
-
-    mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 50 -- 0" \
-	    "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \
-              "data-disassemble file, line, number (more than main lines) assembly only"
-}
-
-
-proc test_disassembly_mixed {} {
-    global mi_gdb_prompt
-    global hex
-    global decimal
-
-    # Test disassembly more only for the current function.
-    # Tests:
-    # -data-disassembly -f basics.c -l 21 -- 1
-    # -data-disassembly -s $pc -e "$pc+8" -- 1
-
-    mi_gdb_test "002-data-disassemble -f basics.c -l 21 -- 1" \
-	    "002\\^done,asm_insns=\{src_and_asm_line=\{line=\"21\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\}\},.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\}\}\}" \
-             "data-disassemble file, line assembly mixed"
-
-    #
-    # In mixed mode, the lowest level of granularity is the source line.
-    # So we are going to get the disassembly for the source line at
-    # which we are now, even if we have specified that the range is only 2 insns.
-    #
-    mi_gdb_test "003-data-disassemble -s \$pc -e \"\$pc+4\" -- 1" \
-	    "003\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}\}\}" \
-             "data-disassemble range assembly mixed"
-}
-
-proc test_disassembly_mixed_lines_limit {} {
-    global mi_gdb_prompt
-    global hex
-    global decimal
-
-    # Test disassembly more only for the current function.
-    # Tests:
-    # -data-disassembly -f basics.c -l 32 -n 20 -- 1
-    # -data-disassembly -f basics.c -l 32 -n 0 -- 1
-    # -data-disassembly -f basics.c -l 32 -n 50 -- 1
-
-    mi_gdb_test "print/x \$pc" "" ""
-    mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 20 -- 1" \
-	    "222\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\}" \
-              "data-disassemble file, line, number assembly mixed"
-
-    mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 0 -- 1" \
-	    "222\\^done,asm_insns=\{src_and_asm_line=\{line=\"31\",file=\".*basics.c\",line_asm_insn=\{\}\}\}" \
-              "data-disassemble file, line, number (zero lines) assembly mixed"
-
-    mi_gdb_test "222-data-disassemble  -f basics.c -l 32 -n 50 -- 1" \
-	    "222\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\}" \
-              "data-disassemble file, line, number (more than main lines) assembly mixed"
-}
-
-proc test_disassembly_bogus_args {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Test that bogus input to disassembly command is rejected.
-    # Tests:
-    # -data-disassembly -f foo -l abc -n 0 -- 0
-    # -data-disassembly -s foo -e bar -- 0
-    # -data-disassembly -s $pc -f basics.c -- 0
-    # -data-disassembly -f basics.c -l 32 -- 9
-
-    mi_gdb_test "123-data-disassemble -f foo -l abc -n 0 -- 0" \
-             ".*123\\^error,msg=\"mi_cmd_disassemble: Invalid filename.\"" \
-             "data-disassemble bogus filename"
-
-    mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \
-             "321\\^error,msg=\"No symbol \\\\\"foo\\\\\" in current context.\"" \
-             "data-disassemble bogus address"
-
-    mi_gdb_test "456-data-disassemble -s \$pc -f basics.c -- 0" \
-             "456\\^error,msg=\"mi_cmd_disassemble: Usage: \\( .-f filename -l linenum .-n howmany.. | .-s startaddr -e endaddr.\\) .--. mixed_mode.\"" \
-             "data-disassemble mix different args"
-
-    mi_gdb_test "789-data-disassemble -f basics.c -l 32 -- 9" \
-             "789\\^error,msg=\"mi_cmd_disassemble: Mixed_mode argument must be 0 or 1.\"" \
-             "data-disassemble wrong mode arg"
-
-}
-
-test_breakpoints_creation_and_listing
-test_running_the_program
-test_disassembly_only
-test_disassembly_mixed
-test_disassembly_bogus_args
-test_disassembly_lines_limit
-test_disassembly_mixed_lines_limit
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-eval.exp b/gdb/testsuite/gdb.mi/mi0-eval.exp
deleted file mode 100644
index a6f6978..0000000
--- a/gdb/testsuite/gdb.mi/mi0-eval.exp
+++ /dev/null
@@ -1,101 +0,0 @@
-#   Copyright 1999, 2000 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 essential Machine interface (MI) operations
-#
-# Verify -data-evaluate-expression. There are really minimal tests.
-
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_running_the_program {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Run the program without args, then specify srgs and rerun the program
-    # Tests:
-    # -exec-run
-
-    mi_gdb_test "300-break-insert callee4" \
-             "300\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
-             "insert breakpoint at callee4"
-
-    # mi_gdb_test cannot be used for asynchronous commands because there are
-    # two prompts involved and this can lead to a race condition.
-    # The following is equivalent to a send_gdb "000-exec-run\n"
-    mi_run_cmd
-    # The running part has been checked already by mi_run_cmd
-        gdb_expect {
-	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \
-		    { pass "run to callee4" }
-          -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
-          timeout {fail "run to callee4 (timeout 2)"}
-        }
-	
-	send_gdb "101-exec-next\n"
-        gdb_expect {
-	    -re "101\\^running\r\n$mi_gdb_prompt" {
-		gdb_expect {
-		    -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"9\"\}\r\n$mi_gdb_prompt$" \
-		    { pass "next in callee4" }
-	    -re ".*$mi_gdb_prompt$" {fail "next in callee4 (2)"}
-	    timeout {fail "next in callee4 (timeout 2)"}
-        }
-    }
-      -re ".*$mi_gdb_prompt$" {fail "next in callee4 (1)"}
-      timeout {fail "next in callee4 (timeout 1)"}
-    }
-
-}
-
-test_running_the_program
-
-mi_gdb_test "211-data-evaluate-expression A" "211\\^done,value=\"1\"" "eval A"
-
-mi_gdb_test "311-data-evaluate-expression &A" "311\\^done,value=\"$hex\"" "eval &A"
-
-mi_gdb_test "411-data-evaluate-expression A+3" "411\\^done,value=\"4\"" "eval A+3"
-
-mi_gdb_test "511-data-evaluate-expression \"A + 3\"" "511\\^done,value=\"4\"" "eval A + 3"
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-hack-cli.exp b/gdb/testsuite/gdb.mi/mi0-hack-cli.exp
deleted file mode 100644
index 50a1e19..0000000
--- a/gdb/testsuite/gdb.mi/mi0-hack-cli.exp
+++ /dev/null
@@ -1,40 +0,0 @@
-#   Copyright 1999 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
-
-
-# Some basic checks for the CLI.
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-mi_gdb_test "show architecture\n" \
-	"&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n\\^done" \
-	"show architecture"
-
-mi_gdb_test "47show architecture\n" \
-	"&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n47\\^done" \
-	"47show architecture"
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-read-memory.exp b/gdb/testsuite/gdb.mi/mi0-read-memory.exp
deleted file mode 100644
index f48bfa5..0000000
--- a/gdb/testsuite/gdb.mi/mi0-read-memory.exp
+++ /dev/null
@@ -1,100 +0,0 @@
-#   Copyright 1999, 2000 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 basic Machine interface (MI) operations
-#
-# Verify that, using the MI, we can load a program and do
-# other basic things that are used by all test files through  mi_gdb_exit,
-# mi_gdb_start, mi_delete_breakpoints, mi_gdb_reinitialize_dir and
-# mi_gdb_load, so we can safely use those.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but the command syntax and correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "mi-read-memory"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-
-mi_run_to_main
-
-#mi_next "do initialization"
-send_gdb "101-exec-next\n"
-gdb_expect {
-    -re "101\\^running\r\n$mi_gdb_prompt" {
-	gdb_expect {
-	    -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*mi-read-memory.c\",line=\"20\"\}.*$mi_gdb_prompt$" \
-		    { pass "do initialization" }
-	    -re ".*$mi_gdb_prompt$" {fail "do initialization (2)"}
-	    timeout {fail "do initialization (timeout 2)"}
-        }
-    }
-      -re ".*$mi_gdb_prompt$" {fail "do initialization (1)"}
-      timeout {fail "do initialization (timeout 1)"}
-}
-
-mi_gdb_test "1-data-read-memory" \
-	"1\\^error,msg=\".*\"" \
-	"no arguments"
-
-
-mi_gdb_test "2-data-read-memory bytes x 1 3 2" \
-	"2\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"0x00\",\"0x01\"}},{addr=\"$hex\",data={\"0x02\",\"0x03\"}},{addr=\"$hex\",data={\"0x04\",\"0x05\"}}}" \
-	"3x2, one byte"
-
-
-mi_gdb_test "9-data-read-memory -o -6 -- -0+bytes+6 x 1 3 2" \
-	"9\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"0x00\",\"0x01\"}},{addr=\"$hex\",data={\"0x02\",\"0x03\"}},{addr=\"$hex\",data={\"0x04\",\"0x05\"}}}" \
-	"3x2, one byte offset by -6"
-
-
-mi_gdb_test "3-data-read-memory \"(shorts + 128)\" x 2 1 2" \
-	"3\\^done,addr=\"$hex\",nr-bytes=\"4\",total-bytes=\"4\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"0x0100\",\"0x0102\"}}}" \
-	"expression in quotes"
-
-
-mi_gdb_test "4-data-read-memory bytes+16 x 1 8 4 x" \
-	"4\\^done,addr=\"$hex\",nr-bytes=\"32\",total-bytes=\"32\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"0x10\",\"0x11\",\"0x12\",\"0x13\"},ascii=\"xxxx\"},{addr=\"$hex\",data={\"0x14\",\"0x15\",\"0x16\",\"0x17\"},ascii=\"xxxx\"},{addr=\"$hex\",data={\"0x18\",\"0x19\",\"0x1a\",\"0x1b\"},ascii=\"xxxx\"},{addr=\"$hex\",data={\"0x1c\",\"0x1d\",\"0x1e\",\"0x1f\"},ascii=\"xxxx\"},{addr=\"$hex\",data={\"0x20\",\"0x21\",\"0x22\",\"0x23\"},ascii=\" !\\\\\"#\"},{addr=\"$hex\",data={\"0x24\",\"0x25\",\"0x26\",\"0x27\"},ascii=\"\\$%&'\"},{addr=\"$hex\",data={\"0x28\",\"0x29\",\"0x2a\",\"0x2b\"},ascii=\"().+\"},{addr=\"$hex\",data={\"0x2c\",\"0x2d\",\"0x2e\",\"0x2f\"},ascii=\",-\./\"}}" \
-	"ascii and data"
-
-
-mi_gdb_test "5-data-read-memory shorts+64 d 2 1 1" \
-	"5\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"128\"}}}" \
-	"decimal"
-
-mi_gdb_test "6-data-read-memory shorts+64 o 2 1 1" \
-	"6\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory={{addr=\"$hex\",data={\"0200\"}}}" \
-	"octal"
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-regs.exp b/gdb/testsuite/gdb.mi/mi0-regs.exp
deleted file mode 100644
index 1b6dac8..0000000
--- a/gdb/testsuite/gdb.mi/mi0-regs.exp
+++ /dev/null
@@ -1,177 +0,0 @@
-#   Copyright 1999, 2000 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 essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and look at registers.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_breakpoints_creation_and_listing {} {
-    global mi_gdb_prompt
-    global srcfile
-    global hex
-
-    # Insert some breakpoints and list them
-    # Also, disable some so they do not interfere with other tests
-    # Tests:
-    # -break-insert
-    # -break-list
-    # -break-disable
-    # -break-info
-
-    mi_gdb_test "200-break-insert main" \
-             "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
-             "break-insert operation"
-
-    mi_gdb_test "204-break-list" \
-                "204\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\}" \
-                "list of breakpoints"
-}
-
-proc test_running_the_program {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Run the program without args
-    # Tests:
-    # -exec-run
-
-    # mi_gdb_test cannot be used for asynchronous commands because there are
-    # two prompts involved and this can lead to a race condition.
-    # FIXME: We are accepting a duplicate file and line info temporarely.
-    # The following is equivalent to a send_gdb "000-exec-run\n"
-    mi_run_cmd
-    # The running part has been checked already by mi_run_cmd
-        gdb_expect {
-	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
-            pass "run to main"
-          }
-          -re ".*$mi_gdb_prompt$" {fail "run to main (2)"}
-          timeout {fail "run to main (timeout 2)"}
-        }
-}
-
-proc sparc_register_tests_no_exec { } {
-	# Test the generic IDT chip.
-	mi_gdb_test "111-data-list-register-values" \
-		".*111\\^error,msg=\"mi_cmd_data_list_register_values: Usage: -data-list-register-values <format> \\\[<regnum1>...<regnumN>\\\]\"" \
-		"wrong arguments"
-
-	mi_gdb_test "111-data-list-register-values x" \
-		".*111\\^error,msg=\"mi_cmd_data_list_register_values: No registers\.\"" \
-		"no executable"
-}
-
-# These tests exercise IDT-specific MIPS registers for several
-# different processor models.
-
-# This should detect the actual processor in use and change
-# the expected results appropriately.  FIXME
-
-proc sparc_register_tests { } {
-    global hex
-    global decimal
-    set octal "\[0-7\]+"
-    set binary "\[0-1\]+"
-    set float "-?\[0-9\]+(\.\[0-9\]+)?(e\[+\-\]\[0-9\]+)?"
-    set float2 "\-?\[0-9\]+"
-
-    mi_gdb_test "111-data-list-register-names" \
-	    "111\\^done,register-names=\{\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\}" \
-	    "list register names"
-
-    mi_gdb_test "222-data-list-register-values x" \
-	    "222\\^done,register-values=\{\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\}" \
-	    "register values x"
-
-    mi_gdb_test "333-data-list-register-values f" \
-	    "333\\^done,register-values=\{\{number=\"0\",value=\"$float\"\},\{number=\"1\",value=\"$float\"\},.*\{number=\"71\",value=\"$float\"\}\}" \
-	    "register values f"
-
-    mi_gdb_test "444-data-list-register-values d" \
-	    "444\\^done,register-values=\{\{number=\"0\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\}" \
-	    "register values d"
-
-    mi_gdb_test "555-data-list-register-values o" \
-	    "555\\^done,register-values=\{\{number=\"0\",value=\"$octal\"\}.*\{number=\"71\",value=\"$octal\"\}\}" \
-	    "register values o"
-
-    mi_gdb_test "666-data-list-register-values t" \
-	    "666\\^done,register-values=\{\{number=\"0\",value=\"$binary\"\}.*\{number=\"71\",value=\"$binary\"\}\}" \
-	    "register values t"
-
-    # On the sparc, registers 0-31 are int, 32-63 float, 64-71 int
-
-    mi_gdb_test "777-data-list-register-values N" \
-	    "777\\^done,register-values=\{\{number=\"0\",value=\"$decimal\"\}.*\{number=\"31\",value=\"$decimal\"\},\{number=\"32\",value=\"$float\"\}.*\{number=\"63\",value=\"$float\"\},\{number=\"64\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\}" \
-	    "register values N"
-
-    mi_gdb_test "888-data-list-register-values r" \
-	    "888\\^done,register-values=\{\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\}" \
-	    "register values r"
-
-    mi_gdb_test "999-data-list-register-names 68 69 70 71" \
-	    "999\\^done,register-names=\{\"pc\",\"npc\",\"fpsr\",\"cpsr\"\}" \
-	    "list names of some regs"
-
-    mi_gdb_test "001-data-list-register-values x 68 69 70 71" \
-	    "001\\^done,register-values=\{\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\}" \
-	    "list values of some regs"
-
-    # Don't know how useful this test is
-
-    mi_gdb_test "002-data-list-changed-registers" \
-	    "002\\^done,changed-registers=\{\"1\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"30\",\"31\",\"65\",\"68\",\"69\"\}" \
-	    "list changed registers"
-}
-
-if [istarget "sparc-*-*"] then {
-    sparc_register_tests_no_exec
-    test_breakpoints_creation_and_listing
-    test_running_the_program
-    sparc_register_tests
-} else {
-    verbose "mi-regs.exp tests ignored for this target"
-}
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-return.exp b/gdb/testsuite/gdb.mi/mi0-return.exp
deleted file mode 100644
index 95e0252..0000000
--- a/gdb/testsuite/gdb.mi/mi0-return.exp
+++ /dev/null
@@ -1,91 +0,0 @@
-#   Copyright 1999, 2000 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 Machine interface (MI) operations 
-# Verify that, using the MI, we can run a simple program and perform
-# exec-return.  
-
-# The goal is not to
-# test gdb functionality, which is done by other tests, but to verify
-# the correct output response to MI operations.  
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_running_to_callee4 {} {
-    global mi_gdb_prompt
-    global hex
-
-    mi_gdb_test "200-break-insert callee4" \
-             "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
-             "break-insert operation"
-
-    mi_run_cmd
-
-    gdb_expect {
-	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
-	    pass "run to callee4"
-	}
-	timeout {
-	    fail "run to callee4 (timeout)"
-	}
-    }
-
-    mi_gdb_test "205-break-delete" \
-                "205\\^done.*" \
-                "delete all breakpoints"
-
-}
-
-proc test_return_simple {} {
-    global mi_gdb_prompt
-    global hex
-
-    send_gdb "111-exec-return\n"
-    gdb_expect {
-	-re "111\\^done,frame=\{level=\"0 \",addr=\"$hex\",func=\"callee3\",args=\{.*\},file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"}
-	-re ".*\r\n$mi_gdb_prompt$" { fail "return from callee4 now" }
-	timeout { fail "return from callee4 now (timeout)"
-	}
-    }
-}
-
-test_running_to_callee4
-test_return_simple
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-simplerun.exp b/gdb/testsuite/gdb.mi/mi0-simplerun.exp
deleted file mode 100644
index 683d6bb..0000000
--- a/gdb/testsuite/gdb.mi/mi0-simplerun.exp
+++ /dev/null
@@ -1,227 +0,0 @@
-#   Copyright 1999, 2000 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 essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_breakpoints_creation_and_listing {} {
-    global mi_gdb_prompt
-    global srcfile
-    global hex
-
-    # Insert some breakpoints and list them
-    # Also, disable some so they do not interfere with other tests
-    # Tests:
-    # -break-insert
-    # -break-list
-    # -break-disable
-    # -break-info
-
-    mi_gdb_test "200-break-insert main" \
-             "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
-             "break-insert operation"
-
-    mi_gdb_test "201-break-insert basics.c:callee2" \
-             "201\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \
-             "insert breakpoint at basics.c:callee2"
-
-    mi_gdb_test "202-break-insert basics.c:15" \
-             "202\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \
-             "insert breakpoint at basics.c:15 (callee3)"
-
-    mi_gdb_test "203-break-insert \"\\\"${srcfile}\\\":6\"" \
-             "203\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \
-             "insert breakpoint at \"<fullfilename>\":6 (callee4)"
-
-    mi_gdb_test "204-break-list" \
-                "204\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
-                "list of breakpoints"
-
-    mi_gdb_test "205-break-disable 2 3 4" \
-                "205\\^done.*" \
-                "disabling of breakpoints"
-
-    mi_gdb_test "206-break-info 2" \
-                "206\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"2\",.*,enabled=\"n\",.*\}\}" \
-                "list of breakpoints, 16 disabled"
-}
-
-proc test_running_the_program {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Run the program without args, then specify srgs and rerun the program
-    # Tests:
-    # -exec-run
-    # -gdb-set
-
-    # mi_gdb_test cannot be used for asynchronous commands because there are
-    # two prompts involved and this can lead to a race condition.
-    # The following is equivalent to a send_gdb "000-exec-run\n"
-    mi_run_cmd
-    gdb_expect {
-	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
-	    pass "run to main"
-	}
-	timeout {
-	    fail "run to main (timeout)"
-	}
-    }
-}
-
-proc test_controlled_execution {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Continue execution until a breakpoint is reached, step into calls, verifying
-    # if the arguments are correctly shown, continue to the end of a called
-    # function, step over a call (next).
-    # Tests:
-    # -exec-continue
-    # -exec-next
-    # -exec-step
-    # -exec-finish
-
-    # mi_gdb_test cannot be used for asynchronous commands because there are
-    # two prompts involved and this can lead to a race condition.
-    send_gdb "220-exec-next\n"
-    gdb_expect {
-	-re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"33\"\}\r\n$mi_gdb_prompt$" {
-	    pass "next at main"
-	}
-	timeout {
-	    fail "next at main (timeout)"
-	}
-    }
-
-    # FIXME: A string argument is not printed right; should be fixed and
-    #        we should look for the right thing here.
-    # NOTE: The ``\\\\\"'' is for \".
-    send_gdb "221-exec-step\n"
-    gdb_expect {
-	-re "221\\^running\r\n${mi_gdb_prompt}221\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee1\",args=\{\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\},file=\".*basics.c\",line=\"27\"\}\r\n$mi_gdb_prompt$" {
-            pass "step at main"
-	}
-	timeout {
-	    fail "step at main (timeout)"
-        }
-    }
-
-    # FIXME: A string argument is not printed right; should be fixed and
-    #        we should look for the right thing here.
-    send_gdb "222-exec-step 3\n"
-    gdb_expect 30 {
-	-re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
-            pass "step to callee4"
-	}
-	timeout {
-	    fail "step to callee4 (timeout)"
-	}
-    }
-
-    # FIXME: A string argument is not printed right; should be fixed and
-    #        we should look for the right thing here.
-    # NOTE: The ``.'' is part of ``gdb-result-var="$1"''
-    send_gdb "223-exec-finish\n"
-    gdb_expect 30 {
-	-re "223\\^running\r\n${mi_gdb_prompt}223\\*stopped,reason=\"function-finished\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee3\",args=\{.*\},file=\".*basics.c\",line=\"18\"\},gdb-result-var=\".1\",return-value=\"0\"\r\n$mi_gdb_prompt$" {
-            pass "exec-finish"
-	}
-	timeout {
-	    fail "exec-finish (timeout)"
-	}
-    }
-}
-
-proc test_controlling_breakpoints {} {
-    global mi_gdb_prompt
-
-    # Enable, delete, set ignore counts in breakpoints
-    # (disable was already tested above)
-    # Tests:
-    # -break-delete
-    # -break-enable
-    # -break-after
-    # -break-condition
-
-}
-
-proc test_program_termination {} {
-    global mi_gdb_prompt
-
-    # Run to completion: normal and forced
-    # Tests:
-    # -exec-abort
-    # (normal termination of inferior)
-
-    # FIXME: "stopped" doesn't seem appropriate.
-    # mi_gdb_test cannot be used for asynchronous commands because there are
-    # two prompts involved and this can lead to a race condition.
-    send_gdb "999-exec-continue\n"
-    gdb_expect {
-      -re "999\\^running\r\n$mi_gdb_prompt" {
-        gdb_expect {
-          -re "999\\*stopped,reason=\"exited-normally\"\r\n$mi_gdb_prompt$" {
-            pass "continue to end"
-          }
-          -re ".*$mi_gdb_prompt$" {fail "continue to end (2)"}
-          timeout {fail "continue to end (timeout 2)"}
-        }
-      }
-      -re ".*$mi_gdb_prompt$" {fail "continue to end (1)"}
-      timeout {fail "continue to end (timeout 1)"}
-    }
-}
-
-test_breakpoints_creation_and_listing
-test_running_the_program
-test_controlled_execution
-test_controlling_breakpoints
-test_program_termination
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-stack.exp b/gdb/testsuite/gdb.mi/mi0-stack.exp
deleted file mode 100644
index faa92ec..0000000
--- a/gdb/testsuite/gdb.mi/mi0-stack.exp
+++ /dev/null
@@ -1,218 +0,0 @@
-#   Copyright 2000 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 essential Machine interface (MI) operations
-#
-# Verify that stack commands work.
-
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-
-mi_gdb_test "200-break-insert callee4" \
-	"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
-	"break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
-	pass "run to callee4"
-    }
-    -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
-    timeout {fail "run to callee4 (timeout 2)"}
-}
-
-
-proc test_stack_frame_listing {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Obtain a stack trace
-    # Tests:
-    # -stack-list-frames
-    # -stack-list-frames 1 1
-    # -stack-list-frames 1 3
-
-    mi_gdb_test "231-stack-list-frames" \
-	    "231\\^done,stack=\{frame=\{level=\"0 \",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4 \",addr=\"$hex\",func=\"main\",.*\}\}" \
-                "stack frame listing"
-    mi_gdb_test "232-stack-list-frames 1 1" \
-	    "232\\^done,stack=\{frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\}\}" \
-                "stack frame listing 1 1"
-    mi_gdb_test "233-stack-list-frames 1 3" \
-	    "233\\^done,stack=\{frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\}\}" \
-                "stack frame listing 1 3"
-
-    mi_gdb_test "234-stack-list-frames 1" \
-	    "234\\^error,msg=\"mi_cmd_stack_list_frames: Usage.*FRAME_LOW FRAME_HIGH.*\"" \
-	    "stack frame listing wrong"
-}
-
-proc test_stack_args_listing {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Obtain lists for args for the stack frames
-    # Tests:
-    # -stack-list-arguments 0
-    # -stack-list-arguments 0 1 1
-    # -stack-list-arguments 0 1 3
-    # -stack-list-arguments 1
-    # -stack-list-arguments 1 1 1
-    # -stack-list-arguments 1 1 3
-    # -stack-list-arguments 
-
-    mi_gdb_test "231-stack-list-arguments 0" \
-	    "231\\^done,stack-args=\{frame=\{level=\"0\",args=\{\}\},frame=\{level=\"1\",args=\{name=\"strarg\"\}\},frame=\{level=\"2\",args=\{name=\"intarg\",name=\"strarg\"\}\},frame=\{level=\"3\",args=\{name=\"intarg\",name=\"strarg\",name=\"fltarg\"\}\},frame=\{level=\"4\",args=\{\}\}\}" \
-                "stack args listing 0"
-
-    mi_gdb_test "232-stack-list-arguments 0 1 1" \
-	    "232\\^done,stack-args=\{frame=\{level=\"1\",args=\{name=\"strarg\"\}\}\}" \
-                "stack args listing 0 1 1"
-
-    mi_gdb_test "233-stack-list-arguments 0 1 3" \
-	    "233\\^done,stack-args=\{frame=\{level=\"1\",args=\{name=\"strarg\"\}\},frame=\{level=\"2\",args=\{name=\"intarg\",name=\"strarg\"\}\},frame=\{level=\"3\",args=\{name=\"intarg\",name=\"strarg\",name=\"fltarg\"\}\}\}" \
-                "stack args listing 0 1 3"
-
-    mi_gdb_test "231-stack-list-arguments 1" \
-	    "231\\^done,stack-args=\{frame=\{level=\"0\",args=\{\}\},frame=\{level=\"1\",args=\{\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\},frame=\{level=\"2\",args=\{\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\},frame=\{level=\"3\",args=\{\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\}\},frame=\{level=\"4\",args=\{\}\}\}" \
-                "stack args listing 1"
-
-    mi_gdb_test "232-stack-list-arguments 1 1 1" \
-	    "232\\^done,stack-args=\{frame=\{level=\"1\",args=\{\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\}\}" \
-                "stack args listing 1 1 1"
-
-    mi_gdb_test "233-stack-list-arguments 1 1 3" \
-	    "233\\^done,stack-args=\{frame=\{level=\"1\",args=\{\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\},frame=\{level=\"2\",args=\{\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\},frame=\{level=\"3\",args=\{\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\}\}\}" \
-                "stack args listing 1 1 3"
-
-    mi_gdb_test "234-stack-list-arguments" \
-	    "234\\^error,msg=\"mi_cmd_stack_list_args: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \
-	    "stack args listing wrong"
-}
-
-proc test_stack_info_depth {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Obtain depth of stack
-    # Tests:
-    # -stack-info-depth
-    # -stack-info-depth 3
-    # -stack-info-depth 99
-
-    mi_gdb_test "231-stack-info-depth" \
-	    "231\\^done,depth=\"5\"" \
-                "stack info-depth"
-
-    mi_gdb_test "231-stack-info-depth 3" \
-	    "231\\^done,depth=\"3\"" \
-                "stack info-depth 3"
-
-    mi_gdb_test "231-stack-info-depth 99" \
-	    "231\\^done,depth=\"5\"" \
-                "stack info-depth 99"
-
-    mi_gdb_test "231-stack-info-depth 99 99" \
-	    "231\\^error,msg=\"mi_cmd_stack_info_depth: Usage: .MAX_DEPTH.\"" \
-                "stack info-depth wrong usage"
-}
-
-proc test_stack_locals_listing {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Obtain lists for locals for the stack frames
-    # Tests:
-    # -stack-list-locals 0
-    # -stack-list-locals 1
-    # -stack-list-arguments 
-
-    mi_gdb_test "232-stack-list-locals 0" \
-	    "232\\^done,locals=\{name=\"A\",name=\"B\",name=\"C\"\}" \
-                "stack locals listing 0"
-
-# step until A, B, C, have some reasonable values.
-send_gdb "-exec-next 3\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
-	pass "next's in callee4"
-    }
-    timeout { fail "next in callee4 (timeout)" }
-}
-
-    mi_gdb_test "232-stack-list-locals 1" \
-	    "232\\^done,locals=\{\{name=\"A\",value=\"1\"\},\{name=\"B\",value=\"2\"\},\{name=\"C\",value=\"3\"\}\}" \
-                "stack locals listing 1"
-
-    mi_gdb_test "234-stack-list-locals" \
-	    "234\\^error,msg=\"mi_cmd_stack_list_locals: Usage.*PRINT_VALUES.*\"" \
-	    "stack locals listing wrong"
-
-    mi_gdb_test "232-stack-select-frame 1" \
-	    "232\\^done" \
-                "stack select frame 1"
-
-    mi_gdb_test "232-stack-list-locals 1" \
-	    "232\\^done,locals=\{\}" \
-                "stack locals listing for new frame"
-
-# this should be a no-op
-
-    mi_gdb_test "232-stack-select-frame" \
-	    "232\\^done" \
-                "stack select same frame"
-
-    mi_gdb_test "232-stack-list-locals 1" \
-	    "232\\^done,locals=\{\}" \
-                "stack locals for same frame (level 1)"
-
-}
-
-test_stack_frame_listing
-test_stack_args_listing
-test_stack_locals_listing
-test_stack_info_depth
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-stepi.exp b/gdb/testsuite/gdb.mi/mi0-stepi.exp
deleted file mode 100644
index 800cef8..0000000
--- a/gdb/testsuite/gdb.mi/mi0-stepi.exp
+++ /dev/null
@@ -1,106 +0,0 @@
-#   Copyright 1999, 2000 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 Machine interface (MI) operations 
-# Verify that, using the MI, we can run a simple program and perform
-# exec-step-instruction and exec-next-instruction.  
-
-# The goal is not to
-# test gdb functionality, which is done by other tests, but to verify
-# the correct output response to MI operations.  
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_running_to_main {} {
-    global mi_gdb_prompt
-    global hex
-
-    mi_gdb_test "200-break-insert main" \
-             "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
-             "break-insert operation"
-
-    mi_run_cmd
-
-    gdb_expect {
-	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
-	    pass "run to main"
-	}
-	timeout {
-	    fail "run to main (timeout)"
-	}
-    }
-}
-
-proc test_stepi_nexti {} {
-    global mi_gdb_prompt
-    global hex
-
-    send_gdb "111-exec-step-instruction\n"
-    gdb_expect {
-	-re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
-	    pass "step-instruction at main"
-	}
-	timeout {
-	    fail "step-instruction at main (timeout)"
-	}
-    }
-    send_gdb "222-exec-next-instruction\n"
-    gdb_expect {
-	-re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
-	    pass "next-instruction at main"
-	}
-	timeout {
-	    fail "next-instruction at main (timeout)"
-	}
-    }
-    send_gdb "333-exec-next-instruction\n"
-    gdb_expect {
-	-re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" {
-	    pass "next-instruction at main"
-	}
-	timeout {
-	    fail "next-instruction at main (timeout)"
-	}
-    }
-}
-
-test_running_to_main
-test_stepi_nexti
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-until.exp b/gdb/testsuite/gdb.mi/mi0-until.exp
deleted file mode 100644
index e633002..0000000
--- a/gdb/testsuite/gdb.mi/mi0-until.exp
+++ /dev/null
@@ -1,124 +0,0 @@
-#   Copyright 1999, 2000 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 Machine interface (MI) operations 
-# Verify that, using the MI, we can run a simple program and perform
-# exec-until.  
-
-# The goal is not to
-# test gdb functionality, which is done by other tests, but to verify
-# the correct output response to MI operations.  
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "until"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_running_to_foo {} {
-    global mi_gdb_prompt
-    global hex
-
-    mi_gdb_test "200-break-insert 10" \
-             "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*until.c\",line=\"10\",times=\"0\"\}" \
-             "break-insert operation"
-
-    mi_run_cmd
-
-    gdb_expect {
-	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\{\},file=\".*until.c\",line=\"10\"\}\r\n$mi_gdb_prompt$" {
-	    pass "run to main"
-	}
-	timeout {
-	    fail "run to main (timeout)"
-	}
-    }
-
-    mi_gdb_test "100-break-delete 1" "100\\^done" "break-delete 1"
-
-}
-
-proc test_until {} {
-    global mi_gdb_prompt
-    global hex
-
-    send_gdb "111-exec-until\n"
-    gdb_expect {
-	-re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\{\},file=\".*until.c\",line=\"12\"\}\r\n$mi_gdb_prompt$" {
-	    pass "until after while loop"
-	}
-	timeout {
-	    fail "until after while loop (timeout)"
-	}
-    }
-
-    send_gdb "222-exec-until 15\n"
-    gdb_expect {
-	-re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"location-reached\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\{\},file=\".*until.c\",line=\"15\"\}\r\n$mi_gdb_prompt$" {
-	    pass "until line number"
-	}
-	timeout {
-	    fail "until line number (timeout)"
-	}
-    }
-
-    send_gdb "333-exec-until until.c:17\n"
-    gdb_expect {
-	-re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"location-reached\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"foo\",args=\{\},file=\".*until.c\",line=\"17\"\}\r\n$mi_gdb_prompt$" {
-	    pass "until line number:file"
-	}
-	timeout {
-	    fail "until line number:file (timeout)"
-	}
-    }
-
-    # This is supposed to NOT stop at line 25. It stops right after foo is over.
-
-    send_gdb "444-exec-until until.c:25\n"
-    gdb_expect {
-	-re "444\\^running\r\n${mi_gdb_prompt}444\\*stopped,reason=\"location-reached\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*until.c\",line=\"24\"\}\r\n$mi_gdb_prompt$" {
-	    pass "until after current function"
-	}
-	timeout {
-	    fail "until after current function (timeout)"
-	}
-    }
-
-}
-
-test_running_to_foo
-test_until
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-var-block.exp b/gdb/testsuite/gdb.mi/mi0-var-block.exp
deleted file mode 100644
index 2ef383f..0000000
--- a/gdb/testsuite/gdb.mi/mi0-var-block.exp
+++ /dev/null
@@ -1,228 +0,0 @@
-#   Copyright (C) 1999 2000 s Solutions
-#
-# 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 essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "var-cmd"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-mi_gdb_test "200-break-insert do_block_tests" \
-	"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_block_tests\",file=\".*var-cmd.c\",line=\"154\",times=\"0\"\}" \
-	"break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"154\"\}\r\n$mi_gdb_prompt$" {
-	pass "run to do_block_tests"
-    }
-    -re ".*$mi_gdb_prompt$" {fail "run to do_block_tests (2)"}
-    timeout {fail "run to do_block_tests (timeout 2)"}
-}
-
-# Test: c_variable-3.2
-# Desc: create cb and foo
-mi_gdb_test "-var-create cb * cb" \
-	"\\^done,name=\"cb\",numchild=\"0\",type=\"int\"" \
-	"create local variable cb"
-
-mi_gdb_test "-var-create foo * foo" \
-	"&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
-	"create local variable foo"
-
-# step to "foo = 123;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"158\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_block_tests"
-    }
-    timeout {
-	fail "step at do_block_tests (timeout)"
-    }
-}
-
-
-# Be paranoid and assume 3.2 created foo
-mi_gdb_test "-var-delete foo" \
-	"&\"Variable object not found\\\\n\".*\\^error,msg=\"Variable object not found\"" \
-	"delete var foo"
-
-
-# Test: c_variable-3.3
-# Desc: create foo
-mi_gdb_test "-var-create foo * foo" \
-	"\\^done,name=\"foo\",numchild=\"0\",type=\"int\"" \
-	"create local variable foo"
-
-# step to "foo2 = 123;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"161\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_block_tests"
-    }
-    timeout {
-	fail "step at do_block_tests (timeout)"
-    }
-}
-
-# Test: c_variable-3.4
-# Desc: check foo, cb changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"foo\",in_scope=\"true\",type_changed=\"false\",name=\"cb\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars: cb foo changed"
-
-# step to "foo = 321;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"164\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_block_tests"
-    }
-    timeout {
-	fail "step at do_block_tests (timeout)"
-    }
-}
-
-# Test: c_variable-3.5
-# Desc: create inner block foo
-mi_gdb_test "-var-create inner_foo * foo" \
-	"\\^done,name=\"inner_foo\",numchild=\"0\",type=\"int\"" \
-	"create local variable inner_foo"
-
-# step to "foo2 = 0;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"166\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_block_tests"
-    }
-    timeout { fail "step at do_block_tests (timeout)" }
-}
-
-# Test: c_variable-3.6
-# Desc: create foo2
-mi_gdb_test "-var-create foo2 * foo2" \
-	"\\^done,name=\"foo2\",numchild=\"0\",type=\"int\"" \
-	"create local variable foo2"
-
-# Test: c_variable-3.7
-# Desc: check that outer foo in scope and inner foo out of scope
-# Note: also a known gdb problem
-setup_xfail *-*-*
-mi_gdb_test "-var-update inner_foo" \
-	"\\^done,changelist=\{FIXME\}" \
-	"update inner_foo: should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-
-setup_xfail *-*-*
-mi_gdb_test "-var-evaluate-expression inner_foo" \
-	"\\^done,value=\{FIXME\}" \
-	"evaluate inner_foo: should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-
-mi_gdb_test "-var-update foo" \
-	"\\^done,changelist=\{\}" \
-	"update foo: did not change"
-
-mi_gdb_test "-var-delete inner_foo" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var inner_foo"
-
-# step to "foo = 0;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"168\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_block_tests"
-    }
-    timeout { fail "step at do_block_tests (timeout)" }
-}
-
-# Test: c_variable-3.8
-# Desc: check that foo2 out of scope (known gdb problem)
-setup_xfail *-*-*
-mi_gdb_test "-var-update foo2" \
-	"\\^done,changelist=\{FIXME\}" \
-	"update foo2: should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-
-# step to "cb = 21;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\{\},file=\".*var-cmd.c\",line=\"171\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_block_tests"
-    }
-    timeout { fail "step at do_block_tests (timeout)" }
-}
-
-
-# Test: c_variable-3.9
-# Desc: check that only cb is in scope (known gdb problem)
-setup_xfail *-*-*
-mi_gdb_test "-var-update foo2" \
-	"\\^done,changelist=\{FIXME\}" \
-	"update foo2 should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-setup_xfail *-*-*
-mi_gdb_test "-var-update foo" \
-	"\\^done,changelist=\{FIXME\}" \
-	"update foo should be out of scope: KNOWN PROBLEM"
-clear_xfail *-*-*
-mi_gdb_test "-var-update cb" \
-	"\\^done,changelist=\{\}" \
-	"update cb"
-
-# Test: c_variable-3.10
-# Desc: names of editable variables
-#gdbtk_test c_variable-3.10 {names of editable variables} {
-#  editable_variables
-#} {{foo cb foo2} {}}
-
-# Done with block tests
-mi_gdb_test "-var-delete foo" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var foo"
-
-mi_gdb_test "-var-delete foo2" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var foo2"
-
-mi_gdb_test "-var-delete cb" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var cb"
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-var-child.exp b/gdb/testsuite/gdb.mi/mi0-var-child.exp
deleted file mode 100644
index c89438d..0000000
--- a/gdb/testsuite/gdb.mi/mi0-var-child.exp
+++ /dev/null
@@ -1,1331 +0,0 @@
-#   Copyright (C) 1999 2000 Cygnus Solutions
-#
-# 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 essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "var-cmd"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-mi_gdb_test "200-break-insert do_children_tests" \
-	"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"190\",times=\"0\"\}" \
-	"break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"190\"\}\r\n$mi_gdb_prompt$" {
-	pass "run to do_children_tests"
-    }
-    -re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
-    timeout {fail "run to do_children_tests (timeout 2)"}
-}
-
-#####        #####
-#                #
-# children tests #
-#                #
-#####        #####
-
-
-# Test: c_variable-4.2
-# Desc: create variable "struct_declarations"
-mi_gdb_test "-var-create struct_declarations * struct_declarations" \
-	"\\^done,name=\"struct_declarations\",numchild=\"11\",type=\"struct _struct_decl\"" \
-	"create local variable struct_declarations"
-
-# Test: c_variable-4.3
-# Desc: children of struct_declarations
-mi_gdb_test "-var-list-children struct_declarations" \
-	"\\^done,numchild=\"11\",children=\{child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
-	"get children of struct_declarations"
-
-#gdbtk_test c_variable-4.3 {children of struct_declarations} {
-#  get_children  struct_declarations
-#} {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2}
-
-# Test: c_variable-4.4
-# Desc: number of children of struct_declarations
-mi_gdb_test "-var-info-num-children struct_declarations" \
-	"\\^done,numchild=\"11\"" \
-	"get number of children of struct_declarations"
-
-# Test: c_variable-4.5
-# Desc: children of struct_declarations.integer
-mi_gdb_test "-var-list-children struct_declarations.integer" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.integer"
-
-# Test: c_variable-4.6
-# Desc: number of children of struct_declarations.integer
-mi_gdb_test "-var-info-num-children struct_declarations.integer" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.integer"
-
-# Test: c_variable-4.7
-# Desc: children of struct_declarations.character
-mi_gdb_test "-var-list-children struct_declarations.character" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.character"
-
-# Test: c_variable-4.8
-# Desc: number of children of struct_declarations.character
-mi_gdb_test "-var-info-num-children struct_declarations.character" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.character"
-
-# Test: c_variable-4.9
-# Desc: children of struct_declarations.char_ptr
-mi_gdb_test "-var-list-children struct_declarations.char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
-	"get children of struct_declarations.char_ptr"
-
-# Test: c_variable-4.10
-# Desc: number of children of struct_declarations.char_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of struct_declarations.char_ptr"
-
-# Test: c_variable-4.11
-# Desc: children of struct_declarations.long_int
-mi_gdb_test "-var-list-children struct_declarations.long_int" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.long_int"
-
-# Test: c_variable-4.12
-# Desc: number of children of struct_declarations.long_int
-mi_gdb_test "-var-info-num-children struct_declarations.long_int" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.long_int"
-
-# Test: c_variable-4.13
-# Desc: children of int_ptr_ptr
-mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
-	"get children of struct_declarations.int_ptr_ptr"
-
-#gdbtk_test c_variable-4.13 {children of int_ptr_ptr} {
-#  get_children struct_declarations.int_ptr_ptr
-#} {*int_ptr_ptr}
-
-# Test: c_variable-4.14
-# Desc: number of children of int_ptr_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of struct_declarations.int_ptr_ptr"
-
-
-# Test: c_variable-4.15
-# Desc: children of struct_declarations.long_array
-mi_gdb_test "-var-list-children struct_declarations.long_array" \
-	"\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
-	"get children of struct_declarations.long_array"
-
-# Test: c_variable-4.16
-# Desc: number of children of struct_declarations.long_array
-mi_gdb_test "-var-info-num-children struct_declarations.long_array" \
-	"\\^done,numchild=\"10\"" \
-	"get number of children of struct_declarations.long_array"
-
-# Test: c_variable-4.17
-# Desc: children of struct_declarations.func_ptr
-mi_gdb_test "-var-list-children struct_declarations.func_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.func_ptr"
-
-
-# Test: c_variable-4.18
-# Desc: number of children of struct_declarations.func_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.func_ptr"
-
-
-# Test: c_variable-4.19
-# Desc: children of struct_declarations.func_ptr_struct
-mi_gdb_test "-var-list-children struct_declarations.func_ptr_struct" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.func_ptr_struct"
-
-# Test: c_variable-4.20
-# Desc: number of children of struct_declarations.func_ptr_struct
-mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_struct" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.func_ptr_struct"
-
-
-# Test: c_variable-4.21
-# Desc: children of struct_declarations.func_ptr_ptr
-mi_gdb_test "-var-list-children struct_declarations.func_ptr_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.func_ptr_ptr"
-
-# Test: c_variable-4.22
-# Desc: number of children of struct_declarations.func_ptr_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.func_ptr_ptr"
-
-
-# Test: c_variable-4.23
-# Desc: children of struct_declarations.u1
-mi_gdb_test "-var-list-children struct_declarations.u1" \
-	"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\}" \
-	"get children of struct_declarations.u1"
-
-# Test: c_variable-4.24
-# Desc: number of children of struct_declarations.u1
-mi_gdb_test "-var-info-num-children struct_declarations.u1" \
-	"\\^done,numchild=\"4\"" \
-	"get number of children of struct_declarations.u1"
-
-# Test: c_variable-4.25
-# Desc: children of struct_declarations.s2
-mi_gdb_test "-var-list-children struct_declarations.s2" \
-	"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\}" \
-	"get children of struct_declarations.s2"
-#gdbtk_test c_variable-4.25 {children of struct_declarations.s2} {
-#  get_children struct_declarations.s2
-#} {u2 g h i}
-
-# Test: c_variable-4.26
-# Desc: number of children of struct_declarations.s2
-mi_gdb_test "-var-info-num-children struct_declarations.s2" \
-	"\\^done,numchild=\"4\"" \
-	"get number of children of struct_declarations.s2"
-
-
-# Test: c_variable-4.27
-# Desc: children of struct_declarations.long_array.1
-mi_gdb_test "-var-list-children struct_declarations.long_array.1" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.long_array.1"
-
-# Test: c_variable-4.28
-# Desc: number of children of struct_declarations.long_array.1
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.1" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.long_array.1"
-
-# Test: c_variable-4.29
-# Desc: children of struct_declarations.long_array.2
-mi_gdb_test "-var-list-children struct_declarations.long_array.2" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.long_array.2"
-
-# Test: c_variable-4.30
-# Desc: number of children of struct_declarations.long_array.2
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.2" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.long_array.2"
-
-# Test: c_variable-4.31
-# Desc: children of struct_declarations.long_array.3
-mi_gdb_test "-var-list-children struct_declarations.long_array.3" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.long_array.3"
-
-# Test: c_variable-4.32
-# Desc: number of children of struct_declarations.long_array.3
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.3" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.long_array.3"
-
-# Test: c_variable-4.33 
-# Desc: children of struct_declarations.long_array.4
-mi_gdb_test "-var-list-children struct_declarations.long_array.4" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.long_array.4"
-
-# Test: c_variable-4.34
-# Desc: number of children of struct_declarations.long_array.4
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.4" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.long_array.4"
-
-# Test: c_variable-4.35
-# Desc: children of struct_declarations.long_array.5
-mi_gdb_test "-var-list-children struct_declarations.long_array.5" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.long_array.5"
-
-# Test: c_variable-4.36
-# Desc: number of children of struct_declarations.long_array.5
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.5" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.long_array.5"
-
-# Test: c_variable-4.37
-# Desc: children of struct_declarations.long_array.6
-mi_gdb_test "-var-list-children struct_declarations.long_array.6" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.long_array.6"
-
-# Test: c_variable-4.38
-# Desc: number of children of struct_declarations.long_array.6
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.6" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.long_array.6"
-
-# Test: c_variable-4.39
-# Desc: children of struct_declarations.long_array.7
-mi_gdb_test "-var-list-children struct_declarations.long_array.7" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.long_array.7"
-
-# Test: c_variable-4.40
-# Desc: number of children of struct_declarations.long_array.7
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.7" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.long_array.7"
-
-# Test: c_variable-4.41
-# Desc: children of struct_declarations.long_array.8
-mi_gdb_test "-var-list-children struct_declarations.long_array.8" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.long_array.8"
-
-# Test: c_variable-4.42
-# Desc: number of children of struct_declarations.long_array.8
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.8" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.long_array.8"
-
-
-# Test: c_variable-4.43
-# Desc: children of struct_declarations.long_array.9
-mi_gdb_test "-var-list-children struct_declarations.long_array.9" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.long_array.9"
-
-# Test: c_variable-4.44
-# Desc: number of children of struct_declarations.long_array.9
-mi_gdb_test "-var-info-num-children struct_declarations.long_array.9" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.long_array.9"
-
-# Test: c_variable-4.45
-# Desc: children of struct_declarations.u1.a
-mi_gdb_test "-var-list-children struct_declarations.u1.a" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.u1.a"
-
-# Test: c_variable-4.46
-# Desc: number of children of struct_declarations.u1.a
-mi_gdb_test "-var-info-num-children struct_declarations.u1.a" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.u1.a"
-
-# Test: c_variable-4.47
-# Desc: children of struct_declarations.u1.b
-mi_gdb_test "-var-list-children struct_declarations.u1.b" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.u1.b.\\*b\",exp=\"\\*b\",numchild=\"0\",type=\"char\"\}\}" \
-	"get children of struct_declarations.u1.b"
-
-# Test: c_variable-4.48
-# Desc: number of children of struct_declarations.u1.b
-mi_gdb_test "-var-info-num-children struct_declarations.u1.b" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of struct_declarations.u1.b"
-
-# Test: c_variable-4.49
-# Desc: children of struct_declarations.u1.c
-mi_gdb_test "-var-list-children struct_declarations.u1.c" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.u1.c"
-
-# Test: c_variable-4.50
-# Desc: number of children of struct_declarations.u1.c
-mi_gdb_test "-var-info-num-children struct_declarations.u1.c" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.u1.c"
-
-# Test: c_variable-4.51
-# Desc: children of struct_declarations.u1.d
-mi_gdb_test "-var-list-children struct_declarations.u1.d" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.u1.d"
-
-
-# Test: c_variable-4.52
-# Desc: number of children of struct_declarations.u1.d
-mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.u1.d"
-
-
-# Test: c_variable-4.53
-# Desc: children of struct_declarations.s2.u2
-mi_gdb_test "-var-list-children struct_declarations.s2.u2" \
-	"\\^done,numchild=\"3\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
-	"get children of struct_declarations.s2.u2"
-
-# Test: c_variable-4.54
-# Desc: number of children of struct_declarations.s2.u2
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2" \
-	"\\^done,numchild=\"3\"" \
-	"get number of children of struct_declarations.s2.u2"
-
-# Test: c_variable-4.55
-# Desc: children of struct_declarations.s2.g
-mi_gdb_test "-var-list-children struct_declarations.s2.g" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.s2.g"
-
-# Test: c_variable-4.56
-# Desc: number of children of struct_declarations.s2.g
-mi_gdb_test "-var-info-num-children struct_declarations.s2.g" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.s2.g"
-
-
-# Test: c_variable-4.57
-# Desc: children of struct_declarations.s2.h
-mi_gdb_test "-var-list-children struct_declarations.s2.h" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.s2.h"
-
-# Test: c_variable-4.58
-# Desc: number of children of struct_declarations.s2.h
-mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.s2.h"
-
-
-# Test: c_variable-4.59
-# Desc: children of struct_declarations.s2.i
-mi_gdb_test "-var-list-children struct_declarations.s2.i" \
-	"\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
-	"get children of struct_declarations.s2.i"
-
-# Test: c_variable-4.60
-# Desc: number of children of struct_declarations.s2.i
-mi_gdb_test "-var-info-num-children struct_declarations.s2.i" \
-	"\\^done,numchild=\"10\"" \
-	"get number of children of struct_declarations.s2.i"
-
-# Test: c_variable-4.61
-# Desc: children of struct_declarations.s2.u2.u1s1
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1" \
-	"\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\}" \
-	"get children of struct_declarations.s2.u2.u1s1"
-
-# Test: c_variable-4.62
-# Desc: number of children of struct_declarations.s2.u2.u1s1
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1" \
-	"\\^done,numchild=\"4\"" \
-	"get number of children of struct_declarations.s2.u2.u1s1"
-
-# Test: c_variable-4.63
-# Desc: children of struct_declarations.s2.u2.f
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.f" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.s2.u2.f"
-
-# Test: c_variable-4.64
-# Desc: number of children of struct_declarations.s2.u2.f
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.f" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.s2.u2.f"
-
-# Test: c_variable-4.65
-# Desc: children of struct_declarations.s2.u2.u1s2
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2" \
-	"\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr\",exp=\"array_ptr\",numchild=\"2\",type=\"char \\\[2\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s2.func\",exp=\"func\",numchild=\"0\",type=\"int \\(\\*\\)\\(\\)\"\}\}" \
-	"get children of struct_declarations.s2.u2.u1s2"
-
-# Test: c_variable-4.66
-# Desc: number of children of struct_declarations.s2.u2.u1s2
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2" \
-	"\\^done,numchild=\"2\"" \
-	"get number of children of struct_declarations.s2.u2.u1s2"
-
-# Test: c_variable-4.67
-# Desc: children of struct_declarations.s2.u2.u1s1.d
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.d" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.s2.u2.u1s1.d"
-
-# Test: c_variable-4.68
-# Desc: number of children of struct_declarations.s2.u2.u1s1.d
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.d" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.s2.u2.u1s1.d"
-
-# Test: c_variable-4.69
-# Desc: children of struct_declarations.s2.u2.u1s1.e
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.e" \
-	"\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.e.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.1\",exp=\"1\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.2\",exp=\"2\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s1.e.3\",exp=\"3\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.4\",exp=\"4\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.5\",exp=\"5\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.6\",exp=\"6\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.7\",exp=\"7\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.8\",exp=\"8\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.9\",exp=\"9\",numchild=\"0\",type=\"char\"\}\}" \
-	"get children of struct_declarations.s2.u2.u1s1.e"
-
-# Test: c_variable-4.70
-# Desc: number of children of struct_declarations.s2.u2.u1s1.e
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.e" \
-	"\\^done,numchild=\"10\"" \
-	"get number of children of struct_declarations.s2.u2.u1s1.e"
-
-
-# Test: c_variable-4.71
-# Desc: children of struct_declarations.s2.u2.u1s1.func
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.func" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.s2.u2.u1s1.func"
-
-# Test: c_variable-4.72
-# Desc: number of children of struct_declarations.s2.u2.u1s1.func
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.func" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.s2.u2.u1s1.func"
-
-
-# Test: c_variable-4.73
-# Desc: children of struct_declarations.s2.u2.u1s1.foo
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.foo" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.s2.u2.u1s1.foo"
-
-# Test: c_variable-4.74
-# Desc: number of children of struct_declarations.s2.u2.u1s1.foo
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.s2.u2.u1s1.foo"
-
-
-# Test: c_variable-4.75
-# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.array_ptr" \
-	"\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=\"1\",numchild=\"0\",type=\"char\"\}\}" \
-	"get children of struct_declarations.s2.u2.u1s2.array_ptr"
-
-# Test: c_variable-4.76
-# Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.array_ptr" \
-	"\\^done,numchild=\"2\"" \
-	"get number of children of struct_declarations.s2.u2.u1s2.array_ptr"
-
-# Test: c_variable-4.77
-# Desc: children of struct_declarations.s2.u2.u1s2.func
-mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.func" \
-	"\\^done,numchild=\"0\"" \
-	"get children of struct_declarations.s2.u2.u1s2.func"
-
-# Test: c_variable-4.78
-# Desc: number of children of struct_declarations.s2.u2.u1s2.func
-mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of struct_declarations.s2.u2.u1s2.func"
-
-# Test: c_variable-4.79
-# Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
-mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
-	"get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
-#} {**int_ptr_ptr}
-
-# Test: c_variable-4.80
-# Desc: Number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr
-mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr"
-
-
-# Step to "struct_declarations.integer = 123;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"192\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-
-# Test: c_variable-4.81
-# Desc: create local variable "weird"
-mi_gdb_test "-var-create weird * weird" \
-	"\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \
-	"create local variable weird"
-
-# Test: c_variable-4.82
-# Desc: children of weird
-mi_gdb_test "-var-list-children weird" \
-	"\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
-	"get children of weird"
-
-# Test: c_variable-4.83
-# Desc: number of children of weird
-mi_gdb_test "-var-info-num-children weird" \
-	"\\^done,numchild=\"11\"" \
-	"get number of children of weird"
-
-
-# Test: c_variable-4.84
-# Desc: children of weird->long_array
-mi_gdb_test "-var-list-children weird.long_array" \
-	"\\^done,numchild=\"10\",children=\{child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \
-	"get children of weird.long_array"
-#gdbtk_test c_variable-4.84 {children of weird->long_array} {
-#  get_children weird.long_array
-#} {0 1 2 3 4 5 6 7 8 9}
-
-# Test: c_variable-4.85
-# Desc: number of children of weird.long_array
-mi_gdb_test "-var-info-num-children weird.long_array" \
-	"\\^done,numchild=\"10\"" \
-	"get number of children of weird.long_array"
-
-# Test: c_variable-4.86
-# Desc: children of weird.int_ptr_ptr
-mi_gdb_test "-var-list-children weird.int_ptr_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
-	"get children of weird.int_ptr_ptr"
-#gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} {
-#  get_children weird.int_ptr_ptr
-#} {*int_ptr_ptr}
-
-# Test: c_variable-4.87
-# Desc: number of children of weird.int_ptr_ptr
-mi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of weird.int_ptr_ptr"
-
-# Test: c_variable-4.88
-# Desc: children of *weird->int_ptr_ptr
-mi_gdb_test "-var-list-children weird.int_ptr_ptr.*int_ptr_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
-	"get children of weird.int_ptr_ptr.*int_ptr_ptr"
-#gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} {
-#  get_children weird.int_ptr_ptr.*int_ptr_ptr
-#} {**int_ptr_ptr}
-
-# Test: c_variable-4.89
-# Desc: number of children *weird->int_ptr_ptr
-mi_gdb_test "-var-info-num-children weird.int_ptr_ptr.*int_ptr_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of weird.int_ptr_ptr.*int_ptr_ptr"
-
-# Test: c_variable-4.90
-# Desc: create weird->int_ptr_ptr
-mi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \
-	"\\^done,name=\"weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"" \
-	"create local variable weird->int_ptr_ptr"
-
-# Test: c_variable-4.91
-# Desc: children of weird->int_ptr_ptr
-mi_gdb_test "-var-list-children weird->int_ptr_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",exp=\"\\*weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \
-	"get children of weird->int_ptr_ptr"
-
-
-# Test: c_variable-4.92
-# Desc: number of children of (weird->int_ptr_ptr)
-mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of weird->int_ptr_ptr"
-
-# Test: c_variable-4.93
-# Desc: children of *(weird->int_ptr_ptr)
-mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=\"\\*\\*weird->int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \
-	"get children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
-
-# Test: c_variable-4.94
-# Desc: number of children of *(weird->int_ptr_ptr)
-mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr"
-
-# Test: c_variable-4.95
-# Desc: children of *(*(weird->int_ptr_ptr))
-mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"
-
-# Test: c_variable-4.96
-# Desc: number of children of *(*(weird->int_ptr_ptr))
-mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr"
-
-# Test: c_variable-4.97
-# Desc: is weird editable
-mi_gdb_test "-var-show-attributes weird" \
-	"\\^done,attr=\"editable\"" \
-	"is weird editable"
-
-# Test: c_variable-4.98
-# Desc: is weird->int_ptr_ptr editable
-mi_gdb_test "-var-show-attributes weird->int_ptr_ptr" \
-	"\\^done,attr=\"editable\"" \
-	"is weird->int_ptr_ptr editable"
-
-# Test: c_variable-4.99
-# Desc: is *(weird->int_ptr_ptr) editable
-mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr" \
-	"\\^done,attr=\"editable\"" \
-	"is weird.int_ptr_ptr.*int_ptr_ptr editable"
-
-# Test: c_variable-4.100
-# Desc: is *(*(weird->int_ptr_ptr)) editable
-mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr" \
-	"\\^done,attr=\"editable\"" \
-	"is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable"
-
-# Test: c_variable-4.101
-# Desc: is weird->u1 editable
-mi_gdb_test "-var-show-attributes weird.u1" \
-	"\\^done,attr=\"noneditable\"" \
-	"is weird.u1 editable"
-
-# Test: c_variable-4.102
-# Desc: is weird->s2 editable
-mi_gdb_test "-var-show-attributes weird.s2" \
-	"\\^done,attr=\"noneditable\"" \
-	"is weird.s2 editable"
-
-# Test: c_variable-4.103
-# Desc: is struct_declarations.u1.a editable
-mi_gdb_test "-var-show-attributes struct_declarations.u1.a" \
-	"\\^done,attr=\"editable\"" \
-	"is struct_declarations.u1.a editable"
-
-# Test: c_variable-4.104
-# Desc: is struct_declarations.u1.b editable
-mi_gdb_test "-var-show-attributes struct_declarations.u1.b" \
-	"\\^done,attr=\"editable\"" \
-	"is struct_declarations.u1.b editable"
-
-# Test: c_variable-4.105
-# Desc: is struct_declarations.u1.c editable
-mi_gdb_test "-var-show-attributes struct_declarations.u1.c" \
-	"\\^done,attr=\"editable\"" \
-	"is struct_declarations.u1.c editable"
-
-# Test: c_variable-4.106
-# Desc: is struct_declarations.long_array editable
-mi_gdb_test "-var-show-attributes struct_declarations.long_array" \
-	"\\^done,attr=\"noneditable\"" \
-	"is struct_declarations.long_array editable"
-
-# Test: c_variable-4.107
-# Desc: is struct_declarations.long_array[0] editable
-mi_gdb_test "-var-show-attributes struct_declarations.long_array.0" \
-	"\\^done,attr=\"editable\"" \
-	"is struct_declarations.long_array.0 editable"
-
-# Test: c_variable-4.108
-# Desc: is struct_declarations editable
-mi_gdb_test "-var-show-attributes struct_declarations" \
-	"\\^done,attr=\"noneditable\"" \
-	"is struct_declarations editable"
-
-mi_gdb_test "-var-delete weird" \
-	"\\^done,ndeleted=\"24\"" \
-	"delete var weird"
-
-#####                         #####
-#                                 #
-# children and update tests #
-#                                 #
-#####                         #####
-
-# Test: c_variable-5.1
-# Desc: check that nothing changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{\}" \
-	"update all vars. None changed"
-
-# Step over "struct_declarations.integer = 123;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"193\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.2
-# Desc: check that integer changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars struct_declarations.integer"
-
-# Step over:
-#    weird->char_ptr = "hello";
-#    bar = 2121;
-#    foo = &bar;
-
-send_gdb "-exec-step 3\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"196\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.3
-# Desc: check that char_ptr changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars struct_declarations.char_ptr"
-
-# Step over "struct_declarations.int_ptr_ptr = &foo;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"197\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.4
-# Desc: check that int_ptr_ptr and children changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars int_ptr_ptr and children changed"
-
-# Step over "weird->long_array[0] = 1234;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"198\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.5
-# Desc: check that long_array[0] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars struct_declarations.long_array.0 changed"
-
-# Step over "struct_declarations.long_array[1] = 2345;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"199\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.6
-# Desc: check that long_array[1] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars struct_declarations.long_array.1 changed"
-
-# Step over "weird->long_array[2] = 3456;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"200\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.7
-# Desc: check that long_array[2] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars struct_declarations.long_array.2 changed"
-
-# Step over:
-#    struct_declarations.long_array[3] = 4567;
-#    weird->long_array[4] = 5678;
-#    struct_declarations.long_array[5] = 6789;
-#    weird->long_array[6] = 7890;
-#    struct_declarations.long_array[7] = 8901;
-#    weird->long_array[8] = 9012;
-#    struct_declarations.long_array[9] = 1234;
-send_gdb "-exec-step 7\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"208\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.8
-# Desc: check that long_array[3-9] changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars struct_declarations.long_array.3-9 changed"
-
-
-# Step over "weird->func_ptr = nothing;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"211\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.9
-# Desc: check that func_ptr changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars struct_declarations.func_ptr changed"
-
-# Delete all variables
-mi_gdb_test "-var-delete struct_declarations" \
-	"\\^done,ndeleted=\"65\"" \
-	"delete var struct_declarations"
-
-mi_gdb_test "-var-delete weird->int_ptr_ptr" \
-	"\\^done,ndeleted=\"3\"" \
-	"delete var weird->int_ptr_ptr"
-
-# Step over all lines:
-# ...
-#   psnp = &snp0;
-send_gdb "-exec-step 43\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"254\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.10
-# Desc: create psnp->char_ptr
-mi_gdb_test "-var-create  psnp->char_ptr *  psnp->char_ptr" \
-	"\\^done,name=\"psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"" \
-	"create local variable  psnp->char_ptr"
-
-# Test: c_variable-5.11
-# Desc: children of psnp->char_ptr
-mi_gdb_test "-var-list-children psnp->char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",exp=\"\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \
-	"get children of psnp->char_ptr"
-
-# Test: c_variable-5.12
-# Desc: number of children of psnp->char_ptr
-mi_gdb_test "-var-info-num-children psnp->char_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->char_ptr"
-
-# Test: c_variable-5.13
-# Desc: children of *(psnp->char_ptr)
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=\"\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \
-	"get children of psnp->char_ptr.*psnp->char_ptr"
-
-# Test: c_variable-5.14
-# Desc: number of children of *(psnp->char_ptr)
-mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->char_ptr.*psnp->char_ptr"
-
-# Test: c_variable-5.15
-# Desc: children of *(*(psnp->char_ptr))
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \
-	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
-
-# Test: c_variable-5.15B
-# Desc: children of *(*(*(psnp->char_ptr)))
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
-	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
-
-# Test: c_variable-5.16
-# Desc: number of children of *(*(psnp->char_ptr))
-mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr"
-
-# Test: c_variable-5.17
-# Desc: children of *(*(*(psnp->char_ptr)))
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
-	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
-
-# Test: c_variable-5.18
-# Desc: number of children of *(*(*(psnp->char_ptr)))
-mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr"
-
-# Test: c_variable-5.17B
-# Desc: children of *(*(*(*(psnp->char_ptr))))
-mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"
-
-# Test: c_variable-5.18B
-# Desc: number of children of *(*(*(*(psnp->char_ptr))))
-mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr"
-
-
-# Test: c_variable-5.19
-# Desc: create psnp->long_ptr
-mi_gdb_test "-var-create  psnp->long_ptr *  psnp->long_ptr" \
-	"\\^done,name=\"psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"" \
-	"create local variable  psnp->long_ptr"
-
-# Test: c_variable-5.20
-# Desc: children of psnp->long_ptr
-mi_gdb_test "-var-list-children psnp->long_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\"\}\}" \
-	"get children of psnp->long_ptr"
-
-# Test: c_variable-5.21
-# Desc: number of children of psnp->long_ptr
-mi_gdb_test "-var-info-num-children psnp->long_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->long_ptr"
-
-# Test: c_variable-5.22
-# Desc: children of *(psnp->long_ptr)
-mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\"\}\}" \
-	"get children of psnp->long_ptr.*psnp->long_ptr"
-
-
-# Test: c_variable-5.23
-# Desc: number of children of *(psnp->long_ptr)
-mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->long_ptr.*psnp->long_ptr"
-
-# Test: c_variable-5.24
-# Desc: children of *(*(psnp->long_ptr))
-mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\"\}\}" \
-	"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
-
-# Test: c_variable-5.25
-# Desc: number of children of *(*(psnp->long_ptr))
-mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr"
-
-# Test: c_variable-5.26
-# Desc: children of *(*(*(psnp->long_ptr)))
-mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long int\"\}\}" \
-	"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
-
-# Test: c_variable-5.27
-# Desc: number of children of *(*(*(psnp->long_ptr)))
-mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr"
-
-# Test: c_variable-5.28
-# Desc: children of *(*(*(*(psnp->long_ptr))))
-mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"
-
-# Test: c_variable-5.29
-# Desc: number of children of *(*(*(*(psnp->long_ptr))))
-mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr"
-
-# Test: c_variable-5.30
-# Desc: create psnp->ptrs
-mi_gdb_test "-var-create  psnp->ptrs *  psnp->ptrs" \
-	"\\^done,name=\"psnp->ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \
-	"create local variable  psnp->ptrs"
-
-# Test: c_variable-5.31
-# Desc: children of psnp->ptrs
-mi_gdb_test "-var-list-children psnp->ptrs" \
-	"\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
-	"get children of psnp->ptrs"
-
-# Test: c_variable-5.32
-# Desc: number of children of psnp->ptrs
-mi_gdb_test "-var-info-num-children psnp->ptrs" \
-	"\\^done,numchild=\"3\"" \
-	"get number of children of psnp->ptrs"
-
-# Test: c_variable-5.33
-# Desc: children of psnp->ptrs[0]
-mi_gdb_test "-var-list-children psnp->ptrs.0" \
-	"\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
-	"get children of psnp->ptrs.0"
-
-# Test: c_variable-5.34
-# Desc: number of children of psnp->ptrs[0]
-mi_gdb_test "-var-info-num-children psnp->ptrs.0" \
-	"\\^done,numchild=\"4\"" \
-	"get number of children of psnp->ptrs.0"
-
-# Test: c_variable-5.35
-# Desc: children of psnp->ptrs[0]->next
-mi_gdb_test "-var-list-children psnp->ptrs.0.next" \
-	"\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
-	"get children of psnp->ptrs.0.next"
-
-#} {char_ptr long_ptr ptrs next}
-
-# Test: c_variable-5.36
-# Desc: number of children of psnp->ptrs[0]->next
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next" \
-	"\\^done,numchild=\"4\"" \
-	"get number of children of psnp->ptrs.0.next"
-
-
-# Test: c_variable-5.37
-# Desc: children of psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \
-	"get children of psnp->ptrs.0.next.char_ptr"
-
-#gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} {
-#  get_children psnp->ptrs.0.next.char_ptr
-#} {*char_ptr}
-
-# Test: c_variable-5.38
-# Desc: number of children of psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->ptrs.0.next.char_ptr"
-
-# Test: c_variable-5.39
-# Desc: children of *psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=\"\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \
-	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr"
-
-# Test: c_variable-5.40
-# Desc: number of children of *psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr"
-
-# Test: c_variable-5.41
-# Desc: children of **psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \
-	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
-
-# Test: c_variable-5.41B
-# Desc: children of ***psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
-	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
-
-# Test: c_variable-5.42
-# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr"
-
-# Test: c_variable-5.43
-# Desc: children of ***psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
-	"\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \
-	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
-
-# Test: c_variable-5.44
-# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \
-	"\\^done,numchild=\"1\"" \
-	"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
-
-# Test: c_variable-5.43B
-# Desc: children of ****psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
-
-# Test: c_variable-5.44B
-# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr
-mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr"
-
-# Test: c_variable-5.45
-# Desc: children of psnp->ptrs[0]->next->next
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.next" \
-	"\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
-	"get children of psnp->ptrs.0.next.next"
-
-# Test: c_variable-5.46
-# Desc: children of psnp->ptrs[0]->next->next->ptrs
-mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \
-	"\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0.next.next.ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \
-	"get children of psnp->ptrs.0.next.next.ptrs"
-
-#  Step over "snp0.char_ptr = &b3;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"255\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.47
-# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars psnp->char_ptr (and 0.char_ptr) changed"
-
-#  Step over "snp1.char_ptr = &c3;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"256\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-
-# Test: c_variable-5.48
-# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
-
-
-#  Step over "snp2.char_ptr = &a3;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"257\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-
-# Test: c_variable-5.49
-# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"
-
-
-#  Step over "snp0.long_ptr = &y3;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"258\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-# Test: c_variable-5.50
-# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars psnp->long_ptr (and 0.long_ptr) changed"
-
-
-#  Step over "snp1.long_ptr = &x3;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"259\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-
-# Test: c_variable-5.51
-# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
-# Why does this have a FIXME?
-setup_xfail *-*-*
-mi_gdb_test "-var-update *" \
-	"FIXME\\^done,changelist=\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
-clear_xfail *-*-*
-
-# This command produces this error message:
-# &"warning: varobj_list: assertion failed - mycount <> 0\n"
-#
-
-#  Step over "snp2.long_ptr = &z3;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_children_tests"
-    }
-    timeout {
-	fail "step at do_children_tests (timeout)"
-    }
-}
-
-
-# Test: c_variable-5.52
-# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
-
-
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-var-cmd.exp b/gdb/testsuite/gdb.mi/mi0-var-cmd.exp
deleted file mode 100644
index ae2bd7b..0000000
--- a/gdb/testsuite/gdb.mi/mi0-var-cmd.exp
+++ /dev/null
@@ -1,605 +0,0 @@
-#   Copyright (C) 1999 2000 Cygnus Solutions
-#
-# 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 essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "var-cmd"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-
-#####                   #####
-#                           #
-#  Variable Creation tests  #
-#                           #
-#####                   #####
-
-# Test:  c_variable-1.1
-# Desc:  Create global variable
-
-mi_gdb_test "111-var-create global_simple * global_simple" \
-	"111\\^done,name=\"global_simple\",numchild=\"6\",type=\"simpleton\"" \
-	"create global variable"
-
-# Test: c_variable-1.2
-# Desc: Create non-existent variable
-
-mi_gdb_test "112-var-create bogus_unknown_variable * bogus_unknown_variable" \
-	"&\"mi_cmd_var_create: unable to create variable object\\\\n\".*112\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
-	"create non-existent variable"
-
-# Test: c_variable-1.3
-# Desc: Create out of scope variable
-
-mi_gdb_test "113-var-create argc * argc" \
-	"&\"mi_cmd_var_create: unable to create variable object\\\\n\".*113\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
-	"create out of scope variable"
-
-mi_gdb_test "200-break-insert do_locals_tests" \
-	"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_locals_tests\",file=\".*var-cmd.c\",line=\"106\",times=\"0\"\}" \
-	"break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"106\"\}\r\n$mi_gdb_prompt$" {
-	pass "run to do_locals_tests"
-    }
-    -re ".*$mi_gdb_prompt$" {fail "run todo_locals_tests (2)"}
-    timeout {fail "run to do_locals_tests (timeout 2)"}
-}
-
-# Test: c_variable-1.4
-# Desc: create local variables
-
-mi_gdb_test "-var-create linteger * linteger" \
-	"\\^done,name=\"linteger\",numchild=\"0\",type=\"int\"" \
-	"create local variable linteger"
-
-mi_gdb_test "-var-create lpinteger * lpinteger" \
-	"\\^done,name=\"lpinteger\",numchild=\"1\",type=\"int \\*\"" \
-	"create local variable lpinteger"
-
-mi_gdb_test "-var-create lcharacter * lcharacter" \
-	"\\^done,name=\"lcharacter\",numchild=\"0\",type=\"char\"" \
-	"create local variablelcharacter "
-
-mi_gdb_test "-var-create lpcharacter * lpcharacter" \
-	"\\^done,name=\"lpcharacter\",numchild=\"0\",type=\"char \\*\"" \
-	"create local variable lpcharacter"
-
-mi_gdb_test "-var-create llong * llong" \
-	"\\^done,name=\"llong\",numchild=\"0\",type=\"long int\"" \
-	"create local variable llong"
-
-mi_gdb_test "-var-create lplong * lplong" \
-	"\\^done,name=\"lplong\",numchild=\"1\",type=\"long int \\*\"" \
-	"create local variable lplong"
-
-mi_gdb_test "-var-create lfloat * lfloat" \
-	"\\^done,name=\"lfloat\",numchild=\"0\",type=\"float\"" \
-	"create local variable lfloat"
-
-mi_gdb_test "-var-create lpfloat * lpfloat" \
-	"\\^done,name=\"lpfloat\",numchild=\"1\",type=\"float \\*\"" \
-	"create local variable lpfloat"
-
-mi_gdb_test "-var-create ldouble * ldouble" \
-	"\\^done,name=\"ldouble\",numchild=\"0\",type=\"double\"" \
-	"create local variable ldouble"
-
-mi_gdb_test "-var-create lpdouble * lpdouble" \
-	"\\^done,name=\"lpdouble\",numchild=\"1\",type=\"double \\*\"" \
-	"create local variable lpdouble"
-
-mi_gdb_test "-var-create lsimple * lsimple" \
-	"\\^done,name=\"lsimple\",numchild=\"6\",type=\"struct _simple_struct\"" \
-	"create local variable lsimple"
-
-mi_gdb_test "-var-create lpsimple * lpsimple" \
-	"\\^done,name=\"lpsimple\",numchild=\"6\",type=\"struct _simple_struct \\*\"" \
-	"create local variable lpsimple"
-
-mi_gdb_test "-var-create func * func" \
-	"\\^done,name=\"func\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"" \
-	"create local variable func"
-
-# Test: c_variable-1.5
-# Desc: create lsimple.character
-mi_gdb_test "-var-create lsimple.character * lsimple.character" \
-	"\\^done,name=\"lsimple.character\",numchild=\"0\",type=\"char\"" \
-	"create lsimple.character"
-
-# Test: c_variable-1.6
-# Desc: create lpsimple->integer
-mi_gdb_test "-var-create lsimple->integer * lsimple->integer" \
-	"\\^done,name=\"lsimple->integer\",numchild=\"0\",type=\"int\"" \
-	"create lsimple->integer"
-
-# Test: c_variable-1.7
-# Desc: ceate lsimple.integer
-mi_gdb_test "-var-create lsimple.integer * lsimple.integer" \
-	"\\^done,name=\"lsimple.integer\",numchild=\"0\",type=\"int\"" \
-	"create lsimple->integer"
-
-
-# Test: c_variable-1.9
-# Desc: create type name
-#    Type names (like int, long, etc..) are all proper expressions to gdb.
-#    make sure variable code does not allow users to create variables, though.
-mi_gdb_test "-var-create int * int" \
-	"&\"Attempt to use a type name as an expression.mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
-	"create int"
-
-
-#####             #####
-#                     #
-# Value changed tests #
-#                     #
-#####             #####
-
-# Test: c_variable-2.1
-# Desc: check whether values changed at do_block_tests
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{\}" \
-	"update all vars"
-
-# Step over "linteger = 1234;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"107\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_locals_tests"
-    }
-    timeout {
-	fail "step at do_locals_tests (timeout)"
-    }
-}
-
-# Test: c_variable-2.2
-# Desc: check whether only linteger changed values
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars: linteger changed"
-
-# Step over "lpinteger = &linteger;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"108\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_locals_tests"
-    }
-    timeout {
-	fail "step at do_locals_tests (timeout)"
-    }
-}
-
-# Test: c_variable-2.3
-# Desc: check whether only lpinteger changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars: lpinteger changed"
-
-# Step over "lcharacter = 'a';"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"109\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_locals_tests"
-    }
-    timeout {
-	fail "step at do_locals_tests (timeout)"
-    }
-}
-
-# Test: c_variable-2.4
-# Desc: check whether only lcharacter changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars: lcharacter changed"
-
-# Step over "lpcharacter = &lcharacter;"
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"110\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_locals_tests"
-    }
-    timeout {
-	fail "step at do_locals_tests (timeout)"
-    }
-}
-
-# Test: c_variable-2.5
-# Desc: check whether only lpcharacter changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars: lpcharacter changed"
-
-
-# Step over:
-#  llong = 2121L;
-#  lplong = &llong;
-#  lfloat = 2.1;
-#  lpfloat = &lfloat;
-#  ldouble = 2.718281828459045;
-#  lpdouble = &ldouble;
-#  lsimple.integer = 1234;
-#  lsimple.unsigned_integer = 255;
-#  lsimple.character = 'a';
-
-send_gdb "-exec-step 9\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"119\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_locals_tests"
-    }
-    timeout {
-	fail "step at do_locals_tests (timeout)"
-    }
-}
-
-# Test: c_variable-2.6
-# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
-#       lsimple.unsigned_character lsimple.integer lsimple.character changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",name=\"lpdouble\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lpfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lplong\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars: many changed"
-
-# Step over:
-#  lsimple.signed_character = 21;
-#  lsimple.char_ptr = &lcharacter;
-#  lpsimple = &lsimple;
-#  func = nothing;
-
-send_gdb "-exec-step 4\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"125\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_locals_tests"
-    }
-    timeout {
-	fail "step at do_locals_tests (timeout)"
-    }
-}
-
-# Test: c_variable-2.7
-# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"func\",in_scope=\"true\",type_changed=\"false\",name=\"lpsimple\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars: func and lpsimple changed"
-
-# Step over
-#  linteger = 4321;
-#  lcharacter = 'b';
-#  llong = 1212L;
-#  lfloat = 1.2;
-#  ldouble = 5.498548281828172;
-#  lsimple.integer = 255;
-#  lsimple.unsigned_integer = 4321;
-#  lsimple.character = 'b';
-
-send_gdb "-exec-step 8\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"133\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at do_locals_tests"
-    }
-    timeout {
-	fail "step at do_locals_tests (timeout)"
-    }
-}
-
-# Test: c_variable-2.8
-# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
-#       lpsimple.integer lsimple.character changed
-# Note: this test also checks that lpsimple->integer and lsimple.integer have
-#       changed (they are the same)
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\",name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\",name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars: func and lpsimple changed"
-
-
-### 
-#
-# Test assignment to variables. More tests on assignment are in other files.
-#
-###
-mi_gdb_test "-var-assign global_simple 0" \
-	"&\"mi_cmd_var_assign: Variable object is not editable\\\\n\".*\\^error,msg=\"mi_cmd_var_assign: Variable object is not editable\"" \
-	"assign to global_simple"
-
-mi_gdb_test "-var-assign linteger 3333" \
-	"\\^done,value=\"3333\"" \
-	"assign to linteger"
-
-mi_gdb_test "-var-evaluate-expression linteger" \
-	"\\^done,value=\"3333\"" \
-	"eval linteger"
-
-mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
-	"\\^done,value=\"$hex\"" \
-	"assign to lpinteger"
-
-mi_gdb_test "-var-evaluate-expression lpinteger" \
-	"\\^done,value=\"$hex\"" \
-	"eval lpinteger"
-
-# reset the values to the original ones so that the rest of the file doesn't suffer.
-
-mi_gdb_test "-var-assign linteger 4321" \
-	"\\^done,value=\"4321\"" \
-	"assign to linteger"
-
-mi_gdb_test "-var-assign lpinteger &linteger" \
-	"\\^done,value=\"$hex\"" \
-	"assign to lpinteger"
-
-mi_gdb_test "-var-assign lcharacter 'z'" \
-	"\\^done,value=\"122 'z'\"" \
-	"assign to lcharacter"
-
-mi_gdb_test "-var-evaluate-expression lcharacter" \
-	"\\^done,value=\"122 'z'\"" \
-	"eval lcharacter"
-
-mi_gdb_test "-var-assign llong 1313L" \
-	"\\^done,value=\"1313\"" \
-	"assign to llong"
-mi_gdb_test "-var-evaluate-expression llong" \
-	"\\^done,value=\"1313\"" \
-	"eval llong"
-mi_gdb_test "-var-assign llong 1212L" \
-	"\\^done,value=\"1212\"" \
-	"assign to llong"
-
-mi_gdb_test "-var-assign lplong &llong+4" \
-	"\\^done,value=\"$hex\"" \
-	"assign to lplong"
-mi_gdb_test "-var-evaluate-expression lplong" \
-	"\\^done,value=\"$hex\"" \
-	"eval lplong"
-mi_gdb_test "-var-assign lplong &llong" \
-	"\\^done,value=\"$hex\"" \
-	"assign to lplong"
-
-mi_gdb_test "-var-assign lfloat 3.4" \
-	"\\^done,value=\"3.4.*\"" \
-	"assign to lfloat"
-mi_gdb_test "-var-evaluate-expression lfloat" \
-	"\\^done,value=\"3.4.*\"" \
-	"eval lfloat"
-mi_gdb_test "-var-assign lfloat 1.2" \
-	"\\^done,value=\"1.2.*\"" \
-	"assign to lfloat"
-
-mi_gdb_test "-var-assign lpfloat &lfloat+4" \
-	"\\^done,value=\"$hex\"" \
-	"assign to lpfloat"
-
-mi_gdb_test "-var-assign ldouble 5.333318284590435" \
-	"\\^done,value=\"5.333318284590435\"" \
-	"assign to ldouble"
-
-mi_gdb_test "-var-assign func do_block_tests" \
-	"\\^done,value=\"$hex <do_block_tests>\"" \
-	"assign to func"
-
-mi_gdb_test "-var-assign lsimple.character 'd'" \
-	"\\^done,value=\"100 'd'\"" \
-	"assign to lsimple.character"
-
-mi_gdb_test "-var-assign  lsimple->integer 222" \
-	"\\^done,value=\"222\"" \
-	"assign to lsimple->integer"
-
-mi_gdb_test "-var-assign lsimple.integer 333" \
-	"\\^done,value=\"333\"" \
-	"assign to lsimple.integer"
-
-######
-# End of assign tests 
-#####
-
-mi_gdb_test "-break-insert subroutine1" \
-	"\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"146\",times=\"0\"\}" \
-	"break-insert subroutine1"
-send_gdb "-exec-continue\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\{\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}\},file=\".*var-cmd.c\",line=\"146\"\}\r\n$mi_gdb_prompt$" {
-	pass "continue to subroutine1"
-    }
-    timeout {
-	fail "continue to subroutine1 (timeout)"
-    }
-}
-
-# Test: c_variable-2.10
-# Desc: create variable for locals i,l in subroutine1
-mi_gdb_test "-var-create i  * i" \
-	"\\^done,name=\"i\",numchild=\"0\",type=\"int\"" \
-	"create i"
-
-mi_gdb_test "-var-create l * l" \
-	"\\^done,name=\"l\",numchild=\"1\",type=\"long int \\*\"" \
-	"create l"
-
-# Test: c_variable-2.11
-# Desc: create do_locals_tests local in subroutine1
-mi_gdb_test "-var-create linteger * linteger" \
-	"&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
-	"create linteger"
-
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\{\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}\},file=\".*var-cmd.c\",line=\"147\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at subroutine1"
-    }
-    timeout {
-	fail "step at subroutine1 (timeout)"
-    }
-}
-
-# Test: c_variable-2.12
-# Desc: change global_simple.integer
-# Note: This also tests whether we are reporting changes in structs properly.
-#       gdb normally would say that global_simple has changed, but we
-#       special case that, since it is not what a human expects to
-#       see.
-
-setup_xfail *-*-*
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{FIXME: WHAT IS CORRECT HERE\}" \
-	"update all vars: changed FIXME"
-clear_xfail *-*-*
-
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\{\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}\},file=\".*var-cmd.c\",line=\"148\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at subroutine1"
-    }
-    timeout { fail "step at subroutine1 (timeout)" }
-}
-
-# Test: c_variable-2.13
-# Desc: change subroutine1 local i
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"i\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars: i changed"
-
-send_gdb "-exec-step\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"subroutine1\",args=\{\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}\},file=\".*var-cmd.c\",line=\"149\"\}\r\n$mi_gdb_prompt$" {
-	pass "step at subroutine1"
-    }
-    timeout { fail "step at subroutine1 (timeout)" }
-}
-
-# Test: c_variable-2.14
-# Desc: change do_locals_tests local llong
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \
-	"update all vars: llong changed"
-
-send_gdb "-exec-next\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\{\},file=\".*var-cmd.c\",line=\"136\"\}\r\n$mi_gdb_prompt$" {
-	pass "next out of subroutine1"
-    }
-    timeout { fail "next out of subroutine1 (timeout)" }
-}
-
-# Test: c_variable-2.15
-# Desc: check for out of scope subroutine1 locals
-mi_gdb_test "-var-update *" \
-	"\\^done,changelist=\{name=\"l\",in_scope=\"false\",name=\"i\",in_scope=\"false\"\}" \
-	"update all vars: all now out of scope"
-
-# Done with locals/globals tests. Erase all variables
-#delete_all_variables
-mi_gdb_test "-var-delete global_simple" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var"
-
-mi_gdb_test "-var-delete linteger" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var linteger"
-
-mi_gdb_test "-var-delete lpinteger" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lpinteger"
-
-mi_gdb_test "-var-delete lcharacter" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lcharacter"
-
-mi_gdb_test "-var-delete lpcharacter" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lpcharacter"
-
-mi_gdb_test "-var-delete llong" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var llong"
-
-mi_gdb_test "-var-delete lplong" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lplong"
-
-mi_gdb_test "-var-delete lfloat" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lfloat"
-
-mi_gdb_test "-var-delete lpfloat" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lpfloat"
-
-mi_gdb_test "-var-delete ldouble" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var ldouble"
-
-mi_gdb_test "-var-delete lpdouble" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lpdouble"
-
-mi_gdb_test "-var-delete lsimple" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lsimple"
-
-mi_gdb_test "-var-delete lpsimple" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lpsimple"
-
-mi_gdb_test "-var-delete func" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var func"
-
-mi_gdb_test "-var-delete lsimple.character" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lsimple.character"
-
-mi_gdb_test "-var-delete  lsimple->integer" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var  lsimple->integer"
-
-mi_gdb_test "-var-delete lsimple.integer" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var lsimple.integer"
-
-mi_gdb_test "-var-delete i" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var i"
-
-mi_gdb_test "-var-delete l" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var l"
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-var-display.exp b/gdb/testsuite/gdb.mi/mi0-var-display.exp
deleted file mode 100644
index e01f534..0000000
--- a/gdb/testsuite/gdb.mi/mi0-var-display.exp
+++ /dev/null
@@ -1,621 +0,0 @@
-#   Copyright (C) 1999 2000 Cygnus Solutions
-#
-# 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 essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can create, update, delete variables.
-#
-
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "var-cmd"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-mi_gdb_test "200-break-insert 260" \
-	"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"260\",times=\"0\"\}" \
-	"break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\{\},file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" {
-	pass "run to do_children_tests"
-    }
-    -re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
-    timeout {fail "run to do_children_tests (timeout 2)"}
-}
-
-#####       #####
-#               #
-# Display tests #
-#               #
-#####       #####
-
-# Test: c_variable-6.1
-# Desc: create variable bar
-mi_gdb_test "-var-create bar * bar" \
-	"\\^done,name=\"bar\",numchild=\"0\",type=\"int\"" \
-	"create local variable bar"
-
-# Test: c_variable-6.2
-# Desc: type of variable bar
-mi_gdb_test "-var-info-type bar" \
-	"\\^done,type=\"int\"" \
-	"info type variable bar"
-
-# Test: c_variable-6.3
-# Desc: format of variable bar
-mi_gdb_test "-var-show-format bar" \
-	"\\^done,format=\"natural\"" \
-	"show format variable bar"
-
-# Test: c_variable-6.4
-# Desc: value of variable bar
-mi_gdb_test "-var-evaluate-expression bar" \
-	"\\^done,value=\"2121\"" \
-	"eval variable bar"
-
-# Test: c_variable-6.5
-# Desc: change format of bar to hex
-mi_gdb_test "-var-set-format bar hexadecimal" \
-	"\\^done,format=\"hexadecimal\"" \
-	"set format variable bar"
-
-# Test: c_variable-6.6
-# Desc: value of bar with new format
-mi_gdb_test "-var-evaluate-expression bar" \
-	"\\^done,value=\"0x849\"" \
-	"eval variable bar with new format"
-
-# Test: c_variable-6.7
-# Desc: change value of bar
-mi_gdb_test "-var-assign bar 3" \
-	"\\^done,value=\"0x3\"" \
-	"assing to variable bar"
-
-mi_gdb_test "-var-set-format bar decimal" \
-	"\\^done,format=\"decimal\"" \
-	"set format variable bar"
-
-mi_gdb_test "-var-evaluate-expression bar" \
-	"\\^done,value=\"3\"" \
-	"eval variable bar with new value"
-
-mi_gdb_test "-var-delete bar" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var bar"
-
-# Test: c_variable-6.11
-# Desc: create variable foo
-mi_gdb_test "-var-create foo * foo" \
-	"\\^done,name=\"foo\",numchild=\"1\",type=\"int \\*\"" \
-	"create local variable foo"
-
-# Test: c_variable-6.12
-# Desc: type of variable foo
-mi_gdb_test "-var-info-type foo" \
-	"\\^done,type=\"int \\*\"" \
-	"info type variable foo"
-
-# Test: c_variable-6.13
-# Desc: format of variable foo
-mi_gdb_test "-var-show-format foo" \
-	"\\^done,format=\"natural\"" \
-	"show format variable foo"
-
-# Test: c_variable-6.14
-# Desc: value of variable foo
-mi_gdb_test "-var-evaluate-expression foo" \
-	"\\^done,value=\"$hex\"" \
-	"eval variable foo"
-
-# Test: c_variable-6.15
-# Desc: change format of var to octal
-mi_gdb_test "-var-set-format foo octal" \
-	"\\^done,format=\"octal\"" \
-	"set format variable foo"
-
-mi_gdb_test "-var-show-format foo" \
-	"\\^done,format=\"octal\"" \
-	"show format variable foo"
-
-# Test: c_variable-6.16
-# Desc: value of foo with new format
-mi_gdb_test "-var-evaluate-expression foo" \
-	"\\^done,value=\"\[0-7\]+\"" \
-	"eval variable foo"
-
-# Test: c_variable-6.17
-# Desc: change value of foo
-mi_gdb_test "-var-assign foo 3" \
-	"\\^done,value=\"03\"" \
-	"assing to variable foo"
-
-mi_gdb_test "-var-set-format foo decimal" \
-	"\\^done,format=\"decimal\"" \
-	"set format variable foo"
-
-# Test: c_variable-6.18
-# Desc: check new value of foo
-mi_gdb_test "-var-evaluate-expression foo" \
-	"\\^done,value=\"3\"" \
-	"eval variable foo"
-
-mi_gdb_test "-var-delete foo" \
-	"\\^done,ndeleted=\"1\"" \
-	"delete var foo"
-
-# Test: c_variable-6.21
-# Desc: create variable weird and children
-mi_gdb_test "-var-create weird * weird" \
-	"\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \
-	"create local variable weird"
-
-mi_gdb_test "-var-list-children weird" \
-	"\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \
-	"get children local variable weird"
-
-
-# Test: c_variable-6.23
-# Desc: change format of weird.func_ptr and weird.func_ptr_ptr
-mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \
-	"\\^done,format=\"hexadecimal\"" \
-	"set format variable weird.func_ptr"
-
-mi_gdb_test "-var-show-format weird.func_ptr" \
-	"\\^done,format=\"hexadecimal\"" \
-	"show format variable weird.func_ptr"
-
-mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \
-	"\\^done,format=\"hexadecimal\"" \
-	"set format variable weird.func_ptr_ptr"
-
-mi_gdb_test "-var-show-format weird.func_ptr_ptr" \
-	"\\^done,format=\"hexadecimal\"" \
-	"show format variable weird.func_ptr_ptr"
-
-# Test: c_variable-6.24
-# Desc: format of weird and children
-mi_gdb_test "-var-set-format weird natural" \
-	"\\^done,format=\"natural\"" \
-	"set format variable weird"
-
-mi_gdb_test "-var-set-format weird.integer natural" \
-	"\\^done,format=\"natural\"" \
-	"set format variable weird.integer"
-
-mi_gdb_test "-var-set-format weird.character natural" \
-	"\\^done,format=\"natural\"" \
-	"set format variable weird.character"
-
-mi_gdb_test "-var-set-format weird.char_ptr natural" \
-	"\\^done,format=\"natural\"" \
-	"set format variable weird.char_ptr"
-
-mi_gdb_test "-var-set-format weird.long_int natural" \
-	"\\^done,format=\"natural\"" \
-	"set format variable weird.long_int"
-
-mi_gdb_test "-var-set-format weird.int_ptr_ptr natural" \
-	"\\^done,format=\"natural\"" \
-	"set format variable weird.int_ptr_ptr"
-
-mi_gdb_test "-var-set-format weird.long_array natural" \
-	"\\^done,format=\"natural\"" \
-	"set format variable weird.long_array"
-
-mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \
-	"\\^done,format=\"hexadecimal\"" \
-	"set format variable weird.func_ptr"
-
-mi_gdb_test "-var-set-format weird.func_ptr_struct hexadecimal" \
-	"\\^done,format=\"hexadecimal\"" \
-	"set format variable weird.func_ptr_struct"
-
-mi_gdb_test "-var-set-format weird.func_ptr_ptr natural" \
-	"\\^done,format=\"natural\"" \
-	"set format variable weird.func_ptr_ptr"
-
-mi_gdb_test "-var-set-format weird.u1 natural" \
-	"\\^done,format=\"natural\"" \
-	"set format variable weird.u1"
-
-mi_gdb_test "-var-set-format weird.s2 natural" \
-	"\\^done,format=\"natural\"" \
-	"set format variable weird.s2"
-
-# Test: c_variable-6.25
-# Desc: value of weird and children
-#gdbtk_test c_variable-6.25 {value of weird and children} {
-#  set values {}
-#  foreach v [lsort [array names var]] f [list x "" "" x x x x d d d d d] {
-#    lappend values [value $v $f]
-#  }
-
-#  set values
-#} {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1}
-
-# Test: c_variable-6.26
-# Desc: change format of weird and children to octal
-#gdbtk_test c_variable-6.26 {change format of weird and children to octal} {
-#  set formats {}
-#  foreach v [lsort [array names var]] {
-#    $var($v) format octal
-#    lappend formats [$var($v) format]
-#  }
-
-#  set formats
-#} {octal octal octal octal octal octal octal octal octal octal octal octal}
-
-# Test: c_variable-6.27
-# Desc: value of weird and children with new format
-#gdbtk_test c_variable-6.27 {value of foo with new format} {
-#  set values {}
-#  foreach v [lsort [array names var]] {
-#    lappend values [value $v o]
-#  }
-
-#  set values
-#} {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1}
-
-# Test: c_variable-6.30
-# Desc: create more children of weird
-#gdbtk_test c_variable-6.30 {create more children of weird} {
-#  foreach v [array names var] {
-#    get_children $v
-#  }
-
-#  # Do it twice to get more children
-#  foreach v [array names var] {
-#    get_children $v
-#  }
-
-#  lsort [array names var]
-#} {weird weird.char_ptr weird.character weird.func_ptr weird.func_ptr_ptr weird.func_ptr_struct weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.integer weird.long_array weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.long_int weird.s2 weird.s2.g weird.s2.h weird.s2.i weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9 weird.s2.u2 weird.s2.u2.f weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.u1 weird.u1.a weird.u1.b weird.u1.c weird.u1.d}
-
-# Test: c_variable-6.31
-# Desc: check that all children of weird change
-#       Ok, obviously things like weird.s2 and weird.u1 will not change!
-#gdbtk_test *c_variable-6.31 {check that all children of weird change (ops, we are now reporting array names as changed in this case - seems harmless though)} {
-#  $var(weird) value 0x2121
-#  check_update
-#} {{weird.integer weird.character weird.char_ptr weird.long_int weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.func_ptr weird.func_ptr_struct weird.func_ptr_ptr weird.u1.a weird.u1.b weird.u1.c weird.u1.d weird.s2.u2.f weird.s2.g weird.s2.h weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9} {weird.s2.i weird.s2.u2 weird weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.s2 weird.long_array weird.u1} {}}
-
-mi_gdb_test "-var-delete weird" \
-	"\\^done,ndeleted=\"12\"" \
-	"delete var weird"
-
-
-#####               #####
-#                       #
-# Special Display Tests #
-#                       #
-#####               #####
-
-# Stop in "do_special_tests"
-mi_gdb_test "200-break-insert do_special_tests" \
-	"200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"282\",times=\"0\"\}" \
-	"break-insert operation"
-
-send_gdb "-exec-continue\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\{\},file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" {
-	pass "continue to do_special_tests"
-    }
-    timeout {
-	fail "continue to do_special_tests (timeout)"
-    }
-}
-
-# Test: c_variable-7.10
-# Desc: create union u
-mi_gdb_test "-var-create u * u" \
-	"\\^done,name=\"u\",numchild=\"2\",type=\"union named_union\"" \
-	"create local variable u"
-
-# Test: c_variable-7.11
-# Desc: value of u
-mi_gdb_test "-var-evaluate-expression u" \
-	"\\^done,value=\"\{\\.\\.\\.\}\"" \
-	"eval variable u"
-
-# Test: c_variable-7.12
-# Desc: type of u
-mi_gdb_test "-var-info-type u" \
-	"\\^done,type=\"union named_union\"" \
-	"info type variable u"
-
-# Test: c_variable-7.13
-# Desc: is u editable
-mi_gdb_test "-var-show-attributes u" \
-	"\\^done,attr=\"noneditable\"" \
-	"is u editable"
-
-# Test: c_variable-7.14
-# Desc: number of children of u
-mi_gdb_test "-var-info-num-children u" \
-	"\\^done,numchild=\"2\"" \
-	"get number of children of u"
-
-# Test: c_variable-7.15
-# Desc: children of u
-mi_gdb_test "-var-list-children u" \
-	"\\^done,numchild=\"2\",children=\{child=\{name=\"u.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"u.char_ptr\",exp=\"char_ptr\",numchild=\"0\",type=\"char \\*\"\}\}" \
-	"get children of u"
-
-# Test: c_variable-7.20
-# Desc: create anonu
-mi_gdb_test "-var-create anonu * anonu" \
-	"\\^done,name=\"anonu\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"" \
-	"create local variable anonu"
-
-# Test: c_variable-7.21
-# Desc: value of anonu
-mi_gdb_test "-var-evaluate-expression anonu" \
-	"\\^done,value=\"\{\\.\\.\\.\}\"" \
-	"eval variable anonu"
-
-# Test: c_variable-7.22
-# Desc: type of anonu
-mi_gdb_test "-var-info-type anonu" \
-	"\\^done,type=\"union \{\\.\\.\\.\}\"" \
-	"info type variable anonu"
-
-# Test: c_variable-7.23
-# Desc: is anonu editable
-mi_gdb_test "-var-show-attributes anonu" \
-	"\\^done,attr=\"noneditable\"" \
-	"is anonu editable"
-
-# Test: c_variable-7.24
-# Desc: number of children of anonu
-mi_gdb_test "-var-info-num-children anonu" \
-	"\\^done,numchild=\"3\"" \
-	"get number of children of anonu"
-
-# Test: c_variable-7.25
-# Desc: children of anonu
-mi_gdb_test "-var-list-children anonu" \
-	"\\^done,numchild=\"3\",children=\{child=\{name=\"anonu.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anonu.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anonu.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\}" \
-	"get children of anonu"
-
-# Test: c_variable-7.30
-# Desc: create struct s
-mi_gdb_test "-var-create s * s" \
-	"\\^done,name=\"s\",numchild=\"6\",type=\"struct _simple_struct\"" \
-	"create local variable s"
-
-
-# Test: c_variable-7.31
-# Desc: value of s
-mi_gdb_test "-var-evaluate-expression s" \
-	"\\^done,value=\"\{\\.\\.\\.\}\"" \
-	"eval variable s"
-
-# Test: c_variable-7.32
-# Desc: type of s
-mi_gdb_test "-var-info-type s" \
-	"\\^done,type=\"struct _simple_struct\"" \
-	"info type variable s"
-
-# Test: c_variable-7.33
-# Desc: is s editable
-mi_gdb_test "-var-show-attributes s" \
-	"\\^done,attr=\"noneditable\"" \
-	"is s editable"
-
-# Test: c_variable-7.34
-# Desc: number of children of s
-mi_gdb_test "-var-info-num-children s" \
-	"\\^done,numchild=\"6\"" \
-	"get number of children of s"
-
-# Test: c_variable-7.35
-# Desc: children of s
-mi_gdb_test "-var-list-children s" \
-	"\\^done,numchild=\"6\",children=\{child=\{name=\"s.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"s.unsigned_integer\",exp=\"unsigned_integer\",numchild=\"0\",type=\"unsigned int\"\},child=\{name=\"s.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"s.signed_character\",exp=\"signed_character\",numchild=\"0\",type=\"signed char\"\},child=\{name=\"s.char_ptr\",exp=\"char_ptr\",numchild=\"0\",type=\"char \\*\"\},child=\{name=\"s.array_of_10\",exp=\"array_of_10\",numchild=\"10\",type=\"int \\\[10\\\]\"\}\}" \
-	"get children of s"
-#} {integer unsigned_integer character signed_character char_ptr array_of_10}
-
-# Test: c_variable-7.40
-# Desc: create anons
-mi_gdb_test "-var-create anons * anons" \
-	"\\^done,name=\"anons\",numchild=\"3\",type=\"struct \{\\.\\.\\.\}\"" \
-	"create local variable anons"
-
-# Test: c_variable-7.41
-# Desc: value of anons
-mi_gdb_test "-var-evaluate-expression anons" \
-	"\\^done,value=\"\{\\.\\.\\.\}\"" \
-	"eval variable anons"
-
-# Test: c_variable-7.42
-# Desc: type of anons
-mi_gdb_test "-var-info-type anons" \
-	"\\^done,type=\"struct \{\\.\\.\\.\}\"" \
-	"info type variable anons"
-
-# Test: c_variable-7.43
-# Desc: is anons editable
-mi_gdb_test "-var-show-attributes anons" \
-	"\\^done,attr=\"noneditable\"" \
-	"is anons editable"
-
-# Test: c_variable-7.44
-# Desc: number of children of anons
-mi_gdb_test "-var-info-num-children anons" \
-	"\\^done,numchild=\"3\"" \
-	"get number of children of anons"
-
-# Test: c_variable-7.45
-# Desc: children of anons
-mi_gdb_test "-var-list-children anons" \
-	"\\^done,numchild=\"3\",children=\{child=\{name=\"anons.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anons.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anons.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\}" \
-	"get children of anons"
-
-
-# Test: c_variable-7.50
-# Desc: create enum e
-mi_gdb_test "-var-create e * e" \
-	"\\^done,name=\"e\",numchild=\"0\",type=\"enum foo\"" \
-	"create local variable e"
-
-setup_xfail "*-*-*"
-# Test: c_variable-7.51
-# Desc: value of e
-mi_gdb_test "-var-evaluate-expression e" \
-	"\\^done,value=\"FIXME\"" \
-	"eval variable e"
-clear_xfail "*-*-*"
-
-# Test: c_variable-7.52
-# Desc: type of e
-mi_gdb_test "-var-info-type e" \
-	"\\^done,type=\"enum foo\"" \
-	"info type variable e"
-
-# Test: c_variable-7.53
-# Desc: is e editable
-mi_gdb_test "-var-show-attributes e" \
-	"\\^done,attr=\"editable\"" \
-	"is e editable"
-
-# Test: c_variable-7.54
-# Desc: number of children of e
-mi_gdb_test "-var-info-num-children e" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of e"
-
-# Test: c_variable-7.55
-# Desc: children of e
-mi_gdb_test "-var-list-children e" \
-	"\\^done,numchild=\"0\"" \
-	"get children of e"
-
-# Test: c_variable-7.60
-# Desc: create anone
-mi_gdb_test "-var-create anone * anone" \
-	"\\^done,name=\"anone\",numchild=\"0\",type=\"enum \{\\.\\.\\.\}\"" \
-	"create local variable anone"
-
-setup_xfail "*-*-*"
-# Test: c_variable-7.61
-# Desc: value of anone
-mi_gdb_test "-var-evaluate-expression anone" \
-	"\\^done,value=\"A\"" \
-	"eval variable anone"
-clear_xfail "*-*-*"
-
-
-# Test: c_variable-7.70
-# Desc: create anone
-mi_gdb_test "-var-create anone * anone" \
-	"&\"Duplicate variable object name\\\\n\".*\\^error,msg=\"Duplicate variable object name\"" \
-	"create duplicate local variable anone"
-
-
-# Test: c_variable-7.72
-# Desc: type of anone
-mi_gdb_test "-var-info-type anone" \
-	"\\^done,type=\"enum \{\\.\\.\\.\}\"" \
-	"info type variable anone"
-
-
-# Test: c_variable-7.73
-# Desc: is anone editable
-mi_gdb_test "-var-show-attributes anone" \
-	"\\^done,attr=\"editable\"" \
-	"is anone editable"
-
-# Test: c_variable-7.74
-# Desc: number of children of anone
-mi_gdb_test "-var-info-num-children anone" \
-	"\\^done,numchild=\"0\"" \
-	"get number of children of anone"
-
-# Test: c_variable-7.75
-# Desc: children of anone
-mi_gdb_test "-var-list-children anone" \
-	"\\^done,numchild=\"0\"" \
-	"get children of anone"
-
-
-# Record fp
-
-send_gdb "p/x \$fp\n"
-gdb_expect {
-    -re ".*($hex).*\\^done\r\n$mi_gdb_prompt$" { 
-	pass "print FP register"
-	set fp $expect_out(1,string) 
-    }
-#    -re ".*" { fail "print FP register"}
-    timeout { fail "print FP register (timeout)"}
-}
-
-mi_gdb_test "200-break-insert incr_a" \
-	"200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"85\",times=\"0\"\}" \
-	"break-insert operation"
-send_gdb "-exec-continue\n"
-gdb_expect {
-    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\{\{name=\"a\",value=\"2\.*\"\}\},file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
-	pass "continue to incr_a"
-    }
-    timeout {
-	fail "continue to incr_a (timeout)"
-    }
-}
-
-# Test: c_variable-7.81
-# Desc: Create variables in different scopes
-mi_gdb_test "-var-create a1 * a" \
-	"\\^done,name=\"a1\",numchild=\"0\",type=\"char\"" \
-	"create local variable a1"
-
-mi_gdb_test "-var-create a2 $fp a" \
-	"\\^done,name=\"a2\",numchild=\"0\",type=\"int\"" \
-	"create variable a2 in different scope"
-
-#gdbtk_test c_variable-7.81 {create variables in different scopes} {
-#  set a1 [gdb_variable create -expr a]
-#  set a2 [gdb_variable create -expr a -frame $fp]
-
-#  set vals {}
-#  lappend vals [$a1 value]
-#  lappend vals [$a2 value]
-#  set vals
-#} {2 1}
-
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.mi/mi0-watch.exp b/gdb/testsuite/gdb.mi/mi0-watch.exp
deleted file mode 100644
index a565193..0000000
--- a/gdb/testsuite/gdb.mi/mi0-watch.exp
+++ /dev/null
@@ -1,191 +0,0 @@
-#   Copyright 1999, 2000 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 essential Machine interface (MI) operations
-#
-# Verify that, using the MI, we can run a simple program and perform basic
-# debugging activities like: insert breakpoints, run the program,
-# step, next, continue until it ends and, last but not least, quit.
-#
-# The goal is not to test gdb functionality, which is done by other tests,
-# but to verify the correct output response to MI operations.
-#
-
-load_lib mi-support.exp
-set MIFLAGS "-i=mi0"
-
-gdb_exit
-if [mi_gdb_start] {
-    continue
-}
-
-set testfile "basics"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
-proc test_watchpoint_creation_and_listing {} {
-    global mi_gdb_prompt
-    global srcfile
-    global hex
-
-    # Insert a watchpoint and list
-    # Tests:
-    # -break-watch C
-    # -break-list
-
-    mi_gdb_test "111-break-watch C" \
-             "111\\^done,wpt=\{number=\"2\",exp=\"C\"\}" \
-             "break-watch operation"
-
-    mi_gdb_test "222-break-list" \
-                "222\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\}" \
-                "list of watchpoints"
-
-}
-
-# UNUSED at the time
-proc test_awatch_creation_and_listing {} {
-    global mi_gdb_prompt
-    global srcfile
-    global hex
-
-    # Insert an access watchpoint and list it
-    # Tests:
-    # -break-watch -a A
-    # -break-list
-
-    mi_gdb_test "333-break-watch -a A" \
-             "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \
-             "break-watch -a operation"
-
-    mi_gdb_test "444-break-list" \
-                "444\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
-                "list of watchpoints awatch"
-
-    mi_gdb_test "777-break-delete 3" \
-	    "777\\^done" \
-	    "delete access watchpoint"
-}
-
-# UNUSED at the time
-proc test_rwatch_creation_and_listing {} {
-    global mi_gdb_prompt
-    global srcfile
-    global hex
-
-    # Insert a read watchpoint and list it.
-    # Tests:
-    # -break-insert -r B
-    # -break-list
-
-    mi_gdb_test "200-break-watch -r C" \
-             "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
-             "break-insert -r operation"
-
-    mi_gdb_test "300-break-list" \
-                "300\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\}" \
-                "list of breakpoints"
-
-    mi_gdb_test "177-break-delete 4" \
-	    "177\\^done" \
-	    "delete read watchpoint"
-}
-
-proc test_running_the_program {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Run the program without args, then specify srgs and rerun the program
-    # Tests:
-    # -exec-run
-
-    mi_gdb_test "300-break-insert callee4" \
-             "300\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
-             "insert breakpoint at callee4"
-
-    # mi_gdb_test cannot be used for asynchronous commands because there are
-    # two prompts involved and this can lead to a race condition.
-    # The following is equivalent to a send_gdb "000-exec-run\n"
-    mi_run_cmd
-    # The running part has been checked already by mi_run_cmd
-        gdb_expect {
-	    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \
-		    { pass "run to callee4" }
-          -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
-          timeout {fail "run to callee4 (timeout 2)"}
-        }
-}
-
-proc test_watchpoint_triggering {} {
-    global mi_gdb_prompt
-    global hex
-
-    # Continue execution until the watchpoint is reached,  continue again, 
-    # to see the watchpoint go out of scope.
-    # Does:
-    # -exec-continue (Here wp triggers)
-    # -exec-continue (Here wp goes out of scope)
-
-    send_gdb "222-exec-continue\n"
-    gdb_expect {
-      -re "222\\^running\r\n$mi_gdb_prompt" {
-        gdb_expect {
-	    -re "222\\*stopped,reason=\"watchpoint-trigger\",wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\},thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee4\",args=\{\},file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
-            pass "watchpoint trigger"
-          }
-          -re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (2)"}
-          timeout {fail "watchpoint trigger (timeout 2)"}
-        }
-      }
-      -re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (1)"}
-      timeout {fail "watchpoint trigger (timeout 1)"}
-    }
-
-    send_gdb "223-exec-continue\n"
-    gdb_expect {
-      -re "223\\^running\r\n$mi_gdb_prompt" {
-        gdb_expect {
-	    -re "\[\r\n\]*223\\*stopped,reason=\"watchpoint-scope\",wpnum=\"2\",thread-id=\"0\",frame=\{addr=\"$hex\",func=\"callee3\",args=\{.*\},file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {
-            pass "wp out of scope"
-          }
-          -re ".*$mi_gdb_prompt$" {fail "wp out of scope (2)"}
-          timeout {fail "wp out of scope (timeout 2)"}
-        }
-      }
-      -re ".*$mi_gdb_prompt$" {fail "wp out of scope (1)"}
-      timeout {fail "wp out of scope (timeout 1)"}
-    }
-}
-
-test_running_the_program
-test_watchpoint_creation_and_listing
-#test_rwatch_creation_and_listing
-#test_awatch_creation_and_listing
-test_watchpoint_triggering
-
-mi_gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp
index bdb3209..f4b2af0 100644
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -146,15 +146,9 @@
 ### Return true if the thread had a stack which was not only
 ### acceptable, but interesting.  SEEN should be an array in which
 ### SEEN(N) exists iff we have found philosopher number N before.
-
-set main_seen 0
-set manager_seen 0
-
 proc check_philosopher_stack {thread seen_name} {
     global gdb_prompt
     upvar $seen_name seen
-    global main_seen
-    global manager_seen
 
     set name "philosopher is distinct: $thread"
     set interesting 0
@@ -176,24 +170,6 @@
 	    ## Maybe the thread hasn't started yet.
 	    pass $name
 	}
-	-re ".* in main \\(.*$gdb_prompt $" {
-	    if {$main_seen == 1} {
-		fail "main is distinct: $thread"
-	    } else {
-		set main_seen 1
-		pass "main is distinct: $thread"
-	    }
-	    set interesting 1
-	}
-	-re ".* in __pthread_manager \\(.*$gdb_prompt $" {
-	    if {$manager_seen == 1} {
-		fail "manager thread is distinct: $thread"
-	    } else {
-		set manager_seen 1
-		pass "manager thread is distinct: $thread"
-	    }
-	    set interesting 1
-	}
 	-re " in \\?\\?.*\r\n$gdb_prompt $" {
 	    ## Sometimes we can't get a backtrace.  I'm going to call
 	    ## this a pass, since we do verify that at least one
@@ -215,7 +191,7 @@
 
 set any_interesting 0
 array set seen {}
-for {set i 1} {$i <= 7} {incr i} {
+for {set i 3} {$i <= 7} {incr i} {
     if [check_philosopher_stack $i seen] {
 	set any_interesting 1
     }
diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp
index e57583b..88db0f0 100644
--- a/gdb/testsuite/gdb.threads/pthreads.exp
+++ b/gdb/testsuite/gdb.threads/pthreads.exp
@@ -170,11 +170,7 @@
 
     send_gdb "p common_routine::full_coverage\n"
     gdb_expect {
-	-re ".* = 1.*$gdb_prompt $" {}
-	-re ".* = 0.*$gdb_prompt $" {
-	    fail "some threads didn't run"
-	    return 0
-	}
+	-re ".*= 1\r\n$gdb_prompt $" {}
 	default {
 	    fail "some threads didn't run"
 	    return 0
@@ -197,11 +193,13 @@
     # We should be able to do an info threads before starting any others.
     send_gdb "info threads\n"
     gdb_expect {
-	-re ".*Thread.*main.*$gdb_prompt $" {
+	-re ".*Thread.*LWP.*main.*$gdb_prompt $" {
 	    pass "info threads"
 	}
 	-re "\r\n$gdb_prompt $" {
-	    unsupported "gdb does not support pthreads for this machine"
+	    pass "info threads"
+	    setup_xfail "*-*-*"
+	    fail "gdb does not support pthreads for this machine"
 	    return 0
 	}
     }
@@ -259,7 +257,6 @@
 	}
 	timeout {
 	    fail "$description (timeout)"
-	    return 1;
 	}
     }
     gdb_test "bt" ""
@@ -268,7 +265,6 @@
     if [all_threads_running] then {
 	pass "All threads running after continuing from ^C stop"
     }
-    return 0;
 }
 
 proc check_backtraces {} {
@@ -339,10 +335,7 @@
 if [runto_main] then {
     clear_xfail "alpha-*-osf*"
     if [test_startup] then {
-	if [check_control_c] then {
-	    warning "Could not stop child with ^C; skipping rest of tests.\n"
-	    return;
-	}
+	check_control_c
 	check_backtraces
     }
 }
diff --git a/gdb/testsuite/gdb.trace/actions.c b/gdb/testsuite/gdb.trace/actions.c
index ae3c1c3..e8df614 100644
--- a/gdb/testsuite/gdb.trace/actions.c
+++ b/gdb/testsuite/gdb.trace/actions.c
@@ -53,15 +53,15 @@
 
 {
    char *p = "gdb_c_test";
-   char *ridiculously_long_variable_name_with_equally_long_string_assignment;
+   char *rediculously_long_variable_name_with_equally_long_string_assignment;
    register long local_reg = 7;
    static unsigned long local_static, local_static_sizeof;
    long local_long;
    unsigned long *stack_ptr;
    unsigned long end_of_stack;
 
-   ridiculously_long_variable_name_with_equally_long_string_assignment = 
-     "ridiculously long variable name with equally long string assignment";
+   rediculously_long_variable_name_with_equally_long_string_assignment = 
+     "rediculously long variable name with equally long string assignment";
    local_static = 9;
    local_static_sizeof = sizeof (struct GDB_STRUCT_TEST);
    local_long = local_reg + 1;
diff --git a/gdb/testsuite/gdb.trace/gdb_c_test.c b/gdb/testsuite/gdb.trace/gdb_c_test.c
index 7477590..6447fb1 100644
--- a/gdb/testsuite/gdb.trace/gdb_c_test.c
+++ b/gdb/testsuite/gdb.trace/gdb_c_test.c
@@ -497,15 +497,15 @@
 
 {
    char *p = "gdb_c_test";
-   char *ridiculously_long_variable_name_with_equally_long_string_assignment;
+   char *rediculously_long_variable_name_with_equally_long_string_assignment;
    register long local_reg = 7;
    static unsigned long local_static, local_static_sizeof;
    long local_long;
    unsigned long *stack_ptr;
    unsigned long end_of_stack;
 
-   ridiculously_long_variable_name_with_equally_long_string_assignment = 
-     "ridiculously long variable name with equally long string assignment";
+   rediculously_long_variable_name_with_equally_long_string_assignment = 
+     "rediculously long variable name with equally long string assignment";
    local_static = 9;
    local_static_sizeof = sizeof (struct GDB_STRUCT_TEST);
    local_long = local_reg + 1;
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 73df80f..496b21a 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -371,8 +371,7 @@
 
 
 
-# gdb_test COMMAND PATTERN MESSAGE QUESTION RESPONSE
-# Send a command to gdb; test the result.
+# gdb_test COMMAND PATTERN MESSAGE -- send a command to gdb; test the result.
 #
 # COMMAND is the command to execute, send to GDB with send_gdb.  If
 #   this is the null string no command is sent.
@@ -382,9 +381,6 @@
 #   omitted, then the pass/fail messages use the command string as the
 #   message.  (If this is the empty string, then sometimes we don't
 #   call pass or fail at all; I don't understand this at all.)
-# QUESTION is a question GDB may ask in response to COMMAND, like
-#   "are you sure?"
-# RESPONSE is the response to send if QUESTION appears.
 #
 # Returns:
 #    1 if the test failed,
@@ -1603,30 +1599,6 @@
   }
 }
 
-# Initializes the display for gdbtk testing.
-# Returns 1 if tests should run, 0 otherwise.
-proc gdbtk_initialize_display {} {
-  global _using_windows
-
-  # This is hacky, but, we don't have much choice. When running
-  # expect under Windows, tcl_platform(platform) is "unix".
-  if {![info exists _using_windows]} {
-    set _using_windows [expr {![catch {exec cygpath --help}]}]
-  }
-
-  if {![_gdbtk_xvfb_init]} {
-    if {$_using_windows} {
-      untested "No GDB_DISPLAY -- skipping tests"
-    } else {
-      untested "No GDB_DISPLAY or Xvfb -- skipping tests"
-    }
-
-    return 0
-  }
-
-  return 1
-}
-
 # From dejagnu:
 # srcdir = testsuite src dir (e.g., devo/gdb/testsuite)
 # objdir = testsuite obj dir (e.g., gdb/testsuite)
@@ -1660,34 +1632,34 @@
     }
   }
 
+  
   set wd [pwd]
-
-  # Find absolute path to test
-  set test [to_tcl_path -abs $test]
-
-  # Set environment variables for tcl libraries and such
   cd $srcdir
   set abs_srcdir [pwd]
-  set env(GDBTK_LIBRARY) [to_tcl_path -abs [file join $abs_srcdir .. gdbtk library]]
-  set env(TCL_LIBRARY) [to_tcl_path -abs [file join $abs_srcdir .. .. tcl library]]
-  set env(TK_LIBRARY) [to_tcl_path -abs [file join $abs_srcdir .. .. tk library]]
-  set env(TIX_LIBRARY) [to_tcl_path -abs [file join $abs_srcdir .. .. tix library]]
-  set env(ITCL_LIBRARY) [to_tcl_path -abs [file join $abs_srcdir .. .. itcl itcl library]]
-  set env(CYGNUS_GUI_LIBRARY) [to_tcl_path -abs [file join .. $abs_srcdir .. .. libgui library]]
-  set env(DEFS) [to_tcl_path -abs [file join $abs_srcdir $subdir defs]]
-
+  cd [file join $abs_srcdir .. gdbtk library]
+  set env(GDBTK_LIBRARY) [pwd]
+  cd [file join $abs_srcdir .. .. tcl library]
+  set env(TCL_LIBRARY) [pwd]
+  cd [file join $abs_srcdir .. .. tk library]
+  set env(TK_LIBRARY) [pwd]
+  cd [file join $abs_srcdir .. .. tix library]
+  set env(TIX_LIBRARY) [pwd]
+  cd [file join $abs_srcdir .. .. itcl itcl library]
+  set env(ITCL_LIBRARY) [pwd]
+  cd [file join .. $abs_srcdir .. .. libgui library]
+  set env(CYGNUS_GUI_LIBRARY) [pwd]
+  cd $wd
+  cd [file join $abs_srcdir $subdir]
+  set env(DEFS) [file join [pwd] defs]
   cd $wd
   cd [file join $objdir $subdir]
   set env(OBJDIR) [pwd]
   cd $wd
 
-  # Set info about target into env
-  _gdbtk_export_target_info
-
   set env(SRCDIR) $abs_srcdir
   set env(GDBTK_VERBOSE) 1
-  set env(GDBTK_LOGFILE) [to_tcl_path [file join $objdir gdb.log]]
-
+  set env(GDBTK_LOGFILE) [file join $objdir gdb.log]
+  set env(GDBTK_TEST_RUNNING) 1
   set err [catch {exec $GDB -nx -q --tclcommand=$test} res]
   if { $err } {
     perror "Execing $GDB failed: $res"
@@ -1696,149 +1668,6 @@
   return $res
 }
 
-# Start xvfb when using it.
-# The precedence is:
-#   1. If GDB_DISPLAY is set, use it
-#   2. If Xvfb exists, use it (not on cygwin)
-#   3. Skip tests
-proc _gdbtk_xvfb_init {} {
-  global env spawn_id _xvfb_spawn_id _using_windows
-
-  if {[info exists env(GDB_DISPLAY)]} {
-    set env(DISPLAY) $env(GDB_DISPLAY)
-  } elseif {!$_using_windows && [which Xvfb] != 0} {
-    set screen ":[getpid]"
-    set pid [spawn  Xvfb $screen]
-    set _xvfb_spawn_id $spawn_id
-    set env(DISPLAY) $screen
-  } else {
-    # No Xvfb found -- skip test
-    return 0
-  }
-
-  return 1
-}
-
-# Kill xvfb
-proc _gdbtk_xvfb_exit {} {
-  global objdir subdir env _xvfb_spawn_id
-
-  if {[info exists _xvfb_spawn_id]} {
-    exec kill [exp_pid -i $_xvfb_spawn_id]
-    wait -i $_xvfb_spawn_id
-  }
-}
-
-# help proc for setting tcl-style paths from unix-style paths
-# pass "-abs" to make it an absolute path
-proc to_tcl_path {unix_path {arg {}}} {
-  global _using_windows
-
-  if {[string compare $unix_path "-abs"] == 0} {
-    set unix_path $arg
-    set wd [pwd]
-    cd [file dirname $unix_path]
-    set dirname [pwd]
-    set unix_name [file join $dirname [file tail $unix_path]]
-    cd $wd
-  }
-
-  if {$_using_windows} {
-    set unix_path [exec cygpath -aw $unix_path]
-    set unix_path [join [split $unix_path \\] /]
-  }
-
-  return $unix_path
-}
-  
-# Set information about the target into the environment
-# variable TARGET_INFO. This array will contain a list
-# of commands that are necessary to run a target.
-#
-# This is mostly devined from how dejagnu works, what
-# procs are defined, and analyzing unix.exp, monitor.exp,
-# and sim.exp.
-#
-# Array elements exported:
-# Index   Meaning
-# -----   -------
-# init    list of target/board initialization commands
-# target  target command for target/board
-# load    load command for target/board
-# run     run command for target_board
-proc _gdbtk_export_target_info {} {
-  global env
-
-  # Figure out what "target class" the testsuite is using,
-  # i.e., sim, monitor, native
-  if {[string compare [info proc gdb_target_monitor] gdb_target_monitor] == 0} {
-    # Using a monitor/remote target
-    set target monitor
-  } elseif {[string compare [info proc gdb_target_sim] gdb_target_sim] == 0} {
-    # Using a simulator target
-    set target simulator
-  } else {
-    # Assume native
-    set target native
-  }
-
-  # Now setup the array to be exported.
-  set info(init) {}
-  set info(target) {}
-  set info(load) {}
-  set info(run) {}
-
-  switch $target {
-    simulator {
-      set opts "[target_info gdb,target_sim_options]"
-      set info(target) "target sim $opts"
-      set info(load) "load"
-      set info(run) "run"
-    }
-
-    monitor {
-      # Setup options for the connection
-      if {[target_info exists baud]} {
-	lappend info(init) "set remotebaud [target_info baud]"
-      }
-      if {[target_info exists binarydownload]} {
-	lappend info(init) "set remotebinarydownload [target_info binarydownload]"
-      }
-      if {[target_info exists disable_x_packet]} {
-	lappend info(init) "set remote X-packet disable"
-      }
-      if {[target_info exists disable_z_packet]} {
-	lappend info(init) "set remote Z-packet disable"
-      }
-
-      # Get target name and connection info
-      if {[target_info exists gdb_protocol]} {
-	set targetname "[target_info gdb_protocol]"
-      } else {
-	set targetname "not_specified"
-      }
-      if {[target_info exists gdb_serial]} {
-	set serialport "[target_info gdb_serial]"
-      } elseif {[target_info exists netport]} {
-	set serialport "[target_info netport]"
-      } else {
-	set serialport "[target_info serial]"
-      }
-
-      set info(target) "target $targetname $serialport"
-      set info(load) "load"
-      set info(run) "continue"
-    }
-
-    native {
-      set info(run) "run"
-    }
-  }
-
-  # Export the array to the environment
-  set env(TARGET_INFO) [array get info]
-}
-
 # gdbtk tests call this function to print out the results of the
 # tests. The argument is a proper list of lists of the form:
 # {status name description msg}. All of these things typically
@@ -1874,16 +1703,6 @@
   }
 }
 
-proc gdbtk_done {{results {}}} {
-  global _xvfb_spawn_id
-  gdbtk_analyze_results $results
-
-  # Kill off xvfb if using it
-  if {[info exists _xvfb_spawn_id]} {
-    _gdbtk_xvfb_exit
-  }
-}
-
 # Print a message and return true if a test should be skipped
 # due to lack of floating point suport.
 
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 2f48ebe..202a0a0 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -206,7 +206,6 @@
     send_gdb "103-break-list\n"
     gdb_expect 30 {
 	 -re "103-break-list\r\n103\\\^done,BreakpointTable=\{\}\r\n$mi_gdb_prompt$" {}
-	 -re "103-break-list\r\n103\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[\\\]\}" {}
 	 -re "103-break-list\r\n103\\\^doneNo breakpoints or watchpoints.\r\n\r\n$mi_gdb_prompt$" {warning "Unexpected console text received"}
 	 -re "$mi_gdb_prompt$" { perror "Breakpoints not deleted" ; return }
 	 -re "Delete all breakpoints.*or n.*$" {
@@ -633,7 +632,7 @@
 
     mi_run_cmd
     gdb_expect {
-	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"main\",args=\(\\\[\\\]\|\{\}\),file=\".*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
+	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"main\",args=\{\},file=\".*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
 	    pass "$test"
 	    return 0
 	}
@@ -655,7 +654,7 @@
     global mi_gdb_prompt
     send_gdb "220-exec-next\n"
     gdb_expect {
-	-re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"end-stepping-range\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\".*\",args=\[\\\[\{].*[\\\]\}\],,file=\".*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
+	-re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"end-stepping-range\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\".*\",args=\{.*\},,file=\".*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
 	    pass "$test"
 	    return 0
 	}
@@ -677,7 +676,7 @@
     global mi_gdb_prompt
     send_gdb "220-exec-step\n"
     gdb_expect {
-	-re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"end-stepping-range\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\".*\",args=\[\\\[\{\].*\[\\\]\}\],,file=\".*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
+	-re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"end-stepping-range\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\".*\",args=\{.*\},,file=\".*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
 	    pass "$test"
 	    return 0
 	}
@@ -687,3 +686,8 @@
 	}
     }
 }
+
+
+# Local variables: 
+# change-log-default-name: "../gdb.mi/ChangeLog-mi"
+# End: 
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index 8ddc6a2..e357751 100644
--- a/gdb/thread-db.c
+++ b/gdb/thread-db.c
@@ -56,8 +56,7 @@
 /* Non-zero if we're using this module's target vector.  */
 static int using_thread_db;
 
-/* Non-zero if we have to keep this module's target vector active
-   across re-runs.  */
+/* Non-zero if we musn't deactivate this module's target vector.  */
 static int keep_thread_db;
 
 /* Non-zero if we have determined the signals used by the threads
@@ -123,17 +122,23 @@
 
 /* Building process ids.  */
 
+#ifndef TIDGET
+#define TIDGET(PID)		(((PID) & 0x7fffffff) >> 16)
+#define PIDGET(PID)		(((PID) & 0xffff))
+#define MERGEPID(PID, TID)	(((PID) & 0xffff) | ((TID) << 16))
+#endif
 
-#define GET_PID(ptid)		ptid_get_pid (ptid)
-#define GET_LWP(ptid)		ptid_get_lwp (ptid)
-#define GET_THREAD(ptid)	ptid_get_tid (ptid)
+#define THREAD_FLAG		0x80000000
 
-#define is_lwp(ptid)		(GET_LWP (ptid) != 0)
-#define is_thread(ptid)		(GET_THREAD (ptid) != 0)
+#define is_lwp(pid)		(((pid) & THREAD_FLAG) == 0 && TIDGET (pid))
+#define is_thread(pid)		((pid) & THREAD_FLAG)
 
-#define BUILD_LWP(lwp, pid)	ptid_build (pid, lwp, 0)
-#define BUILD_THREAD(tid, pid)	ptid_build (pid, 0, tid)
+#define GET_PID(pid)		PIDGET (pid)
+#define GET_LWP(pid)		TIDGET (pid)
+#define GET_THREAD(pid)		TIDGET (pid)
 
+#define BUILD_LWP(tid, pid)	MERGEPID (pid, tid)
+#define BUILD_THREAD(tid, pid)	(MERGEPID (pid, tid) | THREAD_FLAG)
 
 
 struct private_thread_info
@@ -143,6 +148,27 @@
 };
 
 
+/* Helper functions.  */
+
+static void
+restore_inferior_pid (void *arg)
+{
+  int *saved_pid_ptr = arg;
+  inferior_pid = *saved_pid_ptr;
+  xfree (arg);
+}
+
+static struct cleanup *
+save_inferior_pid (void)
+{
+  int *saved_pid_ptr;
+
+  saved_pid_ptr = xmalloc (sizeof (int));
+  *saved_pid_ptr = inferior_pid;
+  return make_cleanup (restore_inferior_pid, saved_pid_ptr);
+}
+
+
 static char *
 thread_db_err_str (td_err_e err)
 {
@@ -226,50 +252,50 @@
 
 /* Convert between user-level thread ids and LWP ids.  */
 
-static ptid_t
-thread_from_lwp (ptid_t ptid)
+static int
+thread_from_lwp (int pid)
 {
   td_thrinfo_t ti;
   td_thrhandle_t th;
   td_err_e err;
 
-  if (GET_LWP (ptid) == 0)
-    ptid = BUILD_LWP (GET_PID (ptid), GET_PID (ptid));
+  if (GET_LWP (pid) == 0)
+    pid = BUILD_LWP (pid, pid);
 
-  gdb_assert (is_lwp (ptid));
+  gdb_assert (is_lwp (pid));
 
-  err = td_ta_map_lwp2thr_p (thread_agent, GET_LWP (ptid), &th);
+  err = td_ta_map_lwp2thr_p (thread_agent, GET_LWP (pid), &th);
   if (err != TD_OK)
     error ("Cannot find user-level thread for LWP %d: %s",
-	   GET_LWP (ptid), thread_db_err_str (err));
+	   GET_LWP (pid), thread_db_err_str (err));
 
   err = td_thr_get_info_p (&th, &ti);
   if (err != TD_OK)
     error ("Cannot get thread info: %s", thread_db_err_str (err));
 
-  return BUILD_THREAD (ti.ti_tid, GET_PID (ptid));
+  return BUILD_THREAD (ti.ti_tid, GET_PID (pid));
 }
 
-static ptid_t
-lwp_from_thread (ptid_t ptid)
+static int
+lwp_from_thread (int pid)
 {
   td_thrinfo_t ti;
   td_thrhandle_t th;
   td_err_e err;
 
-  if (! is_thread (ptid))
-    return ptid;
+  if (! is_thread (pid))
+    return pid;
 
-  err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
+  err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (pid), &th);
   if (err != TD_OK)
     error ("Cannot find thread %ld: %s",
-	   (long) GET_THREAD (ptid), thread_db_err_str (err));
+	   (long) GET_THREAD (pid), thread_db_err_str (err));
 
   err = td_thr_get_info_p (&th, &ti);
   if (err != TD_OK)
     error ("Cannot get thread info: %s", thread_db_err_str (err));
 
-  return BUILD_LWP (ti.ti_lid, GET_PID (ptid));
+  return BUILD_LWP (ti.ti_lid, GET_PID (pid));
 }
 
 
@@ -480,6 +506,20 @@
 }
 
 static void
+deactivate_target (void)
+{
+  /* Forget about the child's process ID.  We shouldn't need it
+     anymore.  */
+  proc_handle.pid = 0;
+
+  if (! keep_thread_db)
+    {
+      using_thread_db = 0;
+      unpush_target (&thread_db_ops);
+    }
+}
+
+static void
 thread_db_new_objfile (struct objfile *objfile)
 {
   td_err_e err;
@@ -487,15 +527,11 @@
   if (objfile == NULL)
     {
       /* All symbols have been discarded.  If the thread_db target is
-         active, deactivate it now.  */
-      if (using_thread_db)
-	{
-	  gdb_assert (proc_handle.pid == 0);
-	  unpush_target (&thread_db_ops);
-	  using_thread_db = 0;
-	}
-
+         active, deactivate it now, even if the application was linked
+         statically against the thread library.  */
       keep_thread_db = 0;
+      if (using_thread_db)
+	deactivate_target ();
 
       goto quit;
     }
@@ -508,7 +544,7 @@
   /* Initialize the structure that identifies the child process.  Note
      that at this point there is no guarantee that we actually have a
      child process.  */
-  proc_handle.pid = GET_PID (inferior_ptid);
+  proc_handle.pid = GET_PID (inferior_pid);
 
   /* Now attempt to open a connection to the thread library.  */
   err = td_ta_new_p (&proc_handle, &thread_agent);
@@ -557,7 +593,7 @@
 }
 
 static void
-attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
+attach_thread (int pid, const td_thrhandle_t *th_p,
 	       const td_thrinfo_t *ti_p, int verbose)
 {
   struct thread_info *tp;
@@ -566,80 +602,53 @@
   check_thread_signals ();
 
   if (verbose)
-    printf_unfiltered ("[New %s]\n", target_pid_to_str (ptid));
+    printf_unfiltered ("[New %s]\n", target_pid_to_str (pid));
 
   /* Add the thread to GDB's thread list.  */
-  tp = add_thread (ptid);
+  tp = add_thread (pid);
   tp->private = xmalloc (sizeof (struct private_thread_info));
   tp->private->lwpid = ti_p->ti_lid;
 
-  if (ti_p->ti_state == TD_THR_UNKNOWN ||
-      ti_p->ti_state == TD_THR_ZOMBIE)
-    return;/* A zombie thread -- do not attach. */
-
   /* Under Linux, we have to attach to each and every thread.  */
 #ifdef ATTACH_LWP
-  ATTACH_LWP (BUILD_LWP (ti_p->ti_lid, GET_PID (ptid)), 0);
+  if (ti_p->ti_lid != GET_PID (pid))
+    ATTACH_LWP (BUILD_LWP (ti_p->ti_lid, GET_PID (pid)), 0);
 #endif
 
   /* Enable thread event reporting for this thread.  */
   err = td_thr_event_enable_p (th_p, 1);
   if (err != TD_OK)
     error ("Cannot enable thread event reporting for %s: %s",
-	   target_pid_to_str (ptid), thread_db_err_str (err));
+	   target_pid_to_str (pid), thread_db_err_str (err));
 }
 
 static void
-thread_db_attach (char *args, int from_tty)
-{
-  target_beneath->to_attach (args, from_tty);
-
-  /* Destroy thread info; it's no longer valid.  */
-  init_thread_list ();
-
-  /* The child process is now the actual multi-threaded
-     program.  Snatch its process ID...  */
-  proc_handle.pid = GET_PID (inferior_ptid);
-
-  /* ...and perform the remaining initialization steps.  */
-  enable_thread_event_reporting ();
-  thread_db_find_new_threads();
-}
-
-static void
-detach_thread (ptid_t ptid, int verbose)
+detach_thread (int pid, int verbose)
 {
   if (verbose)
-    printf_unfiltered ("[%s exited]\n", target_pid_to_str (ptid));
+    printf_unfiltered ("[%s exited]\n", target_pid_to_str (pid));
 }
 
 static void
 thread_db_detach (char *args, int from_tty)
 {
   disable_thread_event_reporting ();
-
-  /* There's no need to save & restore inferior_ptid here, since the
-     inferior is supposed to be survive this function call.  */
-  inferior_ptid = lwp_from_thread (inferior_ptid);
-
-  /* Forget about the child's process ID.  We shouldn't need it
-     anymore.  */
-  proc_handle.pid = 0;
+  deactivate_target ();
 
   target_beneath->to_detach (args, from_tty);
 }
 
 static void
-thread_db_resume (ptid_t ptid, int step, enum target_signal signo)
+thread_db_resume (int pid, int step, enum target_signal signo)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
 
-  if (GET_PID (ptid) == -1)
-    inferior_ptid = lwp_from_thread (inferior_ptid);
-  else if (is_thread (ptid))
-    ptid = lwp_from_thread (ptid);
+  if (pid == -1)
+    inferior_pid = lwp_from_thread (inferior_pid);
+  else if (is_thread (pid))
+    pid = lwp_from_thread (pid);
 
-  target_beneath->to_resume (ptid, step, signo);
+  target_beneath->to_resume (pid, step, signo);
 
   do_cleanups (old_chain);
 }
@@ -649,7 +658,7 @@
    the event.  */
 
 static void
-check_event (ptid_t ptid)
+check_event (int pid)
 {
   td_event_msg_t msg;
   td_thrinfo_t ti;
@@ -657,7 +666,7 @@
   CORE_ADDR stop_pc;
 
   /* Bail out early if we're not at a thread event breakpoint.  */
-  stop_pc = read_pc_pid (ptid) - DECR_PC_AFTER_BREAK;
+  stop_pc = read_pc_pid (pid) - DECR_PC_AFTER_BREAK;
   if (stop_pc != td_create_bp_addr && stop_pc != td_death_bp_addr)
     return;
 
@@ -674,7 +683,7 @@
   if (err != TD_OK)
     error ("Cannot get thread info: %s", thread_db_err_str (err));
 
-  ptid = BUILD_THREAD (ti.ti_tid, GET_PID (ptid));
+  pid = BUILD_THREAD (ti.ti_tid, GET_PID (pid));
 
   switch (msg.event)
     {
@@ -691,8 +700,8 @@
       /* We may already know about this thread, for instance when the
          user has issued the `info threads' command before the SIGTRAP
          for hitting the thread creation breakpoint was reported.  */
-      if (! in_thread_list (ptid))
-	attach_thread (ptid, msg.th_p, &ti, 1);
+      if (! in_thread_list (pid))
+	attach_thread (pid, msg.th_p, &ti, 1);
       return;
 
     case TD_DEATH:
@@ -703,10 +712,10 @@
 	error ("Thread death event doesn't match breakpoint.");
 #endif
 
-      if (! in_thread_list (ptid))
+      if (! in_thread_list (pid))
 	error ("Spurious thread death event.");
 
-      detach_thread (ptid, 1);
+      detach_thread (pid, 1);
       return;
 
     default:
@@ -714,34 +723,34 @@
     }
 }
 
-static ptid_t
-thread_db_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+static int
+thread_db_wait (int pid, struct target_waitstatus *ourstatus)
 {
-  extern ptid_t trap_ptid;
+  extern int trap_pid;
 
-  if (GET_PID (ptid) != -1 && is_thread (ptid))
-    ptid = lwp_from_thread (ptid);
+  if (pid != -1 && is_thread (pid))
+    pid = lwp_from_thread (pid);
 
-  ptid = target_beneath->to_wait (ptid, ourstatus);
+  pid = target_beneath->to_wait (pid, ourstatus);
 
   if (proc_handle.pid == 0)
     /* The current child process isn't the actual multi-threaded
        program yet, so don't try to do any special thread-specific
        post-processing and bail out early.  */
-    return ptid;
+    return pid;
 
   if (ourstatus->kind == TARGET_WAITKIND_EXITED)
-    return pid_to_ptid (-1);
+    return -1;
 
   if (ourstatus->kind == TARGET_WAITKIND_STOPPED
       && ourstatus->value.sig == TARGET_SIGNAL_TRAP)
     /* Check for a thread event.  */
-    check_event (ptid);
+    check_event (pid);
 
-  if (!ptid_equal (trap_ptid, null_ptid))
-    trap_ptid = thread_from_lwp (trap_ptid);
+  if (trap_pid)
+    trap_pid = thread_from_lwp (trap_pid);
 
-  return thread_from_lwp (ptid);
+  return thread_from_lwp (pid);
 }
 
 static int
@@ -749,17 +758,17 @@
 		       struct mem_attrib *attrib,
 		       struct target_ops *target)
 {
-  struct cleanup *old_chain = save_inferior_ptid ();
+  struct cleanup *old_chain = save_inferior_pid ();
   int xfer;
 
-  if (is_thread (inferior_ptid))
+  if (is_thread (inferior_pid))
     {
       /* FIXME: This seems to be necessary to make sure breakpoints
          are removed.  */
-      if (! target_thread_alive (inferior_ptid))
-	inferior_ptid = pid_to_ptid (GET_PID (inferior_ptid));
+      if (! target_thread_alive (inferior_pid))
+	inferior_pid = GET_PID (inferior_pid);
       else
-	inferior_ptid = lwp_from_thread (inferior_ptid);
+	inferior_pid = lwp_from_thread (inferior_pid);
     }
 
   xfer = target_beneath->to_xfer_memory (memaddr, myaddr, len, write, attrib, target);
@@ -776,27 +785,27 @@
   gdb_prfpregset_t fpregset;
   td_err_e err;
 
-  if (! is_thread (inferior_ptid))
+  if (! is_thread (inferior_pid))
     {
       /* Pass the request to the target beneath us.  */
       target_beneath->to_fetch_registers (regno);
       return;
     }
 
-  err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (inferior_ptid), &th);
+  err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (inferior_pid), &th);
   if (err != TD_OK)
     error ("Cannot find thread %ld: %s",
-	   (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+	   (long) GET_THREAD (inferior_pid), thread_db_err_str (err));
 
   err = td_thr_getgregs_p (&th, gregset);
   if (err != TD_OK)
     error ("Cannot fetch general-purpose registers for thread %ld: %s",
-	   (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+	   (long) GET_THREAD (inferior_pid), thread_db_err_str (err));
 
   err = td_thr_getfpregs_p (&th, &fpregset);
   if (err != TD_OK)
     error ("Cannot get floating-point registers for thread %ld: %s",
-	   (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+	   (long) GET_THREAD (inferior_pid), thread_db_err_str (err));
 
   /* Note that we must call supply_gregset after calling the thread_db
      routines because the thread_db routines call ps_lgetgregs and
@@ -813,17 +822,17 @@
   gdb_prfpregset_t fpregset;
   td_err_e err;
 
-  if (! is_thread (inferior_ptid))
+  if (! is_thread (inferior_pid))
     {
       /* Pass the request to the target beneath us.  */
       target_beneath->to_store_registers (regno);
       return;
     }
 
-  err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (inferior_ptid), &th);
+  err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (inferior_pid), &th);
   if (err != TD_OK)
     error ("Cannot find thread %ld: %s",
-	   (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+	   (long) GET_THREAD (inferior_pid), thread_db_err_str (err));
 
   if (regno != -1)
     {
@@ -840,42 +849,33 @@
   err = td_thr_setgregs_p (&th, gregset);
   if (err != TD_OK)
     error ("Cannot store general-purpose registers for thread %ld: %s",
-	   (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+	   (long) GET_THREAD (inferior_pid), thread_db_err_str (err));
   err = td_thr_setfpregs_p (&th, &fpregset);
   if (err != TD_OK)
     error ("Cannot store floating-point registers  for thread %ld: %s",
-	   (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+	   (long) GET_THREAD (inferior_pid), thread_db_err_str (err));
 }
 
 static void
 thread_db_kill (void)
 {
-  /* There's no need to save & restore inferior_ptid here, since the
-     inferior isn't supposed to survive this function call.  */
-  inferior_ptid = lwp_from_thread (inferior_ptid);
   target_beneath->to_kill ();
 }
 
 static void
 thread_db_create_inferior (char *exec_file, char *allargs, char **env)
 {
-  if (! keep_thread_db)
-    {
-      unpush_target (&thread_db_ops);
-      using_thread_db = 0;
-    }
-
   target_beneath->to_create_inferior (exec_file, allargs, env);
 }
 
 static void
-thread_db_post_startup_inferior (ptid_t ptid)
+thread_db_post_startup_inferior (int pid)
 {
   if (proc_handle.pid == 0)
     {
       /* The child process is now the actual multi-threaded
          program.  Snatch its process ID...  */
-      proc_handle.pid = GET_PID (ptid);
+      proc_handle.pid = GET_PID (pid);
 
       /* ...and perform the remaining initialization steps.  */
       enable_thread_event_reporting ();
@@ -887,24 +887,20 @@
 thread_db_mourn_inferior (void)
 {
   remove_thread_event_breakpoints ();
-
-  /* Forget about the child's process ID.  We shouldn't need it
-     anymore.  */
-  proc_handle.pid = 0;
+  deactivate_target ();
 
   target_beneath->to_mourn_inferior ();
 }
 
 static int
-thread_db_thread_alive (ptid_t ptid)
+thread_db_thread_alive (int pid)
 {
-  td_thrhandle_t th;
-  td_thrinfo_t   ti;
-  td_err_e       err;
-
-  if (is_thread (ptid))
+  if (is_thread (pid))
     {
-      err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
+      td_thrhandle_t th;
+      td_err_e err;
+
+      err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (pid), &th);
       if (err != TD_OK)
 	return 0;
 
@@ -912,19 +908,11 @@
       if (err != TD_OK)
 	return 0;
 
-      err = td_thr_get_info_p (&th, &ti);
-      if (err != TD_OK)
-	return 0;
-
-      if (ti.ti_state == TD_THR_UNKNOWN ||
-	  ti.ti_state == TD_THR_ZOMBIE)
-	return 0;	/* A zombie thread. */
-
       return 1;
     }
 
   if (target_beneath->to_thread_alive)
-    return target_beneath->to_thread_alive (ptid);
+    return target_beneath->to_thread_alive (pid);
 
   return 0;
 }
@@ -934,21 +922,16 @@
 {
   td_thrinfo_t ti;
   td_err_e err;
-  ptid_t ptid;
+  int pid;
 
   err = td_thr_get_info_p (th_p, &ti);
   if (err != TD_OK)
     error ("Cannot get thread info: %s", thread_db_err_str (err));
 
-  if (ti.ti_state == TD_THR_UNKNOWN ||
-      ti.ti_state == TD_THR_ZOMBIE)
+  pid = BUILD_THREAD (ti.ti_tid, GET_PID (inferior_pid));
 
-    return 0;	/* A zombie -- ignore. */
-
-  ptid = BUILD_THREAD (ti.ti_tid, GET_PID (inferior_ptid));
-
-  if (! in_thread_list (ptid))
-    attach_thread (ptid, th_p, &ti, 1);
+  if (! in_thread_list (pid))
+    attach_thread (pid, th_p, &ti, 1);
 
   return 0;
 }
@@ -967,24 +950,24 @@
 }
 
 static char *
-thread_db_pid_to_str (ptid_t ptid)
+thread_db_pid_to_str (int pid)
 {
-  if (is_thread (ptid))
+  if (is_thread (pid))
     {
       static char buf[64];
       td_thrhandle_t th;
       td_thrinfo_t ti;
       td_err_e err;
 
-      err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
+      err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (pid), &th);
       if (err != TD_OK)
 	error ("Cannot find thread %ld: %s",
-	       (long) GET_THREAD (ptid), thread_db_err_str (err));
+	       (long) GET_THREAD (pid), thread_db_err_str (err));
 
       err = td_thr_get_info_p (&th, &ti);
       if (err != TD_OK)
 	error ("Cannot get thread info for thread %ld: %s",
-	       (long) GET_THREAD (ptid), thread_db_err_str (err));
+	       (long) GET_THREAD (pid), thread_db_err_str (err));
 
       if (ti.ti_state == TD_THR_ACTIVE && ti.ti_lid != 0)
 	{
@@ -1000,10 +983,10 @@
       return buf;
     }
 
-  if (target_beneath->to_pid_to_str (ptid))
-    return target_beneath->to_pid_to_str (ptid);
+  if (target_beneath->to_pid_to_str (pid))
+    return target_beneath->to_pid_to_str (pid);
 
-  return normal_pid_to_str (ptid);
+  return normal_pid_to_str (pid);
 }
 
 static void
@@ -1012,7 +995,6 @@
   thread_db_ops.to_shortname = "multi-thread";
   thread_db_ops.to_longname = "multi-threaded child process.";
   thread_db_ops.to_doc = "Threads and pthreads support.";
-  thread_db_ops.to_attach = thread_db_attach;
   thread_db_ops.to_detach = thread_db_detach;
   thread_db_ops.to_resume = thread_db_resume;
   thread_db_ops.to_wait = thread_db_wait;
diff --git a/gdb/thread.c b/gdb/thread.c
index 210b946..22c35fa 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -61,27 +61,10 @@
 static int thread_alive (struct thread_info *);
 static void info_threads_command (char *, int);
 static void thread_apply_command (char *, int);
-static void restore_current_thread (ptid_t);
-static void switch_to_thread (ptid_t ptid);
+static void restore_current_thread (int);
+static void switch_to_thread (int pid);
 static void prune_threads (void);
 
-void
-delete_step_resume_breakpoint (void *arg)
-{
-  struct breakpoint **breakpointp = (struct breakpoint **) arg;
-  struct thread_info *tp;
-
-  if (*breakpointp != NULL)
-    {
-      delete_breakpoint (*breakpointp);
-      for (tp = thread_list; tp; tp = tp->next)
-	if (tp->step_resume_breakpoint == *breakpointp)
-	  tp->step_resume_breakpoint = NULL;
-
-      *breakpointp = NULL;
-    }
-}
-
 static void
 free_thread (struct thread_info *tp)
 {
@@ -120,28 +103,43 @@
    so that back_ends can initialize their private data.  */
 
 struct thread_info *
-add_thread (ptid_t ptid)
+add_thread (int pid)
 {
   struct thread_info *tp;
 
-  tp = (struct thread_info *) xmalloc (sizeof (*tp));
-  memset (tp, 0, sizeof (*tp));
-  tp->ptid = ptid;
+  tp = (struct thread_info *) xmalloc (sizeof (struct thread_info));
+
+  tp->pid = pid;
   tp->num = ++highest_thread_num;
+  tp->prev_pc = 0;
+  tp->prev_func_start = 0;
+  tp->prev_func_name = NULL;
+  tp->step_range_start = 0;
+  tp->step_range_end = 0;
+  tp->step_frame_address = 0;
+  tp->step_resume_breakpoint = 0;
+  tp->through_sigtramp_breakpoint = 0;
+  tp->handling_longjmp = 0;
+  tp->trap_expected = 0;
+  tp->another_trap = 0;
+  tp->stepping_through_solib_after_catch = 0;
+  tp->stepping_through_solib_catchpoints = NULL;
+  tp->stepping_through_sigtramp = 0;
   tp->next = thread_list;
+  tp->private = NULL;
   thread_list = tp;
   return tp;
 }
 
 void
-delete_thread (ptid_t ptid)
+delete_thread (int pid)
 {
   struct thread_info *tp, *tpprev;
 
   tpprev = NULL;
 
   for (tp = thread_list; tp; tpprev = tp, tp = tp->next)
-    if (ptid_equal (tp->ptid, ptid))
+    if (tp->pid == pid)
       break;
 
   if (!tp)
@@ -167,14 +165,14 @@
   return NULL;
 }
 
-/* Find a thread_info by matching PTID.  */
+/* Find a thread_info by matching 'pid'.  */
 struct thread_info *
-find_thread_pid (ptid_t ptid)
+find_thread_pid (int pid)
 {
   struct thread_info *tp;
 
   for (tp = thread_list; tp; tp = tp->next)
-    if (ptid_equal (tp->ptid, ptid))
+    if (tp->pid == pid)
       return tp;
 
   return NULL;
@@ -220,34 +218,34 @@
 }
 
 int
-pid_to_thread_id (ptid_t ptid)
+pid_to_thread_id (int pid)
 {
   struct thread_info *tp;
 
   for (tp = thread_list; tp; tp = tp->next)
-    if (ptid_equal (tp->ptid, ptid))
+    if (tp->pid == pid)
       return tp->num;
 
   return 0;
 }
 
-ptid_t
+int
 thread_id_to_pid (int num)
 {
   struct thread_info *thread = find_thread_id (num);
   if (thread)
-    return thread->ptid;
+    return thread->pid;
   else
-    return pid_to_ptid (-1);
+    return -1;
 }
 
 int
-in_thread_list (ptid_t ptid)
+in_thread_list (int pid)
 {
   struct thread_info *tp;
 
   for (tp = thread_list; tp; tp = tp->next)
-    if (ptid_equal (tp->ptid, ptid))
+    if (tp->pid == pid)
       return 1;
 
   return 0;			/* Never heard of 'im */
@@ -261,7 +259,7 @@
   struct thread_info *tp;
   int num = 0;
 
-  ui_out_tuple_begin (uiout, "thread-ids");
+  ui_out_list_begin (uiout, "thread-ids");
 
   for (tp = thread_list; tp; tp = tp->next)
     {
@@ -269,7 +267,7 @@
       ui_out_field_int (uiout, "thread-id", tp->num);
     }
 
-  ui_out_tuple_end (uiout);
+  ui_out_list_end (uiout);
   ui_out_field_int (uiout, "number-of-threads", num);
   return GDB_RC_OK;
 }
@@ -287,110 +285,86 @@
 /* Load infrun state for the thread PID.  */
 
 void
-load_infrun_state (ptid_t ptid, 
-		   CORE_ADDR *prev_pc, 
-		   CORE_ADDR *prev_func_start,
-		   char **prev_func_name, 
-		   int *trap_expected,
+load_infrun_state (int pid, CORE_ADDR *prev_pc, CORE_ADDR *prev_func_start,
+		   char **prev_func_name, int *trap_expected,
 		   struct breakpoint **step_resume_breakpoint,
 		   struct breakpoint **through_sigtramp_breakpoint,
-		   CORE_ADDR *step_range_start, 
-		   CORE_ADDR *step_range_end,
-		   CORE_ADDR *step_frame_address, 
-		   int *handling_longjmp,
-		   int *another_trap, 
-		   int *stepping_through_solib_after_catch,
+		   CORE_ADDR *step_range_start, CORE_ADDR *step_range_end,
+		   CORE_ADDR *step_frame_address, int *handling_longjmp,
+		   int *another_trap, int *stepping_through_solib_after_catch,
 		   bpstat *stepping_through_solib_catchpoints,
-		   int *stepping_through_sigtramp,
-		   int *current_line, 
-		   struct symtab **current_symtab, 
-		   CORE_ADDR *step_sp)
+		   int *stepping_through_sigtramp)
 {
   struct thread_info *tp;
 
   /* If we can't find the thread, then we're debugging a single threaded
      process.  No need to do anything in that case.  */
-  tp = find_thread_id (pid_to_thread_id (ptid));
+  tp = find_thread_id (pid_to_thread_id (pid));
   if (tp == NULL)
     return;
 
   *prev_pc = tp->prev_pc;
   *prev_func_start = tp->prev_func_start;
   *prev_func_name = tp->prev_func_name;
-  *trap_expected = tp->trap_expected;
   *step_resume_breakpoint = tp->step_resume_breakpoint;
-  *through_sigtramp_breakpoint = tp->through_sigtramp_breakpoint;
   *step_range_start = tp->step_range_start;
   *step_range_end = tp->step_range_end;
   *step_frame_address = tp->step_frame_address;
+  *through_sigtramp_breakpoint = tp->through_sigtramp_breakpoint;
   *handling_longjmp = tp->handling_longjmp;
+  *trap_expected = tp->trap_expected;
   *another_trap = tp->another_trap;
   *stepping_through_solib_after_catch = tp->stepping_through_solib_after_catch;
   *stepping_through_solib_catchpoints = tp->stepping_through_solib_catchpoints;
   *stepping_through_sigtramp = tp->stepping_through_sigtramp;
-  *current_line = tp->current_line;
-  *current_symtab = tp->current_symtab;
-  *step_sp = tp->step_sp;
 }
 
 /* Save infrun state for the thread PID.  */
 
 void
-save_infrun_state (ptid_t ptid, 
-		   CORE_ADDR prev_pc, 
-		   CORE_ADDR prev_func_start,
-		   char *prev_func_name, 
-		   int trap_expected,
+save_infrun_state (int pid, CORE_ADDR prev_pc, CORE_ADDR prev_func_start,
+		   char *prev_func_name, int trap_expected,
 		   struct breakpoint *step_resume_breakpoint,
 		   struct breakpoint *through_sigtramp_breakpoint,
-		   CORE_ADDR step_range_start, 
-		   CORE_ADDR step_range_end,
-		   CORE_ADDR step_frame_address, 
-		   int handling_longjmp,
-		   int another_trap, 
-		   int stepping_through_solib_after_catch,
+		   CORE_ADDR step_range_start, CORE_ADDR step_range_end,
+		   CORE_ADDR step_frame_address, int handling_longjmp,
+		   int another_trap, int stepping_through_solib_after_catch,
 		   bpstat stepping_through_solib_catchpoints,
-		   int stepping_through_sigtramp, 
-		   int current_line,
-		   struct symtab *current_symtab,
-		   CORE_ADDR step_sp)
+		   int stepping_through_sigtramp)
 {
   struct thread_info *tp;
 
   /* If we can't find the thread, then we're debugging a single-threaded
      process.  Nothing to do in that case.  */
-  tp = find_thread_id (pid_to_thread_id (ptid));
+  tp = find_thread_id (pid_to_thread_id (pid));
   if (tp == NULL)
     return;
 
   tp->prev_pc = prev_pc;
   tp->prev_func_start = prev_func_start;
   tp->prev_func_name = prev_func_name;
-  tp->trap_expected = trap_expected;
   tp->step_resume_breakpoint = step_resume_breakpoint;
-  tp->through_sigtramp_breakpoint = through_sigtramp_breakpoint;
   tp->step_range_start = step_range_start;
   tp->step_range_end = step_range_end;
   tp->step_frame_address = step_frame_address;
+  tp->through_sigtramp_breakpoint = through_sigtramp_breakpoint;
   tp->handling_longjmp = handling_longjmp;
+  tp->trap_expected = trap_expected;
   tp->another_trap = another_trap;
   tp->stepping_through_solib_after_catch = stepping_through_solib_after_catch;
   tp->stepping_through_solib_catchpoints = stepping_through_solib_catchpoints;
   tp->stepping_through_sigtramp = stepping_through_sigtramp;
-  tp->current_line = current_line;
-  tp->current_symtab = current_symtab;
-  tp->step_sp = step_sp;
 }
 
 /* Return true if TP is an active thread. */
 static int
 thread_alive (struct thread_info *tp)
 {
-  if (PIDGET (tp->ptid) == -1)
+  if (tp->pid == -1)
     return 0;
-  if (!target_thread_alive (tp->ptid))
+  if (!target_thread_alive (tp->pid))
     {
-      tp->ptid = pid_to_ptid (-1);	/* Mark it as dead */
+      tp->pid = -1;		/* Mark it as dead */
       return 0;
     }
   return 1;
@@ -405,7 +379,7 @@
     {
       next = tp->next;
       if (!thread_alive (tp))
-	delete_thread (tp->ptid);
+	delete_thread (tp->pid);
     }
 }
 
@@ -420,7 +394,7 @@
 info_threads_command (char *arg, int from_tty)
 {
   struct thread_info *tp;
-  ptid_t current_ptid;
+  int current_pid;
   struct frame_info *cur_frame;
   int saved_frame_level = selected_frame_level;
   int counter;
@@ -433,18 +407,18 @@
 
   prune_threads ();
   target_find_new_threads ();
-  current_ptid = inferior_ptid;
+  current_pid = inferior_pid;
   for (tp = thread_list; tp; tp = tp->next)
     {
-      if (ptid_equal (tp->ptid, current_ptid))
+      if (tp->pid == current_pid)
 	printf_filtered ("* ");
       else
 	printf_filtered ("  ");
 
 #ifdef HPUXHPPA
-      printf_filtered ("%d %s", tp->num, target_tid_to_str (tp->ptid));
+      printf_filtered ("%d %s", tp->num, target_tid_to_str (tp->pid));
 #else
-      printf_filtered ("%d %s", tp->num, target_pid_to_str (tp->ptid));
+      printf_filtered ("%d %s", tp->num, target_pid_to_str (tp->pid));
 #endif
 
       extra_info = target_extra_thread_info (tp);
@@ -452,14 +426,14 @@
 	printf_filtered (" (%s)", extra_info);
       puts_filtered ("  ");
 
-      switch_to_thread (tp->ptid);
+      switch_to_thread (tp->pid);
       if (selected_frame)
 	print_only_stack_frame (selected_frame, -1, 0);
       else
 	printf_filtered ("[No stack.]\n");
     }
 
-  switch_to_thread (current_ptid);
+  switch_to_thread (current_pid);
 
   /* Code below copied from "up_silently_base" in "stack.c".
    * It restores the frame set by the user before the "info threads"
@@ -487,12 +461,12 @@
 /* Switch from one thread to another. */
 
 static void
-switch_to_thread (ptid_t ptid)
+switch_to_thread (int pid)
 {
-  if (ptid_equal (ptid, inferior_ptid))
+  if (pid == inferior_pid)
     return;
 
-  inferior_ptid = ptid;
+  inferior_pid = pid;
   flush_cached_frames ();
   registers_changed ();
   stop_pc = read_pc ();
@@ -500,34 +474,34 @@
 }
 
 static void
-restore_current_thread (ptid_t ptid)
+restore_current_thread (int pid)
 {
-  if (! ptid_equal (ptid, inferior_ptid))
+  if (pid != inferior_pid)
     {
-      switch_to_thread (ptid);
+      switch_to_thread (pid);
       print_stack_frame (get_current_frame (), 0, -1);
     }
 }
 
 struct current_thread_cleanup
 {
-  ptid_t inferior_ptid;
+  int inferior_pid;
 };
 
 static void
 do_restore_current_thread_cleanup (void *arg)
 {
   struct current_thread_cleanup *old = arg;
-  restore_current_thread (old->inferior_ptid);
+  restore_current_thread (old->inferior_pid);
   xfree (old);
 }
 
 static struct cleanup *
-make_cleanup_restore_current_thread (ptid_t inferior_ptid)
+make_cleanup_restore_current_thread (int inferior_pid)
 {
   struct current_thread_cleanup *old
     = xmalloc (sizeof (struct current_thread_cleanup));
-  old->inferior_ptid = inferior_ptid;
+  old->inferior_pid = inferior_pid;
   return make_cleanup (do_restore_current_thread_cleanup, old);
 }
 
@@ -551,7 +525,7 @@
   if (cmd == NULL || *cmd == '\000')
     error ("Please specify a command following the thread ID list");
 
-  old_chain = make_cleanup_restore_current_thread (inferior_ptid);
+  old_chain = make_cleanup_restore_current_thread (inferior_pid);
 
   /* It is safe to update the thread list now, before
      traversing it for "thread apply all".  MVS */
@@ -564,14 +538,14 @@
   for (tp = thread_list; tp; tp = tp->next)
     if (thread_alive (tp))
       {
-	switch_to_thread (tp->ptid);
+	switch_to_thread (tp->pid);
 #ifdef HPUXHPPA
 	printf_filtered ("\nThread %d (%s):\n",
 			 tp->num,
-			 target_tid_to_str (inferior_ptid));
+			 target_tid_to_str (inferior_pid));
 #else
 	printf_filtered ("\nThread %d (%s):\n", tp->num,
-			 target_pid_to_str (inferior_ptid));
+			 target_pid_to_str (inferior_pid));
 #endif
 	execute_command (cmd, from_tty);
 	strcpy (cmd, saved_cmd); /* Restore exact command used previously */
@@ -598,7 +572,7 @@
   if (*cmd == '\000')
     error ("Please specify a command following the thread ID list");
 
-  old_chain = make_cleanup_restore_current_thread (inferior_ptid);
+  old_chain = make_cleanup_restore_current_thread (inferior_pid);
 
   /* Save a copy of the command in case it is clobbered by
      execute_command */
@@ -641,13 +615,13 @@
 	    warning ("Thread %d has terminated.", start);
 	  else
 	    {
-	      switch_to_thread (tp->ptid);
+	      switch_to_thread (tp->pid);
 #ifdef HPUXHPPA
 	      printf_filtered ("\nThread %d (%s):\n", tp->num,
-			       target_tid_to_str (inferior_ptid));
+			       target_tid_to_str (inferior_pid));
 #else
 	      printf_filtered ("\nThread %d (%s):\n", tp->num,
-			       target_pid_to_str (inferior_ptid));
+			       target_pid_to_str (inferior_pid));
 #endif
 	      execute_command (cmd, from_tty);
 	      strcpy (cmd, saved_cmd);	/* Restore exact command used previously */
@@ -670,11 +644,11 @@
       /* Don't generate an error, just say which thread is current. */
       if (target_has_stack)
 	printf_filtered ("[Current thread is %d (%s)]\n",
-			 pid_to_thread_id (inferior_ptid),
+			 pid_to_thread_id (inferior_pid),
 #if defined(HPUXHPPA)
-			 target_tid_to_str (inferior_ptid)
+			 target_tid_to_str (inferior_pid)
 #else
-			 target_pid_to_str (inferior_ptid)
+			 target_pid_to_str (inferior_pid)
 #endif
 	  );
       else
@@ -707,25 +681,25 @@
   if (!thread_alive (tp))
     error ("Thread ID %d has terminated.\n", num);
 
-  switch_to_thread (tp->ptid);
+  switch_to_thread (tp->pid);
 
 #ifdef UI_OUT
   ui_out_text (uiout, "[Switching to thread ");
-  ui_out_field_int (uiout, "new-thread-id", pid_to_thread_id (inferior_ptid));
+  ui_out_field_int (uiout, "new-thread-id", pid_to_thread_id (inferior_pid));
   ui_out_text (uiout, " (");
 #if defined(HPUXHPPA)
-  ui_out_text (uiout, target_tid_to_str (inferior_ptid));
+  ui_out_text (uiout, target_tid_to_str (inferior_pid));
 #else
-  ui_out_text (uiout, target_pid_to_str (inferior_ptid));
+  ui_out_text (uiout, target_pid_to_str (inferior_pid));
 #endif
   ui_out_text (uiout, ")]");
 #else /* UI_OUT */
   printf_filtered ("[Switching to thread %d (%s)]\n",
-		   pid_to_thread_id (inferior_ptid),
+		   pid_to_thread_id (inferior_pid),
 #if defined(HPUXHPPA)
-		   target_tid_to_str (inferior_ptid)
+		   target_tid_to_str (inferior_pid)
 #else
-		   target_pid_to_str (inferior_ptid)
+		   target_pid_to_str (inferior_pid)
 #endif
     );
 #endif /* UI_OUT */
diff --git a/gdb/top.c b/gdb/top.c
index 79eaa41..77d6c6a 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -224,6 +224,21 @@
 /* Level of control structure.  */
 static int control_level;
 
+/* Structure for arguments to user defined functions.  */
+#define MAXUSERARGS 10
+struct user_args
+  {
+    struct user_args *next;
+    struct
+      {
+	char *arg;
+	int len;
+      }
+    a[MAXUSERARGS];
+    int count;
+  }
+ *user_args;
+
 /* Signal to catch ^Z typed while reading a command: SIGTSTP or SIGCONT.  */
 
 #ifndef STOP_SIGNAL
@@ -326,8 +341,7 @@
 /* Called when going to wait for the target.  Usually allows the GUI to run
    while waiting for target events.  */
 
-ptid_t (*target_wait_hook) (ptid_t ptid,
-                            struct target_waitstatus * status);
+int (*target_wait_hook) (int pid, struct target_waitstatus * status);
 
 /* Used by UI as a wrapper around command execution.  May do various things
    like enabling/disabling buttons, etc...  */
@@ -1695,7 +1709,7 @@
 int
 quit_confirm (void)
 {
-  if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
+  if (inferior_pid != 0 && target_has_execution)
     {
       char *s;
 
@@ -1732,7 +1746,7 @@
       exit_code = (int) value_as_long (val);
     }
 
-  if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
+  if (inferior_pid != 0 && target_has_execution)
     {
       if (attach_flag)
 	target_detach (args, from_tty);
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index fbe377e..41d2062 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -33,8 +33,6 @@
 #include "remote.h"
 #include "linespec.h"
 #include "regcache.h"
-#include "completer.h"
-#include "gdb-events.h"
 
 #include "ax.h"
 #include "ax-gdb.h"
@@ -424,6 +422,10 @@
 	t->addr_string = savestring (addr_start, addr_end - addr_start);
 
       trace_mention (t);
+
+      /* Let the UI know of any additions */
+      if (create_tracepoint_hook)
+	create_tracepoint_hook (t);
     }
 
   if (sals.nelts > 1)
@@ -570,11 +572,13 @@
     {
     case enable_op:
       t->enabled = enabled;
-      tracepoint_modify_event (t->number);
+      if (modify_tracepoint_hook)
+	modify_tracepoint_hook (t);
       break;
     case disable_op:
       t->enabled = disabled;
-      tracepoint_modify_event (t->number);
+      if (modify_tracepoint_hook)
+	modify_tracepoint_hook (t);
       break;
     case delete_op:
       if (tracepoint_chain == t)
@@ -583,11 +587,14 @@
       ALL_TRACEPOINTS (t2)
 	if (t2->next == t)
 	{
-	  tracepoint_delete_event (t2->number);
 	  t2->next = t->next;
 	  break;
 	}
 
+      /* Let the UI know of any deletions */
+      if (delete_tracepoint_hook)
+	delete_tracepoint_hook (t);
+
       if (t->addr_string)
 	xfree (t->addr_string);
       if (t->source_file)
@@ -733,7 +740,8 @@
 	    if (t1 == (struct tracepoint *) -1 || t1 == t2)
 	      {
 		t2->pass_count = count;
-		tracepoint_modify_event (t2->number);
+		if (modify_tracepoint_hook)
+		  modify_tracepoint_hook (t2);
 		if (from_tty)
 		  printf_filtered ("Setting tracepoint %d's passcount to %d\n",
 				   t2->number, count);
@@ -2786,13 +2794,12 @@
 No argument means enable all tracepoints.",
 	   &enablelist);
 
-  c = add_com ("trace", class_trace, trace_command,
-	       "Set a tracepoint at a specified line or function or address.\n\
+  add_com ("trace", class_trace, trace_command,
+	   "Set a tracepoint at a specified line or function or address.\n\
 Argument may be a line number, function name, or '*' plus an address.\n\
 For a line number or function, trace at the start of its code.\n\
 If an address is specified, trace at that exact address.\n\n\
 Do \"help tracepoints\" for info on other tracepoint commands.");
-  c->completer = location_completer;
 
   add_com_alias ("tp", "trace", class_alias, 0);
   add_com_alias ("tr", "trace", class_alias, 1);
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 910cb16..b6f9c7a 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -25,7 +25,6 @@
 #include "expression.h"		/* For language.h */
 #include "language.h"
 #include "ui-out.h"
-#include "gdb_assert.h"
 
 /* Convenience macro for allocting typesafe memory. */
 
@@ -39,25 +38,10 @@
     int colno;
     int width;
     int alignment;
-    char *col_name;
     char *colhdr;
     struct ui_out_hdr *next;
   };
 
-/* Maintain a stack so that the info applicable to the inner most list
-   is always available.  Stack/nested level 0 is reserved for the
-   top-level result. */
-
-enum { MAX_UI_OUT_LEVELS = 5 };
-
-struct ui_out_level
-  {
-    /* Count each field; the first element is for non-list fields */
-    int field_count;
-    /* The type of this level. */
-    enum ui_out_type type;
-  };
-
 /* The ui_out structure */
 /* Any change here requires a corresponding one in the initialization
    of the default uiout, which is statically initialized */
@@ -81,9 +65,11 @@
     /* strinf identifying the table (as specified in the table_begin call) */
     char *table_id;
 
-    /* Sub structure tracking the table depth. */
-    int level;
-    struct ui_out_level levels[MAX_UI_OUT_LEVELS];
+    /* if on, a list is being generated.  The value is the level of nesting */
+    int list_flag;
+
+    /* we count each field; the first element is for non-list fields */
+    int field_count[5];
 
     /* points to the first header (if any) */
     struct ui_out_hdr *headerfirst;
@@ -96,78 +82,30 @@
 
   };
 
-/* The current (inner most) level. */
-static struct ui_out_level *
-current_level (struct ui_out *uiout)
-{
-  return &uiout->levels[uiout->level];
-}
-
-/* Create a new level, of TYPE.  Return the new level's index. */
-static int
-push_level (struct ui_out *uiout,
-	    enum ui_out_type type,
-	    const char *id)
-{
-  struct ui_out_level *current;
-  /* We had better not overflow the buffer. */
-  uiout->level++;
-  gdb_assert (uiout->level >= 0 && uiout->level < MAX_UI_OUT_LEVELS);
-  current = current_level (uiout);
-  current->field_count = 0;
-  current->type = type;
-  return uiout->level;
-}
-
-/* Discard the current level, return the discarded level's index.
-   TYPE is the type of the level being discarded. */
-static int
-pop_level (struct ui_out *uiout,
-	   enum ui_out_type type)
-{
-  /* We had better not underflow the buffer. */
-  gdb_assert (uiout->level > 0 && uiout->level < MAX_UI_OUT_LEVELS);
-  gdb_assert (current_level (uiout)->type == type);
-  uiout->level--;
-  return uiout->level + 1;
-}
-
-
 /* These are the default implementation functions */
 
 static void default_table_begin (struct ui_out *uiout, int nbrofcols,
-				 int nr_rows, const char *tblid);
+				 char *tblid);
 static void default_table_body (struct ui_out *uiout);
 static void default_table_end (struct ui_out *uiout);
 static void default_table_header (struct ui_out *uiout, int width,
-				  enum ui_align alig, const char *col_name,
-				  const char *colhdr);
-static void default_begin (struct ui_out *uiout,
-			   enum ui_out_type type,
-			   int level, const char *id);
-static void default_end (struct ui_out *uiout,
-			 enum ui_out_type type,
-			 int level);
+				  enum ui_align alig, char *colhdr);
+static void default_list_begin (struct ui_out *uiout, int list_flag,
+				char *lstid);
+static void default_list_end (struct ui_out *uiout, int list_flag);
 static void default_field_int (struct ui_out *uiout, int fldno, int width,
-			       enum ui_align alig,
-			       const char *fldname,
-			       int value);
+			       enum ui_align alig, char *fldname, int value);
 static void default_field_skip (struct ui_out *uiout, int fldno, int width,
-				enum ui_align alig,
-				const char *fldname);
+				enum ui_align alig, char *fldname);
 static void default_field_string (struct ui_out *uiout, int fldno, int width,
-				  enum ui_align align,
-				  const char *fldname,
+				  enum ui_align align, char *fldname,
 				  const char *string);
 static void default_field_fmt (struct ui_out *uiout, int fldno,
 			       int width, enum ui_align align,
-			       const char *fldname,
-			       const char *format,
-			       va_list args);
+			       char *fldname, char *format, va_list args);
 static void default_spaces (struct ui_out *uiout, int numspaces);
-static void default_text (struct ui_out *uiout, const char *string);
-static void default_message (struct ui_out *uiout, int verbosity,
-			     const char *format,
+static void default_text (struct ui_out *uiout, char *string);
+static void default_message (struct ui_out *uiout, int verbosity, char *format,
 			     va_list args);
 static void default_wrap_hint (struct ui_out *uiout, char *identstring);
 static void default_flush (struct ui_out *uiout);
@@ -180,8 +118,8 @@
   default_table_body,
   default_table_end,
   default_table_header,
-  default_begin,
-  default_end,
+  default_list_begin,
+  default_list_end,
   default_field_int,
   default_field_skip,
   default_field_string,
@@ -190,8 +128,7 @@
   default_text,
   default_message,
   default_wrap_hint,
-  default_flush,
-  0, /* Does not need MI hacks.  */
+  default_flush
 };
 
 /* The default ui_out */
@@ -210,42 +147,33 @@
 
 /* These are the interfaces to implementation functions */
 
-static void uo_table_begin (struct ui_out *uiout, int nbrofcols,
-			    int nr_rows, const char *tblid);
+static void uo_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid);
 static void uo_table_body (struct ui_out *uiout);
 static void uo_table_end (struct ui_out *uiout);
 static void uo_table_header (struct ui_out *uiout, int width,
-			     enum ui_align align, const char *col_name,
-			     const char *colhdr);
-static void uo_begin (struct ui_out *uiout,
-		      enum ui_out_type type,
-		      int level, const char *id);
-static void uo_end (struct ui_out *uiout,
-		    enum ui_out_type type,
-		    int level);
+			     enum ui_align align, char *colhdr);
+static void uo_list_begin (struct ui_out *uiout, int list_flag, char *lstid);
+static void uo_list_end (struct ui_out *uiout, int list_flag);
 static void uo_field_int (struct ui_out *uiout, int fldno, int width,
-			  enum ui_align align, const char *fldname, int value);
+			  enum ui_align align, char *fldname, int value);
 static void uo_field_skip (struct ui_out *uiout, int fldno, int width,
-			   enum ui_align align, const char *fldname);
+			   enum ui_align align, char *fldname);
 static void uo_field_string (struct ui_out *uiout, int fldno, int width,
-			     enum ui_align align, const char *fldname,
-			     const char *string);
+			  enum ui_align align, char *fldname, const char *string);
 static void uo_field_fmt (struct ui_out *uiout, int fldno, int width,
-			  enum ui_align align, const char *fldname,
-			  const char *format, va_list args);
+			  enum ui_align align, char *fldname,
+			  char *format, va_list args);
 static void uo_spaces (struct ui_out *uiout, int numspaces);
-static void uo_text (struct ui_out *uiout, const char *string);
+static void uo_text (struct ui_out *uiout, char *string);
 static void uo_message (struct ui_out *uiout, int verbosity,
-			const char *format, va_list args);
+			char *format, va_list args);
 static void uo_wrap_hint (struct ui_out *uiout, char *identstring);
 static void uo_flush (struct ui_out *uiout);
 
 /* Prototypes for local functions */
 
 extern void _initialize_ui_out (void);
-static void append_header_to_list (struct ui_out *uiout, int width,
-				   int alignment, const char *col_name,
-				   const char *colhdr);
+static void append_header_to_list (struct ui_out *uiout, int width, int alignment, char *colhdr);
 static int get_curr_header (struct ui_out *uiout, int *colno, int *width,
 			    int *alignment, char **colhdr);
 static void clear_header_list (struct ui_out *uiout);
@@ -259,9 +187,7 @@
 /* Mark beginning of a table */
 
 void
-ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
-		    int nr_rows,
-		    const char *tblid)
+ui_out_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
 {
   if (uiout->table_flag)
     internal_error (__FILE__, __LINE__,
@@ -276,7 +202,7 @@
     uiout->table_id = NULL;
   clear_header_list (uiout);
 
-  uo_table_begin (uiout, nbrofcols, nr_rows, uiout->table_id);
+  uo_table_begin (uiout, nbrofcols, uiout->table_id);
 }
 
 void
@@ -320,132 +246,73 @@
 
 void
 ui_out_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
-		     const char *col_name,
-		     const char *colhdr)
+		     char *colhdr)
 {
   if (!uiout->table_flag || uiout->body_flag)
     internal_error (__FILE__, __LINE__,
 		    "table header must be specified after table_begin \
 and before table_body.");
 
-  append_header_to_list (uiout, width, alignment, col_name, colhdr);
+  append_header_to_list (uiout, width, alignment, colhdr);
 
-  uo_table_header (uiout, width, alignment, col_name, colhdr);
+  uo_table_header (uiout, width, alignment, colhdr);
 }
 
 void
-ui_out_begin (struct ui_out *uiout,
-	      enum ui_out_type type,
-	      const char *id)
+ui_out_list_begin (struct ui_out *uiout, char *lstid)
 {
-  int new_level;
   if (uiout->table_flag && !uiout->body_flag)
     internal_error (__FILE__, __LINE__,
 		    "table header or table_body expected; lists must be \
 specified after table_body.");
-  new_level = push_level (uiout, type, id);
-  if (uiout->table_flag && (new_level == 1))
+  if (uiout->list_flag >= 4)
+    internal_error (__FILE__, __LINE__,
+		    "list depth exceeded; only 4 levels of lists can be \
+nested.");
+
+  uiout->list_flag++;
+  uiout->field_count[uiout->list_flag] = 0;
+  if (uiout->table_flag && (uiout->list_flag == 1))
     uiout->headercurr = uiout->headerfirst;
-  uo_begin (uiout, type, new_level, id);
-}
 
-void
-ui_out_list_begin (struct ui_out *uiout,
-		   const char *id)
-{
-  ui_out_begin (uiout, ui_out_type_list, id);
-}
-
-void
-ui_out_tuple_begin (struct ui_out *uiout, const char *id)
-{
-  ui_out_begin (uiout, ui_out_type_tuple, id);
-}
-
-void
-ui_out_end (struct ui_out *uiout,
-	    enum ui_out_type type)
-{
-  int old_level = pop_level (uiout, type);
-  uo_end (uiout, type, old_level);
+  uo_list_begin (uiout, uiout->list_flag, lstid);
 }
 
 void
 ui_out_list_end (struct ui_out *uiout)
 {
-  ui_out_end (uiout, ui_out_type_list);
-}
+  if (!uiout->list_flag)
+    internal_error (__FILE__, __LINE__,
+		    "misplaced list_end; there is no list to be closed.");
 
-void
-ui_out_tuple_end (struct ui_out *uiout)
-{
-  ui_out_end (uiout, ui_out_type_tuple);
-}
+  uo_list_end (uiout, uiout->list_flag);
 
-struct ui_out_end_cleanup_data
-{
-  struct ui_out *uiout;
-  enum ui_out_type type;
-};
+  uiout->list_flag--;
+}
 
 static void
-do_cleanup_end (void *data)
+do_list_end (void *uiout)
 {
-  struct ui_out_end_cleanup_data *end_cleanup_data = data;
-  ui_out_end (end_cleanup_data->uiout, end_cleanup_data->type);
-  xfree (end_cleanup_data);
-}
-
-static struct cleanup *
-make_cleanup_ui_out_end (struct ui_out *uiout,
-			 enum ui_out_type type)
-{
-  struct ui_out_end_cleanup_data *end_cleanup_data;
-  end_cleanup_data = XMALLOC (struct ui_out_end_cleanup_data);
-  end_cleanup_data->uiout = uiout;
-  end_cleanup_data->type = type;
-  return make_cleanup (do_cleanup_end, end_cleanup_data);
+  ui_out_list_end (uiout);
 }
 
 struct cleanup *
-make_cleanup_ui_out_begin_end (struct ui_out *uiout,
-			       enum ui_out_type type,
-			       const char *id)
+make_cleanup_ui_out_list_end (struct ui_out *uiout)
 {
-  ui_out_begin (uiout, type, id);
-  return make_cleanup_ui_out_end (uiout, type);
-}
-
-struct cleanup *
-make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
-				     const char *id)
-{
-  ui_out_tuple_begin (uiout, id);
-  return make_cleanup_ui_out_end (uiout, ui_out_type_tuple);
-}
-
-struct cleanup *
-make_cleanup_ui_out_list_begin_end (struct ui_out *uiout,
-				    const char *id)
-{
-  ui_out_list_begin (uiout, id);
-  return make_cleanup_ui_out_end (uiout, ui_out_type_list);
+  return make_cleanup (do_list_end, uiout);
 }
 
 void
-ui_out_field_int (struct ui_out *uiout,
-		  const char *fldname,
-		  int value)
+ui_out_field_int (struct ui_out *uiout, char *fldname, int value)
 {
   int fldno;
   int width;
   int align;
-  struct ui_out_level *current = current_level (uiout);
 
   verify_field_proper_position (uiout);
 
-  current->field_count += 1;
-  fldno = current->field_count;
+  uiout->field_count[uiout->list_flag] += 1;
+  fldno = uiout->field_count[uiout->list_flag];
 
   verify_field_alignment (uiout, fldno, &width, &align);
 
@@ -453,9 +320,7 @@
 }
 
 void
-ui_out_field_core_addr (struct ui_out *uiout,
-			const char *fldname,
-			CORE_ADDR address)
+ui_out_field_core_addr (struct ui_out *uiout, char *fldname, CORE_ADDR address)
 {
   char addstr[20];
 
@@ -467,9 +332,7 @@
 }
 
 void
-ui_out_field_stream (struct ui_out *uiout,
-		     const char *fldname,
-		     struct ui_stream *buf)
+ui_out_field_stream (struct ui_out *uiout, char *fldname, struct ui_stream *buf)
 {
   long length;
   char *buffer = ui_file_xstrdup (buf->stream, &length);
@@ -485,18 +348,16 @@
 /* used to ommit a field */
 
 void
-ui_out_field_skip (struct ui_out *uiout,
-		   const char *fldname)
+ui_out_field_skip (struct ui_out *uiout, char *fldname)
 {
   int fldno;
   int width;
   int align;
-  struct ui_out_level *current = current_level (uiout);
 
   verify_field_proper_position (uiout);
 
-  current->field_count += 1;
-  fldno = current->field_count;
+  uiout->field_count[uiout->list_flag] += 1;
+  fldno = uiout->field_count[uiout->list_flag];
 
   verify_field_alignment (uiout, fldno, &width, &align);
 
@@ -505,18 +366,17 @@
 
 void
 ui_out_field_string (struct ui_out *uiout,
-		     const char *fldname,
+		     char *fldname,
 		     const char *string)
 {
   int fldno;
   int width;
   int align;
-  struct ui_out_level *current = current_level (uiout);
 
   verify_field_proper_position (uiout);
 
-  current->field_count += 1;
-  fldno = current->field_count;
+  uiout->field_count[uiout->list_flag] += 1;
+  fldno = uiout->field_count[uiout->list_flag];
 
   verify_field_alignment (uiout, fldno, &width, &align);
 
@@ -525,20 +385,17 @@
 
 /* VARARGS */
 void
-ui_out_field_fmt (struct ui_out *uiout,
-		  const char *fldname,
-		  const char *format, ...)
+ui_out_field_fmt (struct ui_out *uiout, char *fldname, char *format,...)
 {
   va_list args;
   int fldno;
   int width;
   int align;
-  struct ui_out_level *current = current_level (uiout);
 
   verify_field_proper_position (uiout);
 
-  current->field_count += 1;
-  fldno = current->field_count;
+  uiout->field_count[uiout->list_flag] += 1;
+  fldno = uiout->field_count[uiout->list_flag];
 
   /* will not align, but has to call anyway */
   verify_field_alignment (uiout, fldno, &width, &align);
@@ -557,15 +414,13 @@
 }
 
 void
-ui_out_text (struct ui_out *uiout,
-	     const char *string)
+ui_out_text (struct ui_out *uiout, char *string)
 {
   uo_text (uiout, string);
 }
 
 void
-ui_out_message (struct ui_out *uiout, int verbosity,
-		const char *format,...)
+ui_out_message (struct ui_out *uiout, int verbosity, char *format,...)
 {
   va_list args;
 
@@ -713,18 +568,10 @@
 }
 #endif
 
-int
-ui_out_is_mi_like_p (struct ui_out *uiout)
-{
-  return uiout->impl->is_mi_like_p;
-}
-
 /* default gdb-out hook functions */
 
 static void
-default_table_begin (struct ui_out *uiout, int nbrofcols,
-		     int nr_rows,
-		     const char *tblid)
+default_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
 {
 }
 
@@ -740,36 +587,29 @@
 
 static void
 default_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
-		      const char *col_name,
-		      const char *colhdr)
+		      char *colhdr)
 {
 }
 
 static void
-default_begin (struct ui_out *uiout,
-	       enum ui_out_type type,
-	       int level,
-	       const char *id)
+default_list_begin (struct ui_out *uiout, int list_flag, char *lstid)
 {
 }
 
 static void
-default_end (struct ui_out *uiout,
-	     enum ui_out_type type,
-	     int level)
+default_list_end (struct ui_out *uiout, int list_flag)
 {
 }
 
 static void
 default_field_int (struct ui_out *uiout, int fldno, int width,
-		   enum ui_align align,
-		   const char *fldname, int value)
+		   enum ui_align align, char *fldname, int value)
 {
 }
 
 static void
 default_field_skip (struct ui_out *uiout, int fldno, int width,
-		    enum ui_align align, const char *fldname)
+		    enum ui_align align, char *fldname)
 {
 }
 
@@ -778,16 +618,14 @@
 		      int fldno,
 		      int width,
 		      enum ui_align align,
-		      const char *fldname,
+		      char *fldname,
 		      const char *string)
 {
 }
 
 static void
 default_field_fmt (struct ui_out *uiout, int fldno, int width,
-		   enum ui_align align,
-		   const char *fldname,
-		   const char *format,
+		   enum ui_align align, char *fldname, char *format,
 		   va_list args)
 {
 }
@@ -798,13 +636,12 @@
 }
 
 static void
-default_text (struct ui_out *uiout, const char *string)
+default_text (struct ui_out *uiout, char *string)
 {
 }
 
 static void
-default_message (struct ui_out *uiout, int verbosity,
-		 const char *format,
+default_message (struct ui_out *uiout, int verbosity, char *format,
 		 va_list args)
 {
 }
@@ -822,13 +659,11 @@
 /* Interface to the implementation functions */
 
 void
-uo_table_begin (struct ui_out *uiout, int nbrofcols,
-		int nr_rows,
-		const char *tblid)
+uo_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
 {
   if (!uiout->impl->table_begin)
     return;
-  uiout->impl->table_begin (uiout, nbrofcols, nr_rows, tblid);
+  uiout->impl->table_begin (uiout, nbrofcols, tblid);
 }
 
 void
@@ -848,40 +683,31 @@
 }
 
 void
-uo_table_header (struct ui_out *uiout, int width, enum ui_align align,
-		 const char *col_name,
-		 const char *colhdr)
+uo_table_header (struct ui_out *uiout, int width, enum ui_align align, char *colhdr)
 {
   if (!uiout->impl->table_header)
     return;
-  uiout->impl->table_header (uiout, width, align, col_name, colhdr);
+  uiout->impl->table_header (uiout, width, align, colhdr);
 }
 
 void
-uo_begin (struct ui_out *uiout,
-	  enum ui_out_type type,
-	  int level,
-	  const char *id)
+uo_list_begin (struct ui_out *uiout, int list_flag, char *lstid)
 {
-  if (uiout->impl->begin == NULL)
+  if (!uiout->impl->list_begin)
     return;
-  uiout->impl->begin (uiout, type, level, id);
+  uiout->impl->list_begin (uiout, list_flag, lstid);
 }
 
 void
-uo_end (struct ui_out *uiout,
-	enum ui_out_type type,
-	int level)
+uo_list_end (struct ui_out *uiout, int list_flag)
 {
-  if (uiout->impl->end == NULL)
+  if (!uiout->impl->list_end)
     return;
-  uiout->impl->end (uiout, type, level);
+  uiout->impl->list_end (uiout, list_flag);
 }
 
 void
-uo_field_int (struct ui_out *uiout, int fldno, int width, enum ui_align align,
-	      const char *fldname,
-	      int value)
+uo_field_int (struct ui_out *uiout, int fldno, int width, enum ui_align align, char *fldname, int value)
 {
   if (!uiout->impl->field_int)
     return;
@@ -889,8 +715,7 @@
 }
 
 void
-uo_field_skip (struct ui_out *uiout, int fldno, int width, enum ui_align align,
-	       const char *fldname)
+uo_field_skip (struct ui_out *uiout, int fldno, int width, enum ui_align align, char *fldname)
 {
   if (!uiout->impl->field_skip)
     return;
@@ -899,9 +724,7 @@
 
 void
 uo_field_string (struct ui_out *uiout, int fldno, int width,
-		 enum ui_align align,
-		 const char *fldname,
-		 const char *string)
+		 enum ui_align align, char *fldname, const char *string)
 {
   if (!uiout->impl->field_string)
     return;
@@ -909,10 +732,7 @@
 }
 
 void
-uo_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align,
-	      const char *fldname,
-	      const char *format,
-	      va_list args)
+uo_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align, char *fldname, char *format, va_list args)
 {
   if (!uiout->impl->field_fmt)
     return;
@@ -928,8 +748,7 @@
 }
 
 void
-uo_text (struct ui_out *uiout,
-	 const char *string)
+uo_text (struct ui_out *uiout, char *string)
 {
   if (!uiout->impl->text)
     return;
@@ -937,9 +756,7 @@
 }
 
 void
-uo_message (struct ui_out *uiout, int verbosity,
-	    const char *format,
-	    va_list args)
+uo_message (struct ui_out *uiout, int verbosity, char *format, va_list args)
 {
   if (!uiout->impl->message)
     return;
@@ -985,8 +802,7 @@
 append_header_to_list (struct ui_out *uiout,
 		       int width,
 		       int alignment,
-		       const char *col_name,
-		       const char *colhdr)
+		       char *colhdr)
 {
   struct ui_out_hdr *temphdr;
 
@@ -995,13 +811,10 @@
   temphdr->alignment = alignment;
   /* we have to copy the column title as the original may be an automatic */
   if (colhdr != NULL)
-    temphdr->colhdr = xstrdup (colhdr);
-  else
-    temphdr->colhdr = NULL;
-  if (col_name != NULL)
-    temphdr->col_name = xstrdup (colhdr);
-  else
-    temphdr->col_name = xstrdup (colhdr);
+    {
+      temphdr->colhdr = xmalloc (strlen (colhdr) + 1);
+      strcpy (temphdr->colhdr, colhdr);
+    }
   temphdr->next = NULL;
   if (uiout->headerfirst == NULL)
     {
@@ -1049,7 +862,7 @@
 	internal_error (__FILE__, __LINE__,
 			"table_body missing; table fields must be \
 specified after table_body and inside a list.");
-      if (uiout->level == 0)
+      if (!uiout->list_flag)
 	internal_error (__FILE__, __LINE__,
 			"list_begin missing; table fields must be \
 specified after table_body and inside a list.");
@@ -1109,8 +922,8 @@
   uiout->flags = flags;
   uiout->table_flag = 0;
   uiout->body_flag = 0;
-  uiout->level = 0;
-  memset (uiout->levels, 0, sizeof (uiout->levels));
+  uiout->list_flag = 0;
+  uiout->field_count[0] = 0;
   uiout->headerfirst = NULL;
   uiout->headerlast = NULL;
   uiout->headercurr = NULL;
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index 797c2fe..a7be1ed 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -65,80 +65,44 @@
 
 /* Prototypes for ui-out API. */
 
-/* A result is a recursive data structure consisting of lists and
-   tuples. */
-
-enum ui_out_type
-  {
-    ui_out_type_tuple,
-    ui_out_type_list
-  };
-
-extern void ui_out_begin (struct ui_out *uiout,
-			  enum ui_out_type level_type,
-			  const char *id);
-
-extern void ui_out_end (struct ui_out *uiout, enum ui_out_type type);
-
-extern struct cleanup *ui_out_begin_cleanup_end (struct ui_out *uiout,
-						 enum ui_out_type level_type,
-						 const char *id);
-
-/* A table can be considered a special tuple/list combination with the
-   implied structure: ``table = { hdr = { header, ... } , body = [ {
-   field, ... }, ... ] }''. If NR_ROWS is negative then there is at
-   least one row. */
-
 extern void ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
-				int nr_rows, const char *tblid);
+				char *tblid);
 
 extern void ui_out_table_header (struct ui_out *uiout, int width,
-				 enum ui_align align, const char *col_name,
-				 const char *colhdr);
+				 enum ui_align align, char *colhdr);
 
 extern void ui_out_table_body (struct ui_out *uiout);
 
 extern void ui_out_table_end (struct ui_out *uiout);
 
-/* Compatibility wrappers.  */
-
-extern void ui_out_list_begin (struct ui_out *uiout, const char *id);
+extern void ui_out_list_begin (struct ui_out *uiout, char *lstid);
 
 extern void ui_out_list_end (struct ui_out *uiout);
 
-extern struct cleanup *make_cleanup_ui_out_list_begin_end (struct ui_out *uiout,
-							   const char *id);
+extern struct cleanup *make_cleanup_ui_out_list_end (struct ui_out *uiout);
 
-extern void ui_out_tuple_begin (struct ui_out *uiout, const char *id);
+extern void ui_out_field_int (struct ui_out *uiout, char *fldname, int value);
 
-extern void ui_out_tuple_end (struct ui_out *uiout);
-
-extern struct cleanup *make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
-							    const char *id);
-
-extern void ui_out_field_int (struct ui_out *uiout, const char *fldname,
-			      int value);
-
-extern void ui_out_field_core_addr (struct ui_out *uiout, const char *fldname,
+extern void ui_out_field_core_addr (struct ui_out *uiout, char *fldname,
 				    CORE_ADDR address);
 
-extern void ui_out_field_string (struct ui_out * uiout, const char *fldname,
+extern void ui_out_field_string (struct ui_out * uiout, char *fldname,
 				 const char *string);
 
-extern void ui_out_field_stream (struct ui_out *uiout, const char *fldname,
+extern void ui_out_field_stream (struct ui_out *uiout, char *fldname,
 				 struct ui_stream *buf);
 
-extern void ui_out_field_fmt (struct ui_out *uiout, const char *fldname,
-			      const char *format, ...);
+extern void ui_out_field_fmt (struct ui_out *uiout, char *fldname,
+			      char *format, ...);
 
-extern void ui_out_field_skip (struct ui_out *uiout, const char *fldname);
+extern void ui_out_field_skip (struct ui_out *uiout, char *fldname);
 
 extern void ui_out_spaces (struct ui_out *uiout, int numspaces);
 
-extern void ui_out_text (struct ui_out *uiout, const char *string);
+extern void ui_out_text (struct ui_out *uiout, char *string);
 
 extern void ui_out_message (struct ui_out *uiout, int verbosity,
-			    const char *format, ...);
+			    char *format, ...);
 
 extern struct ui_stream *ui_out_stream_new (struct ui_out *uiout);
 
@@ -184,13 +148,6 @@
 extern void gdb_query (struct ui_out *uiout, int qflags, char *qprompt);
 #endif
 
-/* HACK: Code in GDB is currently checking to see the type of ui_out
-   builder when determining which output to produce.  This function is
-   a hack to encapsulate that test.  Once GDB manages to separate the
-   CLI/MI from the core of GDB the problem should just go away ....  */
-
-extern int ui_out_is_mi_like_p (struct ui_out *uiout);
-
 /* From here on we have things that are only needed by implementation
    routines and main.c.   We should pehaps have a separate file for that,
    like a  ui-out-impl.h  file */
@@ -200,41 +157,28 @@
 /* Type definition of all implementation functions. */
 
 typedef void (table_begin_ftype) (struct ui_out * uiout,
-				  int nbrofcols, int nr_rows,
-				  const char *tblid);
+				  int nbrofcols, char *tblid);
 typedef void (table_body_ftype) (struct ui_out * uiout);
 typedef void (table_end_ftype) (struct ui_out * uiout);
 typedef void (table_header_ftype) (struct ui_out * uiout, int width,
-				   enum ui_align align, const char *col_name,
-				   const char *colhdr);
-/* Note: level 0 is the top-level so LEVEL is always greater than
-   zero. */
-typedef void (ui_out_begin_ftype) (struct ui_out *uiout,
-				   enum ui_out_type type,
-				   int level, const char *id);
-typedef void (ui_out_end_ftype) (struct ui_out *uiout,
-				 enum ui_out_type type,
-				 int level);
+				   enum ui_align align, char *colhdr);
+typedef void (list_begin_ftype) (struct ui_out * uiout,
+				 int list_flag, char *lstid);
+typedef void (list_end_ftype) (struct ui_out * uiout, int list_flag);
 typedef void (field_int_ftype) (struct ui_out * uiout, int fldno, int width,
-				enum ui_align align,
-				const char *fldname, int value);
+			     enum ui_align align, char *fldname, int value);
 typedef void (field_skip_ftype) (struct ui_out * uiout, int fldno, int width,
-				 enum ui_align align,
-				 const char *fldname);
+				 enum ui_align align, char *fldname);
 typedef void (field_string_ftype) (struct ui_out * uiout, int fldno, int width,
-				   enum ui_align align,
-				   const char *fldname,
+				   enum ui_align align, char *fldname,
 				   const char *string);
 typedef void (field_fmt_ftype) (struct ui_out * uiout, int fldno, int width,
-				enum ui_align align,
-				const char *fldname,
-				const char *format,
-				va_list args);
+				enum ui_align align, char *fldname,
+				char *format, va_list args);
 typedef void (spaces_ftype) (struct ui_out * uiout, int numspaces);
-typedef void (text_ftype) (struct ui_out * uiout,
-			   const char *string);
+typedef void (text_ftype) (struct ui_out * uiout, char *string);
 typedef void (message_ftype) (struct ui_out * uiout, int verbosity,
-			      const char *format, va_list args);
+			      char *format, va_list args);
 typedef void (wrap_hint_ftype) (struct ui_out * uiout, char *identstring);
 typedef void (flush_ftype) (struct ui_out * uiout);
 
@@ -249,8 +193,8 @@
     table_body_ftype *table_body;
     table_end_ftype *table_end;
     table_header_ftype *table_header;
-    ui_out_begin_ftype *begin;
-    ui_out_end_ftype *end;
+    list_begin_ftype *list_begin;
+    list_end_ftype *list_end;
     field_int_ftype *field_int;
     field_skip_ftype *field_skip;
     field_string_ftype *field_string;
@@ -260,7 +204,6 @@
     message_ftype *message;
     wrap_hint_ftype *wrap_hint;
     flush_ftype *flush;
-    int is_mi_like_p;
   };
 
 extern struct ui_out_data *ui_out_data (struct ui_out *uiout);
diff --git a/gdb/ultra3-nat.c b/gdb/ultra3-nat.c
index 3b73680..7c6c133 100644
--- a/gdb/ultra3-nat.c
+++ b/gdb/ultra3-nat.c
@@ -80,7 +80,7 @@
 /* OBSOLETE /* Global Registers */ */
 /* OBSOLETE #ifdef ULTRA3 */
 /* OBSOLETE   errno = 0; */
-/* OBSOLETE   ptrace (PT_READ_STRUCT, PIDGET (inferior_ptid), */
+/* OBSOLETE   ptrace (PT_READ_STRUCT, inferior_pid, */
 /* OBSOLETE 	  (PTRACE_ARG3_TYPE) register_addr (GR96_REGNUM, 0), */
 /* OBSOLETE 	  (int) &pt_struct.pt_gr[0], 32 * 4); */
 /* OBSOLETE   if (errno != 0) */
@@ -101,7 +101,7 @@
 /* OBSOLETE /* Local Registers */ */
 /* OBSOLETE #ifdef ULTRA3 */
 /* OBSOLETE   errno = 0; */
-/* OBSOLETE   ptrace (PT_READ_STRUCT, PIDGET (inferior_ptid), */
+/* OBSOLETE   ptrace (PT_READ_STRUCT, inferior_pid, */
 /* OBSOLETE 	  (PTRACE_ARG3_TYPE) register_addr (LR0_REGNUM, 0), */
 /* OBSOLETE 	  (int) &pt_struct.pt_lr[0], 128 * 4); */
 /* OBSOLETE   if (errno != 0) */
@@ -154,7 +154,7 @@
 /* OBSOLETE 	return; */
 /* OBSOLETE       regaddr = register_addr (regno, 0); */
 /* OBSOLETE       errno = 0; */
-/* OBSOLETE       ptrace (PT_WRITE_U, PIDGET (inferior_ptid), */
+/* OBSOLETE       ptrace (PT_WRITE_U, inferior_pid, */
 /* OBSOLETE 	      (PTRACE_ARG3_TYPE) regaddr, read_register (regno)); */
 /* OBSOLETE       if (errno != 0) */
 /* OBSOLETE 	{ */
@@ -171,7 +171,7 @@
 /* OBSOLETE       for (regno = LR0_REGNUM; regno < LR0_REGNUM + 128; regno++) */
 /* OBSOLETE 	pt_struct.pt_gr[regno] = read_register (regno); */
 /* OBSOLETE       errno = 0; */
-/* OBSOLETE       ptrace (PT_WRITE_STRUCT, PIDGET (inferior_ptid), */
+/* OBSOLETE       ptrace (PT_WRITE_STRUCT, inferior_pid, */
 /* OBSOLETE 	      (PTRACE_ARG3_TYPE) register_addr (GR1_REGNUM, 0), */
 /* OBSOLETE 	      (int) &pt_struct.pt_gr1, (1 * 32 * 128) * 4); */
 /* OBSOLETE       if (errno != 0) */
@@ -190,7 +190,7 @@
 /* OBSOLETE       pt_struct.pt_bp = read_register (BP_REGNUM); */
 /* OBSOLETE       pt_struct.pt_fc = read_register (FC_REGNUM); */
 /* OBSOLETE       errno = 0; */
-/* OBSOLETE       ptrace (PT_WRITE_STRUCT, PIDGET (inferior_ptid), */
+/* OBSOLETE       ptrace (PT_WRITE_STRUCT, inferior_pid, */
 /* OBSOLETE 	      (PTRACE_ARG3_TYPE) register_addr (CPS_REGNUM, 0), */
 /* OBSOLETE 	      (int) &pt_struct.pt_psr, (10) * 4); */
 /* OBSOLETE       if (errno != 0) */
@@ -238,7 +238,7 @@
 /* OBSOLETE   else */
 /* OBSOLETE     { */
 /* OBSOLETE       errno = 0; */
-/* OBSOLETE       val = ptrace (PT_READ_U, PIDGET (inferior_ptid), */
+/* OBSOLETE       val = ptrace (PT_READ_U, inferior_pid, */
 /* OBSOLETE 		    (PTRACE_ARG3_TYPE) register_addr (regno, 0), 0); */
 /* OBSOLETE       if (errno != 0) */
 /* OBSOLETE 	{ */
diff --git a/gdb/utils.c b/gdb/utils.c
index 294ad42..1e9c44f 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -868,6 +868,35 @@
   return_to_top_level (RETURN_QUIT);
 }
 
+
+#if defined(_MSC_VER)		/* should test for wingdb instead? */
+
+/*
+ * Windows translates all keyboard and mouse events 
+ * into a message which is appended to the message 
+ * queue for the process.
+ */
+
+void
+notice_quit (void)
+{
+  int k = win32pollquit ();
+  if (k == 1)
+    quit_flag = 1;
+  else if (k == 2)
+    immediate_quit = 1;
+}
+
+#else /* !defined(_MSC_VER) */
+
+void
+notice_quit (void)
+{
+  /* Done by signals */
+}
+
+#endif /* !defined(_MSC_VER) */
+
 /* Control C comes here */
 void
 request_quit (int signo)
diff --git a/gdb/uw-thread.c b/gdb/uw-thread.c
index 617cfbd..8f1d1c66 100644
--- a/gdb/uw-thread.c
+++ b/gdb/uw-thread.c
@@ -135,7 +135,7 @@
 #endif
 
 /* Back end to CALL_BASE() and TRY_BASE(): evaluate CALL, then convert
-   inferior_ptid to a composite thread/process id. */
+   inferior_pid to a composite thread/process id. */
 
 #define CALL_BASE_1(call)		\
 do {					\
@@ -144,8 +144,8 @@
   do_cleanups (infpid_cleanup);		\
 } while (0)
 
-/* If inferior_ptid can be converted to a composite lwp/process id, do so,
-   evaluate base_ops function CALL, and then convert inferior_ptid back to a
+/* If inferior_pid can be converted to a composite lwp/process id, do so,
+   evaluate base_ops function CALL, and then convert inferior_pid back to a
    composite thread/process id.
 
    Otherwise, issue an error message and return nonlocally. */
@@ -158,7 +158,7 @@
 } while (0)
 
 /* Like CALL_BASE(), but instead of returning nonlocally on error, set
-   *CALLED to whether the inferior_ptid conversion was successful. */
+   *CALLED to whether the inferior_pid conversion was successful. */
 
 #define TRY_BASE(call, called)		\
 do {					\
@@ -220,7 +220,7 @@
    libthread.so passes null map when calling stub with tc_*_complete. */
 static struct thread_info *switchto_thread;
 
-/* Cleanup chain for safely restoring inferior_ptid after CALL_BASE. */
+/* Cleanup chain for safely restoring inferior_pid after CALL_BASE. */
 static struct cleanup *infpid_cleanup;
 
 
@@ -261,7 +261,7 @@
 /* Return a string representing composite PID's components. */
 
 static char *
-dbgpid (ptid_t ptid)
+dbgpid (int pid)
 {
   static char *buf, buf1[80], buf2[80];
   if (!buf || buf == buf2)
@@ -269,10 +269,10 @@
   else
     buf = buf2;
 
-  if (PIDGET (ptid) <= 0)
-    sprintf (buf, "%d", PIDGET (ptid));
+  if (pid <= 0)
+    sprintf (buf, "%d", pid);
   else
-    sprintf (buf, "%s %ld/%d", ISTID (pid) ? "thr" : "lwp",
+    sprintf (buf, "%s %d/%d", ISTID (pid) ? "thr" : "lwp",
 	     TIDGET (pid), PIDGET (pid));
 
   return buf;
@@ -404,20 +404,20 @@
 /* Return the composite lwp/process id corresponding to composite
    id PID.  If PID is a thread with no lwp, return 0. */
 
-static ptid_t
-thr_to_lwp (ptid_t ptid)
+static int
+thr_to_lwp (int pid)
 {
   struct thread_info *info;
-  ptid_t lid;
+  int lid;
 
-  if (!ISTID (ptid))
-    lid = ptid;
-  else if (!(info = find_thread_pid (ptid)))
-    lid = null_ptid;
+  if (!ISTID (pid))
+    lid = pid;
+  else if (!(info = find_thread_pid (pid)))
+    lid = 0;
   else if (!info->private->lwpid)
-    lid = null_ptid;
+    lid = 0;
   else
-    lid = MKLID (PIDGET (ptid), info->private->lwpid);
+    lid = MKLID (pid, info->private->lwpid);
 
   DBG2(("  thr_to_lwp(%s) = %s", dbgpid (pid), dbgpid (lid)));
   return lid;
@@ -431,7 +431,7 @@
 {
   int lwpid = (int)data;
 
-  if (!ISTID (tp->ptid))
+  if (!ISTID (tp->pid))
     return 0;
   if (!tp->private->stable)
     return 0;
@@ -454,52 +454,51 @@
 /* Return the composite thread/process id corresponding to composite
    id PID.  If PID is an lwp with no thread, return PID. */
 
-static ptid_t
-lwp_to_thr (ptid_t ptid)
+static int
+lwp_to_thr (int pid)
 {
   struct thread_info *info;
-  int lwpid;
-  ptid_t tid = ptid;
+  int tid = pid, lwpid;
 
-  if (ISTID (ptid))
+  if (ISTID (pid))
     goto done;
-  if (!(lwpid = LIDGET (ptid)))
+  if (!(lwpid = LIDGET (pid)))
     goto done;
   if (!(info = find_thread_lwp (lwpid)))
     goto done;
-  tid = MKTID (PIDGET (ptid), info->private->thrid);
+  tid = MKTID (pid, info->private->thrid);
 
  done:
-  DBG2((ISTID (tid) ? NULL : "lwp_to_thr: no thr for %s", dbgpid (ptid)));
+  DBG2((ISTID (tid) ? NULL : "lwp_to_thr: no thr for %s", dbgpid (pid)));
   return tid;
 }
 
-/* do_cleanups() callback: convert inferior_ptid to a composite
+/* do_cleanups() callback: convert inferior_pid to a composite
    thread/process id after having made a procfs call. */
 
 static void
 thr_infpid (void *unused)
 {
-  ptid_t ptid = lwp_to_thr (inferior_ptid);
-  DBG2((" inferior_ptid from procfs: %s => %s",
-	dbgpid (inferior_ptid), dbgpid (ptid)));
-  inferior_ptid = ptid;
+  int pid = lwp_to_thr (inferior_pid);
+  DBG2((" inferior_pid from procfs: %s => %s",
+	dbgpid (inferior_pid), dbgpid (pid)));
+  inferior_pid = pid;
 }
 
-/* If possible, convert inferior_ptid to a composite lwp/process id in
+/* If possible, convert inferior_pid to a composite lwp/process id in
    preparation for making a procfs call.  Return success. */
 
 static int
 lwp_infpid (void)
 {
-  ptid_t ptid = thr_to_lwp (inferior_ptid);
-  DBG2((" inferior_ptid to procfs: %s => %s",
-	dbgpid (inferior_ptid), dbgpid (ptid)));
+  int pid = thr_to_lwp (inferior_pid);
+  DBG2((" inferior_pid to procfs: %s => %s",
+	dbgpid (inferior_pid), dbgpid (pid)));
 
-  if (ptid_equal (ptid, null_ptid))
+  if (!pid)
     return 0;
 
-  inferior_ptid = ptid;
+  inferior_pid = pid;
   infpid_cleanup = make_cleanup (thr_infpid, NULL);
   return 1;
 }
@@ -508,11 +507,11 @@
    lwp id LWPID, map address MAPP, and composite thread/process PID. */
 
 static void
-add_thread_uw (int thrid, int lwpid, CORE_ADDR mapp, ptid_t ptid)
+add_thread_uw (int thrid, int lwpid, CORE_ADDR mapp, int pid)
 {
   struct thread_info *newthread;
 
-  if ((newthread = add_thread (ptid)) == NULL)
+  if ((newthread = add_thread (pid)) == NULL)
     error ("failed to create new thread structure");
 
   newthread->private = xmalloc (sizeof (struct private_thread_info));
@@ -522,7 +521,7 @@
   newthread->private->mapp = mapp;
 
   if (target_has_execution)
-    printf_unfiltered ("[New %s]\n", target_pid_to_str (ptid));
+    printf_unfiltered ("[New %s]\n", target_pid_to_str (pid));
 }
 
 /* notice_threads() and find_main() callback: if the thread list doesn't
@@ -534,10 +533,10 @@
 {
   int thrid = iter->map.thr_tid;
   int lwpid = !iter->map.thr_lwpp ? 0 : iter->lwp.lwp_id;
-  ptid_t ptid = MKTID (PIDGET (inferior_ptid), thrid);
+  int pid = MKTID (inferior_pid, thrid);
 
-  if (!find_thread_pid (ptid) && (!data || thrid == 1))
-    add_thread_uw (thrid, lwpid, iter->mapp, ptid);
+  if (!find_thread_pid (pid) && (!data || thrid == 1))
+    add_thread_uw (thrid, lwpid, iter->mapp, pid);
 
   return 0;
 }
@@ -559,7 +558,7 @@
     {
       struct thread_info *info;
       thread_iter (notice_thread, (void *)1);
-      if ((info = find_thread_pid (MKTID (PIDGET (inferior_ptid), 1))))
+      if ((info = find_thread_pid (MKTID (inferior_pid, 1))))
 	thr_map_main = info->private->mapp;
     }
   return thr_map_main;
@@ -591,16 +590,12 @@
    and all threads otherwise. */
 
 static void
-uw_thread_resume (ptid_t ptid, int step, enum target_signal signo)
+uw_thread_resume (int pid, int step, enum target_signal signo)
 {
-  if (PIDGET (ptid) > 0)
-    {
-      ptid = thr_to_lwp (ptid);
-      if (ptid_equal (ptid, null_ptid))
-	ptid = pid_to_ptid (-1);
-    }
+  if (pid > 0 && !(pid = thr_to_lwp (pid)))
+    pid = -1;
 
-  CALL_BASE (base_ops.to_resume (ptid, step, signo));
+  CALL_BASE (base_ops.to_resume (pid, step, signo));
 }
 
 /* If the trap we just received from lwp PID was due to a breakpoint
@@ -608,22 +603,21 @@
    accordingly. */
 
 static void
-libthread_stub (ptid_t ptid)
+libthread_stub (int pid)
 {
   CORE_ADDR sp, mapp, mapp_main;
   enum thread_change change;
   struct thread_map map;
   __lwp_desc_t lwp;
-  int lwpid;
-  ptid_t tid = null_ptid;
+  int tid = 0, lwpid;
   struct thread_info *info;
 
   /* Check for stub breakpoint. */
-  if (read_pc_pid (ptid) - DECR_PC_AFTER_BREAK != thr_brk_addr)
+  if (read_pc_pid (pid) - DECR_PC_AFTER_BREAK != thr_brk_addr)
     return;
 
   /* Retrieve stub args. */
-  sp = read_register_pid (SP_REGNUM, ptid);
+  sp = read_register_pid (SP_REGNUM, pid);
   if (!base_ops.to_xfer_memory (sp + SP_ARG0, (char *)&mapp,
 				sizeof (mapp), 0, NULL, &base_ops))
     goto err;
@@ -648,7 +642,7 @@
       break;
     if (!read_map (mapp, &map))
       goto err;
-    tid = MKTID (PIDGET (ptid), map.thr_tid);
+    tid = MKTID (pid, map.thr_tid);
 
     switch (change) {
     case tc_thread_create:		/* new thread */
@@ -664,8 +658,8 @@
     case tc_thread_exit:		/* thread has exited */
       printf_unfiltered ("[Exited %s]\n", target_pid_to_str (tid));
       delete_thread (tid);
-      if (ptid_equal (tid, inferior_ptid))
-	inferior_ptid = ptid;
+      if (tid == inferior_pid)
+	inferior_pid = pid;
       break;
 
     case tc_switch_begin:		/* lwp is switching threads */
@@ -726,25 +720,22 @@
 
 /* Wait for thread/lwp/process ID if >= 0 or for any thread otherwise. */
 
-static ptid_t
-uw_thread_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+uw_thread_wait (int pid, struct target_waitstatus *status)
 {
-  if (PIDGET (ptid) > 0)
-    ptid = thr_to_lwp (ptid);
-  if (PIDGET (ptid) <= 0)
-    ptid = pid_to_ptid (-1);
-
-  CALL_BASE (ptid = base_ops.to_wait (ptid, status));
+  if (pid > 0)
+    pid = thr_to_lwp (pid);
+  CALL_BASE (pid = base_ops.to_wait (pid > 0 ? pid : -1, status));
 
   if (status->kind == TARGET_WAITKIND_STOPPED &&
       status->value.sig == TARGET_SIGNAL_TRAP)
-    libthread_stub (ptid);
+    libthread_stub (pid);
 
-  return lwp_to_thr (ptid);
+  return lwp_to_thr (pid);
 }
 
 /* Tell gdb about the registers in the thread/lwp/process specified by
-   inferior_ptid. */
+   inferior_pid. */
 
 static void
 uw_thread_fetch_registers (int regno)
@@ -757,7 +748,7 @@
   if (called)
     return;
 
-  if (!(info = find_thread_pid (inferior_ptid)))
+  if (!(info = find_thread_pid (inferior_pid)))
     return;
   if (!read_map (info->private->mapp, &map))
     return;
@@ -767,7 +758,7 @@
 }
 
 /* Store gdb's current view of the register set into the thread/lwp/process
-   specified by inferior_ptid. */
+   specified by inferior_pid. */
 
 static void
 uw_thread_store_registers (int regno)
@@ -831,14 +822,14 @@
 /* Return whether thread PID is still valid. */
 
 static int
-uw_thread_alive (ptid_t ptid)
+uw_thread_alive (int pid)
 {
-  if (!ISTID (ptid))
-    return base_ops.to_thread_alive (ptid);
+  if (!ISTID (pid))
+    return base_ops.to_thread_alive (pid);
 
   /* If it's in the thread list, it's valid, because otherwise
      libthread_stub() would have deleted it. */
-  return in_thread_list (ptid);
+  return in_thread_list (pid);
 }
 
 /* Add to the thread list any threads and lwps it doesn't already contain. */
@@ -855,16 +846,16 @@
    This may be called by either procfs.c or by generic gdb. */
 
 static char *
-uw_thread_pid_to_str (ptid_t ptid)
+uw_thread_pid_to_str (int pid)
 {
-#define FMT "Thread %ld"
-  static char buf[sizeof (FMT) + 3 * sizeof (long)];
+#define FMT "Thread %d"
+  static char buf[sizeof (FMT) + 3 * sizeof (pid)];
 
-  if (!ISTID (ptid))
+  if (!ISTID (pid))
     /* core_ops says "process foo", so call procfs_ops explicitly. */
-    return procfs_ops.to_pid_to_str (ptid);
+    return procfs_ops.to_pid_to_str (pid);
 
-  sprintf (buf, FMT, TIDGET (ptid));
+  sprintf (buf, FMT, TIDGET (pid));
 #undef FMT
   return buf;
 }
@@ -881,7 +872,7 @@
   int lwpid;
   char *name;
 
-  if (!ISTID (info->ptid))
+  if (!ISTID (info->pid))
     return NULL;
 
   if (!info->private->stable)
diff --git a/gdb/v850ice.c b/gdb/v850ice.c
index 1aec483..704d2a2 100644
--- a/gdb/v850ice.c
+++ b/gdb/v850ice.c
@@ -73,8 +73,7 @@
 
 static void v850ice_fetch_registers (int regno);
 
-static void v850ice_resume (ptid_t ptid, int step,
-                            enum target_signal siggnal);
+static void v850ice_resume (int pid, int step, enum target_signal siggnal);
 
 static void v850ice_open (char *name, int from_tty);
 
@@ -86,8 +85,7 @@
 
 static void v850ice_mourn (void);
 
-static ptid_t v850ice_wait (ptid_t ptid,
-                                  struct target_waitstatus *status);
+static int v850ice_wait (int pid, struct target_waitstatus *status);
 
 static void v850ice_kill (void);
 
@@ -369,7 +367,7 @@
      target is active.  These functions should be split out into seperate
      variables, especially since GDB will someday have a notion of debugging
      several processes.  */
-  inferior_ptid = pid_to_ptid (42000);
+  inferior_pid = 42000;
 
   start_remote ();
   return;
@@ -385,7 +383,7 @@
     {
       UnregisterClient ();
       ice_open = 0;
-      inferior_ptid = null_ptid;
+      inferior_pid = 0;
     }
 }
 
@@ -411,7 +409,7 @@
 /* Tell the remote machine to resume.  */
 
 static void
-v850ice_resume (ptid_t ptid, int step, enum target_signal siggnal)
+v850ice_resume (int pid, int step, enum target_signal siggnal)
 {
   long retval;
   char buf[256];
@@ -434,8 +432,8 @@
    Returns "pid" (though it's not clear what, if anything, that
    means in the case of this target).  */
 
-static ptid_t
-v850ice_wait (ptid_t ptid, struct target_waitstatus *status)
+static int
+v850ice_wait (int pid, struct target_waitstatus *status)
 {
   long v850_status;
   char buf[256];
@@ -487,7 +485,7 @@
     }
   while (!done);
 
-  return inferior_ptid;
+  return inferior_pid;
 }
 
 static int
@@ -754,7 +752,7 @@
 v850ice_kill (void)
 {
   target_mourn_inferior ();
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
 }
 
 static void
diff --git a/gdb/valops.c b/gdb/valops.c
index 7cc025d..0e7e7e1 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -365,7 +365,7 @@
 	  /* No superclass found, just fall through to change ptr type.  */
 	}
       VALUE_TYPE (arg2) = type;
-      arg2 = value_change_enclosing_type (arg2, type);
+      VALUE_ENCLOSING_TYPE (arg2) = type;	/* pai: chk_val */
       VALUE_POINTED_TO_OFFSET (arg2) = 0;	/* pai: chk_val */
       return arg2;
     }
@@ -609,7 +609,7 @@
     case lval_internalvar:
       set_internalvar (VALUE_INTERNALVAR (toval), fromval);
       val = value_copy (VALUE_INTERNALVAR (toval)->value);
-      val = value_change_enclosing_type (val, VALUE_ENCLOSING_TYPE (fromval));
+      VALUE_ENCLOSING_TYPE (val) = VALUE_ENCLOSING_TYPE (fromval);
       VALUE_EMBEDDED_OFFSET (val) = VALUE_EMBEDDED_OFFSET (fromval);
       VALUE_POINTED_TO_OFFSET (val) = VALUE_POINTED_TO_OFFSET (fromval);
       return val;
@@ -823,7 +823,7 @@
   memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval),
 	  TYPE_LENGTH (type));
   VALUE_TYPE (val) = type;
-  val = value_change_enclosing_type (val, VALUE_ENCLOSING_TYPE (fromval));
+  VALUE_ENCLOSING_TYPE (val) = VALUE_ENCLOSING_TYPE (fromval);
   VALUE_EMBEDDED_OFFSET (val) = VALUE_EMBEDDED_OFFSET (fromval);
   VALUE_POINTED_TO_OFFSET (val) = VALUE_POINTED_TO_OFFSET (fromval);
 
@@ -965,7 +965,7 @@
 
   /* This may be a pointer to a base subobject; so remember the
      full derived object's type ... */
-  arg2 = value_change_enclosing_type (arg2, lookup_pointer_type (VALUE_ENCLOSING_TYPE (arg1)));
+  VALUE_ENCLOSING_TYPE (arg2) = lookup_pointer_type (VALUE_ENCLOSING_TYPE (arg1));
   /* ... and also the relative position of the subobject in the full object */
   VALUE_POINTED_TO_OFFSET (arg2) = VALUE_EMBEDDED_OFFSET (arg1);
   VALUE_BFD_SECTION (arg2) = VALUE_BFD_SECTION (arg1);
@@ -1009,7 +1009,7 @@
       /* Re-adjust type */
       VALUE_TYPE (arg2) = TYPE_TARGET_TYPE (base_type);
       /* Add embedding info */
-      arg2 = value_change_enclosing_type (arg2, enc_type);
+      VALUE_ENCLOSING_TYPE (arg2) = enc_type;
       VALUE_EMBEDDED_OFFSET (arg2) = VALUE_POINTED_TO_OFFSET (arg1);
 
       /* We may be pointing to an object of some derived type */
@@ -3165,7 +3165,7 @@
      type is wrong, set it *//* pai: FIXME -- sounds iffy */
   if (full)
     {
-      argp = value_change_enclosing_type (argp, real_type);
+      VALUE_ENCLOSING_TYPE (argp) = real_type;
       return argp;
     }
 
diff --git a/gdb/value.h b/gdb/value.h
index 8b1d18f..50abe0e 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -68,55 +68,16 @@
        at the same place in memory.  This will be described in the
        lval enum above as "lval_reg_frame_relative".  */
     CORE_ADDR frame_addr;
-
     /* Type of the value.  */
     struct type *type;
+    /* Type of the enclosing object if this is an embedded subobject.
+       The member embedded_offset gives the real position of the subobject
+       if type is not the same as enclosing_type.
 
-    /* If a value represents a C++ object, then the `type' field gives
-       the object's compile-time type.  If the object actually belongs
-       to some class derived from `type', perhaps with other base
-       classes and additional members, then `type' is just a subobject
-       of the real thing, and the full object is probably larger than
-       `type' would suggest.
-
-       If `type' is a dynamic class (i.e. one with a vtable), then GDB
-       can actually determine the object's run-time type by looking at
-       the run-time type information in the vtable.  When this
-       information is available, we may elect to read in the entire
-       object, for several reasons:
-
-         - When printing the value, the user would probably rather see
-           the full object, not just the limited portion apparent from
-           the compile-time type.
-
-         - If `type' has virtual base classes, then even printing
-           `type' alone may require reaching outside the `type'
-           portion of the object to wherever the virtual base class
-           has been stored.
-
-       When we store the entire object, `enclosing_type' is the
-       run-time type --- the complete object --- and `embedded_offset'
-       is the offset of `type' within that larger type, in bytes.  The
-       VALUE_CONTENTS macro takes `embedded_offset' into account, so
-       most GDB code continues to see the `type' portion of the value,
-       just as the inferior would.
-
-       If `type' is a pointer to an object, then `enclosing_type' is a
-       pointer to the object's run-time type, and `pointed_to_offset'
-       is the offset in bytes from the full object to the pointed-to
-       object --- that is, the value `embedded_offset' would have if
-       we followed the pointer and fetched the complete object.  (I
-       don't really see the point.  Why not just determine the
-       run-time type when you indirect, and avoid the special case?
-       The contents don't matter until you indirect anyway.)
-
-       If we're not doing anything fancy, `enclosing_type' is equal to
-       `type', and `embedded_offset' is zero, so everything works
-       normally.  */
+       If the type field is a pointer type, then enclosing_type is 
+       a pointer type pointing to the real (enclosing) type of the target
+       object. */
     struct type *enclosing_type;
-    int embedded_offset;
-    int pointed_to_offset;
-
     /* Values are stored in a chain, so that they can be deleted
        easily over calls to the inferior.  Values assigned to internal
        variables or put into the value history are taken off this
@@ -154,6 +115,21 @@
     /* If nonzero, this is the value of a variable which does not
        actually exist in the program.  */
     char optimized_out;
+    /* If this value represents an object that is embedded inside a
+       larger object (e.g., a base subobject in C++), this gives the
+       offset (in bytes) from the start of the contents buffer where
+       the embedded object begins. This is required because some C++
+       runtime implementations lay out objects (especially virtual bases
+       with possibly negative offsets to ancestors).
+       Note: This may be positive or negative! Also note that this offset
+       is not used when retrieving contents from target memory; the entire
+       enclosing object has to be retrieved always, and the offset for
+       that is given by the member offset above. */
+    int embedded_offset;
+    /* If this value represents a pointer to an object that is embedded
+       in another object, this gives the embedded_offset of the object
+       that is pointed to. */
+    int pointed_to_offset;
     /* The BFD section associated with this value.  */
     asection *bfd_section;
     /* Actual contents of the value.  For use of this value; setting
@@ -331,8 +307,6 @@
 
 extern value_ptr allocate_repeat_value (struct type *type, int count);
 
-extern value_ptr value_change_enclosing_type (value_ptr val, struct type *new_type);
-
 extern value_ptr value_mark (void);
 
 extern void value_free_to_mark (value_ptr mark);
diff --git a/gdb/values.c b/gdb/values.c
index 43ff194..8a93be9 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -695,7 +695,12 @@
   else if (nosign)
     {
       /* Unsigned -- be sure we compensate for signed LONGEST.  */
+#if !defined (_MSC_VER) || (_MSC_VER > 900)
       return (ULONGEST) unpack_long (type, valaddr);
+#else
+      /* FIXME!!! msvc22 doesn't support unsigned __int64 -> double */
+      return (LONGEST) unpack_long (type, valaddr);
+#endif /* _MSC_VER */
     }
   else
     {
@@ -757,65 +762,14 @@
 	}
       else
 	{
- 	  /* Anything static that isn't a constant, has an address */
- 	  if (SYMBOL_CLASS (sym) != LOC_CONST)
- 	    {
-	      addr = SYMBOL_VALUE_ADDRESS (sym);
-	      sect = SYMBOL_BFD_SECTION (sym);
-	    }
- 	  /* However, static const's do not, the value is already known.  */
- 	  else
- 	    {
- 	      return value_from_longest (TYPE_FIELD_TYPE (type, fieldno), SYMBOL_VALUE (sym));
- 	    }
- 	}
+	  addr = SYMBOL_VALUE_ADDRESS (sym);
+	  sect = SYMBOL_BFD_SECTION (sym);
+	}
       SET_FIELD_PHYSADDR (TYPE_FIELD (type, fieldno), addr);
     }
   return value_at (TYPE_FIELD_TYPE (type, fieldno), addr, sect);
 }
 
-/* Change the enclosing type of a value object VAL to NEW_ENCL_TYPE.  
-   You have to be careful here, since the size of the data area for the value 
-   is set by the length of the enclosing type.  So if NEW_ENCL_TYPE is bigger 
-   than the old enclosing type, you have to allocate more space for the data.  
-   The return value is a pointer to the new version of this value structure. */
-
-value_ptr
-value_change_enclosing_type (value_ptr val, struct type *new_encl_type)
-{
-  if (TYPE_LENGTH (new_encl_type) <= TYPE_LENGTH (VALUE_ENCLOSING_TYPE (val))) 
-    {
-      VALUE_ENCLOSING_TYPE (val) = new_encl_type;
-      return val;
-    }
-  else
-    {
-      value_ptr new_val;
-      register value_ptr prev;
-      
-      new_val = (value_ptr) xrealloc (val, sizeof (struct value) + TYPE_LENGTH (new_encl_type));
-      
-      /* We have to make sure this ends up in the same place in the value
-	 chain as the original copy, so it's clean-up behavior is the same. 
-	 If the value has been released, this is a waste of time, but there
-	 is no way to tell that in advance, so... */
-      
-      if (val != all_values) 
-	{
-	  for (prev = all_values; prev != NULL; prev = prev->next)
-	    {
-	      if (prev->next == val) 
-		{
-		  prev->next = new_val;
-		  break;
-		}
-	    }
-	}
-      
-      return new_val;
-    }
-}
-
 /* Given a value ARG1 (offset by OFFSET bytes)
    of a struct or union type ARG_TYPE,
    extract and return the value of one of its (non-static) fields.
@@ -851,7 +805,7 @@
          entire object's contents for later references to virtual
          bases, etc.  */
       v = allocate_value (VALUE_ENCLOSING_TYPE (arg1));
-      VALUE_TYPE (v) = type;
+      VALUE_TYPE (v) = arg_type;
       if (VALUE_LAZY (arg1))
 	VALUE_LAZY (v) = 1;
       else
@@ -1328,7 +1282,7 @@
   CORE_ADDR addr;
 
   /* If this is not defined, just use EXTRACT_RETURN_VALUE instead.  */
-  if (EXTRACT_STRUCT_VALUE_ADDRESS_P ())
+  if (EXTRACT_STRUCT_VALUE_ADDRESS_P)
     if (struct_return)
       {
 	addr = EXTRACT_STRUCT_VALUE_ADDRESS (retbuf);
diff --git a/gdb/varobj.c b/gdb/varobj.c
index c62aecf..40bc209 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1639,7 +1639,7 @@
 	    {
 	      tmp_var->obj_name = 
 		savestring (var->obj_name, strlen (var->obj_name));
-	      varobj_delete (var, NULL, 0);
+	      uninstall_variable (var);
 	    }
 	  else
 	    {
@@ -1761,13 +1761,7 @@
     case TYPE_CODE_PTR:
       /* This is where things get compilcated. All pointers have one child.
          Except, of course, for struct and union ptr, which we automagically
-         dereference for the user and function ptrs, which have no children.
-         We also don't dereference void* as we don't know what to show.
-         We can show char* so we allow it to be dereferenced.  If you decide
-         to test for it, please mind that a little magic is necessary to
-         properly identify it: char* has TYPE_CODE == TYPE_CODE_INT and 
-         TYPE_NAME == "char" */
-
+         dereference for the user and function ptrs, which have no children. */
       switch (TYPE_CODE (target))
 	{
 	case TYPE_CODE_STRUCT:
@@ -1776,12 +1770,17 @@
 	  break;
 
 	case TYPE_CODE_FUNC:
-	case TYPE_CODE_VOID:
 	  children = 0;
 	  break;
 
 	default:
-	  children = 1;
+	  /* Don't dereference char* or void*. */
+	  if (TYPE_NAME (target) != NULL
+	      && (STREQ (TYPE_NAME (target), "char")
+		  || STREQ (TYPE_NAME (target), "void")))
+	    children = 0;
+	  else
+	    children = 1;
 	}
       break;
 
diff --git a/gdb/version.in b/gdb/version.in
deleted file mode 100644
index 6b58a0e..0000000
--- a/gdb/version.in
+++ /dev/null
@@ -1 +0,0 @@
-2001-07-06-cvs
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 4113f2c..277b473 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -79,7 +79,7 @@
 extern struct target_ops child_ops;
 
 static void child_stop (void);
-static int win32_child_thread_alive (ptid_t);
+static int win32_child_thread_alive (int);
 void child_kill_inferior (void);
 
 static int last_sig = 0;	/* Set if a signal was received from the
@@ -233,7 +233,7 @@
   th->h = h;
   th->next = thread_head.next;
   thread_head.next = th;
-  add_thread (pid_to_ptid (id));
+  add_thread (id);
   return th;
 }
 
@@ -262,8 +262,8 @@
   thread_info *th;
 
   if (info_verbose)
-    printf_unfiltered ("[Deleting %s]\n", target_pid_to_str (pid_to_ptid (id)));
-  delete_thread (pid_to_ptid (id));
+    printf_unfiltered ("[Deleting %s]\n", target_pid_to_str (id));
+  delete_thread (id);
 
   for (th = &thread_head;
        th->next != NULL && th->next->id != id;
@@ -313,7 +313,7 @@
 static void
 child_fetch_inferior_registers (int r)
 {
-  current_thread = thread_rec (PIDGET (inferior_ptid), TRUE);
+  current_thread = thread_rec (inferior_pid, TRUE);
   do_child_fetch_inferior_registers (r);
 }
 
@@ -333,7 +333,7 @@
 static void
 child_store_inferior_registers (int r)
 {
-  current_thread = thread_rec (PIDGET (inferior_ptid), TRUE);
+  current_thread = thread_rec (inferior_pid, TRUE);
   do_child_store_inferior_registers (r);
 }
 
@@ -849,8 +849,7 @@
 			     current_event.u.CreateThread.hThread);
       if (info_verbose)
 	printf_unfiltered ("[New %s]\n",
-			   target_pid_to_str (
-			     pid_to_ptid (current_event.dwThreadId)));
+			   target_pid_to_str (current_event.dwThreadId));
       retval = current_event.dwThreadId;
       break;
 
@@ -943,7 +942,7 @@
   else
     {
       current_thread = th ? : thread_rec (current_event.dwThreadId, TRUE);
-      inferior_ptid = pid_to_ptid (retval);
+      inferior_pid = retval;
     }
 
 out:
@@ -951,11 +950,9 @@
 }
 
 /* Wait for interesting events to occur in the target process. */
-static ptid_t
-child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+static int
+child_wait (int pid, struct target_waitstatus *ourstatus)
 {
-  int pid = PIDGET (ptid);
-
   /* We loop when we get a non-standard exception rather than return
      with a SPURIOUS because resume can try and step or modify things,
      which needs a current_thread->h.  But some of these exceptions mark
@@ -966,7 +963,7 @@
     {
       int retval = get_child_debug_event (pid, ourstatus);
       if (retval)
-	return pid_to_ptid (retval);
+	return retval;
       else
 	{
 	  int detach = 0;
@@ -1035,10 +1032,10 @@
 
       if (exec_file)
 	printf_unfiltered ("Attaching to program `%s', %s\n", exec_file,
-			   target_pid_to_str (pid_to_ptid (pid)));
+			   target_pid_to_str (pid));
       else
 	printf_unfiltered ("Attaching to %s\n",
-			   target_pid_to_str (pid_to_ptid (pid)));
+			   target_pid_to_str (pid));
 
       gdb_flush (gdb_stdout);
     }
@@ -1056,10 +1053,10 @@
       if (exec_file == 0)
 	exec_file = "";
       printf_unfiltered ("Detaching from program: %s %s\n", exec_file,
-			 target_pid_to_str (inferior_ptid));
+			 target_pid_to_str (inferior_pid));
       gdb_flush (gdb_stdout);
     }
-  inferior_ptid = null_ptid;
+  inferior_pid = 0;
   unpush_target (&child_ops);
 }
 
@@ -1069,7 +1066,7 @@
 child_files_info (struct target_ops *ignore ATTRIBUTE_UNUSED)
 {
   printf_unfiltered ("\tUsing the running image of %s %s.\n",
-      attach_flag ? "attached" : "child", target_pid_to_str (inferior_ptid));
+      attach_flag ? "attached" : "child", target_pid_to_str (inferior_pid));
 }
 
 /* ARGSUSED */
@@ -1079,7 +1076,7 @@
   error ("Use the \"run\" command to start a Unix child process.");
 }
 
-/* Start an inferior win32 child process and sets inferior_ptid to its pid.
+/* Start an inferior win32 child process and sets inferior_pid to its pid.
    EXEC_FILE is the file to run.
    ALLARGS is a string containing the arguments to the program.
    ENV is the environment vector to pass.  Errors reported with error().  */
@@ -1279,12 +1276,11 @@
 }
 
 void
-child_resume (ptid_t ptid, int step, enum target_signal sig)
+child_resume (int pid, int step, enum target_signal sig)
 {
   thread_info *th;
   DWORD continue_status = last_sig > 0 && last_sig < NSIG ?
   DBG_EXCEPTION_NOT_HANDLED : DBG_CONTINUE;
-  int pid = PIDGET (ptid);
 
   last_sig = 0;
 
@@ -1330,8 +1326,7 @@
 static void
 child_close (int x ATTRIBUTE_UNUSED)
 {
-  DEBUG_EVENTS (("gdb: child_close, inferior_ptid=%d\n",
-                PIDGET (inferior_ptid)));
+  DEBUG_EVENTS (("gdb: child_close, inferior_pid=%d\n", inferior_pid));
 }
 
 struct target_ops child_ops;
@@ -1442,21 +1437,17 @@
    by "polling" it.  If WaitForSingleObject returns WAIT_OBJECT_0
    it means that the pid has died.  Otherwise it is assumed to be alive. */
 static int
-win32_child_thread_alive (ptid_t ptid)
+win32_child_thread_alive (int pid)
 {
-  int pid = PIDGET (ptid);
-
   return WaitForSingleObject (thread_rec (pid, FALSE)->h, 0) == WAIT_OBJECT_0 ?
     FALSE : TRUE;
 }
 
 /* Convert pid to printable format. */
 char *
-cygwin_pid_to_str (ptid_t ptid)
+cygwin_pid_to_str (int pid)
 {
   static char buf[80];
-  int pid = PIDGET (ptid);
-
   if ((DWORD) pid == current_event.dwProcessId)
     sprintf (buf, "process %d", pid);
   else
diff --git a/gdb/wince.c b/gdb/wince.c
index d931ddc..83112d9 100644
--- a/gdb/wince.c
+++ b/gdb/wince.c
@@ -129,7 +129,7 @@
 /* Forward declaration */
 extern struct target_ops child_ops;
 
-static int win32_child_thread_alive (ptid_t);
+static int win32_child_thread_alive (int);
 void child_kill_inferior (void);
 
 static int last_sig = 0;	/* Set if a signal was received from the
@@ -1131,7 +1131,7 @@
 static void
 child_fetch_inferior_registers (int r)
 {
-  current_thread = thread_rec (PIDGET (inferior_ptid), TRUE);
+  current_thread = thread_rec (inferior_pid, TRUE);
   do_child_fetch_inferior_registers (r);
 }
 
@@ -1151,7 +1151,7 @@
 static void
 child_store_inferior_registers (int r)
 {
-  current_thread = thread_rec (PIDGET (inferior_ptid), TRUE);
+  current_thread = thread_rec (inferior_pid, TRUE);
   do_child_store_inferior_registers (r);
 }
 
@@ -1412,10 +1412,9 @@
 		     "CREATE_PROCESS_DEBUG_EVENT"));
       current_process_handle = current_event.u.CreateProcessInfo.hProcess;
 
-      main_thread_id = current_event.dwThreadId;
-      inferior_ptid = pid_to_ptid (main_thread_id);
+      main_thread_id = inferior_pid = current_event.dwThreadId;
       /* Add the main thread */
-      th = child_add_thread (PIDGET (inferior_ptid),
+      th = child_add_thread (inferior_pid,
 			     current_event.u.CreateProcessInfo.hThread);
       break;
 
@@ -1487,12 +1486,11 @@
 }
 
 /* Wait for interesting events to occur in the target process. */
-static ptid_t
-child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
+static int
+child_wait (int pid, struct target_waitstatus *ourstatus)
 {
   DWORD event_code;
   int retval;
-  int pid = PIDGET (ptid);
 
   /* We loop when we get a non-standard exception rather than return
      with a SPURIOUS because resume can try and step or modify things,
@@ -1502,7 +1500,7 @@
 
   while (1)
     if (get_child_debug_event (pid, ourstatus, EXCEPTION_DEBUG_EVENT, &retval))
-      return pid_to_ptid (retval);
+      return retval;
     else
       {
 	int detach = 0;
@@ -1521,7 +1519,7 @@
 child_files_info (struct target_ops *ignore)
 {
   printf_unfiltered ("\tUsing the running image of child %s.\n",
-		     target_pid_to_str (inferior_ptid));
+		     target_pid_to_str (inferior_pid));
 }
 
 /* ARGSUSED */
@@ -1713,7 +1711,7 @@
   close (s0);
 }
 
-/* Start an inferior win32 child process and sets inferior_ptid to its pid.
+/* Start an inferior win32 child process and sets inferior_pid to its pid.
    EXEC_FILE is the file to run.
    ALLARGS is a string containing the arguments to the program.
    ENV is the environment vector to pass.  Errors reported with error().  */
@@ -1761,8 +1759,7 @@
   current_process_handle = pi.hProcess;
   current_event.dwProcessId = pi.dwProcessId;
   memset (&current_event, 0, sizeof (current_event));
-  current_event.dwThreadId = pi.dwThreadId;
-  inferior_ptid = pid_to_ptid (current_event.dwThreadId);
+  inferior_pid = current_event.dwThreadId = pi.dwThreadId;
   push_target (&child_ops);
   child_init_thread_list ();
   child_add_thread (pi.dwThreadId, pi.hThread);
@@ -1772,7 +1769,7 @@
   target_terminal_inferior ();
 
   /* Run until process and threads are loaded */
-  while (!get_child_debug_event (PIDGET (inferior_ptid), &dummy,
+  while (!get_child_debug_event (inferior_pid, &dummy,
 				 CREATE_PROCESS_DEBUG_EVENT, &ret))
     continue;
 
@@ -1831,12 +1828,11 @@
 
 /* Resume the child after an exception. */
 void
-child_resume (ptid_t ptid, int step, enum target_signal sig)
+child_resume (int pid, int step, enum target_signal sig)
 {
   thread_info *th;
   DWORD continue_status = last_sig > 0 && last_sig < NSIG ?
   DBG_EXCEPTION_NOT_HANDLED : DBG_CONTINUE;
-  int pid = PIDGET (ptid);
 
   DEBUG_EXEC (("gdb: child_resume (pid=%d, step=%d, sig=%d);\n",
 	       pid, step, sig));
@@ -1874,8 +1870,7 @@
 static void
 child_close (void)
 {
-  DEBUG_EVENTS (("gdb: child_close, inferior_ptid=%d\n",
-                PIDGET (inferior_ptid)));
+  DEBUG_EVENTS (("gdb: child_close, inferior_pid=%d\n", inferior_pid));
 }
 
 /* Explicitly upload file to remotedir */
@@ -2028,9 +2023,8 @@
    by "polling" it.  If WaitForSingleObject returns WAIT_OBJECT_0
    it means that the pid has died.  Otherwise it is assumed to be alive. */
 static int
-win32_child_thread_alive (ptid_t ptid)
+win32_child_thread_alive (int pid)
 {
-  int pid = PIDGET (ptid);
   return thread_alive (thread_rec (pid, FALSE)->h);
 }
 
diff --git a/gdb/xcoffsolib.c b/gdb/xcoffsolib.c
index 867f102..dd3c1d8 100644
--- a/gdb/xcoffsolib.c
+++ b/gdb/xcoffsolib.c
@@ -67,8 +67,8 @@
   struct vmap *vp = vmap;
 
   /* Check for new shared libraries loaded with load ().  */
-  if (! ptid_equal (inferior_ptid, null_ptid))
-    xcoff_relocate_symtab (PIDGET (inferior_ptid));
+  if (inferior_pid)
+    xcoff_relocate_symtab (inferior_pid);
 
   if (vp == NULL || vp->nxt == NULL)
     {
@@ -101,8 +101,8 @@
   dont_repeat ();
 
   /* Check for new shared libraries loaded with load ().  */
-  if (! ptid_equal (inferior_ptid, null_ptid))
-    xcoff_relocate_symtab (PIDGET (inferior_ptid));
+  if (inferior_pid)
+    xcoff_relocate_symtab (inferior_pid);
 
   if (pattern)
     {