Commit Graph

192 Commits

Author SHA1 Message Date
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
Peter Schauer 255181a9ed * dwarfread.c (read_func_scope): Avoid GDB core dumps if
AT_name tag is missing.

	* procfs.c (procfs_stopped_by_watchpoint):  Fix logic when
	FLTWATCH and FLTKWATCH are defined.

	* remote.c (remote_read_bytes):  Advance memaddr for transfers,
	return number of bytes transferred for partial reads.

	* top.c (init_signals):  Reset SIGTRAP to SIG_DFL.
1996-02-03 11:32:34 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
strings.h, and memory.h.
* configure: Regenerated.

* gdb_stat.h: New file, "portable" <sys/stat.h>.
* gdb_string.h: New file, "portable" <string.h>.

* altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c,
convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c,
gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c,
i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c,
mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c,
rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c,
symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c,
ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h"
instead of <sys/stat.h>.

* alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c,
ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c,
core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c,
dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c,
exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c,
fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c,
inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c,
m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c,
monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c,
printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c,
remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c,
remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c,
remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c,
remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c,
remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c,
solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c,
symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c,
valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include
"gdb_string.h" instead of <string.h>.
* gdbtk.c: Likewise.

* config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h,
sparc/xm-sun4os4.h (HAVE_MMAP): Removed.

* config/xm-lynx.h, config/i386/xm-ptx.h,
config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h,
config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/mips/xm-news-mips.h, config/mips/xm-riscos.h,
config/pa/hppah.h, config/rs6000/xm-rs6000.h,
config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h,
config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h,
config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed.
* config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
Peter Schauer b6753b3f6f * procfs.c (unconditionally_kill_inferior): Clear current signal
if PROCFS_NEED_CLEAR_CURSIG_FOR_KILL is defined.
	* config/alpha/nm-osf3.h (PROCFS_NEED_CLEAR_CURSIG_FOR_KILL):  Define.
1995-07-29 20:56:22 +00:00
Jeff Law 10f644eb64 * procfs.c (procfs_ops): Fix typo in last change. 1995-07-14 15:51:51 +00:00
Jeff Law 43fc25c87e * inftarg.c (child_thread_alive): New function to see if a
particular thread is still running.
        (child_ops): Add child_thread_alive entry.
        * remote.c (remote_thread_alive): New function to see if a
        particular thread is still alive.
        (remote_ops): Add remote_thread_alive.
        * target.c (dummy_target): Add dummy entry for thread_alive.
        (cleanup_target): de_fault thread_alive too.
        (update_current_target): INHERIT thread_alive too.
        (debug_to_thread_alive): New function.
        (setup_target_debug): Add debug_to_thread_alive.
        * target.h (struct target_ops): Add to_thread_alive.
        (target_thread_alive): Define.
        * thread.c (info_threads_command): Don't call kill; use
        target_thread_alive instead.
        * config/nm-lynx.h (CHILD_THREAD_ALIVE): Define.
        * gdbserver/low-lynx.c (mythread_alive): New function.
        (mywait): Don't restart any threads after a new thread notification,
        let the generic code handle it.
        * gdbserver/low-sparc.c (mythread_alive): Dummy version.
        * gdbserver/low-sun3.c (mythread_alive): Likewise.
        * gdbserver/server.c (main): Handle thread_alive requests.
        * gdbserver/server.h (mythread_alive): Declare.
        * corelow.c (core_ops): Add dummy entry for thread_alive.
        * exec.c (exec_ops): Likewise.
        * m3-nat.c (m3_ops): Likewise.
        * monitor.c (monitor_ops): Likewise.
        * procfs.c (procfs_ops): Likewise.
        * remote-arc.c (arc_ops): Likewise.
        * remote-array.c (array_ops): Likewise.
        * remote-e7000.c (e7000_ops): Likewise.
        * remote-es.c (es1800_ops, es1800_child_ops): Likewise.
        * remote-mips.c (mips_ops): Likewise.
        * remote-pa.c (remote_hppro_ops): Likewise.
        * remote-sim.c (gdbsim_ops): Likewise.
        * sparcl-tdep.c (sparclite_ops): Likewise.

