fix: detecting windows root paths with unix-style separators#342
fix: detecting windows root paths with unix-style separators#342philipc merged 2 commits intogimli-rs:masterfrom
Conversation
|
@philipc can have a look at PR please? |
|
Seems fine but I would like to do some testing and don't currently have time. |
|
ok, feel free to ping me if I can help you |
philipc
left a comment
There was a problem hiding this comment.
This function is used for two purposes: to determine if a path is a root path, and to determine which separator to use. If the root path is using :/, then I think we also be using / for the separator, but that won't happen with this change. Perhaps this change should be in has_unix_root instead. After doing that, better names for these functions would be has_forward_slash_root and has_backward_slash_root.
|
It would help with testing this if you can add a test file to https://github.com/gimli-rs/object-testfiles/tree/master/dwarf (ideally it would be the |
|
@philipc refactored the code and here is the branch with clang binary from windows gimli-rs/object-testfiles#22 |
On Windows Clang can produce DWARF debug information containing paths to DW_AT_name and DW_AT_comp_dir with unix-stlye slashes. for example C:/myproject/main.cpp. In that case case addr2line mistakenly concatenating absolute path to file with compilation directory