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: PR 9946 - template parameters


I looked through the patch, though I wouldn't say I really reviewed
it.  Everything seems sound; I have only minor comments.

I have no idea how this is going to interact with my patch to
calculate template names when the compiler leaves out arguments from
DW_AT_name; Pedro was looking at that, I think.  But you've got the
moral advantage since you posted this :-)

> diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
> index 085270e..ea84e5d 100644
> --- a/gdb/gdbtypes.h
> +++ b/gdb/gdbtypes.h
> @@ -681,6 +681,9 @@ struct cplus_struct_type
>  
>      short nfn_fields_total;
>  
> +    /* Number of template arguments.  */
> +    unsigned short n_template_arguments : 14;
> +
>      /* One if this struct is a dynamic class, as defined by the
>         Itanium C++ ABI: if it requires a virtual table pointer,
>         because it or any of its base classes have one or more virtual

I like a 14-bit field not at all.  Is it that size to soak up all
available bits?  If so, that just means one more thing to watch out
for if someone needs to free a bit.  You could just use a VEC...

-- 
Daniel Jacobowitz
CodeSourcery


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