This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 2/4] Explicit locations
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Wed, 21 Aug 2013 13:23:47 -0600
- Subject: Re: [RFA 2/4] Explicit locations
- References: <514B9E9F dot 2040400 at redhat dot com>
>>>>> "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