This is the mail archive of the gdb@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: Registering pretty-printers


On Thu, Jun 11, 2009 at 8:51 PM, Daniel Jacobowitz<drow@false.org> wrote:
> In my opinion, anything that increases the size of the executable is a
> non-starter. ?I don't think there's any reliable way to create a
> non-allocatable section, and it would have other problems, like
> duplicate elimination.

Reliable in what sense?  [I realize the term is pretty unambiguous.
I'm guessing I'm missing something as it doesn't seem to be
excessively hard for many important targets.]  Or did you mean
portable?

As for duplicate elimination,
I'm reminded of the new comdat types support in DWARF 4:  Type debug
info is put in comdat sections with a signature computed from the
type.  The linker removes all duplicates and the result ends up in the
.debug_types section.  Employing a similar thing here would solve that
it seems.  It might even be cool to use the same signature.  It avoids
wheel re-invention, and uses something documented and well-vetted.
And maybe the pretty-printer registration could be based on the type
signature.  OTOH the signature wasn't really intended for anything
else so hijacking it may be problematic.
[Just thinking out loud ...]

Not saying there aren't other problems though.
OTOH, I wouldn't mind seeing a couple of paradigms for registering
pretty printers if it means targets that can handle better solutions
aren't left to suffer to the lowest common denominator.


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