This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Handle volatile array types in dwarf2read.c.
- From: Tom Tromey <tromey at redhat dot com>
- To: Mark Wielaard <mjw at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 01 Jul 2014 12:24:55 -0600
- Subject: Re: [PATCH] Handle volatile array types in dwarf2read.c.
- Authentication-results: sourceware.org; auth=none
- References: <1404164071-24432-1-git-send-email-mjw at redhat dot com> <87simlrroa dot fsf at fleche dot redhat dot com> <1404238306 dot 3766 dot 17 dot camel at bordewijk dot wildebeest dot org>
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