mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Merge branch 'fix-proc-maps-pathname' into 'master'
proc: fix capture of mapped pathnames Closes #70 See merge request GNOME/sysprof!48
This commit is contained in:
@ -101,10 +101,14 @@ sysprof_proc_source_populate_maps (SysprofProcSource *self,
|
||||
gint r;
|
||||
|
||||
r = sscanf (lines[i],
|
||||
"%lx-%lx %*15s %lx %*x:%*x %lu %512s",
|
||||
"%lx-%lx %*15s %lx %*x:%*x %lu %511[^\n]",
|
||||
&start, &end, &offset, &inode, file);
|
||||
file [sizeof file - 1] = '\0';
|
||||
|
||||
/* file has a " (deleted)" suffix if it was deleted from disk */
|
||||
if (g_str_has_suffix (file, " (deleted)"))
|
||||
file [strlen (file) - strlen (" (deleted)")] = '\0';
|
||||
|
||||
if (r != 5)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user