mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
podman: add debug directories from podman containers
This is meant to allow us to find the debug files for a given library for podman containers running as the current user. However, we still need to try to translate the fuse-overlayfs paths when parsing the /proc/pid/mounts or we'll have incorrect paths coming from the event stream.
This commit is contained in:
@ -27,6 +27,7 @@
|
||||
#include "sysprof-elf-symbol-resolver.h"
|
||||
#include "sysprof-flatpak.h"
|
||||
#include "sysprof-map-lookaside.h"
|
||||
#include "sysprof-podman.h"
|
||||
|
||||
struct _SysprofElfSymbolResolver
|
||||
{
|
||||
@ -92,12 +93,20 @@ free_element_string (gpointer data)
|
||||
static void
|
||||
sysprof_elf_symbol_resolver_init (SysprofElfSymbolResolver *self)
|
||||
{
|
||||
g_auto(GStrv) podman_dirs = NULL;
|
||||
|
||||
self->debug_dirs = g_array_new (TRUE, FALSE, sizeof (gchar *));
|
||||
g_array_set_clear_func (self->debug_dirs, free_element_string);
|
||||
|
||||
sysprof_elf_symbol_resolver_add_debug_dir (self, "/usr/lib/debug");
|
||||
sysprof_elf_symbol_resolver_add_debug_dir (self, "/usr/lib32/debug");
|
||||
sysprof_elf_symbol_resolver_add_debug_dir (self, "/usr/lib64/debug");
|
||||
|
||||
/* The user may have podman/toolbox containers */
|
||||
podman_dirs = sysprof_podman_debug_dirs ();
|
||||
for (guint i = 0; podman_dirs[i]; i++)
|
||||
sysprof_elf_symbol_resolver_add_debug_dir (self, podman_dirs[i]);
|
||||
|
||||
if (is_flatpak ())
|
||||
{
|
||||
g_auto(GStrv) debug_dirs = sysprof_flatpak_debug_dirs ();
|
||||
|
||||
Reference in New Issue
Block a user