开发访问本地堆栈帧内存的扩展 [英] Developing an extension accessing to local stack frame memory

查看:59
本文介绍了开发访问本地堆栈帧内存的扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


你好,

Hello,



我现在正在构建一个扩展,我想要访问本地堆栈帧内存。我已成功通过DTE访问本地人,但它只向我显示"本地人"。作为字符串,当我想要获取对象 在堆上分配(C ++),
在本地没有看到(例如动态分配的数组),我无法访问它 因为它没有出现在Locals中。

I'm building right now an extension in which I want to access to a local stack frame memory. I have succeed to access Locals thru DTE, however it only shows me the "locals" as strings and when I'm trying to get Objects  allocated on heap (C++), which are not seen in locals (dynamically allocated array for example), I can't access it  because it does not appear in Locals.


在排序中,如何访问当前堆栈帧中的内存,而不是作为对象而是作为字节?类似于readBytes()。

In sort, how do I access the memory in a current stack frame, not ac an object but as bytes? something like readBytes().


谢谢,


Nikolay。

Nikolay.

推荐答案

我不知道知道什么是DTE,我不知道你已经知道多少。所以我会说一些事情,但你应该要求澄清你需要澄清的任何事情。

I don't know what DTE is and I am not sure how much you already know. So I will say some things but you should ask for clarification of anything you need clarification of.

一种可能性就是在其他一切之后简单地在堆栈上分配诸如char或int之类的东西。你需要访问。然后,其余的堆栈项目在项目地址之前的内存中。或者,如果C ++仍支持
内联汇编程序,只需编写少量汇编程序即可获得堆栈指针寄存器。 Visual Studio中的调试器允许我们在调试时提供内存位置并查看内存,这可能有所帮助。

One possibility is to simply allocate something such as a char or int on the stack after everything else that you need to access. Then the rest of the stack items are in memory prior to the address of the item. Alternatively, if C++ still supports inline assembler, just write a small amount of assembler to get the stack pointer register. The debugger in Visual Studio allows us to provide a memory location while debugging and look at memory and that might help.

但是如果你需要一些可以帮助你的东西要了解每个数据是什么,那就更复杂了。你的问题并不清楚你需要多少。

But if you need something that helps you to understand what each piece of data is then that is more complicated. Your question is not clear about how much you need.


这篇关于开发访问本地堆栈帧内存的扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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