You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Absolute paths are returned when no line info is found, relative ones for all other cases. The code that creates an abs path from the relative one is only invoked when ln == NULL. What is the intuition behind that? I think it would be better to always return absolute paths, or always return relative ones and make comp_dir available to the user.
The code does the same thing in all cases, as far as I can see. In the ln == NULL case in dwarf_lookup_pc, there is no entry in the line table, so we add the directory to a relative path name there. When there is an entry in the line table, we add the directory when we build the line table information in read_line_program. So while there could certainly be a bug here, I think I need to see a test case. Thanks.
https://github.com/ianlancetaylor/libbacktrace/blob/master/dwarf.c#L2874
Absolute paths are returned when no line info is found, relative ones for all other cases. The code that creates an abs path from the relative one is only invoked when
ln == NULL
. What is the intuition behind that? I think it would be better to always return absolute paths, or always return relative ones and makecomp_dir
available to the user.Related: athre0z/color-backtrace#2
The text was updated successfully, but these errors were encountered: