* configure.ac: Check for the GNU/Linux ptrace signature.

* configure: Regenerated.
This commit is contained in:
Daniel Jacobowitz 2008-07-27 21:18:50 +00:00
parent 57380f4e0b
commit 064ef605af
3 changed files with 108 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
* configure.ac: Check for the GNU/Linux ptrace signature.
* configure: Regenerated.
2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
* linux-nat.c (resume_callback): Add more debugging output.

92
gdb/configure vendored
View File

@ -20116,7 +20116,8 @@ _ACEOF
fi
# Check return type.
# Check return type. Varargs (used on GNU/Linux) conflict with the
# empty argument list, so check for that explicitly.
echo "$as_me:$LINENO: checking return type of ptrace" >&5
echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
if test "${gdb_cv_func_ptrace_ret+set}" = set; then
@ -20132,6 +20133,48 @@ $gdb_ptrace_headers
int
main ()
{
extern long ptrace (enum __ptrace_request, ...);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
gdb_cv_func_ptrace_ret='long'
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$gdb_ptrace_headers
int
main ()
{
extern int ptrace ();
;
return 0;
@ -20168,6 +20211,8 @@ gdb_cv_func_ptrace_ret='long'
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
@ -20182,6 +20227,49 @@ if test "${gdb_cv_func_ptrace_args+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$gdb_ptrace_headers
int
main ()
{
extern long ptrace (enum __ptrace_request, ...);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
gdb_cv_func_ptrace_args='int,int,long,long'
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
for gdb_arg1 in 'int' 'long'; do
for gdb_arg2 in 'pid_t' 'int' 'long'; do
for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
@ -20292,6 +20380,8 @@ done
# Provide a safe default value.
: ${gdb_cv_func_ptrace_args='int,int,long,long'}
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6

View File

@ -643,16 +643,23 @@ AC_CHECK_DECLS(ptrace, [], [
: ${gdb_cv_func_ptrace_ret='int'}
: ${gdb_cv_func_ptrace_args='int,int,long,long'}
], $gdb_ptrace_headers)
# Check return type.
# Check return type. Varargs (used on GNU/Linux) conflict with the
# empty argument list, so check for that explicitly.
AC_CACHE_CHECK([return type of ptrace], gdb_cv_func_ptrace_ret,
AC_TRY_COMPILE($gdb_ptrace_headers,
[extern int ptrace ();],
gdb_cv_func_ptrace_ret='int',
gdb_cv_func_ptrace_ret='long'))
[extern long ptrace (enum __ptrace_request, ...);],
gdb_cv_func_ptrace_ret='long',
AC_TRY_COMPILE($gdb_ptrace_headers,
[extern int ptrace ();],
gdb_cv_func_ptrace_ret='int',
gdb_cv_func_ptrace_ret='long')))
AC_DEFINE_UNQUOTED(PTRACE_TYPE_RET, $gdb_cv_func_ptrace_ret,
[Define as the return type of ptrace.])
# Check argument types.
AC_CACHE_CHECK([types of arguments for ptrace], gdb_cv_func_ptrace_args, [
AC_TRY_COMPILE($gdb_ptrace_headers,
[extern long ptrace (enum __ptrace_request, ...);],
[gdb_cv_func_ptrace_args='int,int,long,long'],[
for gdb_arg1 in 'int' 'long'; do
for gdb_arg2 in 'pid_t' 'int' 'long'; do
for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
@ -676,7 +683,7 @@ gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
done
# Provide a safe default value.
: ${gdb_cv_func_ptrace_args='int,int,long,long'}
])
])])
ac_save_IFS=$IFS; IFS=','
set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
IFS=$ac_save_IFS