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: [PATCH] Handle volatile array types in dwarf2read.c.


Mark> But we have to look anyway. This is just the existing code, moved into
Mark> its own function. What do you suggest should be changed?

It's fine to leave it.

Tom> make_cv_type preserves the already existing qualifiers so you don't need
Tom> to track "cnst" and "voltl".  You can just pass in the ones you want to
Tom> add.

Mark> The original code already did it this way. And I don't think it is true
Mark> that make_cv_type preserves existing const or volatile qualifiers.

Wow, I wonder how long I've had the incorrect view of make_cv_type.
Hopefully not too long.  Thanks for pointing that out.

Tom> I wonder about typedefs to array type.
Tom> Calling check_typedef here is probably not so great but I assume we can
Tom> just ignore incomplete types.

Mark> I am not sure I understand precisely what you are wondering about. Do
Mark> you have an example? Then I can add a testcase for it. This is just
Mark> precisely as is done for the const case. So the issue you are thinking
Mark> about is probably the same for both cases and might already be existing.

Well, I was thinking this:

    typedef int atype[23];
    const atype a;

However, gcc omits the typedef from the DWARF, so I suppose some
hand-crafted DWARF would have to be written.


This patch is ok.  If there's a further bug and you want to fix it, it's
fine to do that separately.

Tom


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