summaryrefslogtreecommitdiffstats
path: root/libdwfl/linux-proc-maps.c
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-04-06 15:14:09 +0200
committerUlf Hermann <[email protected]>2017-05-08 09:45:39 +0000
commite5cde7378c246a32d7dbc3bff8db15befad8b1a9 (patch)
tree7586f1b4901236f1dbe28e022d6a4c9b84bef74e /libdwfl/linux-proc-maps.c
parent037d971fa81644af1d3be30db409309155fda721 (diff)
Use OS-specific paths
In general we need to use ';' as path separator and '\' and directory separator on windows. The shell will automatically translate paths to some extent, but we have to call "pwd -W" rather than plain "pwd" to get something useful. Change-Id: I1a117d219a2aa00c1f77ae7d3a1d92b9bae526db Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'libdwfl/linux-proc-maps.c')
-rw-r--r--libdwfl/linux-proc-maps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdwfl/linux-proc-maps.c b/libdwfl/linux-proc-maps.c
index 78f472a8..8eb9a5cb 100644
--- a/libdwfl/linux-proc-maps.c
+++ b/libdwfl/linux-proc-maps.c
@@ -245,7 +245,7 @@ proc_maps_report (Dwfl *dwfl, FILE *f, GElf_Addr sysinfo_ehdr, pid_t pid)
}
char *file = line + nread + strspn (line + nread, " \t");
- if (file[0] != '/' || (ino == 0 && dmajor == 0 && dminor == 0))
+ if (!IS_ABSOLUTE_PATH(file) || (ino == 0 && dmajor == 0 && dminor == 0))
/* This line doesn't indicate a file mapping. */
continue;
@@ -362,7 +362,7 @@ dwfl_linux_proc_find_elf (Dwfl_Module *mod __attribute__ ((unused)),
char **file_name, Elf **elfp)
{
int pid = -1;
- if (module_name[0] == '/')
+ if (IS_ABSOLUTE_PATH (module_name))
{
/* When this callback is used together with dwfl_linux_proc_report
then we might see mappings of special character devices. Make