Re: ptrace(2) autoconf tests

Andrew Cagney
2004-08-09T13:09:46Z

> Anyway, below is a first hack at the autoconf tests. The tests
> themselves are inspired by the standard AC_FUNC_CLOSEDIR_VOID and
> AC_FUNC_SELECT_ARGTYPES tests. My code defines PTRACE_LONG if the
> return type of ptrace(2) is `long', defines PTRACE_TYPE_ARG3 to the
> type of the third argument of ptrace(2) and defines PTRACE_TYPE_ARG5
> to the type of the fifth argument of ptrace(2) if it has one.
> PTRACE_TYPE_ARG3 will replace PTRACE_ARG3_TYPE. PTRACE_XFER_TYPE will
> be set based on PTRACE_LONG and PTRACE_TYPE_ARG5 will replace
> FIVE_ARG_PTRACE.

How should we use this - I'm getting a bit lost with all the macros.
Should autoconf define PTRACE_XFER_TYPE (PTRACE_RETURN_TYPE?) directly.

Having this will let us wack a chunk of the nm*.h contents so looking good!

--

Hmm, I just noticed call_ptrace() - appears to be something from the HP
merge (...). Perhaphs I should ari the requirement that all ptrace
calls are routed through that. Would let us implement `set debug ptrace!'.

Andrew