This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: palves at redhat dot com, gdb-patches at sourceware dot org
- Date: Thu, 12 Dec 2013 20:50:50 +0200
- Subject: Re: [RFA] nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing
- Authentication-results: sourceware.org; auth=none
- References: <1386070185-8020-1-git-send-email-brobecker at adacore dot com> <529E361B dot 7070807 at redhat dot com> <20131205105437 dot GE3175 at adacore dot com> <52A073CC dot 3050009 at redhat dot com> <20131209113333 dot GC4011 at adacore dot com> <20131210105624 dot GA14056 at adacore dot com> <52A719F1 dot 6060906 at redhat dot com> <52A71DDC dot 2080908 at redhat dot com> <20131212181843 dot GB3528 at adacore dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Thu, 12 Dec 2013 19:18:43 +0100
> From: Joel Brobecker <brobecker@adacore.com>
> 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.