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: [rfc][13/37] Eliminate builtin_type_ macros: Update EVAL_SKIP dummy return type


> 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


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