/* Low level Unix child interface to ttrace, for GDB when running under HP-UX.
- Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000, 2001, 2003
- Free Software Foundation, Inc.
+
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
#include "gdb_wait.h"
#include "command.h"
#include "gdbthread.h"
+#include "infttrace.h"
/* We need pstat functionality so that we can get the exec file
for a process we attach to.
#undef NO_FLAGS
#endif
-#ifdef USG
-#include <sys/types.h>
-#endif
-
#include <sys/param.h>
#include <sys/dir.h>
#include <signal.h>
#endif
#include "gdbcore.h"
-#ifndef NO_SYS_FILE
+#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
*status = _SIGTRAP;
}
- target_post_wait (pid_to_ptid (tsp.tts_pid), *status);
-
-
#ifdef THREAD_DEBUG
if (debug_on)
printf ("Done waiting, pid is %d, tid %d\n", real_pid, real_tid);
}
-#ifndef CHILD_RESUME
+#ifndef DEPRECATED_CHILD_RESUME
/* Sanity check a thread about to be continued.
*/
}
#endif
-#ifndef CHILD_RESUME
+#ifndef DEPRECATED_CHILD_RESUME
/* Resume execution of the inferior process.
#endif
}
-#endif /* CHILD_RESUME */
+#endif /* DEPRECATED_CHILD_RESUME */
\f
-
-#ifdef ATTACH_DETACH
/*
* Like it says.
*
attach_flag = 1;
}
-#endif /* ATTACH_DETACH */
\f
-#ifdef ATTACH_DETACH
/* Start debugging the process whose number is PID.
* (A _real_ pid).
*/
/* Process-state? */
}
-#endif /* ATTACH_DETACH */
\f
/* Default the type of the ttrace transfer to int. */
to debugger memory starting at MYADDR. Copy to inferior if
WRITE is nonzero. TARGET is ignored.
- Returns the length copied, which is either the LEN argument or zero.
- This xfer function does not do partial moves, since child_ops
- doesn't allow memory operations to cross below us in the target stack
- anyway. */
+ Returns the length copied, which is either the LEN argument or
+ zero. This xfer function does not do partial moves, since
+ deprecated_child_ops doesn't allow memory operations to cross below
+ us in the target stack anyway. */
int
child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
struct mem_attrib *attrib,
struct target_ops *target)
{
- register int i;
+ int i;
/* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (TTRACE_XFER_TYPE);
+ CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (TTRACE_XFER_TYPE);
/* Round ending address up; get number of longwords that makes. */
- register int count
+ int count
= (((memaddr + len) - addr) + sizeof (TTRACE_XFER_TYPE) - 1)
/ sizeof (TTRACE_XFER_TYPE);
/* Allocate buffer of that many longwords. */
/* FIXME (alloca): This code, cloned from infptrace.c, is unsafe
because it uses alloca to allocate a buffer of arbitrary size.
For very large xfers, this could crash GDB's stack. */
- register TTRACE_XFER_TYPE *buffer
+ TTRACE_XFER_TYPE *buffer
= (TTRACE_XFER_TYPE *) alloca (count * sizeof (TTRACE_XFER_TYPE));
if (write)