This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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,gdb]: ensures that cie ptr of an fda is a cie


>>>>> "Fawzi" == Fawzi Mohamed <fawzi.mohamed@nokia.com> writes:

Fawzi> +enum eh_frame_type {
Fawzi> +    eh_cie_type_id = 1,
Fawzi> +    eh_fde_type_id = 2,
Fawzi> +    eh_cie_or_fde_type_id = 3

I think enum constant names should be all caps.
That is the usual style.

Fawzi> +      gdb_assert ((entry_type & eh_cie_type_id)!=0);

It seems to me that this code is attempting to validate user input.  If
so, an assertion is incorrect -- instead it should call either error or
warning and in the latter case also arrange for the bad data to be
ignored.

Tom


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