From b6fb30eda72b7fc3a6214ed2787f80971f66810d Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 31 Oct 2020 08:30:59 -0400 Subject: [PATCH] gdbsupport: re-indent ptrace.m4 For some reason, autoupdate isn't able to grok ptrace.m4: $ autoupdate ptrace.m4 /usr/bin/m4:/tmp/auYjuodw/input.m4:171: ERROR: end of file in string autoupdate: /usr/bin/m4 failed with exit status: 1 Honestly, I'm unable to grok it either. This patch re-indents it in a way that I think is easier to read. With this patch applied, autoupdate becomes able to parse ptrace.m4, but I chose to keep this re-indent in a patch of its own. All the changes in generated configure files consist of insignificant whitespace changes. gdb/ChangeLog: * configure: Re-generate. gdbserver/ChangeLog: * configure: Re-generate. gdbsupport/ChangeLog: * configure: Re-generate. * ptrace.m4: Re-indent. Change-Id: Ie2afab09fecc8b6d0cccccb47ac9756f3843881e --- gdb/ChangeLog | 4 ++ gdb/configure | 55 ++++++++++++------------- gdbserver/ChangeLog | 4 ++ gdbserver/configure | 55 ++++++++++++------------- gdbsupport/ChangeLog | 5 +++ gdbsupport/configure | 55 ++++++++++++------------- gdbsupport/ptrace.m4 | 95 ++++++++++++++++++++++++++------------------ 7 files changed, 154 insertions(+), 119 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b6071bf8ca..cd46bb82e0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-10-31 Simon Marchi + + * configure: Re-generate. + 2020-10-31 Simon Marchi * acinclude.m4: Modernize. diff --git a/gdb/configure b/gdb/configure index ec36cc1909..4816b98919 100755 --- a/gdb/configure +++ b/gdb/configure @@ -15193,25 +15193,29 @@ if ac_fn_c_try_compile "$LINENO"; then : gdb_cv_func_ptrace_ret='int' else gdb_cv_func_ptrace_ret='long' + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 $as_echo "$gdb_cv_func_ptrace_ret" >&6; } + cat >>confdefs.h <<_ACEOF #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret _ACEOF + # Check argument types. { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 $as_echo_n "checking types of arguments for ptrace... " >&6; } if ${gdb_cv_func_ptrace_args+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $gdb_ptrace_headers @@ -15226,64 +15230,61 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' else - -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 - for gdb_arg4 in 'int' 'long' 'void *'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 + for gdb_arg4 in 'int' 'long' 'void *'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $gdb_ptrace_headers int main () { - -extern $gdb_cv_func_ptrace_ret - ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); - +extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; - break 4; + break 4; + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - for gdb_arg5 in 'int *' 'int' 'long'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + for gdb_arg5 in 'int *' 'int' 'long'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $gdb_ptrace_headers int main () { - -extern $gdb_cv_func_ptrace_ret - ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); - +extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : + gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; + break 5; -gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; - break 5; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - done - done - done -done -# Provide a safe default value. -: ${gdb_cv_func_ptrace_args='int,int,long,long'} + done + done + done + done + done + # Provide a safe default value. + : ${gdb_cv_func_ptrace_args='int,int,long,long'} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 $as_echo "$gdb_cv_func_ptrace_args" >&6; } + ac_save_IFS=$IFS; IFS=',' set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 2ee4af0398..bd4ddf77cd 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2020-10-31 Simon Marchi + + * configure: Re-generate. + 2020-10-31 Simon Marchi * configure.ac: Modernize. diff --git a/gdbserver/configure b/gdbserver/configure index c91ce71c94..968642124b 100755 --- a/gdbserver/configure +++ b/gdbserver/configure @@ -9475,25 +9475,29 @@ if ac_fn_c_try_compile "$LINENO"; then : gdb_cv_func_ptrace_ret='int' else gdb_cv_func_ptrace_ret='long' + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 $as_echo "$gdb_cv_func_ptrace_ret" >&6; } + cat >>confdefs.h <<_ACEOF #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret _ACEOF + # Check argument types. { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 $as_echo_n "checking types of arguments for ptrace... " >&6; } if ${gdb_cv_func_ptrace_args+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $gdb_ptrace_headers @@ -9508,64 +9512,61 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' else - -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 - for gdb_arg4 in 'int' 'long' 'void *'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 + for gdb_arg4 in 'int' 'long' 'void *'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $gdb_ptrace_headers int main () { - -extern $gdb_cv_func_ptrace_ret - ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); - +extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; - break 4; + break 4; + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - for gdb_arg5 in 'int *' 'int' 'long'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + for gdb_arg5 in 'int *' 'int' 'long'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $gdb_ptrace_headers int main () { - -extern $gdb_cv_func_ptrace_ret - ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); - +extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : + gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; + break 5; -gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; - break 5; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - done - done - done -done -# Provide a safe default value. -: ${gdb_cv_func_ptrace_args='int,int,long,long'} + done + done + done + done + done + # Provide a safe default value. + : ${gdb_cv_func_ptrace_args='int,int,long,long'} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 $as_echo "$gdb_cv_func_ptrace_args" >&6; } + ac_save_IFS=$IFS; IFS=',' set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog index e03e07f3c3..dbdb2ca953 100644 --- a/gdbsupport/ChangeLog +++ b/gdbsupport/ChangeLog @@ -1,3 +1,8 @@ +2020-10-31 Simon Marchi + + * configure: Re-generate. + * ptrace.m4: Re-indent. + 2020-10-31 Simon Marchi * aclocal.m4: Re-generate. diff --git a/gdbsupport/configure b/gdbsupport/configure index 24e6e3e719..e51c7b5968 100755 --- a/gdbsupport/configure +++ b/gdbsupport/configure @@ -10044,25 +10044,29 @@ if ac_fn_c_try_compile "$LINENO"; then : gdb_cv_func_ptrace_ret='int' else gdb_cv_func_ptrace_ret='long' + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 $as_echo "$gdb_cv_func_ptrace_ret" >&6; } + cat >>confdefs.h <<_ACEOF #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret _ACEOF + # Check argument types. { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 $as_echo_n "checking types of arguments for ptrace... " >&6; } if ${gdb_cv_func_ptrace_args+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $gdb_ptrace_headers @@ -10077,64 +10081,61 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' else - -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 - for gdb_arg4 in 'int' 'long' 'void *'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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 + for gdb_arg4 in 'int' 'long' 'void *'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $gdb_ptrace_headers int main () { - -extern $gdb_cv_func_ptrace_ret - ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); - +extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; - break 4; + break 4; + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - for gdb_arg5 in 'int *' 'int' 'long'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + for gdb_arg5 in 'int *' 'int' 'long'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $gdb_ptrace_headers int main () { - -extern $gdb_cv_func_ptrace_ret - ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); - +extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : + gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; + break 5; -gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; - break 5; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - done - done - done -done -# Provide a safe default value. -: ${gdb_cv_func_ptrace_args='int,int,long,long'} + done + done + done + done + done + # Provide a safe default value. + : ${gdb_cv_func_ptrace_args='int,int,long,long'} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 $as_echo "$gdb_cv_func_ptrace_args" >&6; } + ac_save_IFS=$IFS; IFS=',' set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS diff --git a/gdbsupport/ptrace.m4 b/gdbsupport/ptrace.m4 index 0fcd855aa8..57ed80260a 100644 --- a/gdbsupport/ptrace.m4 +++ b/gdbsupport/ptrace.m4 @@ -34,45 +34,64 @@ gdb_ptrace_headers=' # 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 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.]) +AC_CACHE_CHECK( + [return type of ptrace], + [gdb_cv_func_ptrace_ret], + [AC_TRY_COMPILE( + [$gdb_ptrace_headers], + [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='enum __ptrace_request,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 - for gdb_arg4 in 'int' 'long' 'void *'; do - AC_TRY_COMPILE($gdb_ptrace_headers, [ -extern $gdb_cv_func_ptrace_ret - ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); -], [gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; - break 4;]) - for gdb_arg5 in 'int *' 'int' 'long'; do - AC_TRY_COMPILE($gdb_ptrace_headers, [ -extern $gdb_cv_func_ptrace_ret - ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); -], [ -gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; - break 5;]) - done - done - done - done -done -# Provide a safe default value. -: ${gdb_cv_func_ptrace_args='int,int,long,long'} -])]) +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='enum __ptrace_request,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 + for gdb_arg4 in 'int' 'long' 'void *'; do + AC_TRY_COMPILE( + [$gdb_ptrace_headers], + [extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);], + [gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; + break 4;] + ) + + for gdb_arg5 in 'int *' 'int' 'long'; do + AC_TRY_COMPILE( + [$gdb_ptrace_headers], + [extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);], + [gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; + break 5;] + ) + done + done + done + done + 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 -- 2.34.1