1 //===-- DWARFDebugLine.cpp ------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"
11 #include "llvm/Support/Dwarf.h"
12 #include "llvm/Support/Format.h"
13 #include "llvm/Support/Path.h"
14 #include "llvm/Support/raw_ostream.h"
17 using namespace dwarf;
18 typedef DILineInfoSpecifier::FileLineInfoKind FileLineInfoKind;
20 DWARFDebugLine::Prologue::Prologue() {
24 void DWARFDebugLine::Prologue::clear() {
25 TotalLength = Version = PrologueLength = 0;
26 MinInstLength = MaxOpsPerInst = DefaultIsStmt = LineBase = LineRange = 0;
29 StandardOpcodeLengths.clear();
30 IncludeDirectories.clear();
34 void DWARFDebugLine::Prologue::dump(raw_ostream &OS) const {
35 OS << "Line table prologue:\n"
36 << format(" total_length: 0x%8.8" PRIx64 "\n", TotalLength)
37 << format(" version: %u\n", Version)
38 << format(" prologue_length: 0x%8.8" PRIx64 "\n", PrologueLength)
39 << format(" min_inst_length: %u\n", MinInstLength)
40 << format(Version >= 4 ? "max_ops_per_inst: %u\n" : "", MaxOpsPerInst)
41 << format(" default_is_stmt: %u\n", DefaultIsStmt)
42 << format(" line_base: %i\n", LineBase)
43 << format(" line_range: %u\n", LineRange)
44 << format(" opcode_base: %u\n", OpcodeBase);
46 for (uint32_t i = 0; i < StandardOpcodeLengths.size(); ++i)
47 OS << format("standard_opcode_lengths[%s] = %u\n", LNStandardString(i+1),
48 StandardOpcodeLengths[i]);
50 if (!IncludeDirectories.empty())
51 for (uint32_t i = 0; i < IncludeDirectories.size(); ++i)
52 OS << format("include_directories[%3u] = '", i+1)
53 << IncludeDirectories[i] << "'\n";
55 if (!FileNames.empty()) {
56 OS << " Dir Mod Time File Len File Name\n"
57 << " ---- ---------- ---------- -----------"
59 for (uint32_t i = 0; i < FileNames.size(); ++i) {
60 const FileNameEntry& fileEntry = FileNames[i];
61 OS << format("file_names[%3u] %4" PRIu64 " ", i+1, fileEntry.DirIdx)
62 << format("0x%8.8" PRIx64 " 0x%8.8" PRIx64 " ",
63 fileEntry.ModTime, fileEntry.Length)
64 << fileEntry.Name << '\n';
69 bool DWARFDebugLine::Prologue::parse(DataExtractor debug_line_data,
70 uint32_t *offset_ptr) {
71 const uint64_t prologue_offset = *offset_ptr;
74 TotalLength = debug_line_data.getU32(offset_ptr);
75 if (TotalLength == UINT32_MAX) {
77 TotalLength = debug_line_data.getU64(offset_ptr);
78 } else if (TotalLength > 0xffffff00) {
81 Version = debug_line_data.getU16(offset_ptr);
85 PrologueLength = debug_line_data.getUnsigned(offset_ptr,
86 sizeofPrologueLength());
87 const uint64_t end_prologue_offset = PrologueLength + *offset_ptr;
88 MinInstLength = debug_line_data.getU8(offset_ptr);
90 MaxOpsPerInst = debug_line_data.getU8(offset_ptr);
91 DefaultIsStmt = debug_line_data.getU8(offset_ptr);
92 LineBase = debug_line_data.getU8(offset_ptr);
93 LineRange = debug_line_data.getU8(offset_ptr);
94 OpcodeBase = debug_line_data.getU8(offset_ptr);
96 StandardOpcodeLengths.reserve(OpcodeBase - 1);
97 for (uint32_t i = 1; i < OpcodeBase; ++i) {
98 uint8_t op_len = debug_line_data.getU8(offset_ptr);
99 StandardOpcodeLengths.push_back(op_len);
102 while (*offset_ptr < end_prologue_offset) {
103 const char *s = debug_line_data.getCStr(offset_ptr);
105 IncludeDirectories.push_back(s);
110 while (*offset_ptr < end_prologue_offset) {
111 const char *name = debug_line_data.getCStr(offset_ptr);
112 if (name && name[0]) {
113 FileNameEntry fileEntry;
114 fileEntry.Name = name;
115 fileEntry.DirIdx = debug_line_data.getULEB128(offset_ptr);
116 fileEntry.ModTime = debug_line_data.getULEB128(offset_ptr);
117 fileEntry.Length = debug_line_data.getULEB128(offset_ptr);
118 FileNames.push_back(fileEntry);
124 if (*offset_ptr != end_prologue_offset) {
125 fprintf(stderr, "warning: parsing line table prologue at 0x%8.8" PRIx64
126 " should have ended at 0x%8.8" PRIx64
127 " but it ended at 0x%8.8" PRIx64 "\n",
128 prologue_offset, end_prologue_offset, (uint64_t)*offset_ptr);
134 DWARFDebugLine::Row::Row(bool default_is_stmt) {
135 reset(default_is_stmt);
138 void DWARFDebugLine::Row::postAppend() {
141 EpilogueBegin = false;
144 void DWARFDebugLine::Row::reset(bool default_is_stmt) {
151 IsStmt = default_is_stmt;
155 EpilogueBegin = false;
158 void DWARFDebugLine::Row::dump(raw_ostream &OS) const {
159 OS << format("0x%16.16" PRIx64 " %6u %6u", Address, Line, Column)
160 << format(" %6u %3u %13u ", File, Isa, Discriminator)
161 << (IsStmt ? " is_stmt" : "")
162 << (BasicBlock ? " basic_block" : "")
163 << (PrologueEnd ? " prologue_end" : "")
164 << (EpilogueBegin ? " epilogue_begin" : "")
165 << (EndSequence ? " end_sequence" : "")
169 DWARFDebugLine::Sequence::Sequence() {
173 void DWARFDebugLine::Sequence::reset() {
181 DWARFDebugLine::LineTable::LineTable() {
185 void DWARFDebugLine::LineTable::dump(raw_ostream &OS) const {
190 OS << "Address Line Column File ISA Discriminator Flags\n"
191 << "------------------ ------ ------ ------ --- ------------- "
193 for (const Row &R : Rows) {
199 void DWARFDebugLine::LineTable::clear() {
205 DWARFDebugLine::ParsingState::ParsingState(struct LineTable *LT)
206 : LineTable(LT), RowNumber(0) {
207 resetRowAndSequence();
210 void DWARFDebugLine::ParsingState::resetRowAndSequence() {
211 Row.reset(LineTable->Prologue.DefaultIsStmt);
215 void DWARFDebugLine::ParsingState::appendRowToMatrix(uint32_t offset) {
216 if (Sequence.Empty) {
217 // Record the beginning of instruction sequence.
218 Sequence.Empty = false;
219 Sequence.LowPC = Row.Address;
220 Sequence.FirstRowIndex = RowNumber;
223 LineTable->appendRow(Row);
224 if (Row.EndSequence) {
225 // Record the end of instruction sequence.
226 Sequence.HighPC = Row.Address;
227 Sequence.LastRowIndex = RowNumber;
228 if (Sequence.isValid())
229 LineTable->appendSequence(Sequence);
235 const DWARFDebugLine::LineTable *
236 DWARFDebugLine::getLineTable(uint32_t offset) const {
237 LineTableConstIter pos = LineTableMap.find(offset);
238 if (pos != LineTableMap.end())
243 const DWARFDebugLine::LineTable *
244 DWARFDebugLine::getOrParseLineTable(DataExtractor debug_line_data,
246 std::pair<LineTableIter, bool> pos =
247 LineTableMap.insert(LineTableMapTy::value_type(offset, LineTable()));
248 LineTable *LT = &pos.first->second;
250 if (!LT->parse(debug_line_data, RelocMap, &offset))
256 bool DWARFDebugLine::LineTable::parse(DataExtractor debug_line_data,
257 const RelocAddrMap *RMap,
258 uint32_t *offset_ptr) {
259 const uint32_t debug_line_offset = *offset_ptr;
263 if (!Prologue.parse(debug_line_data, offset_ptr)) {
264 // Restore our offset and return false to indicate failure!
265 *offset_ptr = debug_line_offset;
269 const uint32_t end_offset = debug_line_offset + Prologue.TotalLength +
270 Prologue.sizeofTotalLength();
272 ParsingState State(this);
274 while (*offset_ptr < end_offset) {
275 uint8_t opcode = debug_line_data.getU8(offset_ptr);
278 // Extended Opcodes always start with a zero opcode followed by
279 // a uleb128 length so you can skip ones you don't know about
280 uint32_t ext_offset = *offset_ptr;
281 uint64_t len = debug_line_data.getULEB128(offset_ptr);
282 uint32_t arg_size = len - (*offset_ptr - ext_offset);
284 uint8_t sub_opcode = debug_line_data.getU8(offset_ptr);
285 switch (sub_opcode) {
286 case DW_LNE_end_sequence:
287 // Set the end_sequence register of the state machine to true and
288 // append a row to the matrix using the current values of the
289 // state-machine registers. Then reset the registers to the initial
290 // values specified above. Every statement program sequence must end
291 // with a DW_LNE_end_sequence instruction which creates a row whose
292 // address is that of the byte after the last target machine instruction
294 State.Row.EndSequence = true;
295 State.appendRowToMatrix(*offset_ptr);
296 State.resetRowAndSequence();
299 case DW_LNE_set_address:
300 // Takes a single relocatable address as an operand. The size of the
301 // operand is the size appropriate to hold an address on the target
302 // machine. Set the address register to the value given by the
303 // relocatable address. All of the other statement program opcodes
304 // that affect the address register add a delta to it. This instruction
305 // stores a relocatable value into it instead.
307 // If this address is in our relocation map, apply the relocation.
308 RelocAddrMap::const_iterator AI = RMap->find(*offset_ptr);
309 if (AI != RMap->end()) {
310 const std::pair<uint8_t, int64_t> &R = AI->second;
312 debug_line_data.getAddress(offset_ptr) + R.second;
314 State.Row.Address = debug_line_data.getAddress(offset_ptr);
318 case DW_LNE_define_file:
319 // Takes 4 arguments. The first is a null terminated string containing
320 // a source file name. The second is an unsigned LEB128 number
321 // representing the directory index of the directory in which the file
322 // was found. The third is an unsigned LEB128 number representing the
323 // time of last modification of the file. The fourth is an unsigned
324 // LEB128 number representing the length in bytes of the file. The time
325 // and length fields may contain LEB128(0) if the information is not
328 // The directory index represents an entry in the include_directories
329 // section of the statement program prologue. The index is LEB128(0)
330 // if the file was found in the current directory of the compilation,
331 // LEB128(1) if it was found in the first directory in the
332 // include_directories section, and so on. The directory index is
333 // ignored for file names that represent full path names.
335 // The files are numbered, starting at 1, in the order in which they
336 // appear; the names in the prologue come before names defined by
337 // the DW_LNE_define_file instruction. These numbers are used in the
338 // the file register of the state machine.
340 FileNameEntry fileEntry;
341 fileEntry.Name = debug_line_data.getCStr(offset_ptr);
342 fileEntry.DirIdx = debug_line_data.getULEB128(offset_ptr);
343 fileEntry.ModTime = debug_line_data.getULEB128(offset_ptr);
344 fileEntry.Length = debug_line_data.getULEB128(offset_ptr);
345 Prologue.FileNames.push_back(fileEntry);
349 case DW_LNE_set_discriminator:
350 State.Row.Discriminator = debug_line_data.getULEB128(offset_ptr);
354 // Length doesn't include the zero opcode byte or the length itself, but
355 // it does include the sub_opcode, so we have to adjust for that below
356 (*offset_ptr) += arg_size;
359 } else if (opcode < Prologue.OpcodeBase) {
363 // Takes no arguments. Append a row to the matrix using the
364 // current values of the state-machine registers. Then set
365 // the basic_block register to false.
366 State.appendRowToMatrix(*offset_ptr);
369 case DW_LNS_advance_pc:
370 // Takes a single unsigned LEB128 operand, multiplies it by the
371 // min_inst_length field of the prologue, and adds the
372 // result to the address register of the state machine.
374 debug_line_data.getULEB128(offset_ptr) * Prologue.MinInstLength;
377 case DW_LNS_advance_line:
378 // Takes a single signed LEB128 operand and adds that value to
379 // the line register of the state machine.
380 State.Row.Line += debug_line_data.getSLEB128(offset_ptr);
383 case DW_LNS_set_file:
384 // Takes a single unsigned LEB128 operand and stores it in the file
385 // register of the state machine.
386 State.Row.File = debug_line_data.getULEB128(offset_ptr);
389 case DW_LNS_set_column:
390 // Takes a single unsigned LEB128 operand and stores it in the
391 // column register of the state machine.
392 State.Row.Column = debug_line_data.getULEB128(offset_ptr);
395 case DW_LNS_negate_stmt:
396 // Takes no arguments. Set the is_stmt register of the state
397 // machine to the logical negation of its current value.
398 State.Row.IsStmt = !State.Row.IsStmt;
401 case DW_LNS_set_basic_block:
402 // Takes no arguments. Set the basic_block register of the
403 // state machine to true
404 State.Row.BasicBlock = true;
407 case DW_LNS_const_add_pc:
408 // Takes no arguments. Add to the address register of the state
409 // machine the address increment value corresponding to special
410 // opcode 255. The motivation for DW_LNS_const_add_pc is this:
411 // when the statement program needs to advance the address by a
412 // small amount, it can use a single special opcode, which occupies
413 // a single byte. When it needs to advance the address by up to
414 // twice the range of the last special opcode, it can use
415 // DW_LNS_const_add_pc followed by a special opcode, for a total
416 // of two bytes. Only if it needs to advance the address by more
417 // than twice that range will it need to use both DW_LNS_advance_pc
418 // and a special opcode, requiring three or more bytes.
420 uint8_t adjust_opcode = 255 - Prologue.OpcodeBase;
421 uint64_t addr_offset =
422 (adjust_opcode / Prologue.LineRange) * Prologue.MinInstLength;
423 State.Row.Address += addr_offset;
427 case DW_LNS_fixed_advance_pc:
428 // Takes a single uhalf operand. Add to the address register of
429 // the state machine the value of the (unencoded) operand. This
430 // is the only extended opcode that takes an argument that is not
431 // a variable length number. The motivation for DW_LNS_fixed_advance_pc
432 // is this: existing assemblers cannot emit DW_LNS_advance_pc or
433 // special opcodes because they cannot encode LEB128 numbers or
434 // judge when the computation of a special opcode overflows and
435 // requires the use of DW_LNS_advance_pc. Such assemblers, however,
436 // can use DW_LNS_fixed_advance_pc instead, sacrificing compression.
437 State.Row.Address += debug_line_data.getU16(offset_ptr);
440 case DW_LNS_set_prologue_end:
441 // Takes no arguments. Set the prologue_end register of the
442 // state machine to true
443 State.Row.PrologueEnd = true;
446 case DW_LNS_set_epilogue_begin:
447 // Takes no arguments. Set the basic_block register of the
448 // state machine to true
449 State.Row.EpilogueBegin = true;
453 // Takes a single unsigned LEB128 operand and stores it in the
454 // column register of the state machine.
455 State.Row.Isa = debug_line_data.getULEB128(offset_ptr);
459 // Handle any unknown standard opcodes here. We know the lengths
460 // of such opcodes because they are specified in the prologue
461 // as a multiple of LEB128 operands for each opcode.
463 assert(opcode - 1U < Prologue.StandardOpcodeLengths.size());
464 uint8_t opcode_length = Prologue.StandardOpcodeLengths[opcode - 1];
465 for (uint8_t i = 0; i < opcode_length; ++i)
466 debug_line_data.getULEB128(offset_ptr);
473 // A special opcode value is chosen based on the amount that needs
474 // to be added to the line and address registers. The maximum line
475 // increment for a special opcode is the value of the line_base
476 // field in the header, plus the value of the line_range field,
477 // minus 1 (line base + line range - 1). If the desired line
478 // increment is greater than the maximum line increment, a standard
479 // opcode must be used instead of a special opcode. The "address
480 // advance" is calculated by dividing the desired address increment
481 // by the minimum_instruction_length field from the header. The
482 // special opcode is then calculated using the following formula:
484 // opcode = (desired line increment - line_base) +
485 // (line_range * address advance) + opcode_base
487 // If the resulting opcode is greater than 255, a standard opcode
488 // must be used instead.
490 // To decode a special opcode, subtract the opcode_base from the
491 // opcode itself to give the adjusted opcode. The amount to
492 // increment the address register is the result of the adjusted
493 // opcode divided by the line_range multiplied by the
494 // minimum_instruction_length field from the header. That is:
496 // address increment = (adjusted opcode / line_range) *
497 // minimum_instruction_length
499 // The amount to increment the line register is the line_base plus
500 // the result of the adjusted opcode modulo the line_range. That is:
502 // line increment = line_base + (adjusted opcode % line_range)
504 uint8_t adjust_opcode = opcode - Prologue.OpcodeBase;
505 uint64_t addr_offset =
506 (adjust_opcode / Prologue.LineRange) * Prologue.MinInstLength;
507 int32_t line_offset =
508 Prologue.LineBase + (adjust_opcode % Prologue.LineRange);
509 State.Row.Line += line_offset;
510 State.Row.Address += addr_offset;
511 State.appendRowToMatrix(*offset_ptr);
515 if (!State.Sequence.Empty) {
516 fprintf(stderr, "warning: last sequence in debug line table is not"
520 // Sort all sequences so that address lookup will work faster.
521 if (!Sequences.empty()) {
522 std::sort(Sequences.begin(), Sequences.end(), Sequence::orderByLowPC);
523 // Note: actually, instruction address ranges of sequences should not
524 // overlap (in shared objects and executables). If they do, the address
525 // lookup would still work, though, but result would be ambiguous.
526 // We don't report warning in this case. For example,
527 // sometimes .so compiled from multiple object files contains a few
528 // rudimentary sequences for address ranges [0x0, 0xsomething).
534 uint32_t DWARFDebugLine::LineTable::lookupAddress(uint64_t address) const {
535 uint32_t unknown_index = UINT32_MAX;
536 if (Sequences.empty())
537 return unknown_index;
538 // First, find an instruction sequence containing the given address.
539 DWARFDebugLine::Sequence sequence;
540 sequence.LowPC = address;
541 SequenceIter first_seq = Sequences.begin();
542 SequenceIter last_seq = Sequences.end();
543 SequenceIter seq_pos = std::lower_bound(first_seq, last_seq, sequence,
544 DWARFDebugLine::Sequence::orderByLowPC);
545 DWARFDebugLine::Sequence found_seq;
546 if (seq_pos == last_seq) {
547 found_seq = Sequences.back();
548 } else if (seq_pos->LowPC == address) {
549 found_seq = *seq_pos;
551 if (seq_pos == first_seq)
552 return unknown_index;
553 found_seq = *(seq_pos - 1);
555 if (!found_seq.containsPC(address))
556 return unknown_index;
557 // Search for instruction address in the rows describing the sequence.
558 // Rows are stored in a vector, so we may use arithmetical operations with
560 DWARFDebugLine::Row row;
561 row.Address = address;
562 RowIter first_row = Rows.begin() + found_seq.FirstRowIndex;
563 RowIter last_row = Rows.begin() + found_seq.LastRowIndex;
564 RowIter row_pos = std::lower_bound(first_row, last_row, row,
565 DWARFDebugLine::Row::orderByAddress);
566 if (row_pos == last_row) {
567 return found_seq.LastRowIndex - 1;
569 uint32_t index = found_seq.FirstRowIndex + (row_pos - first_row);
570 if (row_pos->Address > address) {
571 if (row_pos == first_row)
572 return unknown_index;
579 bool DWARFDebugLine::LineTable::lookupAddressRange(
580 uint64_t address, uint64_t size, std::vector<uint32_t> &result) const {
581 if (Sequences.empty())
583 uint64_t end_addr = address + size;
584 // First, find an instruction sequence containing the given address.
585 DWARFDebugLine::Sequence sequence;
586 sequence.LowPC = address;
587 SequenceIter first_seq = Sequences.begin();
588 SequenceIter last_seq = Sequences.end();
589 SequenceIter seq_pos = std::lower_bound(first_seq, last_seq, sequence,
590 DWARFDebugLine::Sequence::orderByLowPC);
591 if (seq_pos == last_seq || seq_pos->LowPC != address) {
592 if (seq_pos == first_seq)
596 if (!seq_pos->containsPC(address))
599 SequenceIter start_pos = seq_pos;
601 // Add the rows from the first sequence to the vector, starting with the
602 // index we just calculated
604 while (seq_pos != last_seq && seq_pos->LowPC < end_addr) {
605 DWARFDebugLine::Sequence cur_seq = *seq_pos;
606 uint32_t first_row_index;
607 uint32_t last_row_index;
608 if (seq_pos == start_pos) {
609 // For the first sequence, we need to find which row in the sequence is the
610 // first in our range. Rows are stored in a vector, so we may use
611 // arithmetical operations with iterators.
612 DWARFDebugLine::Row row;
613 row.Address = address;
614 RowIter first_row = Rows.begin() + cur_seq.FirstRowIndex;
615 RowIter last_row = Rows.begin() + cur_seq.LastRowIndex;
616 RowIter row_pos = std::upper_bound(first_row, last_row, row,
617 DWARFDebugLine::Row::orderByAddress);
618 // The 'row_pos' iterator references the first row that is greater than
619 // our start address. Unless that's the first row, we want to start at
620 // the row before that.
621 first_row_index = cur_seq.FirstRowIndex + (row_pos - first_row);
622 if (row_pos != first_row)
625 first_row_index = cur_seq.FirstRowIndex;
627 // For the last sequence in our range, we need to figure out the last row in
628 // range. For all other sequences we can go to the end of the sequence.
629 if (cur_seq.HighPC > end_addr) {
630 DWARFDebugLine::Row row;
631 row.Address = end_addr;
632 RowIter first_row = Rows.begin() + cur_seq.FirstRowIndex;
633 RowIter last_row = Rows.begin() + cur_seq.LastRowIndex;
634 RowIter row_pos = std::upper_bound(first_row, last_row, row,
635 DWARFDebugLine::Row::orderByAddress);
636 // The 'row_pos' iterator references the first row that is greater than
637 // our end address. The row before that is the last row we want.
638 last_row_index = cur_seq.FirstRowIndex + (row_pos - first_row) - 1;
640 // Contrary to what you might expect, DWARFDebugLine::SequenceLastRowIndex
641 // isn't a valid index within the current sequence. It's that plus one.
642 last_row_index = cur_seq.LastRowIndex - 1;
644 for (uint32_t i = first_row_index; i <= last_row_index; ++i) {
655 DWARFDebugLine::LineTable::getFileNameByIndex(uint64_t FileIndex,
657 FileLineInfoKind Kind,
658 std::string &Result) const {
659 if (FileIndex == 0 || FileIndex > Prologue.FileNames.size() ||
660 Kind == FileLineInfoKind::None)
662 const FileNameEntry &Entry = Prologue.FileNames[FileIndex - 1];
663 const char *FileName = Entry.Name;
664 if (Kind != FileLineInfoKind::AbsoluteFilePath ||
665 sys::path::is_absolute(FileName)) {
670 SmallString<16> FilePath;
671 uint64_t IncludeDirIndex = Entry.DirIdx;
672 const char *IncludeDir = "";
673 // Be defensive about the contents of Entry.
674 if (IncludeDirIndex > 0 &&
675 IncludeDirIndex <= Prologue.IncludeDirectories.size())
676 IncludeDir = Prologue.IncludeDirectories[IncludeDirIndex - 1];
678 // We may still need to append compilation directory of compile unit.
679 // We know that FileName is not absolute, the only way to have an
680 // absolute path at this point would be if IncludeDir is absolute.
681 if (CompDir && Kind == FileLineInfoKind::AbsoluteFilePath &&
682 sys::path::is_relative(IncludeDir))
683 sys::path::append(FilePath, CompDir);
685 // sys::path::append skips empty strings.
686 sys::path::append(FilePath, IncludeDir, FileName);
687 Result = FilePath.str();
692 DWARFDebugLine::LineTable::getFileLineInfoForAddress(uint64_t Address,
694 FileLineInfoKind Kind,
695 DILineInfo &Result) const {
696 // Get the index of row we're looking for in the line table.
697 uint32_t RowIndex = lookupAddress(Address);
700 // Take file number and line/column from the row.
701 const auto &Row = Rows[RowIndex];
702 if (!getFileNameByIndex(Row.File, CompDir, Kind, Result.FileName))
704 Result.Line = Row.Line;
705 Result.Column = Row.Column;