diff options
author | John Baldwin <jhb@FreeBSD.org> | 2020-09-16 11:40:05 -0700 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2020-09-16 11:40:05 -0700 |
commit | e911c6663bb8cff9e6968a885b81d5dd484de031 (patch) | |
tree | 57b7386b1444d9a498ff26af28c48d2feae723c7 /gdb/configure | |
parent | 1f17d372496e18f93cad8ccec15d83530e41206f (diff) | |
download | gdb-e911c6663bb8cff9e6968a885b81d5dd484de031.zip gdb-e911c6663bb8cff9e6968a885b81d5dd484de031.tar.gz gdb-e911c6663bb8cff9e6968a885b81d5dd484de031.tar.bz2 |
Require kinfo_get_file and kinfo_get_vmmap for FreeBSD hosts.
FreeBSD systems have provided these functions in libutil since 7.1
release. The most recent release without support is 6.4 released in
November of 2008.
This also requires libutil-freebsd on GNU/kFreeBSD systems. I assume
that those systems have supported kinfo_get_file and kinfo_get_vmmap
over a similar timeframe.
gdb/ChangeLog:
* configure.ac: Remove check for kinfo_getvmmap().
* configure, config.in: Regenerate.
* fbsd-nat.c (fbsd_read_mapping): Remove
(fbsd_nat_target::find_memory_regions): Remove the procfs version.
(fbsd_nat_target::info_proc): Assume kinfo_getfile() and
kinfo_get_vmmap() are always present.
gdbsupport/ChangeLog:
* common.m4 (GDB_AC_COMMON): Refactor checks for kinfo_getfile().
* configure, config.in: Regenerate.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 77 |
1 files changed, 15 insertions, 62 deletions
diff --git a/gdb/configure b/gdb/configure index e7811e8..a8942ec 100755 --- a/gdb/configure +++ b/gdb/configure @@ -8270,67 +8270,6 @@ fi -# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c). -# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 -$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } -if ${ac_cv_search_kinfo_getvmmap+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kinfo_getvmmap (); -int -main () -{ -return kinfo_getvmmap (); - ; - return 0; -} -_ACEOF -for ac_lib in '' util util-freebsd; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_kinfo_getvmmap=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_kinfo_getvmmap+:} false; then : - break -fi -done -if ${ac_cv_search_kinfo_getvmmap+:} false; then : - -else - ac_cv_search_kinfo_getvmmap=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5 -$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; } -ac_res=$ac_cv_search_kinfo_getvmmap -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h - -fi - - if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" @@ -13567,6 +13506,9 @@ _ACEOF fi + # On FreeBSD we need libutil for the kinfo_get* functions. On + # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. + # Figure out which one to use. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 $as_echo_n "checking for library containing kinfo_getfile... " >&6; } if ${ac_cv_search_kinfo_getfile+:} false; then : @@ -13621,9 +13563,20 @@ ac_res=$ac_cv_search_kinfo_getfile if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h +fi + + + # Define HAVE_KINFO_GETFILE if kinfo_getfile is available. + for ac_func in kinfo_getfile +do : + ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile" +if test "x$ac_cv_func_kinfo_getfile" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KINFO_GETFILE 1 +_ACEOF fi +done # Check for std::thread. This does not work on some platforms, like |