Reading memory that belongs to another process on Windows

2 ビュー (過去 30 日間)
Linda
Linda 2012 年 7 月 23 日
Suppose I have another process running on Windws. That process is stopped in the debugger (Visual Studio). Visual Studio does not have a means of dumping the contents of specified memory locations into a file. However, Visual Studio will tell me the starting address in memory for the data.
Is there a way that Matlab can take a process i.d., a starting address and the number of bytes and read the memory from the process and load it into a Matlab variable / array? Then I would want to have Matlab read this data as 4-byte integer data and give me an array of the integers.
Is there anything that has to be set on the other process to make its memory readable of can Matlab read memory that belongs to any other process?
Thank you for your replies. This would be enormously cool if it worked.
Linda Seltzer

回答 (2 件)

James Tursa
James Tursa 2012 年 7 月 23 日
No. In general, the memory of one process cannot be accessed by another process. There are ways to pass data such as the address itself across (e.g., a COM link ala the MATLAB Engine etc), but the address of one process means nothing to the other process and will not map correctly to the memory you are trying to access (you will likely get a seg fault if you try it).
  6 件のコメント
James Tursa
James Tursa 2012 年 7 月 23 日
Am I to understand from your comment below that you cannot modify the C/C++ program? This would be required to add the code for the MATLAB Engine.
Walter Roberson
Walter Roberson 2012 年 7 月 23 日
Can COM be used to control Visual Studios? And can Visual Studios, so controlled, report back memory contents?

サインインしてコメントする。


Walter Roberson
Walter Roberson 2012 年 7 月 23 日
  1 件のコメント
Linda
Linda 2012 年 7 月 23 日
Thank you. I am studying it.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCOM Component Integration についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by