Commit Graph

70 Commits

Author SHA1 Message Date
Fred Fish 7531f36e8e Changes to hexdump "struct user" for child process on some configurations
that use ptrace().  This is not as useful as doing a full dump in a
human readable format, but is better than nothing when you are trying
to verify what is actually in the user struct.

	* infptrace.c (udot_info): New function.
	(PT_*): Define each individually if that one is not defined.
	Update copyright to 1996.
	* rs6000-nat.c (kernel_u_size): New function
	Include <sys/user.h> for "struct user"
	Update copyright to 1996.
	* alpha-nat.c (kernel_u_size): New function.
	Include <sys/user.h> for "struct user"
	Update copyright to 1996.
	* sparc-nat.c (kernel_u_size): New function.
	Include <sys/user.h> for "struct user"
	Update copyright to 1996.
	* i386b-nat.c (kernel_u_size): New function.
	Update copyright to 1996.
	* i386v-nat.c (kernel_u_size): New function.
	Update copyright to 1996.
	* config/i386/nm-fbsd.h (KERNEL_U_SIZE): Define.
	(kernel_u_size): Declare.
	Update copyright to 1996.
	* config/i386/nm-linux.h (KERNEL_U_SIZE): Define.
	(kernel_u_size): Declare.
	Update copyright to 1996.
	* config/sparc/nm-sun4os4.h (KERNEL_U_SIZE): Define.
	(kernel_u_size): Declare.
	Update copyright to 1996.
	* config/alpha/nm-osf2.h (KERNEL_U_SIZE): Define.
	(kernel_u_size): Declare.
	Update copyright to 1996.
	* config/rs6000/nm-rs6000.h (KERNEL_U_SIZE): Define.
	(kernel_u_size): Declare.
	Update copyright to 1996.
1996-01-04 21:09:59 +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
Jeff Law 918fea3e3c * infptrace.c (child_xfer_memory): Only use if CHILD_XFER_MEMORY
is not defined.

	* hppab-nat.c (call_ptrace): Delete redundant function.
	(kill_inferior, attach, detach, child_resume): Likewise.
	(child_xfer_memory): Likewise.

	* hppah-nat.c (call_ptrace): Delete redundant function.
	(kill_inferior, attach, detach, child_resume): Likewise.

	* config/pa/hppabsd.mh (NATDEPFILES): Add infptrace.o.

	* config/pa/hppahpux.mh (NATDEPFILES): Add infptrace.o.

	* config/pa/nm-hppab.h (FETCH_INFERIOR_REGISTERS): Define.

	* config/pa/nm-hppah.h (FETCH_INFERIOR_REGISTERS): Define.
	(CHILD_XFER_MEMORY): Define.
	(PT_*): Define so that generic infptrace.c code can be used.
