From: Mark Harmstone <mark@harmstone.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] Add pdb archive target
Date: Mon, 15 Aug 2022 18:06:28 +0100 [thread overview]
Message-ID: <9f1aa9fe-db52-b92c-ae5c-18873f838145@harmstone.com> (raw)
In-Reply-To: <c8a8e73b-c844-5bf9-fbe6-c39a2fafaa2d@suse.com>
On 12/8/22 07:14, Jan Beulich wrote:
> On 12.08.2022 01:26, Mark Harmstone wrote:
>> On 11/8/22 14:02, Jan Beulich wrote:
>> > On 26.07.2022 01:44, Mark Harmstone wrote:
>> >> This adds support for the "Multi-Stream Format" container format that
>> >> MSVC uses for its PDB debugging files, as documented at
>> >> https://llvm.org/docs/PDB/MsfFile.html.
>> >
>> > Looking at binutils/testsuite/binutils-all/pdb*.d I wonder what "support"
>> > here means: What is dumped is the binary contents of the file (claimed
>> > to be coming from section .data) rather than the inner file structure.
>>
>> I'm not quite sure what you're getting at. This is purely for PDB files as
>> archives, there is no inner file structure. The tests check that the hex
>> dump of the files matches one possible way to represent an archive of the
>> dummy files.
>
> If it's an archive (and hence can hold multiple files), then surely it
> has an internal structure. Or else your patch also wouldn't be needed,
> btw. Dumping a *.a file gives you an idea what's in the file. I would
> have expected the same for *.pdb (to a reasonable extent at least).
> One might then easily see number of members, block size, etc. Perhaps
> even the sizes of the individual members.
Right, I see what you mean - so that "objdump -x" gives you something
interesting...
>> > Is there a reason for this 4-or-more digits naming of the file? Would
>> > it make sense to use 8 digits (beyond which the index apparently
>> > cannot grow)?
>>
>> In practice, 4 digits is plenty. The number of files in the archive is
>> proportional to the number of object files linked into the image... for the
>> NT kernel, which is probably the most complicated EXE out there, the PDB
>> has 1,100 files. I can't imagine anybody will ever go over 65,535 - and it's
>> not visible anyway, unless you play around with ar.
>
> Since you know the number of files in the archive, may I suggest that you
> base the number of digits on that number of members, such that all
> elements would be extracted to files with names of identical length?
Yep, good idea.
Thanks for your help Jan - I'll submit another patch incorporating your
suggestions shortly.
Mark
next prev parent reply other threads:[~2022-08-15 17:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 23:44 Mark Harmstone
2022-08-11 13:02 ` Jan Beulich
2022-08-11 23:26 ` Mark Harmstone
2022-08-12 6:14 ` Jan Beulich
2022-08-15 17:06 ` Mark Harmstone [this message]
2022-08-15 19:27 ` NightStrike
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=9f1aa9fe-db52-b92c-ae5c-18873f838145@harmstone.com \
--to=mark@harmstone.com \
--cc=binutils@sourceware.org \
--cc=jbeulich@suse.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).