This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH,gdb]: ensures that cie ptr of an fda is a cie
- From: Tom Tromey <tromey at redhat dot com>
- To: Fawzi Mohamed <fawzi dot mohamed at nokia dot com>
- Cc: gdb-patches at sourceware dot org, ext Tristan Gingold <gingold at adacore dot com>, Andrà PÃnitz <andre dot poenitz at nokia dot com>
- Date: Tue, 05 Jul 2011 10:25:26 -0600
- Subject: Re: [PATCH,gdb]: ensures that cie ptr of an fda is a cie
- References: <F1900C4A-1C06-4F4B-9048-16C9A3F03765@nokia.com>
>>>>> "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