There were several problems preventing this from working. The first is that when the PDB had an absolute path to the main source file, we would construct an invalid path by prepending the compilation directory to it anyway. So we needed to check if the path is already absolute first. Second, LLDB assumes that the zero'th item in the support file list is the main compilation unit. We were respecting this requirement, but LLDB *also* requires that file to appear somewhere in the list starting from index 1 as well. So the main compilation file should appear in the support file list twice. And when parsing a line table, it expects the LineEntry records to be constructed using the 1-based index. With these two fixes we can now set breakpoints by file and line using the native PDB reader.
Details
Details
- Reviewers
aleksandr.urakov lemo labath amccarth
Diff Detail
Diff Detail
Event Timeline
lldb/lit/SymbolFile/NativePDB/break-by-line.cpp | ||
---|---|---|
9–10 | You could consider using break-by-source-regex (-p) to avoid this. The regex should be transformed into a line number long before it reaches the pdb plugin. |
Comment Actions
It looks like the code changes landed (probably as part of another patch) but not the tests. I'll look and see if the tests should to be revived.
Comment Actions
I can't see that any of these tests test breakpoint setting features that aren't tested in a bunch of places in the Python testsuite, and except for the building part, none of them look PDB specific. Do we not know how to build & run PDB executables in the dotest testsuite?
Comment Actions
It turns out these tests all seem to exist, so I guess Zachary submitted them as part of other CLs.
You could consider using break-by-source-regex (-p) to avoid this. The regex should be transformed into a line number long before it reaches the pdb plugin.