Skip to content

Commit

Permalink
Support more format of memory maps
Browse files Browse the repository at this point in the history
  • Loading branch information
sj-i committed Nov 12, 2023
1 parent 8530ace commit deb73f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Lib/Process/MemoryMap/ProcessMemoryMapParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private function parseLine(string $line): ?ProcessMemoryArea
$matches = [];
preg_match(
// phpcs:ignore Generic.Files.LineLength.TooLong
'/([0-9a-f]+)-([0-9a-f]+) ([r\-][w\-][x\-][sp\-]) ([0-9a-f]+) ([0-9][0-9][0-9]?:[0-9][0-9][0-9]?) ([0-9]+) +([^ ].+)/',
'/([0-9a-f]+)-([0-9a-f]+) ([r\-][w\-][x\-][sp\-]) ([0-9a-f]+) ([0-9a-f][0-9a-f][0-9a-f]?:[0-9a-f][0-9a-f][0-9a-f]?) ([0-9]+) +([^ ].+)?/',
$line,
$matches
);
Expand All @@ -60,7 +60,7 @@ private function parseLine(string $line): ?ProcessMemoryArea
),
device_id: $matches[5],
inode_num: Cast::toInt($matches[6]),
name: $matches[7],
name: $matches[7] ?? '',
);
}
}

0 comments on commit deb73f2

Please sign in to comment.