这个VC.net解散看起来是对的吗? [英] Does this VC.net dissasembly look right?

查看:89
本文介绍了这个VC.net解散看起来是对的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我声明了两个变量并调用了一个函数。倒数第二个声明

对我来说似乎很可疑。我的另一个非静态函数调用

中的其他方法,同一个类没有this线。此外,执行这个

行后,我的本地变量的地址也会改变。


这是正常的吗?


谢谢,


克里斯


===

int Ni;

双dt;

GetTrackDropParms(Track,dt,Ni);

01610981 lea ecx,[Ni]

01610984 push ecx

01610985 lea edx,[dt]

01610988 push edx

01610989 mov eax,dword ptr [追踪]

0161098C推eax

0161098D mov ecx,dword ptr [this]

01610990调用CtTracker :: GetTrackDropParms(0BC1830h)

解决方案



我收回了我所说的没有看到的这个其他非静态的行

调用同一类中的方法。


然而,当this时执行汇编指令,

局部变量的地址发生变化。为什么会这样?


Chris


" Chris Stankevitz" < CH ****** @ stankevitz.nospamplease.com>在消息中写道

news:ux ************** @ TK2MSFTNGP14.phx.gbl ...

我声明了两个变量叫一个功能。倒数第二个声明对我来说似乎很可疑。我的其他非静态函数调用同一类中的其他方法没有this线。此外,在执行此
行之后,我的局部变量的地址也会发生变化。

这是正常的吗?

谢谢,

Chris

===

int Ni;
double dt;
GetTrackDropParms(Track,dt,Ni);
01610981 lea ecx, [Ni]
01610984推ecx
01610985 lea edx,[dt]
01610988推edx
01610989 mov eax,dword ptr [追踪]
0161098C推eax
0161098D mov ecx,dword ptr [this]
01610990调用CtTracker :: GetTrackDropParms(0BC1830h)



" Chris Stankevitz" < CH ****** @ stankevitz.nospamplease.com>在消息中写道

新闻:Oo ************** @ TK2MSFTNGP09.phx.gbl ...

然而,当这"执行汇编指令后,局部变量的地址会发生变化。为什么会发生这种情况?




好​​吧,如果这是一个真正的问题,可能是堆栈损坏。不太可能是

调试器怪异。你能不能把问题归结为一些小的,可编辑的

片段,你可以在这里发帖吗?


问候,



" William DePalo [MVP VC ++]" < WI *********** @ mvps.org>在留言中写道

新闻:%2 **************** @ tk2msftngp13.phx.gbl ...

嗯,如果它是一个真正的问题,它可能是堆栈损坏。不太可能是调试器的怪异。你可以把问题归结为一些小的,可编辑的片段,你可以在这里发帖吗?

问候,




感谢您的回复Will,


该应用程序是一个大型(100万行)模拟。我无法

缩小它。


有人可以推荐调试堆栈损坏的方法吗?我有很多时间,所以即使是乏味的方式,我也会感到高兴。我只是想知道

发生了什么。


谢谢,


Chris


I declare two variables and call a function. The second to last statement
seems fishy to me. My other non-static function calls to other methods in
the same class do not have "this" line. Furthermore, after executing this
line, the addresses of my local variables change.

Is this normal?

Thanks,

Chris

===
int Ni;
double dt;
GetTrackDropParms(Track, dt, Ni);
01610981 lea ecx,[Ni]
01610984 push ecx
01610985 lea edx,[dt]
01610988 push edx
01610989 mov eax,dword ptr [Track]
0161098C push eax
0161098D mov ecx,dword ptr [this]
01610990 call CtTracker::GetTrackDropParms (0BC1830h)

解决方案


I take back what I said about not seeing "this" line in other non-static
calls to methods in the same class.

Nevertheless, when "this" assembly instruction is executed, the addresses of
local variables change. Why is that happening?

Chris

"Chris Stankevitz" <ch******@stankevitz.nospamplease.com> wrote in message
news:ux**************@TK2MSFTNGP14.phx.gbl...

I declare two variables and call a function. The second to last statement
seems fishy to me. My other non-static function calls to other methods in
the same class do not have "this" line. Furthermore, after executing this
line, the addresses of my local variables change.

Is this normal?

Thanks,

Chris

===
int Ni;
double dt;
GetTrackDropParms(Track, dt, Ni);
01610981 lea ecx,[Ni]
01610984 push ecx
01610985 lea edx,[dt]
01610988 push edx
01610989 mov eax,dword ptr [Track]
0161098C push eax
0161098D mov ecx,dword ptr [this]
01610990 call CtTracker::GetTrackDropParms (0BC1830h)



"Chris Stankevitz" <ch******@stankevitz.nospamplease.com> wrote in message
news:Oo**************@TK2MSFTNGP09.phx.gbl...

Nevertheless, when "this" assembly instruction is executed, the addresses
of local variables change. Why is that happening?



Well, if it is a real problem it could be stack corruption. Less likely is
debugger weirdness. Can you pare the problem down to some small, compilable
snippet that you can post here?

Regards,
Will


"William DePalo [MVP VC++]" <wi***********@mvps.org> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...

Well, if it is a real problem it could be stack corruption. Less likely is
debugger weirdness. Can you pare the problem down to some small,
compilable snippet that you can post here?

Regards,
Will



Thanks for the reply Will,

The application is a large (1 million lines) simulation. I''m unable to
shrink it down.

Can someone recommend ways to go about debugging "stack corruption"? I have
lots of time, so I''d be happy with even tedious ways. I just want to figure
out what is going on.

Thanks,

Chris


这篇关于这个VC.net解散看起来是对的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