This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/dwarf] Use objfile_data mechanism for per-objfile data
Daniel Jacobowitz <drow@false.org> writes:
> > How about:
> > - 'dwarf2_objfile_data_key' for the 'struct objfile_data', and
> > - 'struct dwarf2_objfile' and 'dwarf2_objfile' for the actual
> > per-objfile datatype and the global pointer to the current instance?
> >
> > (Is that any better? I think suffixes like "_data" really only belong
> > on things whose type is unspecified at the point where the name
> > appears, like 'void *' pointers, or objects related to them. I mean,
> > everything is "data"; if you're going to give something a
> > generic-sounding name, that should be because you're emphasizing the
> > genericness of it.)
>
> I don't think that's any better. "dwarf2_objfile" implies that it's a
> kind of objfile. But I'm willing to use your names :)
No, no: "We striev for kwalitie."
Okay, well, how about 'struct dwarf2_per_objfile' and
dwarf2_per_objfile'? That's pretty close to your original names.
> > The lower-case implicit-parameter macros bug me. But I assume they're
> > going away soon, and upper-casing them would make the patch huge,
> > right?
>
> I didn't have a particular plan in either direction. Doing either
> would be an easy follow-on. Replacing them with their expansions would
> be noisy indentation-wise, but otherwise trivial - that may be best.
I'd be happier with replacing them with their expansions. We could
drop the 'dwarf_' prefixes on the member names, too.