Commit Graph

222 Commits

Author SHA1 Message Date
Andrew Cagney a3f171870f 2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
	* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
	* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
	* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
	* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
	* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
	* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
	* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
	* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
	* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
	* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
	* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
	* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
	* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
	* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 00:39:24 +00:00
Andrew Cagney e2e0b3e57f 2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up error_no_arg, query, perror_with_name, complaint, and
	internal_error.
	* breakpoint.c, cp-abi.c, cp-namespace.c, cp-support.c: Update.
	* cris-tdep.c, dbxread.c, dictionary.c, dsrec.c: Update.
	* dummy-frame.c, dve3900-rom.c, dwarf2-frame.c, dwarf2expr.c: Update.
	* dwarf2read.c, dwarfread.c, elfread.c, event-loop.c: Update.
	* exceptions.c, exec.c, f-lang.c, findvar.c, fork-child.c: Update.
	* frame-unwind.c, frame.c, frv-linux-tdep.c, frv-tdep.c: Update.
	* gdb_assert.h, gdbarch.c, gdbtypes.c, gnu-nat.c: Update.
	* go32-nat.c, hppa-tdep.c, hppabsd-nat.c, hpread.c: Update.
	* i386-linux-nat.c, i386-nat.c, i386-tdep.c, i386bsd-nat.c: Update.
	* i386fbsd-nat.c, inf-ptrace.c, inf-ttrace.c, infcall.c: Update.
	* infcmd.c, inflow.c, infptrace.c, infrun.c, inftarg.c: Update.
	* interps.c, language.c, linespec.c, linux-nat.c: Update.
	* m32r-linux-nat.c, m68k-tdep.c, m68kbsd-nat.c: Update.
	* m68klinux-nat.c, m88kbsd-nat.c, macroexp.c, macroscope.c: Update.
	* macrotab.c, maint.c, mdebugread.c, memattr.c: Update.
	* mips-linux-tdep.c, mips-tdep.c, mips64obsd-nat.c: Update.
	* mipsnbsd-nat.c, mn10300-tdep.c, monitor.c, nto-procfs.c: Update.
	* objc-lang.c, objfiles.c, objfiles.h, ocd.c, osabi.c: Update.
	* parse.c, ppc-bdm.c, ppc-linux-nat.c, ppc-sysv-tdep.c: Update.
	* ppcnbsd-nat.c, ppcobsd-nat.c, printcmd.c, procfs.c: Update.
	* regcache.c, reggroups.c, remote-e7000.c, remote-mips.c: Update.
	* remote-rdp.c, remote-sds.c, remote-sim.c, remote-st.c: Update.
	* remote-utils.c, remote.c, rs6000-nat.c, rs6000-tdep.c: Update.
	* s390-nat.c, s390-tdep.c, sentinel-frame.c, serial.c: Update.
	* sh-tdep.c, sh3-rom.c, sh64-tdep.c, shnbsd-nat.c: Update.
	* solib-aix5.c, solib-svr4.c, solib.c, source.c: Update.
	* sparc-nat.c, stabsread.c, stack.c, symfile.c, symtab.c: Update.
	* symtab.h, target.c, tracepoint.c, ui-file.c, ui-out.c: Update.
	* utils.c, valops.c, valprint.c, vax-nat.c, vaxbsd-nat.c: Update.
	* win32-nat.c, xcoffread.c, xstormy16-tdep.c: Update.
	* cli/cli-cmds.c, cli/cli-logging.c, cli/cli-script.c: Update.
	* cli/cli-setshow.c, mi/mi-cmd-break.c, mi/mi-cmds.c: Update.
	* mi/mi-console.c, mi/mi-getopt.c, mi/mi-out.c: Update.
	* tui/tui-file.c, tui/tui-interp.c: Update.
2005-02-11 18:13:55 +00:00
Andrew Cagney 8a3fe4f86c 2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
	* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
	* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
	* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
	* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
	* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
	* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
	* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
	* event-top.c, exec.c, expprint.c, f-lang.c: Update.
	* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
	* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
	* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
	* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
	* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
	* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
	* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
	* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
	* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
	* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
	* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
	* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
	* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
	* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
	* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
	* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
	* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
	* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
	* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
	* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
	* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
	* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
	* remote-rdp.c, remote-sim.c, remote-st.c: Update.
	* remote-utils.c, remote-utils.h, remote.c: Update.
	* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
	* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
	* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
	* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
	* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
	* somread.c, somsolib.c, source.c, stabsread.c: Update.
	* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
	* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
	* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
	* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
	* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
	* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
	* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
	* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
	* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
	* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
	* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
	* tui/tui-win.c: Update.
2005-02-11 04:06:14 +00:00
Mark Kettenis ceb41096a8 * procfs.c (procfs_fetch_registers, procfs_store_registers): Like
Remove optimization for DEPRECATED_FP_REGNUM.
2004-10-30 21:30:58 +00:00
Mark Kettenis 772cf8be75 * procfs.c (proc_get_gregs, proc_get_fpregs, proc_set_gregs)
(proc_set_fpregs, procfs_fetch_registers, procfs_store_registers):
Cleanup coding style.
2004-10-30 18:01:11 +00:00
Andrew Cagney c8e73a318e 2004-10-08 Andrew Cagney <cagney@gnu.org>
* target.h (struct target_ops): Rename to_xfer_memory to
	deprecated_xfer_memory.
	* target.c: Update.
	(deprecated_debug_xfer_memory): Rename debug_to_xfer_memory.
	* wince.c: Update.
	* win32-nat.c: Update.
	* v850ice.c: Update.
	* uw-thread.c: Update.
	* thread-db.c: Update.
	* sol-thread.c: Update.
	* remote.c: Update.
	* remote-vx.c: Update.
	* remote-st.c: Update.
	* remote-sim.c: Update.
	* remote-sds.c: Update.
	* remote-rdp.c: Update.
	* remote-rdi.c: Update.
	* remote-mips.c: Update.
	* remote-m32r-sdi.c: Update.
	* remote-e7000.c: Update.
	* procfs.c: Update.
	* ppc-bdm.c: Update.
	* nto-procfs.c: Update.
	* monitor.c: Update.
	* linux-nat.c: Update.
	* inftarg.c: Update.
	* hpux-thread.c: Update.
	* go32-nat.c: Update.
	* gnu-nat.c: Update.
	* exec.c: Update.
	* corelow.c: Update.
	* bsd-kvm.c: Update.
	* aix-thread.c: Update.
