]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
eu-stacktrace WIP fixes: dwfl_report_end
authorSerhei Makarov <serhei@serhei.io>
Fri, 12 Jan 2024 17:54:54 +0000 (12:54 -0500)
committerSerhei Makarov <serhei@serhei.io>
Fri, 12 Jan 2024 17:54:57 +0000 (12:54 -0500)
There are several things to improve to get parity with eu-stack
in terms of CFI handling; this is the first fix.

src/stacktrace.c

index 1e1b2be2737615773135826069a6d722d2225905..5cd808915138c4dcd87e6c89ddf175dc6ad54cb0 100644 (file)
@@ -861,6 +861,13 @@ sysprof_init_dwfl (struct sysprof_unwind_info *sui,
 #endif
       return NULL;
     }
+  err = dwfl_report_end (dwfl, NULL, NULL);
+  if (err != 0)
+    {
+      fprintf(stderr, "DEBUG dwfl_report_end pid %lld: %s",
+             (long long) pid, dwfl_errmsg (-1));
+      return NULL;
+    }
 
   /* TODO: Check if elf needs to be freed in sample_detach. */
   Elf *elf = NULL;