Linux: sc_iaoq -> HP-UX: ? struct sigcontext - HP UX

This is a discussion on Linux: sc_iaoq -> HP-UX: ? struct sigcontext - HP UX ; Hi all: I am trying to port an application to HP-UX 11.11 coming from Linux. The source from Linux (just snipped the one line): return &(((struct sigcontext *) &(context->uc_mcontext))->sc_gr[offset]); On HP-UX 11.11 I find: /usr/include/machine/sys/sigcontext.h #ifndef _SIGCONTEXT_INCLUDE #define _SIGCONTEXT_INCLUDE struct ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Linux: sc_iaoq -> HP-UX: ? struct sigcontext

  1. Linux: sc_iaoq -> HP-UX: ? struct sigcontext


    Hi all:

    I am trying to port an application to HP-UX 11.11 coming from Linux.

    The source from Linux (just snipped the one line):

    return &(((struct sigcontext *) &(context->uc_mcontext))->sc_gr[offset]);

    On HP-UX 11.11 I find:

    /usr/include/machine/sys/sigcontext.h

    #ifndef _SIGCONTEXT_INCLUDE
    #define _SIGCONTEXT_INCLUDE


    struct sigcontext {
    union {
    struct siglocal sl;
    struct siglocalx sx;
    } sc_ctxt; /* context information */

    #ifdef __LP64__
    long sc_pad[7];
    long sc_sigreturn_gp;
    #endif

    long sc_args[NUMARGREGS]; /* arguments to handler */

    #if defined(_KERNEL) && defined(__LP64__)
    struct frame_marker64 sc_sfm;
    #else
    struct frame_marker sc_sfm;
    #endif
    };

    #endif /* _SIGCONTEXT_INCLUDE */

    Hmmmm - obvious question:

    What is the equivalent of sc_iaoq on HP-UX? (I also need "sc_gr" ...)

    Thanks much in advance!!!

    Best,
    Frank

    --

    Frank Goenninger

    frgo(at)mac(dot)com

    "Don't ask me! I haven't been reading comp.lang.lisp long enough to
    really know ..."

  2. Re: Linux: sc_iaoq -> HP-UX: ? struct sigcontext

    Frank Goenninger wrote:
    > I am trying to port an application to HP-UX 11.11 coming from Linux.
    > return &(((struct sigcontext *) &(context->uc_mcontext))->sc_gr[offset]);


    You want a general register?

    > What is the equivalent of sc_iaoq on HP-UX?


    You have to say what it does? Is this the PC?
    You may have to use something like:
    pinfo.hw_regs.ss_wide.ss_32.ss_pcoq_head_lo;

    > (I also need "sc_gr" ...)


    There is no array, each has a separate name:
    pinfo.hw_regs.ss_narrow.ss_gr19;

    There are union members for narrow and for wide.

  3. Re: Linux: sc_iaoq -> HP-UX: ? struct sigcontext

    Dennis Handly writes:

    > Frank Goenninger wrote:
    >> I am trying to port an application to HP-UX 11.11 coming from Linux.
    >> return &(((struct sigcontext *)
    >> &(context->uc_mcontext))->sc_gr[offset]);

    >
    > You want a general register ?
    >
    >> What is the equivalent of sc_iaoq on HP-UX?

    >
    > You have to say what it does? Is this the PC?
    > You may have to use something like:
    > pinfo.hw_regs.ss_wide.ss_32.ss_pcoq_head_lo;
    >
    >> (I also need "sc_gr" ...)

    >
    > There is no array, each has a separate name:
    > pinfo.hw_regs.ss_narrow.ss_gr19;
    >
    > There are union members for narrow and for wide.


    Partly solved. Thanks for the input.
    I did use the GetSSReg macro to overcome direct structure search.

    I do have another question, though.

    See my other post, please...

    Best,
    Frank

    --

    Frank Goenninger

    frgo(at)mac(dot)com

    "Don't ask me! I haven't been reading comp.lang.lisp long enough to
    really know ..."

+ Reply to Thread