Re: Formatting "drivers" was Re: Can't persuade pahole to see through forward declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> Em Thu, Jun 18, 2009 at 01:28:20PM -0700, Zack Weinberg escreveu:
> >  - Padding at the end of a structure is explicit, always.  (The
> > current pahole output doesn't call it out at all for the 'b' struct
> > inside the union.)
> 
> This one is a bug, I'll fix it.

Cool.

> >  - Bitfields are not special: the structure is treated as a linear
> >    array of bits, within which every field starts at bit
> >    (byteoff*8+bitoff) and continues for (bytes*8+bits) bits.
> >    The bitoff and bits columns are always in the range 0..7.
> >    This saves some fiddly math.
> 
> Well, here the CTFication of the core will give a dividend :-) We
> already treat everything as bit_offsets, see struct class_member.

I don't know what CTF is, and -z doesn't seem to do anything... but
it's good to know the internal representation has no trouble here.

> My first reaction is that dwarf_fprintf would need a "fprintf_ops"
> struct and that then the current set of functions called from
> tag__fprintf would be the first formatter, and the second one that
> will just do as you suggest.

Yes, that sounds like a good strategy.

zw
--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux