[PATCH 2/4] print_debug: Use ebl_debugscn_p() to check if it's a debug section.
Mark Wielaard
mjw at redhat.com
Mon Aug 13 11:38:56 UTC 2012
On Sun, Aug 12, 2012 at 06:29:00PM +0200, Kurt Roeckx wrote:
> + const char *name = elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
>
> - if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
> + if (ebl_debugscn_p(ebl, name) && shdr != NULL && shdr->sh_type == SHT_PROGBITS)
You will have to check name != NULL since ebl_debugscn_p will just
crash when given NULL as name argument.
Cheers,
Mark
More information about the elfutils-devel
mailing list