From: Simon Marchi <simon.marchi@polymtl.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: simon.marchi@ericsson.com, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 3/4] Add DWARF index cache
Date: Mon, 30 Jul 2018 15:33:00 -0000 [thread overview]
Message-ID: <329544a9d729cbf659887269a4ba4a06@polymtl.ca> (raw)
In-Reply-To: <83sh44qslw.fsf@gnu.org>
On 2018-07-27 17:24, Eli Zaretskii wrote:
> If we think this details is likely to change, or have other good
> reasons not divulge this, I'm okay with keeping silent about it. But
> if chances are this will stay forever (or thereabouts), I think the
> details is important enough to tell the users.
If you see a realistic use case where this information would be useful
to users, I am fine with including it. But I can't really think of any,
and mentioning it would more or less paint us into a corner should we
need to change it. Cache files are meant to be written and read by GDB,
not to be interoperable with other programs.
>> >> + /* If we get EEXIST and the existing path is a directory, then
>> >> we're
>> >> + happy. If it exists, but it's a regular file and this is
>> >> not the last
>> >> + component, we'll fail at the next component. If this is the
>> >> last
>> >> + component, the caller will fail with ENOTDIR when trying to
>> >> + open/create a file under that path. */
>> >> + if (mkdir (start, 0700) != 0)
>> >
>> > This will not work on Windows.
>>
>> Which part of it?
>
> mkdir accepts only one argument, not 2.
It builds fine with x86_64-w64-mingw32-g++ on Linux here. It looks like
gnulib offers a compatibility fix, so I guess it's ok:
https://www.gnu.org/software/gnulib/manual/html_node/mkdir.html
Did you see an actual failure?
>> > Does this mean this feature will only work on systems with mmap?
>>
>> Indeed. There is an equivalent API for Windows though I think:
>>
>> https://docs.microsoft.com/en-us/windows/desktop/Memory/file-mapping
>>
>> I can't really do the Windows bits, because I just don't have the
>> competence to write software for Windows. Every time I tried to build
>> GDB for Windows, I failed miserably (do we have a guide for that?).
>> So
>> my thought (including for the mkdir_recursive function) was that
>> somebody who used Windows could later implement the missing parts.
>
> Fair enough.
>
>> Also, I guess that somebody debugging native executables on Windows
>> wouldn't have a use for the cache, because indices only work for DWARF
>> debug info.
>
> MinGW uses DWARF debug info for quite a few years now, so caching will
> definitely be useful.
Ah, I didn't know that, thanks. So it produces DWARF embedded in the PE
executable? Then yes, it would be useful.
Thanks,
Simon
next prev parent reply other threads:[~2018-07-30 15:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-25 22:47 [PATCH v2 0/4] Add a " Simon Marchi
2018-07-25 22:47 ` [PATCH v2 4/4] Add doc and news for " Simon Marchi
2018-07-27 8:50 ` Eli Zaretskii
2018-07-30 19:04 ` Simon Marchi
2018-07-30 19:23 ` Eli Zaretskii
2018-07-25 22:47 ` [PATCH v2 2/4] Introduce mmap_file function Simon Marchi
2018-07-25 22:48 ` [PATCH v2 1/4] Make index reading functions more modular Simon Marchi
2018-07-25 22:48 ` [PATCH v2 3/4] Add DWARF index cache Simon Marchi
2018-07-27 9:06 ` Eli Zaretskii
2018-07-27 14:01 ` Simon Marchi
2018-07-27 21:25 ` Eli Zaretskii
2018-07-30 15:33 ` Simon Marchi [this message]
2018-07-30 15:45 ` Simon Marchi
2018-07-30 15:57 ` Eli Zaretskii
2018-07-30 17:05 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=329544a9d729cbf659887269a4ba4a06@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox