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: [RFA 2/4] Explicit locations


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> This is the second patch in the series. The main purpose of this patch
Keith> is to introduce explicit locations and use them internally.  This
Keith> includes converting all linespec locations to explicit form.

This looks reasonable to me, though the "new file" comment from the
first patch applies here as well, I think.

Keith> +/* A convenience macro for testing for unset locations.  */
Keith> +#define location_empty_p(L)						\
Keith> +  ((EVENT_LOCATION_TYPE ((L)) == EVENT_LOCATION_EXPLICIT		\
Keith> +    && (EVENT_LOCATION_EXPLICIT ((L)) == NULL				\
Keith> +	|| (EVENT_LOCATION_EXPLICIT ((L))->source_filename == NULL	\
Keith> +	    && EVENT_LOCATION_EXPLICIT ((L))->function_name == NULL	\
Keith> +	    && EVENT_LOCATION_EXPLICIT ((L))->label_name == NULL	\
Keith> +	    && (EVENT_LOCATION_EXPLICIT ((L))->line_offset.sign		\
Keith> +		== LINE_OFFSET_UNKNOWN))))				\
Keith> +   || (EVENT_LOCATION_TYPE ((L)) == EVENT_LOCATION_LINESPEC		\
Keith> +       && EVENT_LOCATION_LINESPEC ((L)) == NULL))


I think this would be better as a function in the new module.

Tom


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