accuya/google-breakpad

windows/dump_syms failing with debug .pdbs

Closed this issue · 2 comments

This issue was introduced in the discussion group:
http://groups.google.com/group/airbag-discuss/browse_thread/thread/8ea9968fb3cb2
d90/7d7eabf05b96da6c#7d7eabf05b96da6c

This was verified using the VS .net 2003.
Procedure:
1. Compile a project using the default debug configuration with .pdb
generation.
2. run dump_syms on the created .pdb

outcome:
dump_syms fails. This is a part of the output I get from running
dump_syms.exe dump_syms.pdb:

[...]
FILE 3878 f:\vs70builds\3077\vc\mfcatl\ship\atlmfc\include\atlexcept.h
FILE 3759 f:\vs70builds\3077\vc\mfcatl\ship\atlmfc\include\atltrace.h
FILE 3189 f:\vs70builds\3077\vc\mfcatl\ship\atlmfc\include\atlbase.h
failed to enumerate symbols
[...] 

 tried all .pdb generation option I could find and they all failed.
The symbols are simply not defined in the .pdb. Again, this same code
works perfectly well on .pdb generated in release mode.
pdb_source_line_writer.cc is failing at line 229:

[...]
bool PDBSourceLineWriter::PrintFunctions() {
  CComPtr<IDiaEnumSymbolsByAddr> symbols;
  if (FAILED(session_->getSymbolsByAddr(&symbols))) {
    fprintf(stderr, "failed to get symbol enumerator\n");
    return false;
  }

  CComPtr<IDiaSymbol> symbol;
>  if (FAILED(symbols->symbolByAddr(1, 0, &symbol))) {

    fprintf(stderr, "failed to enumerate symbols\n");
    return false;
  }

  DWORD rva_last = 0;
  if (FAILED(symbol->get_relativeVirtualAddress(&rva_last))) {
    fprintf(stderr, "failed to get symbol rva\n");
    return false;
  }
[...]

I looked into the microsoft DIA documentation and I see nothing wrong
with this code. Actually, even the dia2dump sample
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dias...
or "Microsoft Visual Studio .NET 2003\Visual Studio SDKs\DIA
SDK\Sample") will fail to enumerate symbols on the same .pdb file. 

Original issue reported on code.google.com by login_...@yahoo.com on 22 Jan 2007 at 8:57

Is this still a problem?  If dia2dump can't handle your pdb either, I'm not 
sure what
we can do.  You might want to report it to Microsoft as a bug, but if it doesn't
occur in their latest compiler, you might be out of luck.

Original comment by mmento...@gmail.com on 28 Sep 2007 at 6:34

  • Added labels: OpSys-Windows, Component-Tool-SymConverter
Closing since it appears to not be a problem any more.  Please reopen if it's 
still a
blocker.

Original comment by neal...@gmail.com on 22 Feb 2009 at 7:45

  • Changed state: WontFix