| Issue |
57300
|
| Summary |
PDB: `getAge()` is not consistent across different streams/sources
|
| Labels |
|
| Assignees |
|
| Reporter |
florian-kuebler
|
TLDR: `NativeSession::getGlobalScope()->getAge()` and `InfoStream::getAge()` differs from `DbiStream::getAge()`, while the one from `DbiStream` seam to be correct.
Consider the following code:
```
llvm::pdb::NativeSession* native_session = ...;
llvm::pdb::PDBFile& pdb_file = native_session->getPDBFile();
llvm::Expected<llvm::pdb::DbiStream&> debug_info_stream = pdb_file.getPDBDbiStream();
CHECK(debug_info_stream);
llvm::Expected<llvm::pdb::InfoStream&> info_stream = pdb_file.getPDBInfoStream();
CHECK(info_stream);
uint32_t is_age = info_stream->getAge();
uint32_t dbi_age = debug_info_stream->getAge();
uint32_t global_scope_age = session_->getGlobalScope()->getAge();
CHECK(is_age == dbi_age); // fails
CHECK(is_age == global_scope_age); // succeeds
CHECK(dbi_age == global_scope_age); // fails
```
As an example I used the following one:
PDB: `ntdll.pdb`
GUID: `168bc37b40ebc0d8152621ee552a7823`
Actual Age (checked with DIA SDK, and dumpbin): `1`
is_age: `3`
dbi_age: `1`
global_scope_age: `3`
I used the pdb file downloaded by Visual Studio, but it should be also possible to use the Microsoft Symbol Store:
https://msdl.microsoft.com/download/symbols/ntdll.pdb/168BC37B40EBC0D8152621EE552A78231/ntdll.pdb
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs