----------------------------------------------------------------------
| 278 | |
| 279 | //---------------------------------------------------------------------- |
| 280 | void |
| 281 | DebugInformationEnumerator::OnNewLine(IDiaSession& session, |
| 282 | IDiaLineNumber& lineNumber, |
| 283 | IDebugInformationHandler& handler) |
| 284 | { |
| 285 | DWORD linenum = 0; |
| 286 | if (lineNumber.get_lineNumber(&linenum) != S_OK) |
| 287 | THROW("DIA: Cannot get line number"); |
| 288 | |
| 289 | // Skip invalid lines |
| 290 | if (linenum != 0x00f00f00 && linenum != 0x00feefee) |
| 291 | { |
| 292 | ULONGLONG virtualAddress = 0; |
| 293 | if (lineNumber.get_virtualAddress(&virtualAddress) != S_OK) |
| 294 | THROW("DIA: Cannot get virtual address"); |
| 295 | |
| 296 | CComPtr<IDiaSymbol> symbol; |
| 297 | if (session.findSymbolByVA( |
| 298 | virtualAddress, SymTagEnum::SymTagNull, &symbol) != S_OK || |
| 299 | !symbol) |
| 300 | { |
| 301 | THROW("DIA: Cannot find symbol"); |
| 302 | } |
| 303 | |
| 304 | unsigned long symIndex = 0; |
| 305 | if (symbol->get_symIndexId(&symIndex) != S_OK) |
| 306 | THROW("DIA: Cannot get symIndex"); |
| 307 | |
| 308 | lines_.emplace_back(linenum, virtualAddress, symIndex); |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | //---------------------------------------------------------------------- |
| 313 | std::filesystem::path DebugInformationEnumerator::GetSourceFileName( |
nothing calls this directly
no outgoing calls
no test coverage detected