This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH,gdb, Update1]: ensures that cie ptr of an fda is a cie
> 2011-07-04 Fawzi Mohamed <fawzi.mohamed@nokia.com>
>
> * dwarf2-frame.c (decode_frame_entry, decode_frame_entry_1): ensure
> that CIE pointer of an FDE really points to a CIE
Just a few more nits... (a lot of rules, I know, but we try to have
a consistent development style).
First, in the ChangeLog above: 2 spaces between the date and your
name, and before your email address. Also, sentences always start
with a capital letter, and end with a period. Thus
2011-07-04 Fawzi Mohamed <fawzi.mohamed@nokia.com>
* dwarf2-frame.c (decode_frame_entry, decode_frame_entry_1): Ensure
that CIE pointer of an FDE really points to a CIE .
> +/* defines the type of eh_frames that are expected to be decoded: CIE, FDE
> + or any of them */
> +enum eh_frame_type
Empty line between documentation comment and start of definition...
> +{
> + eh_cie_type_id = 1<<0,
> + eh_fde_type_id = 1<<1,
> + eh_cie_or_fde_type_id = eh_cie_type_id + eh_fde_type_id
> +};
Spaces around binary operators => `1 << 0'.
> -/* Decode the next CIE or FDE. Return NULL if invalid input, otherwise
> - the next byte to be processed. */
> +/* Decode the next CIE or FDE, entry type specifies the expected type.
> + Return NULL if invalid input, otherwise the next byte to be processed. */
> static gdb_byte *
Same here...
> + /* checks that we expected a CIE */
> + gdb_assert ((entry_type & eh_cie_type_id) != 0);
Same here as well. But I think you meant something like `We expect
a CIE.'.
--
Joel