#
132d7a13 |
| 20-Mar-2018 |
Zachary Turner <zturner@google.com> |
Resubmit "Support embedding natvis files in PDBs."
The issue causing this to fail in certain configurations should be fixed.
It was due to the fact that DIA apparently expects there to be a null st
Resubmit "Support embedding natvis files in PDBs."
The issue causing this to fail in certain configurations should be fixed.
It was due to the fact that DIA apparently expects there to be a null string at ID 1 in the string table. I'm not sure why this is important but it seems to make a difference, so set it.
llvm-svn: 328002
show more ...
|
#
a2155889 |
| 19-Mar-2018 |
Zachary Turner <zturner@google.com> |
Revert "Support embedding natvis files in PDBs."
This is causing a test failure on a certain bot, so I'm removing this temporarily until we can figure out the source of the error.
llvm-svn: 327903
|
#
de53aaf1 |
| 19-Mar-2018 |
Zachary Turner <zturner@google.com> |
Support embedding natvis files in PDBs.
Natvis is a debug language supported by Visual Studio for specifying custom visualizers. The /NATVIS option is an undocumented link.exe flag which will take
Support embedding natvis files in PDBs.
Natvis is a debug language supported by Visual Studio for specifying custom visualizers. The /NATVIS option is an undocumented link.exe flag which will take a .natvis file and "inject" it into the PDB. This way, you can ship the debug visualizers for a program along with the PDB, which is very useful for postmortem debugging.
This is implemented by adding a new "named stream" to the PDB with a special name of /src/files/<natvis file name> and simply copying the contents of the xml into this file.
Additionally, we need to emit a single stream named /src/headerblock which contains a hash table of embedded files to records describing them.
This patch adds this functionality, including the /NATVIS option to lld-link.
Differential Revision: https://reviews.llvm.org/D44328
llvm-svn: 327895
show more ...
|
Revision tags: llvmorg-5.0.2-rc1, llvmorg-6.0.0 |
|
#
c6a75a69 |
| 01-Mar-2018 |
Zachary Turner <zturner@google.com> |
[PDB] Defer writing the build id until the rest of the PDB is written.
For now this is NFC, but this small refactor opens the door to letting us embed a hash of the PDB in the build id field of the
[PDB] Defer writing the build id until the rest of the PDB is written.
For now this is NFC, but this small refactor opens the door to letting us embed a hash of the PDB in the build id field of the PDB.
Differential Revision: https://reviews.llvm.org/D43913
llvm-svn: 326453
show more ...
|
Revision tags: llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2 |
|
#
e0df357d |
| 08-Nov-2017 |
Rafael Espindola <rafael.espindola@gmail.com> |
Convert FileOutputBuffer to Expected. NFC.
llvm-svn: 317649
|
Revision tags: llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2 |
|
#
946204c8 |
| 09-Aug-2017 |
Zachary Turner <zturner@google.com> |
[PDB] Merge Global and Publics Builders.
The publics stream and globals stream are very similar. They both contain a list of hash buckets that refer into a single shared stream, the symbol record st
[PDB] Merge Global and Publics Builders.
The publics stream and globals stream are very similar. They both contain a list of hash buckets that refer into a single shared stream, the symbol record stream. Because of the need for each builder to manage both an independent hash stream as well as a single shared record stream, making the two builders be independent entities is not the right design. This patch merges them into a single class, of which only a single instance is needed to create all 3 streams. PublicsStreamBuilder and GlobalsStreamBuilder are now merged into the single GSIStreamBuilder class, which writes all 3 streams at once.
Note that this patch does not contain any functionality change. So we're still not yet writing any records to the globals stream. All we're doing is making it so that when we do start writing records to the globals, this refactor won't have to be part of that patch.
Differential Revision: https://reviews.llvm.org/D36489
llvm-svn: 310438
show more ...
|
#
9fb9d71d |
| 02-Aug-2017 |
Zachary Turner <zturner@google.com> |
[pdb/lld] Write a valid FPM.
The PDB reserves certain blocks for the FPM that describe which blocks in the file are allocated and which are free. We weren't filling that out at all, and in some cas
[pdb/lld] Write a valid FPM.
The PDB reserves certain blocks for the FPM that describe which blocks in the file are allocated and which are free. We weren't filling that out at all, and in some cases we were even stomping it with incorrect data. This patch writes a correct FPM.
Differential Revision: https://reviews.llvm.org/D36235
llvm-svn: 309896
show more ...
|
#
8d927b6b |
| 31-Jul-2017 |
Zachary Turner <zturner@google.com> |
[lld/pdb] Add an empty globals stream.
We don't write any actual symbols to this stream yet, but for now we just create the stream and hook it up to the appropriate places and give it a valid header
[lld/pdb] Add an empty globals stream.
We don't write any actual symbols to this stream yet, but for now we just create the stream and hook it up to the appropriate places and give it a valid header.
Differential Revision: https://reviews.llvm.org/D35290
llvm-svn: 309608
show more ...
|
#
eacdf04f |
| 27-Jul-2017 |
Reid Kleckner <rnk@google.com> |
[PDB] Write public symbol records and the publics hash table
Summary: MSVC link.exe records all external symbol names in the publics stream. It provides similar functionality to an ELF .symtab.
Rev
[PDB] Write public symbol records and the publics hash table
Summary: MSVC link.exe records all external symbol names in the publics stream. It provides similar functionality to an ELF .symtab.
Reviewers: zturner, ruiu
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D35871
llvm-svn: 309303
show more ...
|
Revision tags: llvmorg-5.0.0-rc1 |
|
#
7eaf1d96 |
| 10-Jul-2017 |
Zachary Turner <zturner@google.com> |
[lld/pdb] Create an empty public symbol record stream.
This is part of the continuing effort to increase parity between LLD and MSVC PDBs. link still doesn't like our PDBs, so the most obvious thin
[lld/pdb] Create an empty public symbol record stream.
This is part of the continuing effort to increase parity between LLD and MSVC PDBs. link still doesn't like our PDBs, so the most obvious thing to check was whether adding an empty publics stream would get it to do something else. It still fails in the same way but at least this removes one more variable from the equation. The next logical step would be to try creating an empty globals stream.
Differential Revision: https://reviews.llvm.org/D35224
llvm-svn: 307598
show more ...
|
#
3a11fdf8 |
| 07-Jul-2017 |
Zachary Turner <zturner@google.com> |
[PDB] More changes to bring lld PDBs to parity with MSVC.
1) Don't write a /src/headerblock stream. This appears to be written conditionally by MSVC, but it's not clear what the condition is.
[PDB] More changes to bring lld PDBs to parity with MSVC.
1) Don't write a /src/headerblock stream. This appears to be written conditionally by MSVC, but it's not clear what the condition is. For now, just remove it since we dont' know what it is anyway and the particular pdb we've checked in for the test doesn't have one. 2) Write a valid timestamp for the PDB file signature. This leads to non-reproducible builds, but it matches the default behavior of link, so it should be out default as well. If we need reproducibility, we should add a separate command line option for it that is off by default. 3) Write an empty FPO stream. MSVC seems to always write an FPO stream. This change makes the stream directory match up, although we still need to make the contents of the FPO stream match.
llvm-svn: 307436
show more ...
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
#
68ea80d0 |
| 12-Jun-2017 |
Zachary Turner <zturner@google.com> |
Slightly better fix for dealing with no-id-stream PDBs.
The last fix required the user to manually add the required feature. This caused an LLD test to fail because I failed to update LLD. In prac
Slightly better fix for dealing with no-id-stream PDBs.
The last fix required the user to manually add the required feature. This caused an LLD test to fail because I failed to update LLD. In practice we can hide this logic so it can just be transparently added when we write the PDB.
llvm-svn: 305236
show more ...
|
#
5b74ff33 |
| 03-Jun-2017 |
Zachary Turner <zturner@google.com> |
[PDB] Fix use after free.
Previously MappedBlockStream owned its own BumpPtrAllocator that it would allocate from when a read crossed a block boundary. This way it could still return the user a con
[PDB] Fix use after free.
Previously MappedBlockStream owned its own BumpPtrAllocator that it would allocate from when a read crossed a block boundary. This way it could still return the user a contiguous buffer of the requested size. However, It's not uncommon to open a stream, read some stuff, close it, and then save the information for later. After all, since the entire file is mapped into memory, the data should always be available as long as the file is open.
Of course, the exception to this is when the data isn't *in* the file, but rather in some buffer that we temporarily allocated to present this contiguous view. And this buffer would get destroyed as soon as the strema was closed.
The fix here is to force the user to specify the allocator, this way it can provide an allocator that has whatever lifetime it chooses.
Differential Revision: https://reviews.llvm.org/D33858
llvm-svn: 304623
show more ...
|
Revision tags: llvmorg-4.0.1-rc2 |
|
#
de33a637 |
| 17-May-2017 |
Bob Haarman <llvm@inglorion.net> |
[llvm-pdbdump] in yaml2pdb, generate default output filename if none given
Summary: llvm-pdbdump yaml2pdb used to fail with a misleading error message ("An I/O error occurred on the file system") if
[llvm-pdbdump] in yaml2pdb, generate default output filename if none given
Summary: llvm-pdbdump yaml2pdb used to fail with a misleading error message ("An I/O error occurred on the file system") if no output file was specified. This change adds an assert to PDBFileBuilder to check that an output file name is specified, and makes llvm-pdbdump generate an output file name based on the input file name if no output file name is explicitly specified.
Reviewers: amccarth, zturner
Reviewed By: zturner
Subscribers: fhahn, llvm-commits
Differential Revision: https://reviews.llvm.org/D33296
llvm-svn: 303299
show more ...
|
#
c504ae3c |
| 03-May-2017 |
Zachary Turner <zturner@google.com> |
Resubmit r301986 and r301987 "Add codeview::StringTable"
This was reverted due to a "missing" file, but in reality what happened was that I renamed a file, and then due to a merge conflict both the
Resubmit r301986 and r301987 "Add codeview::StringTable"
This was reverted due to a "missing" file, but in reality what happened was that I renamed a file, and then due to a merge conflict both the old file and the new file got added to the repository. This led to an unused cpp file being in the repo and not referenced by any CMakeLists.txt but #including a .h file that wasn't in the repo. In an even more unfortunate coincidence, CMake didn't report the unused cpp file because it was in a subdirectory of the folder with the CMakeLists.txt, and not in the same directory as any CMakeLists.txt.
The presence of the unused file was then breaking certain tools that determine file lists by globbing rather than by what's specified in CMakeLists.txt
In any case, the fix is to just remove the unused file from the patch set.
llvm-svn: 302042
show more ...
|
#
dff096f2 |
| 03-May-2017 |
Daniel Jasper <djasper@google.com> |
Revert r301986 (and subsequent r301987).
The patch is failing to add StringTableStreamBuilder.h, but that isn't even discovered because the corresponding StringTableStreamBuilder.cpp isn't added to
Revert r301986 (and subsequent r301987).
The patch is failing to add StringTableStreamBuilder.h, but that isn't even discovered because the corresponding StringTableStreamBuilder.cpp isn't added to any CMakeLists.txt file and thus never built. I think this patch is just incomplete.
llvm-svn: 302002
show more ...
|
#
7dba20bd |
| 02-May-2017 |
Zachary Turner <zturner@google.com> |
Make codeview::StringTable.
Previously we had knowledge of how to serialize and deserialize a string table inside of DebugInfo/PDB, but the string table that it serializes contains a piece that is a
Make codeview::StringTable.
Previously we had knowledge of how to serialize and deserialize a string table inside of DebugInfo/PDB, but the string table that it serializes contains a piece that is actually considered CodeView and can appear outside of a PDB. We already have logic in llvm-readobj and MCCodeView to read and write this format, so it doesn't make sense to duplicate the logic in DebugInfoPDB as well.
This patch makes codeview::StringTable (for writing) and codeview::StringTableRef (for reading), updates DebugInfoPDB to use these classes for its own writing, and updates llvm-readobj to additionally use StringTableRef for reading.
It's a bit more difficult to get MCCodeView to use this for writing, but it's a logical next step.
llvm-svn: 301986
show more ...
|
#
e204a6c9 |
| 02-May-2017 |
Zachary Turner <zturner@google.com> |
Rename pdb::StringTable -> pdb::PDBStringTable.
With the forthcoming codeview::StringTable which a pdb::StringTable would hold an instance of as one member, this ambiguity becomes confusing. Rename
Rename pdb::StringTable -> pdb::PDBStringTable.
With the forthcoming codeview::StringTable which a pdb::StringTable would hold an instance of as one member, this ambiguity becomes confusing. Rename to PDBStringTable to avoid this.
llvm-svn: 301948
show more ...
|
Revision tags: llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4 |
|
#
d9dc2829 |
| 02-Mar-2017 |
Zachary Turner <zturner@google.com> |
[Support] Move Stream library from MSF -> Support.
After several smaller patches to get most of the core improvements finished up, this patch is a straight move and header fixup of the source.
Diff
[Support] Move Stream library from MSF -> Support.
After several smaller patches to get most of the core improvements finished up, this patch is a straight move and header fixup of the source.
Differential Revision: https://reviews.llvm.org/D30266
llvm-svn: 296810
show more ...
|
Revision tags: llvmorg-4.0.0-rc3 |
|
#
695ed56b |
| 28-Feb-2017 |
Zachary Turner <zturner@google.com> |
[PDB] Make streams carry their own endianness.
Before the endianness was specified on each call to read or write of the StreamReader / StreamWriter, but in practice it's extremely rare for streams t
[PDB] Make streams carry their own endianness.
Before the endianness was specified on each call to read or write of the StreamReader / StreamWriter, but in practice it's extremely rare for streams to have data encoded in multiple different endiannesses, so we should optimize for the 99% use case.
This makes the code cleaner and more general, but otherwise has NFC.
llvm-svn: 296415
show more ...
|
#
120faca4 |
| 27-Feb-2017 |
Zachary Turner <zturner@google.com> |
[PDB] Partial resubmit of r296215, which improved PDB Stream Library.
This was reverted because it was breaking some builds, and because of incorrect error code usage. Since the CL was large and co
[PDB] Partial resubmit of r296215, which improved PDB Stream Library.
This was reverted because it was breaking some builds, and because of incorrect error code usage. Since the CL was large and contained many different things, I'm resubmitting it in pieces.
This portion is NFC, and consists of:
1) Renaming classes to follow a consistent naming convention. 2) Fixing the const-ness of the interface methods. 3) Adding detailed doxygen comments. 4) Fixing a few instances of passing `const BinaryStream& X`. These are now passed as `BinaryStreamRef X`.
llvm-svn: 296394
show more ...
|
#
05a75e40 |
| 25-Feb-2017 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r296215, "[PDB] General improvements to Stream library." and followings.
r296215, "[PDB] General improvements to Stream library." r296217, "Disable BinaryStreamTest.StreamReaderObject tempora
Revert r296215, "[PDB] General improvements to Stream library." and followings.
r296215, "[PDB] General improvements to Stream library." r296217, "Disable BinaryStreamTest.StreamReaderObject temporarily." r296220, "Re-enable BinaryStreamTest.StreamReaderObject." r296244, "[PDB] Disable some tests that are breaking bots." r296249, "Add static_cast to silence -Wc++11-narrowing."
std::errc::no_buffer_space should be used for OS-oriented errors for socket transmission. (Seek discussions around llvm/xray.)
I could substitute s/no_buffer_space/others/g, but I revert whole them ATM.
Could we define and use LLVM errors there?
llvm-svn: 296258
show more ...
|
#
af299ea5 |
| 25-Feb-2017 |
Zachary Turner <zturner@google.com> |
[PDB] General improvements to Stream library.
This adds various new functionality and cleanup surrounding the use of the Stream library. Major changes include:
* Renaming of all classes for more c
[PDB] General improvements to Stream library.
This adds various new functionality and cleanup surrounding the use of the Stream library. Major changes include:
* Renaming of all classes for more consistency / meaningfulness * Addition of some new methods for reading multiple values at once. * Full suite of unit tests for reader / writer functionality. * Full set of doxygen comments for all classes. * Streams now store their own endianness. * Fixed some bugs in a few of the classes that were discovered by the unit tests.
llvm-svn: 296215
show more ...
|
#
d2684b79 |
| 25-Feb-2017 |
Zachary Turner <zturner@google.com> |
[PDB] Rename Stream related source files.
This is part of a larger effort to get the Stream code moved up to Support. I don't want to do it in one large patch, in part because the changes are so bi
[PDB] Rename Stream related source files.
This is part of a larger effort to get the Stream code moved up to Support. I don't want to do it in one large patch, in part because the changes are so big that it will treat everything as file deletions and add, losing history in the process. Aside from that though, it's just a good idea in general to make small changes.
So this change only changes the names of the Stream related source files, and applies necessary source fix ups.
llvm-svn: 296211
show more ...
|
#
181fe17b |
| 18-Feb-2017 |
Zachary Turner <zturner@google.com> |
Don't assume little endian in StreamReader / StreamWriter.
In an effort to generalize this so it can be used by more than just PDB code, we shouldn't assume little endian.
llvm-svn: 295525
|