We had the pdb2yaml and raw options which each dumped pdb in a different way. But many of the options were effectively the same, but spelled differently. For example, we had:
pdb2yaml | raw --------------------------------------- -dbi-module-syms | -module-syms -dbi-module-info | -modules -dbi-module-source-info | -module-files -dbi-module-lines | -line-info
Furthermore, they didn't appear in the same categories in their respective subcommands, had different help text, stored the results in different variables, etc. So this patch aims to fix all of that by having one set of variables that are shared among subcommands.
At the same time, we need to improve the granularity by which we can dump module subsections. Previously, line-info and dbi-module-lines really means "dump all the subsections of each module's debug stream". But some of those subsections are actually not about lines at all. There's Frame Data, Checksums, even symbols can show up. What we'd really like is a way to specify exactly which subsections are dumped. So the -line-info is changed to an enum value that looks like this:
-subsections - dump subsections from each module's debug stream =cme - Cross module exports (DEBUG_S_CROSSSCOPEEXPORTS subsection) =cmi - Cross module imports (DEBUG_S_CROSSSCOPEIMPORTS subsection) =fc - File checksums (DEBUG_S_CHECKSUMS subsection) =ilines - Inlinee lines (DEBUG_S_INLINEELINES subsection) =lines - Lines (DEBUG_S_LINES subsection) =all - All known subsections
and you can specify one or more of these values separated by commas. This makes it easy to add support for other subsections in future patches. Another benefit is that it allows us to consolidate some of the tests. I was able to convert 3 different tests which did mostly the same thing but with different subsections into a single test which tests all subsections at once.