Open hollowdrutt opened 3 years ago
Hi and thanks for reporting this. Like you, I too am not sure if there is anything we can do to account for this between different versions of Capstone.
In addition to this issue, its worth pointing out that any changes to structures in native Capstone APIs will generally break Capstone.NET. From my experience Capstone does tend to break backwards compatibility between major versions. I fully expect the next
version to be incompatible with v4
(at least for some dissemblers).
My solution to this has been to release newer versions of Capstone.NET that align/support specific versions of Capstone. If there are suggestions for an improved method, please let me know. PRs are welcome :)
https://github.com/9ee1/Capstone.NET/blob/1ed8e2502e770de6655b70877867c22dddcc4d4f/Gee.External.Capstone/NativeCapstone.cs#L52 I've been struggling a bit with trying to use a newer version of capstone than v4 to be able to use the MOS65XX disassembler and I had some problems with accessing the architecture specific details. It seems to me that the magic 80 byte offset is caused by the padding of the struct to make the union of architecture details align in memory. Using the
/d1reportSingleClassLayout
command line option in Visual C++ on source code in the v4 branch of capstone shows an 80 byte offset to the architecture detailAnd doing the same in the capstone next branch shows 88 bytes
Don't know if there is anything to be done in the Capstone.NET source code, but at least I want to give a heads up for anyone trying to use a newer version of capstone.