More lynx-6100 work
1995-07-13 21:40:22 +00:00
Stu Grossman f5a8f1a6f3 * breakpoint.c: Move defaults of watchpoint related macros into
target.h.
	* target.h:  Macros from breakpoint.c.  Conditionalize based on
	TARGET_HAS_HARDWARE_WATCHPOINTS.
	* i386v-nat.c procfs.c:  Use TARGET_HAS_HARDWARE_WATCHPOINTS
	instead of TARGET_CAN_USE_HARDWARE_WATCHPOINT to enable watchpoint
	code.
	* config/i386/nm-linux.h, config/mips/nm-irix4.h,
	config/pa/nm-hppab.h, config/sparc/tm-sparclite.h:  #define
	TARGET_HAS_HARDWARE_WATCHPOINTS to enable watchpoint code.
1995-05-22 23:03:42 +00:00
Peter Schauer b9e585030c * buildsym.c (patch_subfile_name): Update last_source_file
with the real source file name.
	* dbxread.c (end_psymtab):  Handle static functions in the
	SOFUN_ADDRESS_MAYBE_MISSING case by passing pst->filename
	to lookup_minimal_symbol.
	(process_one_symbol):  Ignore extra outermost context from
	SunPRO cc and acc.
	* stabsread.c (define_symbol):  Do not complain for SunPRO
	static variable encoding if STATIC_TRANSFORM_NAME is defined.
	* sparc-tdep.c, config/sparc/tm-sun4sol2.h
	(sunpro_static_transform_name):  Renamed from
	solaris_static_transform_name.
	* config/sparc/tm-sun4os4.h (STATIC_TRANSFORM_NAME):
	Define to sunpro_static_transform_name for acc 3.0 compiled
	executables.
	* procfs.c, config/alpha/nm-osf2.h (PROCFS_DONT_TRACE_FAULTS):
	Renamed from PROCFS_DONT_TRACE_IFAULT, don't trace any faults
	if defined.
	* procfs.c (info_proc_siginfo):  Cast sip->si_addr to
	`unsigned long' and use `lx' format for printing it.
1995-03-25 09:23:10 +00:00
Peter Schauer a1a0d97484 Fix problems with infinite recursion when printing a class
that contains a static instance of the class.
	* cp-valprint.c (dont_print_vb_obstack):  Renamed from
	dont_print_obstack, made static.
	(dont_print_statmem_obstack):  New obstack, controls printing
	of static member classes.
	(_initialize_cp_valprint):  Initialize it.
	(cp_print_static_field):  New function, handles printing of
	static members.
	(cp_print_value_fields):  New parameter dont_print_statmem to
	handle recursive printing of static member classes, use
	cp_print_static_field to handle printing of static members.
	* c-valprint.c (cp_print_value_fields):  Update prototype and
	call to include additional dont_print_statmem parameter.
	* c-valprint.c, f-valprint.c (dont_print_obstack):  Remove unused
	extern declaration.

	* alpha-tdep.c, findvar.c, infptrace.c:  Include <string.h>.

	* config/alpha/tm-alpha.h (FRAME_FIND_SAVED_REGS):  Call
	alpha_find_saved_regs if fi->saved_regs is still NULL.

	* elfread.c (elf_symtab_read):  Ensure that the filename field
	of a minsym is nonempty. Ignore solib trampoline symbols from
	the main symbol table, they might have a bogus value.

	* procfs.c (set_proc_siginfo), config/alpha/alpha-osf2.mh:
	Fix typos in comments.
1995-03-10 11:21:32 +00:00
Peter Schauer f5de490455 Sun Feb 19 11:05:28 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* procfs.c (unconditionally_kill_inferior):  Don't issue a PIOCKILL
	in addition to a PIOCSSIG to kill the inferior.
1995-02-19 19:08:34 +00:00
Stan Shebs e3be225eb4 gcc -Wall lint.
* alpha-tdep.c (alpha_in_lenient_prologue): Comment out.
	(after_prologue): Remove unused local b.
	* procfs.c (thread.h): Include.
	(pr_flag_table, pr_why_table, faults_table, siginfo_table): Use
	nested braces in initializer.
	* top.c (initialize_targets, initialize_utils): Declare.
	(locate_arg, insert_args): Add parens around tested assignments.
	* remote-utils.c (sr_scan_args): Remove decl of strtol.
	* remote.c (thread.h): Include.
	(remote_wait): Remove unused local p2.
	* sparc-tdep.c (fill_gregset, fill_fpregset): Remove decls of
	registers array.

	defs.h (stdlib.h): Include.
	(exit, perror, atoi, qsort, memcpy, memcmp): Don't declare.
	(fclose, atof, malloc, realloc, free, strchr, strrchr, strstr,
	strtok,	strerror): Don't specify parameter types in declaration.
