Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8520837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:38:36+00:00 2026-06-11T06:38:36+00:00

The third parameter of sa_sigaction is a pointer which point to a machine-dependent struct

  • 0

The third parameter of sa_sigaction is a pointer which point to a machine-dependent struct ucontext, I would like to know what I can dump from struct ucontext.

void (*sa_sigaction)(int signum, siginfo_t *info, void *ucontext)

struct ucontext {
        unsigned long     uc_flags;
        struct ucontext  *uc_link;
        stack_t           uc_stack;
        struct sigcontext uc_mcontext;
        sigset_t          uc_sigmask;   /* mask last for extensibility */
};

Particularly through uc_mcontext (if you can show me where I can know more about other data members, that’s would be great), as people usually use uc_mcontext to dump host registers like this,

ucontext->uc_mcontext.gregs[REG_EIP]

Because uc_mcontext type is struct sigcontext, I look on struct sigcontext in arch/x86/include/asm/sigcontext.h.

struct sigcontext {
        unsigned short gs, __gsh;
        unsigned short fs, __fsh;
        unsigned short es, __esh;
        unsigned short ds, __dsh;

        ... snip ...
};

Is it the right one, beacuse I don’t see gregs in struct sigcontext? Any suggestion is welcomed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:38:38+00:00Added an answer on June 11, 2026 at 6:38 am

    You are looking at the Linux kernel definition of sigcontext. You should be looking at the C library headers of struct ucontext. It is defined at /usr/include/sys/ucontext.h file

    Note that it is architecture specific – e.g. the fields for x86 and PPC, for example, are totally different!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i pass to asp.net mvc action parameters like: line[first], line[second], line[third], people[john]
Constructor for PHP's exception has third parameter, documentation says: $previous: The previous exception used
I'm using a third party library which has a blocking function, that is, it
I have an API (from third party java library) that looks like: public List<?>
I'm working with a third party API that receives several parameters which must be
I have a page with multiple flash objects which are written by a third
like many other peoples, I want to turn a async function of a third
I am consuming XML from a third party source but a can't seem to
I am developing a maven plugin, which uses a third party jar file ,
Short version: I have a third-party MVC Extension that returns the FileResult. I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.