Giter Club home page Giter Club logo

function-call-principle's Issues

【疑问】有关函数栈帧-stack5.png

个人以为 stack5.png 的左图有些奇怪:

stack5

  • 如果这里的 initial 指的是 销毁栈帧 这个操作之前的状态,那么 bp 至少不应该指向当前函数栈帧 old bp 之外的空间;
  • 如果这里的 initial 指的是整个栈帧创建之前的状态,那么 ret addr 应该还没有创建,sp 也不应该指向它;

stack5.png 图上方文字描述为:“销毁时先把 栈指针 (sp) 移动到此时 栈基址 (bp) 的位置”,按照 stack5.pnginitial 状态,那么 sp 应该直接指向图中 bp 指向的区域(根据上文,这里的 bp 或许指的是上一个函数的 old bp

综上我认为 stack5.png 的左图有些奇怪。如果我阅读时理解出现偏差,还请大佬直接 closeissue 😢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.