This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH 2/4] print_debug: Use ebl_debugscn_p() to check if it's a debug section.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 13 Aug 2012 13:38:56 +0200
- Subject: Re: [PATCH 2/4] print_debug: Use ebl_debugscn_p() to check if it's a debug section.
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