mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
gprofng: fix the Dwarf reader
gprofng/ChangeLog 2023-03-10 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> gprofng/src/DwarfLib.cc (DwrLineRegs::getPath): Add a DW_AT_comp_dir string if the directoty table has relative names.
This commit is contained in:
parent
ddc6677b17
commit
10577a3b13
@ -1779,7 +1779,15 @@ DwrLineRegs::getPath (int fn)
|
||||
}
|
||||
if (dir == NULL || *dir == 0)
|
||||
return fnp->path;
|
||||
fnp->path = canonical_path (dbe_sprintf ("%s/%s", dir, fnp->fname));
|
||||
|
||||
char *dir1 = NULL;
|
||||
if (*dir != '/')
|
||||
dir1 = dir_names->get(0)->fname;
|
||||
if (dir1 && *dir != 0)
|
||||
fnp->path = dbe_sprintf ("%s/%s/%s", dir1, dir, fnp->fname);
|
||||
else
|
||||
fnp->path = dbe_sprintf ("%s/%s", dir, fnp->fname);
|
||||
fnp->path = canonical_path (fnp->path);
|
||||
return fnp->path;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user