From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25309 invoked by alias); 22 Oct 2007 20:01:02 -0000 Received: (qmail 25275 invoked by uid 22791); 22 Oct 2007 20:00:51 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate3.de.ibm.com (HELO mtagate3.de.ibm.com) (195.212.29.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 22 Oct 2007 20:00:44 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.8/8.13.8) with ESMTP id l9MK0fFQ179336 for ; Mon, 22 Oct 2007 20:00:41 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l9MK0fMh2351296 for ; Mon, 22 Oct 2007 22:00:41 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l9MK0eSN031234 for ; Mon, 22 Oct 2007 22:00:41 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l9MK0ejH031231; Mon, 22 Oct 2007 22:00:40 +0200 Message-Id: <200710222000.l9MK0ejH031231@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 22 Oct 2007 22:00:40 +0200 Subject: Re: [0/8] solib handler rework To: brobecker@adacore.com (Joel Brobecker) Date: Mon, 22 Oct 2007 20:03:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20071022172729.GE764@adacore.com> from "Joel Brobecker" at Oct 22, 2007 10:27:29 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00518.txt.bz2 Joel Brobecker wrote: > > - If there is sometimes the need to add a special compatibility > > library like -lxpdl, we need to add the appropriate configure > > magic to make that happen ... > > This is the option that I prefer. I'm not sure that a 32bit GDB > on HP/UX will be able to debug a 64bit program, but at least that's > a step in that direction. Something like the configure patch below should do that. (Should apply on top of the solib patches.) Bye, Ulrich diff -urNp gdb-orig/gdb/configure gdb-head/gdb/configure --- gdb-orig/gdb/configure 2007-10-19 23:36:41.000000000 +0200 +++ gdb-head/gdb/configure 2007-10-22 20:28:15.532021324 +0200 @@ -5629,6 +5629,134 @@ if test "$ac_cv_search_waddstr" != no; t fi +# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). +echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5 +echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6 +if test "${ac_cv_search_dlgetmodinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_dlgetmodinfo=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlgetmodinfo (); +int +main () +{ +dlgetmodinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + ac_cv_search_dlgetmodinfo="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_dlgetmodinfo" = no; then + for ac_lib in dl xpdl; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlgetmodinfo (); +int +main () +{ +dlgetmodinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + ac_cv_search_dlgetmodinfo="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5 +echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6 +if test "$ac_cv_search_dlgetmodinfo" != no; then + test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS" + +fi + + # Since GDB uses Readline, we need termcap functionality. In many # cases this will be provided by the curses library, but some systems # have a seperate termcap library, or no curses library at all. diff -urNp gdb-orig/gdb/configure.ac gdb-head/gdb/configure.ac --- gdb-orig/gdb/configure.ac 2007-10-19 23:36:41.000000000 +0200 +++ gdb-head/gdb/configure.ac 2007-10-22 20:28:06.689965572 +0200 @@ -319,6 +319,9 @@ AC_SEARCH_LIBS(socketpair, socket) # a situation. AC_SEARCH_LIBS(waddstr, [ncurses cursesX curses]) +# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). +AC_SEARCH_LIBS(dlgetmodinfo, [dl xpdl]) + # Since GDB uses Readline, we need termcap functionality. In many # cases this will be provided by the curses library, but some systems # have a seperate termcap library, or no curses library at all. -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com