From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OUWuM05QzmqloAIAWB0awg (envelope-from ) for ; Tue, 13 Oct 2026 11:37:50 -0400 Received: by simark.ca (Postfix, from userid 112) id C77F41E051; Tue, 13 Oct 2026 11:37:50 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 152D31E050 for ; Tue, 13 Oct 2026 11:37:41 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B58A64BA79A7 for ; Tue, 13 Oct 2026 15:37:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B58A64BA79A7 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 8229F4BA2E39 for ; Tue, 13 Oct 2026 15:37:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8229F4BA2E39 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8229F4BA2E39 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791905827; cv=none; b=tG1/DmtVKp8ojta8FEO9AJU0di2tlYScNLOTAFpTgME2WOuI/VJfW3NQwuJcTDf6e5c3cB4BZ4vsPct9UToD+blaHA4Pg2MHZTihgNSso7mNdNcJLAwliZYYGHeOeqQomttIzY/Wasg2A+kvUyn8OgqCU5cihXZ47askU1hWnGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791905827; c=relaxed/simple; bh=j/83pdkQGiLfl9LTPGp1GsBEiQHEU6eHMY3HtUVHBVA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=XVaV1pW+xHq0dXFrkgij0VuSKeH4jupcpSKJTXnUl5hhwA9olyPqFyG+fsO8zzPFGafOxjTQFfIvVHverFEF/ux9nhrVEa7Tq+7UCAEFkCsHL+jc9wLIY3T3hfqcigBGpS5RyhEAQDXybYOAmMTJB1TAo43NNOGR57kc69v26AI= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8229F4BA2E39 Received: by simark.ca (Postfix) id E24041E090; Tue, 13 Oct 2026 11:37:06 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 04/16] gdbserver, gdbsupport: remove unneeded sys/procfs.h type checks Date: Tue, 13 Oct 2026 11:35:50 -0400 Message-ID: <20261013153657.1610298-5-simon.marchi@efficios.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013153657.1610298-1-simon.marchi@efficios.com> References: <20261013153657.1610298-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Nothing uses HAVE_GREGSET_T, HAVE_FPREGSET_T or HAVE_PRGREGSET32_T. Remove those checks from common.m4. gdb_proc_service.h provides fallback definitions of lwpid_t, psaddr_t, prgregset_t and prfpregset_t, for when configure doesn't find them in sys/procfs.h. gdbserver's configure.ac additionally checks for lwpid_t and psaddr_t in thread_db.h, for old Android versions that defined them there. All the libcs that I know of on Linux define these types in sys/procfs.h since long enough: - glibc: since commit 03fc7ab6ed4b (1999-11-02), first released in glibc 2.1.3. - uClibc: since commit e83a36ce9f97 ("Rev all the header files to sync things with glibc 2.2.4", 2001-09-27). uClibc-ng, forked from uClibc, inherited them. - musl: since its initial check-in, commit 0b44a0315b47 ("initial check-in, version 0.5.0", 2011-02-12). - bionic (Android): prgregset_t and prfpregset_t since commit bf18c61798d1 ("Add a sys/procfs.h.", 2015-03-04), lwpid_t and psaddr_t since commit 895241efbba3 ("Fixes for building gdbserver (and gdb) out of the box.", 2015-06-16), both first released in Android 6.0. I claim that it's not worth supporting Android versions older than that. Remove the checks for these types from common.m4, the GDBSERVER_HAVE_THREAD_DB_TYPE macro and its uses from gdbserver, and the fallback definitions from gdb_proc_service.h. The check for elf_fpregset_t remains, since uClibc-ng's sys/procfs.h doesn't define it for c6x, which gdbserver supports. Regenerate config.in and configure in gdb, gdbserver and gdbsupport. Change-Id: I9770a923b06ebb001ffc25255801b79818fa397b --- gdb/config.in | 21 --- gdb/configure | 252 -------------------------- gdbserver/acinclude.m4 | 21 --- gdbserver/config.in | 21 --- gdbserver/configure | 326 ---------------------------------- gdbserver/configure.ac | 10 -- gdbsupport/common.m4 | 7 - gdbsupport/config.in | 21 --- gdbsupport/configure | 252 -------------------------- gdbsupport/gdb_proc_service.h | 16 -- 10 files changed, 947 deletions(-) diff --git a/gdb/config.in b/gdb/config.in index 07af8d32acb3..636daea082d3 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -207,9 +207,6 @@ /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK -/* Define if has fpregset_t. */ -#undef HAVE_FPREGSET_T - /* Define to 1 if you have the `getauxval' function. */ #undef HAVE_GETAUXVAL @@ -234,9 +231,6 @@ /* Define to 1 if you have the `getuid' function. */ #undef HAVE_GETUID -/* Define if has gregset_t. */ -#undef HAVE_GREGSET_T - /* Define if Guile interpreter is being linked in. */ #undef HAVE_GUILE @@ -318,9 +312,6 @@ /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG -/* Define if has lwpid_t. */ -#undef HAVE_LWPID_T - /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_REG_H @@ -369,21 +360,9 @@ /* Define to 1 if you have the `pread64' function. */ #undef HAVE_PREAD64 -/* Define if has prfpregset_t. */ -#undef HAVE_PRFPREGSET_T - -/* Define if has prgregset32_t. */ -#undef HAVE_PRGREGSET32_T - -/* Define if has prgregset_t. */ -#undef HAVE_PRGREGSET_T - /* Define to 1 if you have the header file. */ #undef HAVE_PROC_SERVICE_H -/* Define if has psaddr_t. */ -#undef HAVE_PSADDR_T - /* Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT diff --git a/gdb/configure b/gdb/configure index 7d1a906eaff1..4c08ab956555 100755 --- a/gdb/configure +++ b/gdb/configure @@ -21878,258 +21878,6 @@ done if test "$ac_cv_header_sys_procfs_h" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -gregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_gregset_t=yes -else - bfd_cv_have_sys_procfs_type_gregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then - -$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -fpregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_fpregset_t=yes -else - bfd_cv_have_sys_procfs_type_fpregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then - -$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -prgregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prgregset_t=yes -else - bfd_cv_have_sys_procfs_type_prgregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then - -$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -prfpregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prfpregset_t=yes -else - bfd_cv_have_sys_procfs_type_prfpregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then - -$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 -$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -prgregset32_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prgregset32_t=yes -else - bfd_cv_have_sys_procfs_type_prgregset32_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then - -$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 -$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -lwpid_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_lwpid_t=yes -else - bfd_cv_have_sys_procfs_type_lwpid_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then - -$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 -$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -psaddr_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_psaddr_t=yes -else - bfd_cv_have_sys_procfs_type_psaddr_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then - -$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : diff --git a/gdbserver/acinclude.m4 b/gdbserver/acinclude.m4 index 9b1cf85a6997..61d7134699a8 100644 --- a/gdbserver/acinclude.m4 +++ b/gdbserver/acinclude.m4 @@ -35,24 +35,3 @@ m4_include(../gdb/ax_cxx_compile_stdcxx.m4) dnl For GDB_AC_SELFTEST. m4_include(../gdbsupport/selftest.m4) - -dnl Check for existence of a type $1 in libthread_db.h -dnl Based on BFD_HAVE_SYS_PROCFS_TYPE in bfd/bfd.m4. - -AC_DEFUN( - [GDBSERVER_HAVE_THREAD_DB_TYPE], - [AC_MSG_CHECKING([for $1 in thread_db.h]) - AC_CACHE_VAL( - [gdbserver_cv_have_thread_db_type_$1], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([#include ], [$1 avar])], - [gdbserver_cv_have_thread_db_type_$1=yes], - [gdbserver_cv_have_thread_db_type_$1=no] - )] - ) - if test $gdbserver_cv_have_thread_db_type_$1 = yes; then - AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1, - [Define if has $1.]) - fi - AC_MSG_RESULT($gdbserver_cv_have_thread_db_type_$1)] -) diff --git a/gdbserver/config.in b/gdbserver/config.in index daad1ec02a25..5b2e60260154 100644 --- a/gdbserver/config.in +++ b/gdbserver/config.in @@ -118,9 +118,6 @@ /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK -/* Define if has fpregset_t. */ -#undef HAVE_FPREGSET_T - /* Define to 1 if you have the `getauxval' function. */ #undef HAVE_GETAUXVAL @@ -136,9 +133,6 @@ /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT -/* Define if has gregset_t. */ -#undef HAVE_GREGSET_T - /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV @@ -181,9 +175,6 @@ /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG -/* Define if has lwpid_t. */ -#undef HAVE_LWPID_T - /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -217,21 +208,9 @@ /* Define to 1 if you have the `pread64' function. */ #undef HAVE_PREAD64 -/* Define if has prfpregset_t. */ -#undef HAVE_PRFPREGSET_T - -/* Define if has prgregset32_t. */ -#undef HAVE_PRGREGSET32_T - -/* Define if has prgregset_t. */ -#undef HAVE_PRGREGSET_T - /* Define to 1 if you have the header file. */ #undef HAVE_PROC_SERVICE_H -/* Define if has psaddr_t. */ -#undef HAVE_PSADDR_T - /* Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT diff --git a/gdbserver/configure b/gdbserver/configure index 1eac3d01669a..68a1f59d675a 100755 --- a/gdbserver/configure +++ b/gdbserver/configure @@ -10082,258 +10082,6 @@ done if test "$ac_cv_header_sys_procfs_h" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -gregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_gregset_t=yes -else - bfd_cv_have_sys_procfs_type_gregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then - -$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -fpregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_fpregset_t=yes -else - bfd_cv_have_sys_procfs_type_fpregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then - -$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -prgregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prgregset_t=yes -else - bfd_cv_have_sys_procfs_type_prgregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then - -$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -prfpregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prfpregset_t=yes -else - bfd_cv_have_sys_procfs_type_prfpregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then - -$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 -$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -prgregset32_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prgregset32_t=yes -else - bfd_cv_have_sys_procfs_type_prgregset32_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then - -$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 -$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -lwpid_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_lwpid_t=yes -else - bfd_cv_have_sys_procfs_type_lwpid_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then - -$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 -$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -psaddr_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_psaddr_t=yes -else - bfd_cv_have_sys_procfs_type_psaddr_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then - -$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : @@ -14031,80 +13779,6 @@ $as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h fi -if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5 -$as_echo_n "checking for lwpid_t in thread_db.h... " >&6; } - if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -lwpid_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdbserver_cv_have_thread_db_type_lwpid_t=yes -else - gdbserver_cv_have_thread_db_type_lwpid_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - - if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then - -$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5 -$as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; } - -fi - -if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5 -$as_echo_n "checking for psaddr_t in thread_db.h... " >&6; } - if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -psaddr_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gdbserver_cv_have_thread_db_type_psaddr_t=yes -else - gdbserver_cv_have_thread_db_type_psaddr_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - - if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then - -$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5 -$as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; } - -fi - old_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac index f1466e8568d4..87d0fc6dec9a 100644 --- a/gdbserver/configure.ac +++ b/gdbserver/configure.ac @@ -243,16 +243,6 @@ if test "${srv_linux_btrace}" = "yes"; then [Define if the target supports branch tracing.]) fi -dnl Some systems (e.g., Android) have lwpid_t defined in libthread_db.h. -if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then - GDBSERVER_HAVE_THREAD_DB_TYPE(lwpid_t) -fi - -dnl Some systems (e.g., Android) have psaddr_t defined in libthread_db.h. -if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then - GDBSERVER_HAVE_THREAD_DB_TYPE(psaddr_t) -fi - dnl Check for libdl, but do not add it to LIBS as only gdbserver dnl needs it (and gdbreplay doesn't). old_LIBS="$LIBS" diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4 index 4de9710c41f0..e8903c41c45f 100644 --- a/gdbsupport/common.m4 +++ b/gdbsupport/common.m4 @@ -253,13 +253,6 @@ AC_CHECK_HEADERS([ \ BFD_SYS_PROCFS_H if test "$ac_cv_header_sys_procfs_h" = yes; then - BFD_HAVE_SYS_PROCFS_TYPE(gregset_t) - BFD_HAVE_SYS_PROCFS_TYPE(fpregset_t) - BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t) - BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t) - BFD_HAVE_SYS_PROCFS_TYPE(prgregset32_t) - BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t) - BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t) BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_t) fi diff --git a/gdbsupport/config.in b/gdbsupport/config.in index 4b152c67cae7..f99a88352196 100644 --- a/gdbsupport/config.in +++ b/gdbsupport/config.in @@ -102,9 +102,6 @@ /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK -/* Define if has fpregset_t. */ -#undef HAVE_FPREGSET_T - /* Define to 1 if you have the `getauxval' function. */ #undef HAVE_GETAUXVAL @@ -120,9 +117,6 @@ /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT -/* Define if has gregset_t. */ -#undef HAVE_GREGSET_T - /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV @@ -153,9 +147,6 @@ /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG -/* Define if has lwpid_t. */ -#undef HAVE_LWPID_T - /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -174,21 +165,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H -/* Define if has prfpregset_t. */ -#undef HAVE_PRFPREGSET_T - -/* Define if has prgregset32_t. */ -#undef HAVE_PRGREGSET32_T - -/* Define if has prgregset_t. */ -#undef HAVE_PRGREGSET_T - /* Define to 1 if you have the header file. */ #undef HAVE_PROC_SERVICE_H -/* Define if has psaddr_t. */ -#undef HAVE_PSADDR_T - /* Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT diff --git a/gdbsupport/configure b/gdbsupport/configure index 998130c29cfa..4e4d2f9ff543 100755 --- a/gdbsupport/configure +++ b/gdbsupport/configure @@ -12981,258 +12981,6 @@ done if test "$ac_cv_header_sys_procfs_h" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -gregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_gregset_t=yes -else - bfd_cv_have_sys_procfs_type_gregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then - -$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -fpregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_fpregset_t=yes -else - bfd_cv_have_sys_procfs_type_fpregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then - -$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -prgregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prgregset_t=yes -else - bfd_cv_have_sys_procfs_type_prgregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then - -$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 -$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -prfpregset_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prfpregset_t=yes -else - bfd_cv_have_sys_procfs_type_prfpregset_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then - -$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 -$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -prgregset32_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_prgregset32_t=yes -else - bfd_cv_have_sys_procfs_type_prgregset32_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then - -$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 -$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -lwpid_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_lwpid_t=yes -else - bfd_cv_have_sys_procfs_type_lwpid_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then - -$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 -$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } - if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _SYSCALL32 -#include -int -main () -{ -psaddr_t avar - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - bfd_cv_have_sys_procfs_type_psaddr_t=yes -else - bfd_cv_have_sys_procfs_type_psaddr_t=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then - -$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 -$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : diff --git a/gdbsupport/gdb_proc_service.h b/gdbsupport/gdb_proc_service.h index 6bac4aaea063..7cd471abd6fc 100644 --- a/gdbsupport/gdb_proc_service.h +++ b/gdbsupport/gdb_proc_service.h @@ -83,22 +83,6 @@ enum ps_err_e PS_NOFREGS /* FPU register set not available for given LWP. */ }; -#ifndef HAVE_LWPID_T -using lwpid_t = unsigned int; -#endif - -#ifndef HAVE_PSADDR_T -using psaddr_t = void *; -#endif - -#ifndef HAVE_PRGREGSET_T -using prgregset_t = elf_gregset_t; -#endif - -#ifndef HAVE_PRFPREGSET_T -using prfpregset_t = elf_fpregset_t; -#endif - /* This type is opaque in this interface. It's defined by the user of libthread_db. GDB's version is defined below. */ struct ps_prochandle; -- 2.56.0