1994-01-21 16:22:51 +00:00
Stu Grossman 5090e82cca * inflow.c (terminal_init_inferior): Temporarily use Lynx PIDGET
macro to set process groups.
	* infptrace.c (child_resume): Temporarily use Lynx PIDGET to
	specify resumption of all threads.
	* infrun.c (wait_for_inferior):  Fix handling of thread-specific
	breakpoints for systems where DECR_PC_AFTER_BREAK > 0 (ie: backup
	PC by the right amount when continuing the thread).
	* thread.c (thread_apply_command):  Add the  `thread apply'
	command to apply a given GDB command to a list of threads.
1993-11-05 19:27:49 +00:00
Jim Kingdon 0626f40d92 * hp300ux-nat.c: Cast second arg to supply_register calls.
(_initialize_kernel_u_addr, getpagesize): New functions.
	(store_inferior_register_1): Change arg name from value to val.
	(fetch_core_registers): Make arg core_reg_size unsigned.
	Pass 5 args to ptrace.
	* config/m68k/xm-hp300hpux.h: Define FIVE_ARG_PTRACE.
	Remove KERNEL_U_ADDR stuff.
	* infptrace.c [FIVE_ARG_PTRACE]: Pass 5th arg to ptrace.
	* config/m68k/hp300hpux.m{t,h}:
	Move exec.o from NATDEPFILES to TDEPFILES
	* config/m68k/hp300hpux.mt: Mention GAS requirement.  Remove
	hp-include stuff.  Add m68k-tdep.o to TDEPFILES.
1993-04-28 21:20:40 +00:00
K. Richard Pixley ef6f3a8b1f Rs6000 native support.
* infptrace.c: remove #ifdef USG from around include ptrace.h.
  machines without this header should not be compiling this file.
* nm-rs6000.h, rs6000-nat.c: new files for native support.
* rs6000-tdep.c: do not include sys/ptrace.h or sys/reg.h.
* rs6000-xdep.c: removed.  all code now in rs6000-nat.c.
* xm-rs6000.h: do not include ptrace.h.
  (ATTACH_DETACH, FETCH_INFERIOR_REGISTERS): moved to nm-rs6000.h.
* config/rs6000.mh (XDEPFILES): removed rs6000-xdep.o.
  infptrace.o and inftarg.o move to NATDEPFIES.
  (NAT_FILE, NATDEPFILES): new macro for native support.
1992-10-02 05:50:17 +00:00
K. Richard Pixley c9c2341230 Host/target/native split for sun4.
* Makefile.in (TSOBS): removed corelow.o.
* infptrace.c: included nat.h.
* nat-trash.h: temporary header file.  This should be removed once
  all hosts have the native/host/target split.
* configure.in: add a symlink from nat-trash.h to nat.h if no
  other nat file exists for this configuration.
* sparc-tdep.c: no longer include sys/ptrace.h.
* sparc-xdep.c: removed.  contents have been moved to nat-sparc.c.
* xm-sparc.h (ATTACH_DETACH, FETCH_INFERIOR_REGISTERS): moved to
  nat-sun4os4.h.
* nat-sparc.c, nat-sun4os4.h: new files for sun4 native support.
* config/sun4os4.mh (XDEPFILES): moved infptrace.o and inftarg.o
  to NATDEPFILES.  removed sparc-xdep.o.
  (NATDEPFILES, NAT_FILE): new macros for native support.
1992-09-30 02:03:24 +00:00
John Gilmore 6bb40269a0 * tm-rs6000.h (AIX_BUGGY_PTRACE_CALL): Zap, we think we fixed it.
Rich and I believe the "real problem" was that both single_step
and target_resume were issuing PT_CONTINUE calls.  This would
cause the second PT_CONTINUE to sometimes fail because the process
was already running.
* infptrace.c (child_resume):  Remove AIX_BUGGY_PTRACE_CALL kludge.
1992-09-18 08:09:25 +00:00
John Gilmore 997cc2c0a3 Preliminary cleanup for splitting host/native/target.
* infptrace.c (child_resume):  Don't deal with NO_SINGLE_STEP
here; it is dealt with at a gdb-target-independent level.
* rs6000-tdep.c (single_step):  Don't call ptrace, we are a
high toned routine.  Fix return type to void.
1992-09-18 07:40:15 +00:00
Stu Grossman a0f9783ea7 * a68v-xdep.c (store_inferior_registers): declare as void.
* infptrace.c:  HP/Apollos have ptrace.h in the wrong place.
* remote-st2000.c:  Massive changes to use new serial package.
Also added 'connect' command to transparantly connect to serial
port.
* ser-termios.c:  Big cleanup, use nicer coding conventions.
* ser-bsd.c:  New module, serial stuff for BSD systems.
* serial.h:  Define struct ttystate properly using HAVE_TERMIO.
* xm-apollo68b.h:  #define PTRACE_IN_WRONG_PLACE...
1992-09-08 22:46:08 +00:00
Fred Fish 51b57ded88 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
symtab.h, tm-i386v4.h, valprint.c, values.c:  Lint.
	* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
	findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
	putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
	utils.c, valarith.c, valops.c, valprint.c, values.c:
	Replace bcopy() use with memcpy(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
	ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
	target.c, values.c:
	Replace bzero() use with memset(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* i386-tdep.c, main.c, valprint.c:
	Replace bcmp() use with memcmp(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
1992-06-29 23:34:38 +00:00
Fred Fish e676a15f0b * Makefile.in (VERSION): Bump to 4.5.6.
* coffread.c (coff_end_symtab):  Cast 2nd arg of complain() to
	correct type.
	* defs.h (NORETURN):  Define away for Lucid compiler.
	* remote.c (remote_timer, remote_interrupt):  Signal handlers
	take one int arg.
	* ser-termios.c (serial_write, serial_close):  Return whatever
	value the write/close call returns, rather than falling off end.
	* inferior.h (PTRACE_ARG3_TYPE):  Third arg to ptrace is int on
	more systems than it is "char *".  Define PTRACE_ARG3_TYPE to
	default to int.
	* infptrace.c, hppabsd-xdep.c, hppahpux-xdep.c, i386-xdep.c,
	inferior.h (call_ptrace):  Use PTRACE_ARG3_TYPE to declare type
	of third arg.
	* a68v-xdep.c, arm-xdep.c, convex-xdep.c, hp300ux-xdep.c, infrun.c,
	m88k-xdep.c, mach386-xdep.c, mips-xdep.c, os68k-xdep.c, pyr-tdep.c,
	pyr-xdep.c, rs6000-xdep.c, sparc-xdep.c, sun3-xdep.c, sun386-xdep.c,
	symm-xdep.c, ultra3-xdep.c:  Use PTRACE_ARG3_TYPE to cast ptrace
	argument 3.
	* sparc-xdep.c, a68v-xdep.c (fetch_inferior_registers,
	store_inferior_registers): Supply missing fourth argument to
	ptrace().
1992-06-24 04:49:48 +00:00
John Gilmore ee0613d186 * core.c, exec.c, solib.c: Rename target_ops sections =>
to_sections, etc.
* infcmd.c, inflow.c, infptrace.c, infrun.c, main.c, target.c,
target.h:  target_kill takes no args.
1992-02-21 01:35:32 +00:00
John Gilmore 7d9884b927 * defs.h: Incorporate param.h. All users changed.
* param-no-tm.h:  Change users to define TM_FILE_OVERRIDE instead.
* param.h, param-no-tm.h:  Removed.
* Update copyrights in all changed files.
* dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c,
solib.c, symtab.h, tm-umax.h, valprint.c:  Lint.
* tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h,
xm-merlin.h:  Avoid host include files in target descriptions.
* getpagesize.h:  Removed, libiberty copes now.
1991-11-21 18:42:05 +00:00
John Gilmore 44ff4c96a4 Cashier <a.out.gnu.h> 1991-11-21 03:59:14 +00:00
John Gilmore b6de2014a1 Add ignored target argument to child_xfer_memory. 1991-08-14 00:23:08 +00:00
John Gilmore d11c44f1ee Roll in Tiemann changes for gcc -ansi. Fix assorted bugs. See ChangeLog. 1991-05-30 08:52:52 +00:00
John Gilmore 5594d534a2 Saber C (lint) cleanups, and a few bug fixes. See ChangeLog. 1991-05-04 23:15:02 +00:00
John Gilmore 8ffd75c8a9 Mips bringup and general cleanup
* cplus-dem.c:  Move CPLUS_MARKER define to after defs.h.
        * infptrace.c (PT_WRITE_D, PT_READ_D):  Use correct values.
        (This still doesn't seem to make MIPS bkpts work.)
        * mipsread.c:  Remove dup "Reading symbol data..." msg.
        (symbol_file_command, add_file_command):  Remove, obsol.
        * printcmd.c (ptype_command):  Say "an enum" rather than "a enum".
        Wrap output appropriately.
        * stack.c (locals_info, catch_info, args_info):  Check
        selected_frame rather than target_has_stack or coredumping.
        * valprint.c (type_print_varspec_suffix):  Wrap "ptype" output of
        enums appropriately.
1991-05-03 01:07:12 +00:00
K. Richard Pixley bd5635a1e2 Initial revision 1991-03-28 16:26:26 +00:00