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] |
On Wed, Oct 13, 2010 at 2:10 PM, Jan Kratochvil <jan.kratochvil@redhat.com> wrote: > Also I do not like much the pr[0-9]+.exp names, one gets fimiliar with any > name but I never remember PR numbers. ?[in fact an idea by Roland McGrath] I often just go with the flow for things such as this, in the absence of specific rules. If we want to declare a specific rule of no more such prNNN naming, that's fine by me. > @@ -1388,7 +1389,7 @@ check_typedef (struct type *type) > ? ? ? ? ?/* It is dangerous to call lookup_symbol if we are currently > ? ? ? ? ? ? reading a symtab. ?Infinite recursion is one danger. ?*/ > ? ? ? ? ?if (currently_reading_symtab) > - ? ? ? ? ? return type; > + ? ? ? ? ? return make_cv_type (is_const, is_volatile, type, NULL); > > ? ? ? ? ?name = type_name_no_tag (type); > ? ? ? ? ?/* FIXME: shouldn't we separately check the TYPE_NAME and I left this out for a later pass to be conservative and avoid having to deal with any unintended consequences. But if one wants to handle this in the same patch, ok. > @@ -1398,7 +1399,7 @@ check_typedef (struct type *type) > ? ? ? ? ?if (name == NULL) > ? ? ? ? ? ?{ > ? ? ? ? ? ? ?stub_noname_complaint (); > - ? ? ? ? ? ? return type; > + ? ? ? ? ? ? return make_cv_type (is_const, is_volatile, type, NULL); > ? ? ? ? ? ?} > ? ? ? ? ?sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0); > ? ? ? ? ?if (sym) Ditto. > @@ -1407,11 +1408,10 @@ check_typedef (struct type *type) > ? ? ? ? ? ?TYPE_TARGET_TYPE (type) = alloc_type_arch (get_type_arch (type)); > ? ? ? ?} > ? ? ? type = TYPE_TARGET_TYPE (type); > + ? ? ?is_const |= TYPE_CONST (type); > + ? ? ?is_volatile |= TYPE_VOLATILE (type); > ? ? } > > - ?is_const = TYPE_CONST (type); > - ?is_volatile = TYPE_VOLATILE (type); > - > ? /* If this is a struct/class/union with no fields, then check > ? ? ?whether a full definition exists somewhere else. ?This is for > ? ? ?systems where a type definition with no fields is issued for such This part doesn't feel right. For example, when a stub is later filled in the accumulated cv qualifiers will get filled in too, but that's wrong. [Right?] Plus there's more than just const/volatile to preserve. [Right?] I like this patch better. 2010-10-13 Doug Evans <dje@google.com> Jan Kratochvil <jan.kratochvil@redhat.com> PR exp/12117 * gdbtypes.c (check_typedef): Clean up function comment. Keep track of instance flags as we strip typedefs and create a new type to preserve them if necessary. testsuite/ * gdb.cp/ptype-cv-cp.cc: New file. * gdb.cp/ptype-cv-cp.exp: New file.
Attachment:
gdb-101013-12117-3.patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |