Windows Program Stack distribution

Source: Internet
Author: User

Relationship of parameters, return address, local variables, and EBP

Debug Version:

0x004000d0 local_3 ebp-20 <--local variable 3
0xCCCCCCCC
0xCCCCCCCC
0x004000dc local_2 ebp-14 <--local variable 2
0xCCCCCCCC
0xCCCCCCCC
0x004000e8 local_1 ebp-8 <--local variable 1
0xCCCCCCCC
0x004000f0 ebp_old ebp <--old ebp value
0x004000f4 retn_addr ebp+4 <--return address
0x004000f8 parem_1 ebp+8 <--parameter 1
0x004000fc param_2 ebp+c <--parameter 2
0x00400100 param_3 ebp+10 <--parameter 3

Release version:

0x004000e4 local_3 ebp-c <--local variable 3
0x004000e8 local_2 ebp-8 <--local variable 2
0x004000ec local_1 ebp-4 <--local variable 1
0x004000f0 ebp_old ebp <--old ebp value
0x004000f4 retn_addr ebp+4 <--return address
0x004000f8 parem_1 ebp+8 <--parameter 1
0x004000fc param_2 ebp+c <--parameter 2
0x00400100 param_3 ebp+10 <--parameter 3

Stack from high address to low address growth

 

Windows Program Stack distribution

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.