Pt_regs struct in Linux

Source: Internet
Author: User

The pt_regs parameter required for the system call is defined in the include/asm-i386/ptrace. h file:
Struct pt_regs {
Long EBX; // pointer to the executable file path (in regs. EBX
Long ECx; // pointer to the command line parameter (in regs. ECx)
Long edX; // environment variable pointer (in regs. EDX ).
Long ESI;
Long EDI;
Long EBP;
Long eax;
Int xds;
Int xes;
Long orig_eax;
Long EIP;
Int XCS;
Long eflags;
Long ESP;
Int XSS;
};
This parameter describes how the CPU registers in the user State are stored in the core State stack when the system call is executed. With this parameter, sys_execve can obtain the following information stored in the user space: the executable file path pointer (regs. in EBX), command line parameter pointer (regs. in ECx) and environment variable pointer (regs. in EDX ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.