Skip to content

Summary in crate docs/README doesn't mention Microsoft or symbol servers #11

@luser

Description

@luser

It's a bit odd to me that the docs here mention Breakpad but not Microsoft or symbol servers. Breakpad may have invented the terms "debug id" and "code id", but the reason they exist in the Breakpad codebase are for interop with Microsoft symbol servers.

I tried to find whether Microsoft had terminology for these fields but they don't, as far as I can tell. The APIs they provide in DbgHelp / symsrv for interfacing with symbol servers are fairly opaque, and they don't actually document the structure of symbol paths as stored on symbol servers. For example, the SymFindFileInPath function, which takes information about a PE file and a symbol search path and returns a symbol file path takes three vaguely-named parameters: id, two, three. In the Remarks section the docs say:

The identifying parameters are filled in as follows:

  • If DbgHelp is looking for a .pdb file, the id parameter specifies the PDB signature as found in the codeview debug directory of the original image. Parameter two specifies the PDB age. Parameter three is unused and set to zero.
  • If DbgHelp is looking for any other type of image, such as an executable file or .dbg file, the id parameter specifies the TimeDateStamp of the original image as found in its PE header. Parameter two specifies the SizeOfImage field, also extracted from the PE header. Parameter three is unused and set to zero.

Similarly, the SymSrvGetFileIndexes function, which takes a PE file as input and returns the information that allows one to fetch the matching debug symbols, returns a GUID and two vague DWORDs, Val1 and Val2.

Just for completeness' sake, there's also a SYMSRV_INDEX_INFO struct that contains the full set of info that can be used for locating all the various types of debug symbols, and the SymSrvGetFileIndexString function, which can generate the relative path to a debug file in a symbol store, but merely refers to it as the "index string".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions