From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15029 invoked by alias); 13 Dec 2013 10:06:50 -0000 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 Received: (qmail 15017 invoked by uid 89); 13 Dec 2013 10:06:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,URIBL_BLACK autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2013 10:06:34 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBDA6O3m003026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Dec 2013 05:06:24 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBDA6Lq0015188; Fri, 13 Dec 2013 05:06:22 -0500 Message-ID: <52AADC1D.9060207@redhat.com> Date: Fri, 13 Dec 2013 10:06:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Tromey CC: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [RFA] nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing References: <1386070185-8020-1-git-send-email-brobecker@adacore.com> <529E361B.7070807@redhat.com> <20131205105437.GE3175@adacore.com> <52A073CC.3050009@redhat.com> <20131209113333.GC4011@adacore.com> <20131210105624.GA14056@adacore.com> <52A719F1.6060906@redhat.com> <52A71DDC.2080908@redhat.com> <20131212181843.GB3528@adacore.com> <87ob4lzpuf.fsf@fleche.redhat.com> In-Reply-To: <87ob4lzpuf.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-12/txt/msg00522.txt.bz2 On 12/12/2013 10:06 PM, Tom Tromey wrote: >>>>>> "Joel" == Joel Brobecker writes: > > Joel> which is good enough for our purposes. But for the second issue, > Joel> I only had a handful of bad options for our current situation: > Joel> 1. Import the module from gnulib; but that's never an innocent > Joel> change, and also the documentation says that it does not work > Joel> for Windows paths; > Joel> 2. Import the libiberty module by hand, which itself depends on > Joel> their safe-ctype.h module. > Joel> 3. Write a quick ad hoc function that implements basename. > > Now that we are on git and can move stuff around without much hassle, I > think it's a good time for someone to tackle rearranging the tree a bit > so that this artificial "gdbserver cannot use libiberty" restriction can > be lifted. Not speaking for or against the plan, but I don't recall that the current restriction was based on directory structure. With ACX_CONFIGURE_DIR, we can build libiberty within gdbserver's build dir, like we do gnulib (see below), so it seems that's a non-issue (even if that was is not the cleanest). Rather, the main issue was that libiberty won't build out of the box on some of the gdbserver targets, like Windows CE and Lynx, IIRC. CE is probably already broken for a while, so it's fine with me to not have it block such a change. --- gdb/gdbserver/configure | 97 ++++++++++++++++++++++++++++++++++++++++++++++ gdb/gdbserver/configure.ac | 2 + 2 files changed, 99 insertions(+) diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index fac7fb3..9c49ae2 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -4714,6 +4714,103 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach cd "$ac_popdir" + + in_src="../../libiberty" + in_build="build-libiberty-gdbserver" + + # Remove --cache-file, --srcdir, and --disable-option-checking arguments + # so they do not pile up. + ac_sub_configure_args= + ac_prev= + eval "set x $ac_configure_args" + shift + for ac_arg + do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + --disable-option-checking) + ;; + *) + case $ac_arg in + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_sub_configure_args " '$ac_arg'" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_arg="--prefix=$prefix" + case $ac_arg in + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" + + # Pass --silent + if test "$silent" = yes; then + ac_sub_configure_args="--silent $ac_sub_configure_args" + fi + + # Always prepend --disable-option-checking to silence warnings, since + # different subdirs can have different --enable and --with options. + ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" + + ac_popdir=`pwd` + ac_dir=$in_build + + ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" + $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 + $as_echo "$ac_msg" >&6 + as_dir="$ac_dir"; as_fn_mkdir_p + + case $srcdir in + [\\/]* | ?:[\\/]* ) + ac_srcdir=$srcdir/$in_src ;; + *) # Relative name. + ac_srcdir=../$srcdir/$in_src ;; + esac + + cd "$ac_dir" + + ac_sub_configure=$ac_srcdir/configure + + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative name. + ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + # The eval makes quoting arguments work. + eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ + --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || + as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 + + cd "$ac_popdir" + + for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h linux/elf.h errno.h fcntl.h signal.h sys/file.h malloc.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index 1c61843..5b39acc 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -77,6 +77,8 @@ AC_PROG_MAKE_SET # build it in the same directory, when building in the source dir. ACX_CONFIGURE_DIR(["../gnulib"], ["build-gnulib-gdbserver"]) +ACX_CONFIGURE_DIR(["../../libiberty"], ["build-libiberty-gdbserver"]) + AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl proc_service.h sys/procfs.h linux/elf.h dnl errno.h fcntl.h signal.h sys/file.h malloc.h dnl -- 1.7.11.7