Generating ARM code for a managed assembly on an Intel machine

若如初见. 提交于 2019-12-20 05:24:12

问题


Directly related to this question.

Given a managed assembly for Windows Phone, how can I generate native code for it for an ARM CPU? I don't have a Windows/ARM device (neither tablet nor a phone). There's the ngen utility out there, but AFAIK it can only generate code for the host machine (i. e. Intel).

The reason why I'm asking, the offsets in the crash stack that Windows Phone Dev Center provides are not MSIL offsets (I've checked - they go way beyond MSIL function size). Those look like native code offsets. Now, there's no guarantee that the ARM code that's generated offline will exactly match what's executing on the phone, but at least there'd be some semblance.

EDIT: the crossgen tool sounds like the thing. But I can't get it to work; says file "..." or one of its dependencies was not found - the file is right there and I'm specifying the /MissingDependenciesOK flag.


回答1:


Regardless of what you generate locally you aren't going to get the exact offsets that match the device's output that you are seeing on the store, since there is an extra, final compilation step that is only done at install time on the device which can further change any offsets that you generate locally.

Instead of tracking through those raw stacks people often setup the Application.UnhandledException event so that you capture the real managed stack with extra debugging information and then send that to themselves, either by having the users mail the crash in, or by setting up a web service to collect them.



来源:https://stackoverflow.com/questions/17345747/generating-arm-code-for-a-managed-assembly-on-an-intel-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!