Application of Vs2013 in Linux development (33): Disassembly

Source: Internet
Author: User

Happy Shrimp

http://blog.csdn.net/lights_joy/

Welcome reprint, but please keep the author information


1.1 failed

according to the documentation, disassembly should be implemented IDebugDisassemblyStream2 interface, and then in


        The debugger calls this if it needs to obtain the IDEBUGDISASSEMBLYSTREAM2 for a particular code-context.        The sample engine does not support dissassembly so it returns E_NOTIMPL public        int Getdisassemblystream (enum_disass Embly_stream_scope Dwscope, IDebugCodeContext2 Codecontext, out IDebugDisassemblyStream2 disassemblystream)

returned to the SDM , unfortunately, for two days or so:


Failed.


1.2 It doesn't cost a whole time.

put Debugengine requirements to implement the interface are checked again, or to no avail, almost want to give up this feature, ready to do the template and installation, the results in the view of the registry found an interesting value:


Note the above Disassembly Key, is the institution right here?

Regardless, try it first, and add this value to our interface registration, and then the magic thing happens:


Plus IDebugDisassemblyStream2 the implementation of the interface, a toss, fix:


but it's strange that the options " Show Source Code " This one doesn't work anyway. As described in the document and as a normal conjecture, when disassembled,theSDM invokes the


        public int Read (UINT dwinstructions, enum_disassembly_stream_fields dwfields, out uint Pdwinstructionsread, Disassemblydata[] prgdisassembly)

through Dwfields should be able to get the option to show the source code, but in fact this value has always been constant!

Let's do it first!





??

Application of Vs2013 in Linux development (33): Disassembly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.