Page MenuHomeFreeBSD

ctf: Import ctf.h from OpenBSD
ClosedPublic

Authored by markj on Feb 23 2022, 11:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 8:27 AM
Unknown Object (File)
Mon, Apr 22, 8:26 AM
Unknown Object (File)
Mon, Apr 22, 8:26 AM
Unknown Object (File)
Mon, Apr 22, 8:26 AM
Unknown Object (File)
Mon, Apr 22, 8:12 AM
Unknown Object (File)
Thu, Apr 4, 6:51 AM
Unknown Object (File)
Mar 7 2024, 5:03 PM
Unknown Object (File)
Mar 3 2024, 10:59 PM

Details

Summary

Use it instead of the existing ctf.h from OpenSolaris. This makes it
easier to use CTF in the core kernel, and to extend the CTF format to
support wider type IDs.

The imported ctf.h is modified to depend only on _types.h, and also to
provide macros which use the "parent" bit of a type ID to refer to types
in a parent CTF container.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste added inline comments.
sys/sys/ctf.h
5

I presume your changes in this file are trivial and do not warrant a copyright statement.

We should perhaps add an SPDX tag though.

tools/build/Makefile
266

sort alphabetically?

The original CTF header has a bunch of useful comments describing the format. Perhaps these things should be included in this header too? While I appreciate that this is an import, those comments have helped me quite a bit when dealing with CTF and IMO should be included.

The original CTF header has a bunch of useful comments describing the format. Perhaps these things should be included in this header too? While I appreciate that this is an import, those comments have helped me quite a bit when dealing with CTF and IMO should be included.

There is a ctf.5 man page that describes the format in much more detail than the comments did. I haven't updated it yet for v3 but will do so. Do you think it is sufficient to reference the man page here?

IMO it's best to avoid duplicating the documentation in multiple places and just referencing (an updated) ctf.5 here is sensible.

The original CTF header has a bunch of useful comments describing the format. Perhaps these things should be included in this header too? While I appreciate that this is an import, those comments have helped me quite a bit when dealing with CTF and IMO should be included.

There is a ctf.5 man page that describes the format in much more detail than the comments did. I haven't updated it yet for v3 but will do so. Do you think it is sufficient to reference the man page here?

Yes, that sounds good to me. ctf.5 is fairly detailed, so if extended with ctfv3 and simply referencing the man page in the header would suffice IMO. Thanks!

  • Add an SPDX identifier.
  • Reference the ctf(5) man page.
This revision is now accepted and ready to land.Mar 5 2022, 1:43 AM
This revision was automatically updated to reflect the committed changes.