1995-02-02 00:10:50 +00:00
Peter Schauer 2592eef89b * README: Add note about SPARCworks cc release 3.0 and higher.
Add procfs support for Alpha OSF/1-2.x.
	* config/alpha/nm-osf.h:  Renamed from nm-alpha.h, generic
	OSF/1 native support.
	* config/alpha/alpha-osf1.mh (NAT_FILE):  Changed accordingly.
	(MUNCH_DEFINE):  Removed.
	* config/alpha/alpha-osf2.mh, config/alpha/nm-osf2.h:  New files
	for procfs support.
	* configure.in (alpha-dec-osf*):  Use alpha-osf2.mh for OSF/1
	release 2.x and higher, else alpha-osf1.mh, as the procfs support
	in release 1.x is incomplete.
	* Makefile.in (ALLCONFIG):  Add config/alpha/alpha-osf2.mh.
	* alpha-nat.c (supply_gregset, fill_gregset, supply_fpgregset,
	fill_fpgregset):  New routines for procfs support.
	* inftarg.c (_initialize_inftarg):  Don't add ptrace support
	if we have an optional procfs and /proc is accessible.
	* procfs.c:  Include sys/fault.h and sys/syscall.h before
	including sys/procfs.h.
	(unconditionally_kill_inferior):  If PROCFS_NEED_PIOCSSIG_FOR_KILL
	is defined, additionally perform a PIOCSSIG to really terminate
	the inferior.
	(create_procinfo):  Always return a result.
	(create_procinfo, do_attach):  Don't trace T_IFAULT faults if
	PROCFS_DONT_TRACE_IFAULT is defined.
	(procfs_init_inferior):  Use START_INFERIOR_TRAPS_EXPECTED as
	argument to startup_inferior if it is defined.
	(proc_set_exec_trap):  If PIOCSSPCACT is defined, use it instead
	of tracing exits from exec system calls. Needed for the user level
	loader under Alpha OSF/1.
	(do_detach):  Clear any pending signal if we want to detach from
	a process without a signal.
	(set_proc_siginfo):  If PROCFS_DONT_PIOCSSIG_CURSIG is defined,
	don't issue a PIOCSSIG if pr_cursig already contains the signal we
	intend to set.
	(info_proc_signals):  If PROCFS_SIGPEND_OFFSET is defined, the
	pending signals are numbered from 1 instead of 0.
	(info_proc_mappings):  Increase size of output format for addresses
	if BFD_HOST_64_BIT is defined.
	(procfs_stop):  Renamed from child_stop.
	(_initialize_procfs):  Don't add procfs support if we have an
	optional procfs and /proc is not accessible.
1995-01-12 18:12:04 +00:00
Stu Grossman 78b459a7e7 * corelow.c, exec.c, inftarg.c, m3-nat.c, op50-rom.c, procfs.c,
remote-adapt.c, remote-e7000.c, remote-eb.c, remote-es.c,
	remote-hms.c, remote-mips.c, remote-mm.c, remote-mon.c,
	remote-nindy.c, remote-os9k.c, remote-pa.c, remote-sim.c,
	remote-st.c, remote-udi.c, remote-vx.c, remote-z8k.c, remote.c,
	w89k-rom.c, target.c, target.h:  Add support for target_stop().
	* gdbtk.c (gdb_stop):  Switch to target_stop().
	* ChangeLog:  Fix comment to make shebs happy...
1994-11-03 22:40:14 +00:00
Peter Schauer 26a859ec83 * corelow.c (add_solib_stub): Copy to_sections changes from
core_ops to current_target after adding the shared libraries.
	* partial-stab.h (N_EXCL), dbxread.c (add_old_header_file,
	find_corresponding_bincl_psymtab):  Change `repeated header not seen'
	error to a complaint, simplify complaint.
	* procfs.c (signalname, errnoname):  Make `name' const.
	* symfile.c (reread_symbols):  Use filename from old BFD to
	reopen the objfile.
	* values.c (record_latest_value):  Don't record value in the
	history chain until we are sure there won't be an error.
