libsysprof-profile: include spawnable information in metadata

This commit is contained in:
Christian Hergert
2023-07-10 10:58:52 -07:00
parent a0befecfaa
commit 304943a03c
3 changed files with 52 additions and 5 deletions

View File

@ -320,17 +320,21 @@ sysprof_spawnable_spawn (SysprofSpawnable *self,
return g_subprocess_launcher_spawnv (launcher, argv, error);
}
const char *
sysprof_spawnable_get_cwd (SysprofSpawnable *self)
{
g_return_val_if_fail (SYSPROF_IS_SPAWNABLE (self), NULL);
return self->cwd;
}
void
sysprof_spawnable_set_cwd (SysprofSpawnable *self,
const gchar *cwd)
{
g_return_if_fail (SYSPROF_IS_SPAWNABLE (self));
if (g_strcmp0 (cwd, self->cwd) != 0)
{
g_free (self->cwd);
self->cwd = g_strdup (cwd);
}
g_set_str (&self->cwd, cwd);
}
/**