[PATCH 01/19] include: new header ctf.h: file format description

Jim Wilson jimw@sifive.com
Wed May 1 21:29:00 GMT 2019


On Wed, May 1, 2019 at 9:57 AM Nick Clifton <nickc@redhat.com> wrote:
> > +/* CTF format description.
> > +   Copyright (C) 2004-2019 Free Software Foundation, Inc.
>
> Copyright starting from 2004, really ?

Looks like CTF is part of dtrace which Oracle inherited from Sun.
Wikipedia tells me that the first release of dtrace was in Jan 2005,
so a 2004 copyright looks right if this is the original sources from
Sun subsequently modified by Oracle.

> > +/* CTF - Compact ANSI-C Type Format
> ANSI-C ?  Isn't everyone using ISO-C these days ?

I was going to say the same thing.

> Also - does this format explicitly exclude other languages like C++ or Go or Rust ?

Apparently doesn't explicitly exclude them, it just doesn't explicitly
include them, and with only 64 possible type classes, it looks like
you could run out without some clever encoding for other languages.

> > +#define CTF_VERSION_3 4
> > +#define CTF_VERSION CTF_VERSION_3 /* Current version.  */
>
> Hang on - so the value of CTF_VERSION_3 is 4 ?  Does this mean that the
> full version number is 3.4, or 4.0 or just 4 ?  I am a bit confused...

Looks like there was a version 1+ which took number 2.
https://github.com/oracle/libdtrace-ctf/blob/master/include/sys/ctf.h#L149

I don't have any expertise with CTF, I was just curious, so did a
little looking around for more info and found the version number
encoding.  I also found a FreeBSD man page which has some useful intro
data.
https://www.freebsd.org/cgi/man.cgi?query=ctf&sektion=5&manpath=freebsd-release-ports

Jim



More information about the Binutils mailing list