How to determine core file type - Aix

This is a discussion on How to determine core file type - Aix ; I am looking into having our core files written to a common directory on our servers. I would like to be able to add the process name to the core file by writing a C program to look at the ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to determine core file type

  1. How to determine core file type

    I am looking into having our core files written to a common directory on our
    servers. I would like to be able to add the process name to the core file
    by writing a C program to look at the core file and extracting the process
    name. I have been able to figure out the offset of the process name for a
    32 bit app and a 64 bit app. However I cannot figure out how to determine
    if a given core file is from a 32 bit app or a 64 bit app. Is there some
    way this can be done?

    There is a "core version" field (c_version) in the core header however I
    have not found any documentation on what it means. It appears to be a
    bitmapped field and does vary depending on whether it was a 32 bit app or 64
    bit app:

    32 bit: 0F EE DD B1
    64 bit: 0F EE DD B2

    Does the B2 versus B1 indicate a 64 bit app? Is there any other way to
    distinguish 32 bit versus 64 bit application core files?

    Thanks,

    Bruce



  2. Re: How to determine core file type

    On Sep 14, 9:38 am, "Roger Tango" wrote:
    > I am looking into having our core files written to a common directory on our
    > servers. I would like to be able to add the process name to the core file
    > by writing a C program to look at the core file and extracting the process
    > name. I have been able to figure out the offset of the process name for a
    > 32 bit app and a 64 bit app. However I cannot figure out how to determine
    > if a given core file is from a 32 bit app or a 64 bit app. Is there some
    > way this can be done?
    >
    > There is a "core version" field (c_version) in the core header however I
    > have not found any documentation on what it means. It appears to be a
    > bitmapped field and does vary depending on whether it was a 32 bit app or 64
    > bit app:
    >
    > 32 bit: 0F EE DD B1
    > 64 bit: 0F EE DD B2
    >
    > Does the B2 versus B1 indicate a 64 bit app? Is there any other way to
    > distinguish 32 bit versus 64 bit application core files?
    >
    > Thanks,
    >
    > Bruce


    I think core version is old 4.1-style vs new.

    At the top of sys/core.h it says:

    * The IS_PROC64() macro can be used to distinquish between 32-bit and
    * 64-bit processes.

    The file command can also distinguish between the two.
    --S


+ Reply to Thread