aboutsummaryrefslogtreecommitdiff
path: root/src/tools/windows/dump_syms/pdb_source_line_writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/windows/dump_syms/pdb_source_line_writer.cc')
-rw-r--r--src/tools/windows/dump_syms/pdb_source_line_writer.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/windows/dump_syms/pdb_source_line_writer.cc b/src/tools/windows/dump_syms/pdb_source_line_writer.cc
index 61c22514..0d1f96ea 100644
--- a/src/tools/windows/dump_syms/pdb_source_line_writer.cc
+++ b/src/tools/windows/dump_syms/pdb_source_line_writer.cc
@@ -65,6 +65,12 @@ bool PDBSourceLineWriter::PrintLines(IDiaEnumLineNumbers *lines) {
return false;
}
+ DWORD length;
+ if (FAILED(line->get_length(&length))) {
+ fprintf(stderr, "failed to get line code length\n");
+ return false;
+ }
+
DWORD source_id;
if (FAILED(line->get_sourceFileId(&source_id))) {
fprintf(stderr, "failed to get line source file id\n");
@@ -77,7 +83,7 @@ bool PDBSourceLineWriter::PrintLines(IDiaEnumLineNumbers *lines) {
return false;
}
- fprintf(output_, "%x %d %d\n", rva, line_num, source_id);
+ fprintf(output_, "%x %x %d %d\n", rva, length, line_num, source_id);
line.Release();
}
return true;
@@ -113,7 +119,7 @@ bool PDBSourceLineWriter::PrintFunction(IDiaSymbol *function) {
return false;
}
- fwprintf(output_, L"FUNC %x %s\n", rva, name);
+ fwprintf(output_, L"FUNC %x %llx %s\n", rva, length, name);
if (!PrintLines(lines)) {
return false;
}