Browse Source

Directory index zero means '.' (compilation directory)

master
A.Olokhtonov 3 years ago
parent
commit
a516ff2f62
  1. 7
      dwarf.c

7
dwarf.c

@ -377,7 +377,12 @@ is followed by a single null byte." */ @@ -377,7 +377,12 @@ is followed by a single null byte." */
offset += decode_leb128(p, &dummy);
if (dest_files) {
dest_files[nfiles].dir = dest_directories[dir_index - 1];
if (dir_index) {
dest_files[nfiles].dir = dest_directories[dir_index - 1];
} else {
/* The current directory of the compilation is understood to be the zeroth entry and is not explicitly represented. */
dest_files[nfiles].dir = ".";
}
}
++nfiles;

Loading…
Cancel
Save