Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 1995 06:44:59 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        current@FreeBSD.org, nate@trout.sri.MT.net, rgrimes@gndrsh.aac.dev.com, rkw@dataplex.net
Subject:   Re: Genassym
Message-ID:  <199504052044.GAA30107@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>I haven't looked at genassym, but assume that it uses the sys headers only
>as input text, or equivalently, conditional conpilation flags. If it makes
>any assumptions about kernel data structures, etc. it will eventually break
>in cross platform compilation. :(

You should like at it.  It's main job is to print the sizes of and offsets
in kernel data structures.  (It also gathers the defines for manifest
constants from scattered headers files that aren't all ready for inclusion
in assembler files, but this is easy to do in other ways.)

genassym can't work in it's present form in a cross platform environment,
so it's a waste of time to worry about how to build it in such an
environment.  genassym.s could be built as follows: replace genassym.c by
code of the form:

    long define_FOO = FOO;
    size_t sizeof_bar = sizeof bar;
    size_t offset_of_baz_in_bar = offsetof(bar, baz);

Compile this to an object file for the target using a cross compiler.
Write a post-processor to convert this file (nm file | awk ...).
nm outout is very easy to parse.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504052044.GAA30107>