1994-09-10 08:50:10 +00:00
Jim Kingdon 1e75b5f530 * inflow.c (set_sigint_trap, clear_sigint_trap): Check for
attach_flag (this check was performed by the callers).  Also check
	inferior_thisrun_terminal.
	* inftarg.c (child_wait), lynx-nat.c (child_wait),
	procfs.c (wait_fd), symm-nat.c (child_wait): Don't check
	attach_flag in deciding whether to call set_sigint_trap and
	clear_sigint_trap.
1994-08-31 20:42:10 +00:00
Stu Grossman eca4a350b8 * infrun.c (wait_for_inferior): Call target_resume() upon
detection of new processes.

	* procfs.c (create_procinfo):  Return pointer to new procinfo
	structure.
	* (do_detach):  Spacing & formatting cleanup.
	* (procfs_wait):  Move wait_again label to ensure that we really
	wait again.  On exit from fork, release new child from gdbs'
	clutches.
	* (procfs_set_sproc_trap):  Enable trapping of fork and vfork.
1994-08-09 17:27:01 +00:00
Thomas Lord cd4104e085 Don't dereference invalid pointers in procfs_mourn_inferior 1994-08-05 17:55:46 +00:00
Stan Shebs 6f54efdc4b * defs.h: Change two-line declarations to one-line form.
(NORETURN): Define as "volatile" only for older GCCs.
	(ATTR_NORETURN): Define for newer GCCs.
	* procfs.c (proc_init_filed): Add ATTR_NORETURN to declaration.
1994-08-02 02:02:39 +00:00
Peter Schauer cef0333efd * dbxread.c, elfread.c, mipsread.c, nlmread.c, os9kread.c:
Move "no debugging symbols found" test to symfile.c.
	* symfile.c (syms_from_objfile, reread_symbols):  Add
	"no debugging symbols found" test.
	* coffread.c (init_stringtab):  Handle stripped files with a
	stringtab offset of zero gracefully.
	* osfsolib.c (solib_create_inferior_hook):  Use DYNAMIC flag from
	BFD instead of stop_pc heuristic to determine if it is a dynamically
	linked object file.
	* procfs.c (wait_fd):  Handle ENOENT error return from PIOCWSTOP
	ioctl, it indicates that the process has exited.
1994-07-06 08:01:52 +00:00
Jim Kingdon 429f1c9f46 * target.c, target.h: New variables target_activity_function and
target_activity_fd.
	* inflow.c, inferior.h: New functions set_sigio_trap and
	clear_sigio_trap.
	* inftarg.c (child_wait), procfs.c (wait_fd): Call them.
1994-05-20 03:43:39 +00:00
Jim Kingdon 3f5e2fb58f * procfs.c (procfs_wait): Reinstate code which deduces the signal
from the fault, #ifndef FAULTED_USE_SIGINFO.
	* config/sparc/tm-sun4sol2.h: Define FAULTED_USE_SIGINFO.
1994-05-03 15:13:26 +00:00
Jim Kingdon 890634eda7 * procfs.c (procfs_wait): Use the signal from the pr_info rather
than trying to deduce it from the fault.
1994-04-27 23:10:26 +00:00
Jeff Law 72b8ca5197 Add missing #endif. 1994-04-20 06:01:44 +00:00
Jeff Law 6bc194d2b5 * procfs.c (procfs_wait): Protect watchpoint code with appropriate
#ifdefs.
	(procfs_set_watchpoint, procfs_stopped_by_watchpoint): Likewise.