2004-10-08 20:30:00 +00:00
Mark Kettenis 998bdd68ff * procfs.c (procfs_xfer_partial): Use WRITEBUF instead of READBUF
when writing to memory.
2004-10-05 11:24:21 +00:00
Joel Brobecker 9185ddce96 * procfs.c (dbx_link_bpt_addr): New static global variable.
(dbx_link_shadow_contents): New static global variable.
        (procfs_wait, case <PR_SYSEXIT>): Handle syssgi events.
        (procfs_wait, case <FLTBPT>): Remove the __dbx_link brekapoint
        if we just hit it.
        (procfs_init_inferior): Enable syssgi() syscall trace if appropriate.
        Reset dbx_link_bpt_addr as the address of __dbx_link() may change
        from run to run.
        (procfs_create_inferior): Remove syssgi syscall-exit notifications
        after the inferior has been forked.
        (remove_dbx_link_breakpoint): New function.
        (dbx_link_addr): New function.
        (insert_dbx_link_bpt_in_file): New function.
        (insert_dbx_link_bpt_in_region): New function.
        (insert_dbx_link_breakpoint): New function.
        (proc_trace_syscalls_1): New function, extracted from
        proc_trace_syscalls.
        (proc_trace_syscalls): Replace extract code by call to
        proc_trace_syscalls_1.
        * solib-irix.c (disable_break): Remove stop_pc assertion, as it
        is no longer valid.
2004-08-27 13:37:42 +00:00
Mark Kettenis cc377e6b36 * procfs.c (procfs_detach): Cleanup. Print process ID, not LWP
ID.  Use comma in output.  Use gdb_flush on gdb_stdout instead of
fflush on stdout.
2004-08-11 06:55:15 +00:00
Mark Kettenis 21749010c8 * procfs.c (procfs_pid_to_str): Use "%ld" to print LWP. 2004-08-10 16:05:38 +00:00
Mark Kettenis 5240ceac28 * procfs.c (procfs_pid_to_str): Remove redundant and unused
variables.  Incapitalized "process".
2004-08-08 01:00:55 +00:00
Andrew Cagney c27cda74c7 2004-05-25 Andrew Cagney <cagney@gnu.org>
* target.h (struct target_ops): Add from_tty to
	to_create_inferior.
	(target_create_inferior, find_default_create_inferior): Update.
	* infcmd.c (run_command): Update.
	* wince.c (child_create_inferior): Update.
	* win32-nat.c (child_create_inferior): Update.
	* uw-thread.c (uw_thread_create_inferior): Update.
	* thread-db.c (thread_db_create_inferior): Update.
	* target.c (debug_to_create_inferior)
	(find_default_create_inferior): Update.
	(maybe_kill_then_create_inferior): Update.
	* sol-thread.c (sol_thread_create_inferior): Update.
	* remote.c (extended_remote_async_create_inferior)
	(extended_remote_create_inferior): Update.
	* remote-vx.c (vx_create_inferior): Update.
	* remote-st.c (st2000_create_inferior): Update.
	* remote-sim.c (gdbsim_create_inferior): Update.
	* remote-sds.c (sds_create_inferior): Update.
	* remote-rdp.c (remote_rdp_create_inferior): Update.
	* remote-rdi.c (arm_rdi_create_inferior): Update.
	* remote-m32r-sdi.c (m32r_create_inferior): Update.
	* remote-e7000.c (e7000_create_inferior): Update.
	* procfs.c (procfs_create_inferior): Update.
	* ocd.c (ocd_create_inferior): Update.
	* ocd.h (ocd_create_inferior): Update.
	* nto-procfs.c (procfs_create_inferior): Update.
	* monitor.c (monitor_create_inferior): Update.
	* lin-lwp.c (lin_lwp_create_inferior): Update.
	* inftarg.c (child_create_inferior): Update.
	* hpux-thread.c (hpux_thread_create_inferior): Update.
	* gnu-nat.c (gnu_create_inferior): Update.
2004-05-25 14:58:31 +00:00
Andrew Cagney 46ac7a5dc6 2004-02-15 Andrew Cagney <cagney@redhat.com>
* procfs.c (procfs_init_inferior): Assume that
	START_INFERIOR_TRAPS_EXPECTED is defined.
	* config/ns32k/nbsdaout.mt (TM_FILE): Set to tm-ns32k.h.
	* config/ns32k/tm-nbsd.h: Delete file,
	START_INFERIOR_TRAPS_EXPECTED already defined as 2.
2004-02-15 22:38:40 +00:00
Roland McGrath 4e73f23d28 2004-01-28 Roland McGrath <roland@redhat.com>
* procfs.c (procfs_xfer_partial): New function.
	(init_procfs_ops): Use that for procfs_ops.to_xfer_partial.
	* Makefile.in (procfs.o): Add $(auxv_h) dep.
	* procfs.c (procfs_make_note_section): If we can read
	TARGET_OBJECT_AUXV data, add an NT_AUXV note containing it.
	* linux-proc.c (linux_make_note_section): Likewise.
2004-02-01 22:35:13 +00:00
Roland McGrath 199587082a 2004-01-29 Roland McGrath <roland@redhat.com>
* procfs.c: Include gdb_string.h for str* decls, otherwise warnings.
	* Makefile.in (procfs.o): Add dep.
2004-01-29 21:54:22 +00:00
Andrew Cagney afb18d0f3d 2004-01-17 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_NPC_REGNUM): Delete.
	* gdbarch.h, gdbarch.c: Re-generate.
	* procfs.c (procfs_fetch_registers): Delete reference to
	DEPRECATED_NPC_REGNUM.
	(procfs_store_registers): Ditto.
	* regcache.c (generic_target_write_pc): Simplify.
	* lynx-nat.c: Delete #ifdef SPARC code.  Not used.

Index: doc/ChangeLog
2004-01-17  Andrew Cagney  <cagney@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Delete
	documentation on DEPRECATED_NPC_REGNUM.
2004-01-17 18:24:15 +00:00
Andrew Cagney 7af6341f3b 2003-11-22 Andrew Cagney <cagney@redhat.com>
* procfs.c (procfs_wait): Delete FAULTED_USE_SIGINFO comment.
	* config/sparc/tm-sun4sol2.h (FAULTED_USE_SIGINFO): Delete macro.
	* config/i386/tm-i386sol2.h (FAULTED_USE_SIGINFO): Delete macro.
	* config/alpha/nm-osf2.h (FAULTED_USE_SIGINFO): Delete macro.
2003-11-22 22:43:05 +00:00
Andrew Cagney deafb06122 2003-09-20 Andrew Cagney <cagney@redhat.com>
* breakpoint.c: Eliminate ARGSUSED.
	* buildsym.c, cli/cli-cmds.c, cli/cli-script.c: Ditto.
	* coffread.c, corelow.c, dwarf2read.c, event-top.c: Ditto.
	* exec.c, gcore.c, hpux-thread.c, infcmd.c, inflow.c: Ditto.
	* infrun.c, inftarg.c, maint.c, ocd.c, printcmd.c: Ditto.
	* procfs.c, regcache.c, remote-rdi.c, remote-sds.c: Ditto.
	* remote.c, sol-thread.c, source.c, stabsread.c: Ditto.
	* stack.c, symfile.c, target.c, top.c, typeprint.c: Ditto.
	* utils.c, v850ice.c, valprint.c, values.c, win32-nat.c: Ditto.
	* wince.c, remote-vx.c: Ditto.
