This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]