question about ucontext_t and friends

From: Etienne Robillard (granted14_at_yahoo.com)
Date: 02/08/05

  • Next message: John-Mark Gurney: "buildenv target"
    Date: Mon, 7 Feb 2005 20:19:17 -0500 (EST)
    To: freebsd-arch@freebsd.org
    
    

    Hi,

    I have a c++ application implementing a user-level
    hardware abstraction (L4 ­µ-kernel in user-mode linux)
    bu I am missing a few arch backbones.

    Afaiu, the application must find some ways to
    manipulate registers in user-context, after having the
    request traced by ptrace(2).

    So far, interfaces are prototyped in similar manners:

    ...
    kernel_entry( *context, ... )

    Where *context is a pointer to a `struct ucontext',
    but I suspect its because the relevant ucontext_t
    type wasnt available for some reasons.

    Question 1:

    Concerning the 'missing members' in ucontext_t, may I
    suspect that conformant applications needs not to
    alter things in uc_mcontext (machine context) ?? [1]

    The docs are saying that:

    "The ucontext_t type that ucp points to defines the
    user context and includes the contents of the calling
    thread's machine registers, the signal mask, and the
    current execution stack."
     
    Therefore this is almost okay but doesnt work on
    freebsd as-is:

    // save it to <machine/reg.h>
    regs.foo = context->uc_mcontext.gregs[REG_FOO]

    TIA
    -erob

    1.
    http://www.opengroup.org/onlinepubs/009695399/functions/getcontext.html
     

    =====
    JabberID: incidah (at) njs (dot) netlab (dot) cz

    -----BEGIN PGP SIGNATURE-----

    iD8DBQBBvMMiwi4xwWEgKqERAsAAAJ0anaSvffwamXLuJnIwH5GRsTjM1wCdGHpa
    BqtF2n/eBawNURrU1t/9FDA=
    =tuy/
    -----END PGP SIGNATURE-----

    ______________________________________________________________________
    Post your free ad now! http://personals.yahoo.ca
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: John-Mark Gurney: "buildenv target"

    Relevant Pages

    • Re: How can I get mouse shortcuts to work in Excel
      ... The Intermediate window is from the Visual Basic Editor. ... There is no right click menu (context menu missing). ... > Hi Dave, Thanks for the response. ...
      (microsoft.public.excel.setup)
    • Re: A twist on OTP for an outstandingly secure channel?
      ... You are missing that there are no "magnitudes beyond ... ... In this particular context, I perceive that ... plaintexts it is impossible to distinguish one from the other, ... unbreakability is probably incorrectly used in this ...
      (sci.crypt)
    • Re: Context Menu Functions in .NET client
      ... I think that there is something that I am missing here. ... the cell changed event is not being raised when I select the menu item ... property in the drawing control, then the cell changed event is firing ... our way of handling context ...
      (microsoft.public.visio.developer.vba)
    • Re: I have a couple of bottles on the finals do you know wot i mean?
      ... Listen, I don't give a pigs burp if it rhymes or not, but at least I ... can spell lobotomy. ... You missing de context o' de whole damn ting. ...
      (uk.radio.amateur)
    • Re: memory and data types
      ... let alone then using the result in an INTEGER context!! ... Ken & Ann Fairfield ... Ken dot And dot Ann ...
      (comp.lang.fortran)