2003-09-21 01:26:46 +00:00
Andrew Cagney efe59759d8 2003-09-17 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_NPC_REGNUM): Deprecate NPC_REGNUM.
	* gdbarch.h, gdbarch.c: Regenerate.
	* core-sol2.c, hppa-tdep.c, lynx-nat.c, procfs.c: Update.
	* regcache.c, remote-vxsparc.c, sparc-linux-nat.c: Update.
	* sparc-nat.c, sparc-tdep.c, sparc64-tdep.c: Update.
	* sparcnbsd-tdep.c: Update.
2003-09-17 15:42:21 +00:00
Andrew Cagney 0ba6dca974 2003-04-28 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_TARGET_READ_FP): Replace TARGET_READ_FP.
	(DEPRECATED_FP_REGNUM): Replace FP_REGNUM.
	* gdbarch.h, gdbarch.c: Re-generate.
	* infcall.c (call_function_by_hand): Use DEPRECATED_FP_REGNUM,
	DEPRECATED_TARGET_READ_FP, or "sp" to create the dummy frame ID.
	* inferior.h (deprecated_read_fp): Rename read_fp.
	(generic_target_read_fp): Delete declaration.
	* regcache.c (generic_target_read_fp): Delete function.
	(deprecated_read_fp): Replace read_fp, use
	DEPRECATED_TARGET_READ_FP or DEPRECATED_FP_REGNUM.
	* d10v-tdep.c (d10v_read_fp): Delete function.
	(d10v_gdbarch_init): Do not set deprecated_read_fp.

	* sparc-tdep.c (sparc_gdbarch_init): Do not set
	deprecated_target_read_fp to generic_target_read_fp.
	* sh-tdep.c (sh_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
	* frv-tdep.c (frv_gdbarch_init): Ditto.

	* xstormy16-tdep.c (xstormy16_gdbarch_init): Set
	deprecated_fp_regnum.
	* x86-64-tdep.c (x86_64_init_abi): Ditto.
	* vax-tdep.c (vax_gdbarch_init): Ditto.
	* v850-tdep.c (v850_gdbarch_init): Ditto.
	* sparc-tdep.c (sparc_gdbarch_init): Ditto.
	* sh-tdep.c (sh_gdbarch_init): Ditto.
	* s390-tdep.c (s390_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
	* mcore-tdep.c (mcore_gdbarch_init): Ditto.
	* m68k-tdep.c (m68k_gdbarch_init): Ditto.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
	* ia64-tdep.c (ia64_gdbarch_init): Ditto.
	* i386-tdep.c (i386_gdbarch_init): Ditto.
	* hppa-tdep.c (hppa_gdbarch_init): Ditto.
	* h8300-tdep.c (h8300_gdbarch_init): Ditto.
	* frv-tdep.c (frv_gdbarch_init): Ditto.
	* cris-tdep.c (cris_gdbarch_init): Ditto.
	* avr-tdep.c (avr_gdbarch_init): Ditto.
	* arm-tdep.c (arm_gdbarch_init): Ditto.
	* alpha-tdep.c (alpha_gdbarch_init): Ditto.

	* x86-64-tdep.c (x86_64_init_abi): Set deprecated_target_read_fp.
	* v850-tdep.c (v850_gdbarch_init): Ditto.
	* sparc-tdep.c (sparc_gdbarch_init): Ditto.
	* sh-tdep.c (sh_gdbarch_init): Ditto.
	* s390-tdep.c (s390_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
	* mips-tdep.c (mips_gdbarch_init): Ditto.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
	* ia64-tdep.c (ia64_gdbarch_init): Ditto.
	* hppa-tdep.c (hppa_gdbarch_init): Ditto.
	* frv-tdep.c (frv_gdbarch_init): Ditto.
	* avr-tdep.c (avr_gdbarch_init): Ditto.
	* arm-tdep.c (arm_gdbarch_init): Ditto.

	* vax-tdep.c (vax_frame_init_saved_regs): Replace FP_REGNUM with
	DEPRECATED_FP_REGNUM.
	(vax_push_dummy_frame, vax_pop_frame): Ditto.
	* std-regs.c (value_of_builtin_frame_fp_reg): Ditto.
	* sparc-tdep.c (sparc_init_extra_frame_info): Ditto.
	(sparc_push_dummy_frame, sparc64_read_fp): Ditto.
	(sparc32_register_virtual_type): Ditto.
	* sh-tdep.c (sh64_frame_chain): Ditto.
	(sh64_get_saved_register, sh64_pop_frame): Ditto.
	(sh_nofp_frame_init_saved_regs): Ditto.
	(sh64_nofp_frame_init_saved_regs): Ditto.
	(sh_fp_frame_init_saved_regs): Ditto.
	* remote-mips.c (mips_wait, mips_fetch_registers): Ditto.
	* remote-e7000.c (fetch_regs_from_dump): Ditto.
	* procfs.c (procfs_fetch_registers): Ditto.
	(procfs_store_registers): Ditto.
	* ns32knbsd-nat.c (fetch_inferior_registers): Ditto.
	(store_inferior_registers, fetch_core_registers): Ditto.
	(fetch_kcore_registers, clear_regs): Ditto.
	* ns32k-tdep.c (ns32k_frame_init_saved_regs): Ditto.
	(ns32k_push_dummy_frame, ns32k_pop_frame): Ditto.
	* nlm/i386.h (DEPRECATED_FP_REGNUM): Ditto.
	* nlm/i386.c (do_status): Ditto.
	* mipsv4-nat.c (supply_gregset): Ditto.
	* mips-tdep.c: Ditto for comments.
	* mips-nat.c (fetch_inferior_registers): Ditto.
	(store_inferior_registers, fetch_core_registers): Ditto.
	* m68k-tdep.c (m68k_push_dummy_frame): Ditto.
	(m68k_pop_frame, m68k_frame_init_saved_regs): Ditto.
	* i386-tdep.c (i386_frame_init_saved_regs): Ditto.
	(i386_do_pop_frame, i386_register_type): Ditto.
	* hppa-tdep.c (hppa_frame_chain): Ditto.
	(hppa_push_dummy_frame, find_dummy_frame_regs): Ditto.
	(hppa_pop_frame, hppa_read_fp): Ditto.
	(skip_prologue_hard_way, hppa_frame_find_saved_regs): Ditto.
	* cris-tdep.c (cris_examine, cris_pop_frame): Ditto.
	* config/vax/nm-vax.h (REGISTER_U_ADDR): Ditto.
	* config/sparc/tm-sparc.h (DEPRECATED_FP_REGNUM): Ditto.
	* config/sparc/tm-sp64.h (DEPRECATED_FP_REGNUM): Ditto.
	* config/s390/tm-s390.h (DEPRECATED_FP_REGNUM): Ditto.
	* config/pa/tm-hppa64.h (DEPRECATED_FP_REGNUM): Ditto.
	* config/ia64/tm-ia64.h (DEPRECATED_FP_REGNUM): Ditto.
	* blockframe.c: Ditto for comments.
	* arch-utils.h: Ditto for comments.
	* arch-utils.c (legacy_virtual_frame_pointer): Ditto.
	* alphanbsd-tdep.c (fetch_core_registers): Ditto.
	* alphabsd-nat.c (fetch_inferior_registers): Ditto.
	* alpha-tdep.h: Ditto for comments.
	* alpha-tdep.c (alpha_cannot_fetch_register): Ditto.
	(alpha_cannot_store_register): Ditto.
	(alpha_push_dummy_frame): Ditto.
	* alpha-nat.c (supply_gregset): Ditto.

	* config/sparc/tm-sp64.h (DEPRECATED_TARGET_READ_FP): Update.
	* config/pa/tm-hppa64.h (DEPRECATED_TARGET_READ_FP): Update.
	* config/sparc/tm-sparc.h: Update comment.

	* hppa-tdep.c (hppa_init_extra_frame_info): Use
	deprecated_read_fp instead of TARGET_READ_FP.
	(hppa_init_extra_frame_info, hppa_frame_chain): Ditto.
	(hppa_push_dummy_frame, hppa_read_fp): Ditto.
	* sparc-tdep.c (sparc_init_extra_frame_info): Use
	deprecated_read_fp instead of read_fp.
	* s390-tdep.c (s390_push_arguments): Ditto.
	* ia64-tdep.c (ia64_gdbarch_init): Ditto.
	* frame.h: Ditto in comments.
	* frame.c (legacy_get_prev_frame): Ditto.
	* dummy-frame.c (dummy_frame_this_id): Ditto.
	* arm-tdep.c (arm_init_extra_frame_info): Ditto.

2003-04-28  Andrew Cagney  <cagney@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Replace
	read_fp, TARGET_READ_FP and FP_REGNUM, with deprecated_read_fp,
	DEPRECATED_TARGET_READ_FP and DEPRECATED_REGNUM.
2003-04-29 01:49:49 +00:00
Andrew Cagney 2555fe1a4f 2003-02-06 Andrew Cagney <ac131313@redhat.com>
* Makefile.in (symm-nat.o): Update dependencies.
	(sparc-nat.o, procfs.o, proc-api.o, ppc-linux-nat.o): Ditto.
	(lynx-nat.o, ia64-linux-nat.): Ditto.
	* symm-nat.c, sparc-nat.c, procfs.c, proc-api.c: Include
	"gdb_wait.h" instead of <wait.h> or <sys/wait.h>.
	* ppc-linux-nat.c, lynx-nat.c, ia64-linux-nat.c: Ditto.
2003-02-07 04:49:34 +00:00
Andrew Cagney 44270758cd 2003-02-06 Andrew Cagney <ac131313@redhat.com>
* Makefile.in (inflow_h): Define.
	(procfs.o, inflow.o, procfs.o): Update dependencies.
	* inftarg.c (child_stop): Delete extern declaration of
	inferior_process_group.  Include "inflow.h".
	* procfs.c (procfs_stop): Ditto.  Include "inflow.h".
	* inflow.c (PROCESS_GROUP_TYPE): Move definitions from here ...
	* inflow.h (PROCESS_GROUP_TYPE): ... to here.  New file.
	(our_process_group, inferior_process_group): Extern declarations.
2003-02-07 04:21:34 +00:00
Andrew Cagney df8f727469 2003-02-06 Andrew Cagney <ac131313@redhat.com>
* procfs.c: Include "gdb_assert.h".
2003-02-07 03:23:20 +00:00
Andrew Cagney 9a043c1d0c 2003-02-01 Andrew Cagney <ac131313@redhat.com>
* defs.h (host_pointer_to_address): Delete declaration.
	(address_to_host_pointer): Delete declaration.
	* utils.c (host_pointer_to_address): Delete function.
	(address_to_host_pointer): Delete function.
	* procfs.c (procfs_address_to_host_pointer): New function.
	* procfs.c (proc_set_watchpoint): Use.
	(procfs_can_use_hw_breakpoint): Update comments.
	* somsolib.c (hpux_address_to_host_pointer_hack): New function.
	(som_solib_add): Use.
	* hppa-tdep.c (hppa_pointer_to_address_hack): New function.
	* hppa-tdep.c (unwind_command): Use.
2003-02-01 23:34:05 +00:00
Michael Snyder 1a303dec0c 2002-06-05 Paul N. Hilfinger <hilfingr@otisco.mckusick.com>
* procfs.c (do_detach): Clear current signal, not just fault.
	Corrects problem with breakpoint trap signal leaking to detached
	process on Tru64.
2002-09-11 00:13:58 +00:00
Stephane Carrez a790ad353e Fix PR gdb/393:
* inflow.c (terminal_save_ours): New function to save terminal
	settings.
	* inferior.h (terminal_save_ours): Declare.
	* target.c (debug_to_terminal_save_ours): New function.
	(cleanup_target): Defaults to_terminal_save_ours.
	(update_current_target): Inherit to_terminal_save_ours.
	(setup_target_debug): Set to_terminal_save_ours.
	* target.h (target_terminal_save_ours): New to save terminal settings.
	(target_ops): New member to_terminal_save_ours.
	* gnu-nat.c (init_gnu_ops): Set to_terminal_save_ours.
	* hpux-thread.c (init_hpux_thread_ops): Likewise.
	* inftarg.c (init_child_ops): Likewise.
	* m3-nat.c (init_m3_ops): Likewise.
	* procfs.c (init_procfs_ops): Likewise.
	* wince.c (init_child_ops): Likewise.
	* win32-nat.c (init_child_ops): Likewise.
	* sol-thread.c (init_sol_thread_ops): Likewise.
2002-08-26 19:18:33 +00:00
Kevin Buettner 1e03ad2088 * procfs.c (procfs_can_use_hw_breakpoint): New function.
(init_procfs_ops): Define ``to_can_use_hw_breakpoint'' for procfs
	target vector.
	* config/mips/nm-irix5.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT):
	Delete.  Add comment regarding this now-deleted target method.
2002-08-13 18:03:38 +00:00
Andrew Cagney 5ae5f59288 Fix some K&R isms. 2002-07-11 13:50:50 +00:00
Michael Snyder 6dbdc4a362 2002-02-13 Michael Snyder <msnyder@redhat.com>
* gcore.c (gcore_command): Use gcore_default_target instead of NULL.
	(default_gcore_mach): Just return 0, work around a problem in bfd.
	(default_gcore_target): OK to return NULL if exec_bfd is null.
	(make_mem_sec): Use a cast, avoid a warning.

	* procfs.c (find_memory_regions_callback): Use a cast instead of
	calling host_pointer_to_address (which complains if
	sizeof (host pointer) != sizeof (target pointer)).
	(procfs_make_note_section): Avoid overflow in psargs string.
2002-02-14 01:57:36 +00:00
Michael Snyder 65554feff8 2002-02-13 Michael Snyder <msnyder@redhat.com>
* procfs.c (procfs_make_note_section): Make the default
	implementation return an error.

2002-02-13  Rodney Brown  <rbrown64@csc.com.au>

	* procfs.c (procfs_make_note_section): Provide a default definition
	(for alpha-dec-osf4.0f). Fix typos.

2002-02-11  Michael Snyder  <msnyder@redhat.com>

	* procfs.c: Include elf-bfd.h (for elfcore_write functions).
	(gcore section): Ifdef for Solaris and Unixware only.
	(procfs_do_thread_registers): Unixware needs one lwpstatus
	per thread (not one prstatus or pstatus).
	(procfs_make_note_section): Iterate only over kernel threads (lwps),
	not over all gdb threads.  For unixware, call elfcore_write_pstatus
	once before iterating over threads.
2002-02-13 22:03:46 +00:00
Michael Snyder be4d133316 2002-01-03 Michael Snyder <msnyder@redhat.com>
Implement a "generate-core-file" command in gdb, save target state.
	* gcore.c: New file.  Implement new command 'generate-core-file'.
	Save a corefile image of the current state of the inferior.
	* linux-proc.c: Add linux-specific code for saving corefiles.
	* target.h (struct target_ops): Add new target vectors for saving
	corefiles; to_find_memory_regions and to_make_corefile_notes.
	(target_find_memory_regions): New macro.
	(target_make_corefile_notes): New macro.
	* target.c (update_current_target): Inherit new target methods.
	(dummy_find_memory_regions): New place-holder method.
	(dummy_make_corefile_notes): New place-holder method.
	(init_dummy_target): Initialize new dummy target vectors.
	* exec.c (exec_set_find_memory_regions): New function.
	Allow the exec_ops vector for memory regions to be taken over.
	(exec_make_note_section): New function, target vector method.
	* defs.h (exec_set_find_memory_regions): Export prototype.
	* procfs.c (proc_find_memory_regions): New function, corefile method.
	(procfs_make_note_section): New function, corefile method.
	(init_procfs_ops): Set new target vector pointers.
	(find_memory_regions_callback): New function.
	(procfs_do_thread_registers): New function.
	(procfs_corefile_thread_callback): New function.
	* sol-thread.c (sol_find_memory_regions): New function.
	(sol_make_note_section): New function.
	(init_sol_thread_ops): Initialize new target vectors.
	* inftarg.c (inftarg_set_find_memory_regions): New function.
	Allow to_find_memory_regions vector to be taken over.
	(inftarg_set_make_corefile_notes): New function.
	Allow to_make_corefile_notes vector to be taken over.
	* thread-db.c (thread_db_new_objfile): Don't activate thread-db
	interface layer if not target_has_execution (may be a corefile).
	* config/i386/linux.mh: Add gcore.o to NATDEPFILES.
	* config/sparc/sun4sol2.mh: Ditto.
	* config/alpha/alpha-linux.mh: Ditto.
	* config/arm/linux.mh: Ditto.
	* config/i386/x86-64linux.mh: Ditto.
	* config/ia64/linux.mh: Ditto.
	* config/m68k/linux.mh: Ditto.
	* config/mips/linux.mh: Ditto.
	* config/powerpc/linux.mh: Ditto.
	* config/sparc/linux.mh: Ditto.
2002-01-09 00:37:02 +00:00
Michael Snyder 831e682efe 2001-12-28 Michael Snyder <msnyder@redhat.com>
Abstract the functionality of iterating over mapped memory
	regions into a general purpose iterator function.
	* procfs.c (iterate_over_mappings): New function, general purpose
	iterator for memory sections.
	(proc_iterate_over_mappings): Reimplement using iterate_over_mappings.
	(solib_mappings_callback): New function, callback for above.
	(info_proc_mappings): Reimpliment using iterate_over_mappings.
	(info_mappings_callback): New function, callback for above.

	* procfs.c (proc_set_watchpoint): Add cast to suppress warning.
2002-01-03 20:50:25 +00:00
Michael Snyder 388faa4837 2001-12-21 Michael Snyder <msnyder@redhat.com>
* procfs.c (info_proc_cmd): Add the 'mappings' sub-command that
	was dropped a few years ago, when procfs.c was rewritten.
	(info_proc_mappings): New function, implement 'info proc mappings'.
	(mappingflags): New function.
	(_initialize_procfs): Document new option to 'info proc' command.
2001-12-28 19:47:08 +00:00
Kevin Buettner 1d5e060273 Allocate/free space associated with saved_entryset and saved_exitset. 2001-07-07 21:55:28 +00:00
Michael Snyder 7de4590493 2001-07-06 Michael Snyder <msnyder@redhat.com>
* procfs.c (procfs_resume): Silence noisy warning.
2001-07-06 21:31:04 +00:00
Kevin Buettner ca6724c16a Redefine ptid_t to be a struct rather than an int. 2001-05-15 00:03:38 +00:00
Kevin Buettner 39f770628a Phase 1 of the ptid_t changes. 2001-05-04 04:15:33 +00:00
Kevin Buettner 4d1bcd09bd Add code to retry certain open()s. 2001-04-17 01:24:49 +00:00
Fernando Nasser d1566ff562 2001-04-13 Fernando Nasser <fnasser@redhat.com>
From  Adam Mirowski  <Adam.Mirowski@Sun.COM>
	Fixed Insight on Solaris. It was not possible to debug a process
	because of EINTR "errors".
	* procfs.c: (procfs_wait): if proc_wait_for_stop() fails
	with EINTR, retry the call.
2001-04-13 13:51:54 +00:00
Kevin Buettner 37de36c6ed Add AIX5 procfs support. 2001-03-27 02:01:11 +00:00
Andrew Cagney 3c37485b16 malloc() -> xmalloc.
Move malloc() decl to utils.c
2001-03-20 01:37:10 +00:00
Andrew Cagney 043780a1fb Add ``attrib'' parameter to *xfer_memory() functions. 2001-03-15 16:55:15 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Michael Snyder aaeb7efa68 2001-01-16 Michael Snyder <msnyder@cleaver.cygnus.com>
* procfs.c (procfs_stopped_by_watchpoint): Don't die if	process
        goes away -- just return false.
2001-01-16 17:41:51 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Kevin Buettner d0849a9a5a Protoization. 2000-09-30 02:39:10 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Kevin Buettner 8ab8638139 Eliminate use of PARAMS. 2000-06-12 01:33:49 +00:00
Andrew Cagney ac2e2ef7e2 Add host_pointer_to_address() and address_to_host_pointer(). Add
signed_pointer_to_address() etc.  Rename generic_pointer_to_address()
to unsigned_pointer_to_address() etc.
2000-06-04 13:46:37 +00:00
Kevin Buettner 507f3c78fb Eliminate PARAMS from function pointer declarations. 2000-06-04 00:41:10 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Michael Snyder c60c0f5f88 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
* gregset.h: New file.  Typedefs for gdb_gregset_t and
        gdb_fpregset_t, prototypes for supply_gregset and friends.
        * procfs.c: Include gregset.h.  Delete local prototypes for
        supply_gregset etc., and local typedef gdb_gregset_t etc.
        * sol-thread.c: Include gregset.h, delete local prototypes,
        add appropriate casts to gdb_gregset_t.
        * uw-thread.c, lin-thread.c, core-sol2.c, core-regset.c,
        sparc-tdep.c, ptx4-nat.c, ppc-linux-nat.c, mipsv4-nat.c,
        m88k-nat.c, m68klinux-nat.c, m68k-tdep.c, irix5-nat.c,
        irix4-nat.c, ia64-linux-nat.c, i386v4-nat.c, cxux-nat.c,
        arm-linux-nat.c, alpha-nat.c: Include gregset.h.
        * config/nm-linux.h: Define GDB_GREGSET_T, GDB_FPREGET_T.
        * config/sparc/tm-sun4sol2.h: Ditto.
2000-05-26 23:22:41 +00:00
Andrew Cagney 4b14d3e4e0 Replace <sys/dir.h> (and <dirent.h>) with "gdb_dirent.h". 2000-05-25 06:49:01 +00:00
Andrew Cagney 004527cbbb Purge procfs.c of make_cleanup_func. 2000-05-22 06:17:35 +00:00
Michael Snyder 6005439332 2000-05-08 Michael Snyder <msnyder@seadog.cygnus.com>
* gdbarch.sh: Add FP0_REGNUM to list of multi-arched register numbers.
        * gdbarch.c, gdbarch.h: Regenerate.
        * core-regset.c: Change FP0_REGNUM to a runtime test.
        * procfs.c: Ditto.
        * sun3-nat.c: Ditto.
        * sparc-tdep.c: Ditto.

        * i386mach-nat.c: Remove unnecessary ifdef for FP0_REGNUM.
        * ptx4-nat.c: Ditto.

        * sol-thread.c (sol_thread_create_inferior): only add the thread
        to the thread list if it is not already in there.
        (prototypes for thread_db func ptrs): pretty up formatting.
2000-05-10 17:38:16 +00:00
Andrew Cagney 327fce13c5 * procfs.c (PROCFS_TRACE): Delete definition.
* proc-utils.h (PROCFS_NOTE, PROC_PRETTYFPRINT_STATUS): Always define.
2000-05-07 23:09:45 +00:00
Michael Snyder 103b3ef54f 2000-05-05 Michael Snyder <msnyder@seadog.cygnus.com>
* procfs.c: Cleanup of procfs tracing.  Move defines and
        prototypes to proc-utils.h
        * proc-utils.h: Define tracing macros.  Declare trace functions.
        * proc-api.c: Make procfs tracing a runtime option.
        (prepare_to_trace): New function, abstracted out of several
        places.  Open a trace file if one is required.
        (ioctl_with_trace, write_with_trace, open_with_trace,
        close_with_trace, wait_with_trace, lseek_with_trace):
        Report errno if an error occurs in a system call.
        (write_with_trace): Make 2nd arg void *, to agree with write.
2000-05-05 20:56:10 +00:00
Michael Snyder 6c1a54b22b 2000-05-05 Michael Snyder <msnyder@seadog.cygnus.com>
* procfs.c (many functions): change int cmd; to long cmd;
        Solaris /proc API calls this parameter a long, and requires it
        for 64-bit hosts (where sizeof(long) != sizeof(int)).  UnixWare
        calls it an int, but on existing UnixWare hosts, int and long
        are the same size.  So long it must be.  If a future UnixWare
        version has problems with this, we'll have to use autoconf.
        * proc-api.c (write_with_trace): use long instead of int.
2000-05-05 18:29:33 +00:00
Andrew Cagney 0386318224 Multi-arch NPC_REGNUM NNPC_REGNUM. 2000-05-02 09:36:57 +00:00
Michael Snyder 02d5252fb1 2000-04-26 Michael Snyder <msnyder@seadog.cygnus.com>
* procfs.c (comments): Eliminate "???" in comments, which GCC
	wants to interpret as a trigraph.  (fill_gregset, supply_gregset,
	fill_fpregset, supply_fpregset): declare.
	(procfs_wait): Sysargs is a long, change printf format to match.
	(test-mapping, mapping_test, test_mapping_cmd) Remove (test only).
2000-04-27 01:04:52 +00:00
Andrew Cagney d311cd50fc From 2000-03-27 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>:
* procfs.c (init_procfs_ops):  Set procfs_ops.to_has_memory and
procfs_ops.to_has_all_memory to 1.
2000-04-07 04:33:21 +00:00
Michael Snyder 03905a3cee 2000-03-28 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
* procfs.c (proc_set_watchpoint):  Declare addr parameter as
        CORE_ADDR, to match call from procfs_set_watchpoint.
2000-03-28 19:02:47 +00:00
Andrew Cagney 05e28a7bbf From Peter Schauer: Fix Solaris/x86 threads by copying linux code. 2000-02-29 13:53:59 +00:00
Andrew Cagney eeefac92e7 From Rodney Brown: Define MERGEPID when needed. 2000-02-16 08:02:57 +00:00
Jason Molenda 0fda6bd286 import gdb-2000-01-24 snapshot 2000-01-25 02:40:50 +00:00
Jason Molenda 0d06e24ba7 import gdb-2000-01-10 snapshot 2000-01-11 03:07:37 +00:00
Jason Molenda c3f6f71df3 import gdb-2000-01-05 snapshot 2000-01-06 03:07:20 +00:00
Jason Molenda ed9a39ebf9 import gdb-1999-12-21 snapshot 1999-12-22 21:45:38 +00:00
Jason Molenda 11cf874164 import gdb-1999-11-08 snapshot 1999-11-09 01:23:30 +00:00
Jason Molenda 2acceee218 import gdb-1999-10-04 snapshot 1999-10-05 23:13:56 +00:00
Jason Molenda 6426a772a2 import gdb-1999-09-28 snapshot 1999-09-28 21:55:21 +00:00
Jason Molenda 104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Stan Shebs b83266a0e1 import gdb-19990504 snapshot 1999-05-05 14:45:51 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Mark Alexander e5c9fdd2b6 Fix for PR 17980:
* procfs.c (wait_fd): Handle deleted threads correctly.
1999-01-29 02:19:27 +00:00
Stan Shebs 51aa361ef8 * procfs.c (init_procfs_ops): New function, fills in procfs_ops,
init only nonzero fields, leave to_require_attach and
	to_require_detach empty, not needed for /proc systems yet.
	(_initialize_procfs): Call init_procfs_ops.
1999-01-22 02:30:37 +00:00
David Taylor 63f8d5f5b3 change initialization of procfs_ops from compile time to run time. 1999-01-18 20:22:43 +00:00
Michael Snyder 3ab2abae9a Wed Jan 13 14:59:02 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
* infrun.c (set/show scheduler-locking) New command.  Set a
          mode bit that will control how GDB attempts to control thread
          scheduling for step, continue, etc.  (resume): make use of
          the schedule-locking mode.
        * target.h (struct target_ops): new field to_has_thread_control.
        * sol-thread.c: initialize target_ops to_has_thread_control.
        * procfs.c: ditto.
        * target.c: ditto.
        * m3-nat.c: ditto.
        * remote.c: ditto.
        * hpux-thread.c: ditto.
1999-01-13 23:53:30 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
David Taylor 4ef1f46773 hp merge changes -- too numerous to mention here; see ChangeLog and
ChangeLog-gdbtk for details.
1998-12-28 23:06:13 +00:00
Felix Lee 15af627cc0 * procfs.c (procfs_wait): handle syscall events first.
* procfs.c (GDB_GREGSET_TYPE, GDB_FPREGSET_TYPE): new macros.
        * config/sparc/xm-sun4sol2.h: use them.
        * core-sol2.c: don't #undef gregset_t and fpregset_t.
        * sol-thread.c: ditto.
        * sparc-tdep.c: ditto.
1998-11-24 14:51:13 +00:00
Michael Snyder 1ba38e79f8 Wed Nov 11 15:47:00 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* procfs.c (proc_set_exec_trap): don't set PR_ASYNC or PR_FORK
        in the child process for UnixWare (causes processes forked by
        the debuggee to hang).
1998-11-18 00:22:45 +00:00
Jason Molenda 1e50f1b441 Mon Apr 20 14:18:45 1998 J. Kean Johnston <jkj@sco.com>
* procfs.c: Added replacement macros for LWP stuff.  Fixed support
        for UnixWare / SVR4.2MP targets and any targets which use
        multi-file /proc entries.  Fixed support for hardware watchpoints.
        * solib.c: SCO needs some of the same code as SunOS. Change
        preprocessor conditionals.

        * config/i386/i386sco5.mt: New file.
        * config/i386/tm-i386sco5.h: New file.
        * config/i386/i386sco5.mh (NATDEPFILES): add i386v-nat.o.
        * config/i386/nm-i386v42mp.h
        (TARGET_HAS_HARDWARE_WATCHPOINTS): define.
        Add other macros for hardware assisted watchpoints.
        * config/i386/nm-i386sco5.h: Correct attributions.
        (TARGET_HAS_HARDWARE_WATCHPOINTS): define.
        * config/i386/nm-linux.h (target_remote_watchpoint): Pass
        'type' through to i386_insert_watchpoint.

Mon Apr 20 14:12:30 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)

        * infrun.c (wait_for_inferior): Don't add signalled processes
        as new threads.
        * procfs.c (wait_fd): Note if LWP has exited.
        (procfs_wait): use GETPID to get process ID.


NOTE:  I didn't commit Kean's changes to configure.host/configure.tgt
yet because they are kind of bogus and I'm punting back to him to let
him figure out what he's trying to do.  So configuring for UnixWare
may not work just yet.
1998-04-20 21:25:40 +00:00
Jason Molenda f0fce3b80b Fri Apr 10 22:36:28 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
Update support for x86 Solaris 2.
        * config/i386/tm-i386sol2.h, nm-i386sol2.h:  New configuration
        files for x86 Solaris 2.
        * config/i386/i386sol2.mt, i386sol2.mh:  Use them.
        * config/sparc/tm-sun4sol2.h (PROCFS_GET_CARRY):  New macro, extract
        carry flag from a given regset.
        (IS_STATIC_TRANSFORM_NAME):  New macro, check if a symbol name
        is a SunPro transformed name.
        * i386-tdep.c (sunpro_static_transform_name):  New function to
        extract the source name from a SunPro transformed name.
        * inferior.h (procfs_first_available, procfs_get_pid_fd):
        Add prototypes.
        * infrun.c (wait_for_inferior):  Handle breakpoint hit in
        signal handler without intervening stop in sigtramp.
        * procfs.c (procfs_lwp_creation_handler):  Use PROCFS_GET_CARRY
        instead of direct access to the status register.
        (procfs_get_pid_fd):  New function, returns procfs fd for a given pid.
        * sol-thread.c (ps_lgetLDT):  New function, returns LDT for a given
        lwpid.
        (sol_find_new_threads):  Handle failed libthread_db initialization
        gracefully.
        * stabsread.c (define_symbol):  Use IS_STATIC_TRANSFORM_NAME
        to check for a SunPro transformed symbol name.
1998-04-11 05:43:33 +00:00
Michael Snyder f14465c3a7 Mon Jul 14 18:02:53 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* procfs.c (wait_fd): Handle an fd that has "hung up" or
        otherwise terminated (Solaris threads).
1997-07-15 01:05:10 +00:00
Peter Schauer b682323727 * procfs.c (proc_set_exec_trap, procfs_init_inferior, procfs_wait,
unconditionally_kill_inferior):  Undo Oct 26 1996 and Apr 26 1997
	changes to trace PRFS_STOPTERM and handle PR_DEAD.
	These changes tried to work around a problem with an early DU 4.0
	release, but they trigger subtle timing dependent kernel bugs
	in older OSF/1 releases.
1997-06-17 20:33:18 +00:00
Michael Snyder 3780c33708 Wed May 21 16:03:25 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
* procfs.c (init_procinfo): new function, abstracts some code
        shared by create_procinfo and do_attach;
        (procfs_set_inferior_syscall_traps): new function, abstracts
        some code needed by procfs_init_inferior, do_attach, and
        procfs_lwp_creation_handler; (procfs_first_available): new
        function, find any LWP that's runnable; (procfs_thread_alive):
        replace stub function with real implementation;
        (procfs_lwp_creation_handler): fix bug starting new child
        threads; (info_proc): bug fixes and enhancements for the
        "INFO PROCESSES" command; (close_procinfo_file): call new
        function "delete_thread" to cleanup GDB's thread database;
        (proc_init_failed): add new argument "kill", to control whether
        process is killed (so this function can be shared by
        create_procinfo and do_attach); (procfs_exit_handler): handle
        exit from an attached process, and cleanup procinfo handles
        when the process exits; (procfs_resume, procfs_wait): cleanup
        after a thread when it exits; (do_attach, do_detach): handle
        attached processes with multiple threads; plus some general
        improvements in the diagnostic output.
        * sol-thread.c (sol_thread_alive): replace stub with real
        implementation; (thread_to_lwp, lwp_to_thread): enhance to
        handle threads that may have exited; (sol_thread_attach): add
        startup setup stuff; (sol_thread_detach): add unpush_target
        call; (sol_thread_mourn_inferior): add unpush_target call;
        (sol_thread_wait, sol_thread_resume): enhance to deal with
        thread exit cleanly; (sol_thread_new_objfile,
        sol_thread_pid_to_str): detect unsuccessful startup and
        don't crash; plus some general cleanup.
        * thread.c (delete_thread): new function, allows targets to
        notify gdb when a thread is no longer valid.
        * infrun.c (wait_for_inferior): don't try to detect a new
        thread on receiving a TARGET_EXITED event.
1997-05-21 23:33:33 +00:00
Peter Schauer 95b7107182 * corelow.c (get_core_registers): Initialize cf.
* procfs.c:  Minor changes to make pre-ANSI compilers happy.
	(procfs_notice_signals):  Copy traced signal set back to
	pi->prrun.pr_trace.
	(unconditionally_kill_inferior):  If PR_DEAD is defined,
	rerun inferior after killing it.
1997-04-26 09:44:30 +00:00
Geoffrey Noer 234c409626 Mon Apr 14 15:54:51 1997 Geoffrey Noer <noer@pizza.cygnus.com>
* procfs.c (notice_signals): fix typo
1997-04-14 23:06:49 +00:00
Geoffrey Noer 234a732de0 Thu Apr 10 13:20:53 1997 Geoffrey Noer <noer@cygnus.com>
* procfs.c: Substantial (but incomplete) changes to support
        sysv4.2mp procfs as implemented in UnixWare 2.1.  The procinfo
        struct now has substructs like struct flt_ctl instead of
        just a fltset_t and has a ctl_fd, status_fd, as_fd, and
        map_fd instead of a single fd.  Non-sysv4.2mp procfs models
        still have the structs and multiple fds, but don't use the
        entire struct and the four fds all point to the same thing.
        We use PROCFS_USE_READ_WRITE to decide whether to talk to
        procfs with reads/writes or use ioctl instead.  We use
        HAVE_MULTIPLE_PROC_FDS to determine whether procfs really has
        multiple fds or not.  PROC_NAME_FMT is split out into
        CTL_PROC_NAME_FMT, AS_PROC_NAME_FMT, MAP_PROC_NAME_FMT,
        STATUS_PROC_NAME_FMT.

        (procfs_notice_signals): now a necessary wrapper around
        (notice_signals): which are the new guts for noticing signals
        (open_proc_file): gets a new flag arg used in sysv4.2mp to
        determine whether or not to attempt to open the ctl_fd.
        (procfs_read_status): new local function, reads procfs status
        (procfs_write_pcwstop): new local function, writes a PCWSTOP
        (procfs_write_pckill): new local function, writes a PCKILL
        (unconditionally_kill_inferior): remove signo since we now
        just call procfs_write_pckill().
        (procfs_xfer_memory): call lseek with SEEK_SET rather than 0
        (proc_iterate_over_mappings): the whole function is ifdefed
        on UNIXWARE to keep things readable.

        Expanded the syscall_table to include new potential sysv4.2mp
        members.  Note that all ifdefs of UNIXWARE should be eliminated
        if possible or renamed to describe what's being selected for a
        bit better.  Sysv4.2mp and IRIX both have SYS_sproc so the
        IRIX specific code now also checks it's not UNIXWARE.

        * config/i386/tm-i386v42mp.h: also define HAVE_PSTATUS_T,
        HAVE_NO_PRRUN_T, PROCFS_USE_READ_WRITE, and UNIXWARE
        * config/mips/nm-irix4.h: set CTL_PROC_NAME_FMT et al to
        "/debug/%d" as PROC_NAME_FMT used to be
1997-04-10 20:24:42 +00:00
Fred Fish e172af811a From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
* procfs.c (wait_fd):  Handle EINTR error return from poll
        by restarting the poll.
	* defs.h (PIDGET): Define a default version that just
	returns its argument unchanged.
	* inflow.c (terminal_init_inferior): Eliminate #ifdef
	of PIDGET and fold both alternatives into common code.
	(pass_signal): Use PIDGET for pid passed to kill().
1996-11-16 06:58:43 +00:00
Peter Schauer 1cb1b16cfb * procfs.c (proc_set_exec_trap): Under Alpha OSF/1-4.0, tracing
the entry to the exit system call to detect termination of the
	inferior stopped working. Trace termination of the inferior via
	PRFS_STOPTERM instead.
	(procfs_init_inferior):  Do not trace entry to exit system call
	if PIOCSSPCACT is defined.
	(procfs_wait):  Handle PR_DEAD event, which signals the termination
	of the inferior if PRFS_STOPTERM is set.

	* mdebugread.c (parse_partial_symbols):  Ignore stNil section
	start address symbols.

	* sparc-tdep.c (get_saved_register):  Get saved PC from the
	frame info if not in innermost frame.
1996-10-26 14:22:35 +00:00
Fred Fish b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Stu Grossman 9b33e492d6 * procfs.c (procfs_thread_alive procfs_stop): Make static.
* (procfs_pid_to_str):  New routine to print out thread id's in an
	intelligible manner.
	* sol-thread.c (sol_thread_fetch_registers):  Re-order manner in
	which supply_register is called to fix bug with writing writing
	individual regs.
	* config/sparc/tm-sun4sol2.h:  Define default for
	target_pid_to_str in case host lacks libthread_db.
1996-05-15 01:09:57 +00:00
Stu Grossman 47ef0da56a * Makefile.in config.in configure configure.in
config/sparc/nm-sun4sol2.h config/sparc/sun4sol2.mh
	config/sparc/tm-sun4sol2.h:  Use autoconf to config Solaris thread
	and pthread support, since pre-2.5 systems don't come with
	libthread_db.so.1.

	* procfs.c (info_proc):  Use int instead of id_t.  Old versions of
	Irix don't see to define this.
1996-05-14 07:02:56 +00:00
Stu Grossman fdfa331511 * Makefile.in, breakpoint.c, corelow.c, fork-child.c, inflow.c,
infrun.c, mac-nat.c, procfs.c, remote.c, sol-thread.c, thread.c,
	win32-nat.c, config/nm-lynx.h:  Rename thread.h to gdbthread.h to
	avoid conflict with Solaris /usr/include/thread.h.
1996-05-09 21:24:20 +00:00
Stu Grossman 8fc2b4170d * fork-child.c (fork_inferior), inferior.h: init_trace_fun now
returns a possibly modified pid.
	* inftarg.c (ptrace_him):  Now returns pid;
	* m3-nat.c (m3_trace_him):  Now returns pid;
	* infcmd.c (run_command):  Minor cleanup.
	* infrun.c (wait_for_inferior):  Add another check for one_stepped
	near where we read the pc to avoid erroneously setting
	random_signal for multi-threaded support.
	* procfs.c:  Add support for Solaris LWPs.  Remove def of
	LOSING_POLL.  Many cleanups...  Several workarounds for Solaris
	lossage.  System call entry and exit are now handled by
	dynamically registered handlers.
	* (syscallname):  Don't barf when handed an unknown syscall
	number.
	* (info_proc_syscalls):  Ditto.
	* sol-thread.c:  New file.  Implements Solaris thread support.
	* symfile.c (symbol_file_add):  Add call to target_new_objfile to
	notify target-dependent code about new symbol tables.
	* (clear_symtab_users):  Call target_new_objfile to notify it of
	the removal of all symbol tables.
	* target.c (push_target):  Make sure that to_close is non-zero
	before calling it.
	* target.h (target_new_objfile):  Provide default.
	* config/alpha/nm-osf2.h:  Define LOSING_POLL because this version
	of OSF can't hack using poll with /proc.
	* config/sparc/nm-sun4sol2.h (target_new_objfile):  Define to be
	sol-thread-new-objfile.
	* config/sparc/sun4sol2.mh:  Add sol-thread.o to NATDEFFILES, and
	add libthread_db.so.1 to NAT_CLIBS.
	* config/sparc/tm-sun4sol2.h:  Define PIDGET, TIDGET, and
	target_pid_to_str.
1996-05-06 21:27:37 +00:00