2011年9月26日

简单的C++程序 汇编分析

摘要: 简单的C++程序汇编分析//源代码#include"iostream"usingnamespacestd;classStudent{ private: intnum; intscore; public: voidsetdata(intp1,intp2) { inttest=0; num=p1; score=p2; }};intmain(void){ StudentS; S.setdata(1,80); return0;}//汇编分析main函数堆栈:栈顶...S.num←对象S的地址[ebp-8]S.scoreebp...栈底19:intmain(void)20:{004. 阅读全文

posted @ 2011-09-26 17:36 江户川柯南 阅读(211) 评论(0) 推荐(0) 编辑

2011年9月16日

简单的C程序 汇编分析

摘要: 简单的C程序汇编分析//源代码typedefstruct{ inti; charc;}S;intfun(inti,charc,S*s){ s->i=i; s->c=c; return0;}intmain(){ Ss; fun(1,'C',&s); return0;}//汇编分析main函数堆栈(注:栈的增长方向从大到小4字节对齐):栈顶...s.i ←变量s的地址[ebp-8]s.cebp...栈底14:intmain()15:{00401060pushebp00401061movebp,esp00401063subesp,48h00401066pusheb 阅读全文

posted @ 2011-09-16 11:53 江户川柯南 阅读(279) 评论(0) 推荐(0) 编辑

导航