This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch bfd]: Follow-up for dump of xdata SEH
- From: Richard Henderson <rth at redhat dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 08 Oct 2010 08:39:41 -0700
- Subject: Re: [patch bfd]: Follow-up for dump of xdata SEH
- References: <AANLkTi=C6ttJKjeYtYiEJQ3mS35k-QBguHujzE1QdfKM@mail.gmail.com>
On 10/08/2010 02:58 AM, Kai Tietz wrote:
I'd like to see a little more commentary here. It took me a minute
or three to convince myself that all of this is ok.
/* Search for the current entry in the sorted array. */
> + p = (bfd_vma *)
> + bsearch (&rf.rva_UnwindData, xdata_arr,
> + (size_t) xdata_arr_cnt, sizeof (bfd_vma),
> + sort_xdata_arr);
Null check impossible? We're searching for an entry that we
know we added.
> + if (p != NULL)
> + {
/* Advance to the next pointer into the xdata section. We may
have shared xdata entries, which will result in a string of
identical pointers in the array; advance past all of them. */
> + while (p[0] <= rf.rva_UnwindData)
> + ++p;
> + if (p[0] == ~((bfd_vma) 0))
> + p = NULL;
> + }
Otherwise ok.
r~