From 61d5187b0953dc3635b7842a106fb159e147cb33 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 19 May 2023 16:33:21 -0700 Subject: [PATCH] libsysprof-analyze: fallback in case of debuglink error If for some reason the debuglink has an issue, we can fallback to looking at the specific ELF containing the address we wanted to look at. --- src/libsysprof-analyze/sysprof-elf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libsysprof-analyze/sysprof-elf.c b/src/libsysprof-analyze/sysprof-elf.c index 54b5e493..a5f0a91f 100644 --- a/src/libsysprof-analyze/sysprof-elf.c +++ b/src/libsysprof-analyze/sysprof-elf.c @@ -294,7 +294,12 @@ sysprof_elf_get_symbol_at_address (SysprofElf *self, g_return_val_if_fail (SYSPROF_IS_ELF (self), NULL); if (self->debug_link_elf != NULL) - return sysprof_elf_get_symbol_at_address (self->debug_link_elf, address, begin_address, end_address); + { + ret = sysprof_elf_get_symbol_at_address (self->debug_link_elf, address, begin_address, end_address); + + if (ret != NULL) + return ret; + } if ((symbol = elf_parser_lookup_symbol (self->parser, address))) {