Dwarves Archive on lore.kernel.org
 help / color / Atom feed
From: Zack Weinberg <zweinberg-4eJtQOnFJqFBDgjK7y7TUQ@public.gmane.org>
To: Arnaldo Carvalho de Melo <acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "Ilpo Järvinen"
Subject: Re: Formatting "drivers" was Re: Can't persuade pahole to see through forward declarations
Date: Tue, 23 Jun 2009 23:42:44 -0700
Message-ID: <20090623234244.03d0edb1@mozilla.com> (raw)
In-Reply-To: <20090618205053.GA4258-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>

Arnaldo Carvalho de Melo <acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 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.


> >  - 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.

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

      parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090615172409.6f0f322b@mozilla.com>
     [not found] ` <20090617170217.GB21530@ghostprotocols.net>
     [not found]   ` <20090617170217.GB21530-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2009-06-17 17:25     ` Zack Weinberg
     [not found]       ` <20090617102506.34aaf8e2-4eJtQOnFJqFBDgjK7y7TUQ@public.gmane.org>
2009-06-17 20:56         ` Arnaldo Carvalho de Melo
2009-06-18 18:36         ` Arnaldo Carvalho de Melo
     [not found]           ` <20090618183634.GE21530-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2009-06-18 20:28             ` Zack Weinberg
     [not found]               ` <20090618132820.2eb7371a-4eJtQOnFJqFBDgjK7y7TUQ@public.gmane.org>
2009-06-18 20:50                 ` Formatting "drivers" was " Arnaldo Carvalho de Melo
     [not found]                   ` <20090618205053.GA4258-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2009-06-24  6:29                     ` Ilpo Järvinen
     [not found]                       ` <Pine.LNX.4.64.0906240918170.26611-tOJ5Hk0ALFH+1EwMtL+0ZheBoQapMCRCVQQcQy+6Uvc@public.gmane.org>
2009-06-24  6:40                         ` Zack Weinberg
     [not found]                           ` <20090623234018.61f1ce02-4eJtQOnFJqFBDgjK7y7TUQ@public.gmane.org>
2009-06-24  6:58                             ` Ilpo Järvinen
2009-06-24  6:42                     ` Zack Weinberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090623234244.03d0edb1@mozilla.com \
    --to=zweinberg-4ejtqonfjqfbdgjk7y7tuq@public.gmane.org \
    --cc=acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ilpo.jarvinen-pxSi+dnQzZMxHbG02/KK1g@public.gmane.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Dwarves Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dwarves/0 dwarves/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dwarves dwarves/ https://lore.kernel.org/dwarves \
	public-inbox-index dwarves

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git