From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7810 invoked by alias); 12 Dec 2013 18:51:01 -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 7798 invoked by uid 89); 12 Dec 2013 18:51:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout20.012.net.il Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Dec 2013 18:50:57 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MXP00100IWBKJ00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Thu, 12 Dec 2013 20:50:49 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MXP001OGJ0P92B0@a-mtaout20.012.net.il>; Thu, 12 Dec 2013 20:50:49 +0200 (IST) Date: Thu, 12 Dec 2013 18:51:00 -0000 From: Eli Zaretskii Subject: Re: [RFA] nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing In-reply-to: <20131212181843.GB3528@adacore.com> To: Joel Brobecker Cc: palves@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83y53p6gz9.fsf@gnu.org> 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> X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00509.txt.bz2 > Date: Thu, 12 Dec 2013 19:18:43 +0100 > From: Joel Brobecker > Cc: gdb-patches@sourceware.org > > On top of that patch, I was able to implement the same post-init > trick of looking for ntdll.dll, but not without a couple of surprises: > we don't have FILENAME_CMP nor a "basename" function in gdbserver > at the moment. I worked around the first issue by using strcasecmp, > which is good enough for our purposes. But for the second issue, > I only had a handful of bad options for our current situation: > 1. Import the module from gnulib; but that's never an innocent > change, and also the documentation says that it does not work > for Windows paths; > 2. Import the libiberty module by hand, which itself depends on > their safe-ctype.h module. > 3. Write a quick ad hoc function that implements basename. > > (1) is a non-starter, and I didn't like either of (2) or (3). > In the end, I went for (2) as the quickest option towards testing > the change and sending an RFC patch. Should we go with this approach, > we'll probably want to add the libiberty dependencies through > configure.srv instead of inside OBS. That addition should be > temporary, as the minute we stop looking specifically for ntdll, > and load all mapped dlls through that loop, we'll stop needing > lbasename, and will be able to remove the dependency. I don't understand why you didn't like (2), I think that's the obvious choice here.