1994-04-14 14:16:56 +00:00
Jeff Law e6b8a17192 * procfs.c (procfs_wait): Protect watchpoint code with appropriate
#ifdefs.
1994-04-14 14:04:15 +00:00
Jeff Law 999dd04b89 * breakpoint.h (enum bptype): Add bp_hardware_watchpoint and
bp_watchpoint_scope breakpoints.
	(struct breakpoint): Add val_chain and related_breakpoint fields
	for use by watchpoints.

	* breakpoint.c (within_scope): Delete.  No longer used.
	(TARGET_CAN_USE_HARDWARE_WATCHPOINT): Provide default definition.
	(target_{remove,insert}_watchpoint): Likewise.
	(can_use_hardware_watchpoint): New function.
	(remove_breakpoint): New function to remove a single breakpoint
	or hardware watchpoint.
	(insert_breakpoints): Handle insertion of hardware watchpoints.
	Store a copy of the value chain derived from the watchpoint
	expression.
	(remove_breakpoints): Simplify by using remove_breakpoint.
	(delete_breakpoint): Likewise.
	(watchpoint_check): Delete the watchpoint and watchpoint scope
	breakpoints when the watchpoint goes out of scope.  Save & restore
	the current frame after checking watchpoints.
	(breakpoint_init_inferior): Likewise (restarting the program
	makes all local watchpoints go out of scope).
	(bpstat_stop_status): Handle hardware watchpoints much like normal
	watchpoints. Delete the watchpoint and watchpoint scope breakpoint
	when the watchpoint goes out of scope.  Remove and reinsert all
	breakpoints before returning if we stopped when a hardware watchpoint
	fired.
	(watch_command): Use a hardware watchpoint when possible.  If
	watching a local expression, build a scope breakpoint too.
	(map_breakpoint_numbers): Also call given function for any
	related breakpoints.
	(disable_breakpoint): Never disable a scope breakpoint.
	(enable_breakpoint): Handle hardware breakpoints much like normal
	breakpoints, but recompute the watchpoint_scope breakpoint's
	frame and address  (if we have an associated scope breakpoint).
	(read_memory_nobpt): Handle hardware watchpoints like normal
	watchpoints.  When necessary handle watchpoint_scope breakpoints.
	(print_it_normal, bpstat_what, breakpoint_1, mention): Likewise.
	(clear_command, breakpoint_re_set_one, enable_command): Likewise.
	(disable_command): Likewise.

	* blockframe.c (find_frame_addr_in_frame_chain): New function.
	Extern prototype added to frame.h

	* infrun.c (wait_for_inferior): Set current_frame and select
	a frame before checking if we stopped due to a hardare watchpoint
	firing.  Handle stepping over hardware watchpoints.
	(normal_stop): Remove unnecessary call to select_frame.

	* value.h (value_release_to_mark): Declare.
	* values.c (value_release_to_mark): New function.

	* procfs.c (procfs_wait): Add cases for hardware watchpoints.
	(procfs_set_watchpoint, procfs_stopped_by_watchpoint): New functions.

	* hppab-nat.c (hppa_set_watchpoint): New function.

	* config/pa/nm-hppab.h (STOPPED_BY_WATCHPOINT): Define.
	(HAVE_STEPPABLE_WATCHPOINT): Define.
	(TARGET_CAN_USE_HARDWARE_WATCHPOINT): Define.
	(target_{insert,delete}_watchpoint): Define.
1994-04-13 21:57:00 +00:00
Jim Kingdon f93b941bde * environ.c (set_in_environ): Eliminate special handling of PATH and
GNUTARGET.
	* putenv.c: Removed, conflicts with system declaration of
	putenv on RS/6000 running AIX 3.2.5, and above change makes it
	unnecessary.
	* Makefile.in: Change accordingly.
	* procfs.c (procfs_create_inferior): Change comment accordingly.
1994-03-15 18:40:51 +00:00
Jim Kingdon 8afd05c039 Tue Feb 1 22:13:25 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* procfs.c (wait_fd):  Handle EINTR error return from PIOCWSTOP ioctl
	by restarting the ioctl.
1994-02-01 21:46:17 +00:00
Jim Kingdon 08f74b9271 * fork-child.c, inferior.h (fork_inferior): New argument shell_file.
* procfs.c (procfs_create_inferior), inftarg.c (child_create_inferior),
	m3-nat.c (m3_create_inferior): Pass it.
	* procfs.c: Remove ptrace function.  It was declared in a way which
	conflicted with the prototype in unistd.h on Solaris.
1994-01-22 17:36:41 +00:00
Jim Kingdon 45dc9be388 * procfs.c (procfs_wait): Fix argument name to match 4 Jan changes.
* Move target_signal_from_host, target_signal_to_host, and
	store_waitstatus from inftarg.c to target.c.  procfs needs them.
	* target.c: Include "wait.h" and <signal.h>.
	* target.h, infrun.c (proceed), proceed callers: Pass new code
	TARGET_SIGNAL_DEFAULT instead of -1.  This avoids problems with
	enums being treated as unsigned and is cleaner.
	* infrun.c (signals_info): Don't print TARGET_SIGNAL_DEFAULT or
	TARGET_SIGNAL_0.
	* infcmd.c (signal_command), infrun.c (signals_info):
	Don't allow user to specify numeric equivalent of
	TARGET_SIGNAL_DEFAULT.
1994-01-06 16:34:51 +00:00