Skip to content

Instantly share code, notes, and snippets.

@zhuizhuhaomeng
Last active July 7, 2023 00:08
Show Gist options
  • Save zhuizhuhaomeng/f7d9d45c956346091c48313bccdfdbfd to your computer and use it in GitHub Desktop.
Save zhuizhuhaomeng/f7d9d45c956346091c48313bccdfdbfd to your computer and use it in GitHub Desktop.
diff --git a/translate.cxx b/translate.cxx
index 5bdda0dd0..9b4b0800b 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -6810,9 +6810,11 @@ static void get_unwind_data (Dwfl_Module *m,
scn = NULL;
while ((scn = elf_nextscn(elf, scn)))
{
+ const char *sh_name;
shdr = gelf_getshdr(scn, &shdr_mem);
- if (strcmp(elf_strptr(elf, ehdr->e_shstrndx, shdr->sh_name),
- ".debug_frame") == 0)
+ sh_name = elf_strptr(elf, ehdr->e_shstrndx, shdr->sh_name);
+ if (strcmp(sh_name, ".debug_frame") == 0
+ || strcmp(sh_name, ".zdebug_frame") == 0)
{
data = elf_rawdata(scn, NULL);
*debug_frame = data->d_buf;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment