[RFA 2/4] Explicit locations

Tom Tromey tromey@redhat.com
Wed Aug 21 19:23:00 GMT 2013


>>>>> "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



More information about the Gdb-patches mailing list