[Lldb-commits] [PATCH] D56010: [NativePDB] Fix setting breakpoint by file and line
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 21 09:16:51 PST 2018
zturner created this revision.
zturner added reviewers: aleksandr.urakov, lemo, labath, amccarth.
Herald added a subscriber: arphaman.
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.
https://reviews.llvm.org/D56010
Files:
lldb/lit/SymbolFile/NativePDB/Inputs/break-by-function.lldbinit
lldb/lit/SymbolFile/NativePDB/Inputs/break-by-line.lldbinit
lldb/lit/SymbolFile/NativePDB/Inputs/breakpoints.lldbinit
lldb/lit/SymbolFile/NativePDB/break-by-function.cpp
lldb/lit/SymbolFile/NativePDB/break-by-line.cpp
lldb/lit/SymbolFile/NativePDB/simple-breakpoints.cpp
lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.cpp
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56010.179300.patch
Type: text/x-patch
Size: 8781 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181221/e16c89f9/attachment.bin>
More information about the lldb-commits
mailing list