This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc][13/37] Eliminate builtin_type_ macros: Update EVAL_SKIP dummy return type
- From: Joel Brobecker <brobecker at adacore dot com>
- To: uweigand at de dot ibm dot com
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 5 Sep 2008 15:56:11 -0700
- Subject: Re: [rfc][13/37] Eliminate builtin_type_ macros: Update EVAL_SKIP dummy return type
- References: <20080831175045.128504000@de.ibm.com> <20080831175124.866908000@de.ibm.com>
> As the actual type doesn't really matter, this patch changes that
> to use builtin_type_int8 instead.
(maybe I am answering prematurely since I haven't read the other
patches, but I have to answer now, or I'll probably forget by the
time I reach the last patch).
I understand how builtin_type_int8 is architecture neutral, and
thus allows us to get rid of the dependency on the gdbarch. No
dispute on the actual patch.
But the patch really made me think that we really ought to have
a procedure that returns a dummy value for the EVAL_SKIP case.
That way, we don't have to remember that we should be using
an arch-neutral type such as builtin_type_int8.
On another related note, the "goto nosideret" seems to be misused
to me. We seem to always have:
goto nosideret;
[...]
nosideret:
return value_from_longest (builtin_type_long, (LONGEST) 1);
If we have a value_dummy() function, we can replace all gotos with
a "return value_dummy ()", and get rid of the label. I think it will
be more readable.
This can be done as a followup patch, though...
--
Joel