From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7833) id 6CC353858D35; Mon, 13 Feb 2023 09:52:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CC353858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676281950; bh=Yiz7/sQHr0f/gH/Xsgi5zkBT+/wi+eRdwPVNqCT35rA=; h=From:To:Subject:Date:From; b=kl1MpehRib6ISwjYyjeDFhlWCOlAi76oZvOQkXWFmalwQ2X8I5LTrOW1dNuJ65NUC tY06kjxLRsuZfJsfOf7Doi/9c0b55pgXhRgmgUgPUsXQGueru9JDDuc+vZglmHYN2S PxeZYTeISzqVRywFC8KQ7W94x4WJ53DZDcNV70II= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Lancelot SIX To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: 'show config' shows --with[out]-amd-dbgapi X-Act-Checkin: binutils-gdb X-Git-Author: Lancelot SIX X-Git-Refname: refs/heads/master X-Git-Oldrev: 3eef3b2c2d85bb0b83a4e902d4444400ddfde0ab X-Git-Newrev: 08d8af48e49d59efd5780bb9e360730d4fd149b1 Message-Id: <20230213095230.6CC353858D35@sourceware.org> Date: Mon, 13 Feb 2023 09:52:30 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D08d8af48e49d= 59efd5780bb9e360730d4fd149b1 commit 08d8af48e49d59efd5780bb9e360730d4fd149b1 Author: Lancelot SIX Date: Mon Feb 6 19:16:14 2023 +0000 gdb: 'show config' shows --with[out]-amd-dbgapi =20 Ensure that the "show configuration" command and the "--configuration" command line switch shows if GDB was built with the AMDGPU support or not. =20 This will be used in a later patch in this series. =20 Approved-By: Simon Marchi Diff: --- gdb/config.in | 3 +++ gdb/configure | 3 +++ gdb/configure.ac | 1 + gdb/top.c | 10 ++++++++++ 4 files changed, 17 insertions(+) diff --git a/gdb/config.in b/gdb/config.in index 7da131ebf04..a6027847444 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -84,6 +84,9 @@ */ #undef HAVE_ALLOCA_H =20 +/* Define if amd-dbgapi is being linked in. */ +#undef HAVE_AMD_DBGAPI + /* Define to 1 if you have the `btowc' function. */ #undef HAVE_BTOWC =20 diff --git a/gdb/configure b/gdb/configure index 113b7cf8a30..8b2039912e7 100755 --- a/gdb/configure +++ b/gdb/configure @@ -18252,6 +18252,9 @@ $as_echo "yes" >&6; } fi =20 if test "$has_amd_dbgapi" =3D "yes"; then + +$as_echo "#define HAVE_AMD_DBGAPI 1" >>confdefs.h + TARGET_OBS=3D"$TARGET_OBS amd-dbgapi-target.o" =20 # If --enable-targets=3Dall was provided, use the list of all files de= pending diff --git a/gdb/configure.ac b/gdb/configure.ac index 7c7bf88b3fb..79eb013ce19 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -275,6 +275,7 @@ if test "$gdb_require_amd_dbgapi" =3D true \ [has_amd_dbgapi=3Dyes], [has_amd_dbgapi=3Dno]) =20 if test "$has_amd_dbgapi" =3D "yes"; then + AC_DEFINE(HAVE_AMD_DBGAPI, 1, [Define if amd-dbgapi is being linked in= .]) TARGET_OBS=3D"$TARGET_OBS amd-dbgapi-target.o" =20 # If --enable-targets=3Dall was provided, use the list of all files de= pending diff --git a/gdb/top.c b/gdb/top.c index 205eb360ba3..1b189d7c5ab 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1629,6 +1629,16 @@ This GDB was configured as follows:\n\ ")); #endif =20 +#if HAVE_AMD_DBGAPI + gdb_printf (stream, _("\ + --with-amd-dbgapi\n\ +")); +#else + gdb_printf (stream, _("\ + --without-amd-dbgapi\n\ +")); +#endif + #if HAVE_SOURCE_HIGHLIGHT gdb_printf (stream, _("\ --enable-source-highlight\n\