Sorry, Ben. As far as I've ever known, you cannot get such a listing from
either gcc (this information is thrown away prior to assembly, except for
debugging) or as. The closest thing you can get is a DWARF-3 description
through DIEs (Debug Information Entries). It's roundabout, but it's the
only way I know of.

1. Compile your program with -g
2. You'll need a program called "dwarfdump". It's available in the libdwarf
package, you'll probably need to download and build it.
3. Where your program is named "myprog", run dwarfdump -i myprog | less

To find the first structure definition, search forward for
DW_TAG_structure_type. The struct you seek will have a DT_AT_name of
"task_struct". DW_TAG_member items are your members' identifiers. The
information is a little dispersed, but it's usually there and obvious.
Offsets from the start of the aggregate are expressed by
DW_AT_data_member_location values within the DW_TAG_member block. It will
look bizarre at first, but you'll get used to it. If you're curious about
this data and its format, it's described in the Dwarf-3 specification.

HTH,
--Jim--

Linux on 390 Port <[email protected]> wrote on 01/07/2008 01:56:09
PM:

> I would like an assembler (or offset map) of task_struct. It is defined
in
> sched.h with quite a few subdefinitions.
>
> How can I request this of GCC (or AS)?
>
> --
> Binyamin Dissen <[EMAIL PROTECTED]>
> http://www.dissensoftware.com
>
> Director, Dissen Software, Bar & Grill - Israel
>
>
> Should you use the mailblocks package and expect a response from me,
> you should preauthorize the dissensoftware.com domain.
>
> I very rarely bother responding to challenge/response systems,
> especially those from irresponsible companies.
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to