libsysprof-analyze: handle pid == -1

This can happen from Perf sometimes so be explicit about remapping it to
process 0, which is our sort of catchall for kernel stuff.
This commit is contained in:
Christian Hergert
2023-06-05 16:45:07 -07:00
parent 3de9f39348
commit 9cba99d894

View File

@ -1246,6 +1246,9 @@ _sysprof_document_process_symbol (SysprofDocument *self,
g_return_val_if_fail (SYSPROF_IS_DOCUMENT (self), NULL);
if (pid < 0)
pid = 0;
info = _sysprof_document_process_info (self, pid, TRUE);
if (info->symbol)