getsentry / pdb

A parser for Microsoft PDB (Program Database) debugging information
https://docs.rs/pdb/
Apache License 2.0
384 stars 69 forks source link

Expose LineProgram line subsections #119

Open mstange opened 2 years ago

mstange commented 2 years ago

At the moment, LineProgram only exposes all line records, or the line records for a certain "line subsection" if you know the line subsection's start offset.

However, I have a case where I do not know the line subsection's start offset, because I'm dealing with a PDB file which has line information but no procedure information (due to /DEBUG:FASTLINK). I would like to enumerate the offsets of all the line subsections.

Can we expose the debug line subsections? We already have an internal iterator type for them but it's not exposed.

mstange commented 2 years ago

I might not need this after all. I can get these start offsets from the section contributions.

jan-auer commented 2 years ago

Going through section contributions is probably harder than necessary for you, eventually we should probably expose all of the C13 section stuff. I'll check if this is a simple change.

Note that the interface has also changed. Since https://github.com/willglynn/pdb/pull/68 you can now look for lines based on any offset within the section through lines_for_symbol.