From: Philipp R. <phi...@si...> - 2015-11-09 16:17:38
|
Hi, I looked inside the source code and it seems that everything is prepared for operands and read/write-register-stuff. In Capstone.java line 447 we retrieve the information from the "Proxy interface to Native Library". In my understanding java is talking to the actual capstone implementation and then parses the results. When trying to access the "detail-information" (like operands etc) (Capstone.java line 138-151) these are not available. So I wonder which piece is missing in the implementation. If you can give me some hint, I'll try to implement it. Best Philipp On 09.11.2015 15:41, Nguyen Anh Quynh wrote: > On Mon, Nov 9, 2015 at 10:31 PM, Philipp Roskosch < > phi...@si...> wrote: > >> Hello everyone, >> >> I am trying to implement static analysis for ARM assembly using Capstone >> and its Java bindings. The cs_regs_access() API is exactly what I was >> looking for. Are there any examples for how to use it correctly? >> >> > this API is not supported by Java binding in the "next" branch yet. > if you can implement that, please send a pull request on Github. > > > thanks. > Q > > When trying to display every written and read register the regsWrite and >> regsRead array is empty most of the times. Also instruction.operants.op >> array is always empty. >> >> I turned on the details with "cs.setDetail(Capstone.CS_OPT_ON);". >> Displaying accessed registers looks like this: >> >> for(short i: instruction.regsWrite) >> System.out.println("Written: " + instruction.regName( i )); >> >> >> Help is much appreciated! >> >> Best regards, >> Philipp >> >> >> ------------------------------------------------------------------------------ >> Presto, an open source distributed SQL query engine for big data, initially >> developed by Facebook, enables you to easily query your data on Hadoop in a >> more interactive manner. Teradata is also now providing full enterprise >> support for Presto. Download a free open source copy now. >> http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140 >> _______________________________________________ >> Capstone-users mailing list >> Cap...@li... >> https://lists.sourceforge.net/lists/listinfo/capstone-users >> > > > > ------------------------------------------------------------------------------ > Presto, an open source distributed SQL query engine for big data, initially > developed by Facebook, enables you to easily query your data on Hadoop in a > more interactive manner. Teradata is also now providing full enterprise > support for Presto. Download a free open source copy now. > http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140 > > > > _______________________________________________ > Capstone-users mailing list > Cap...@li... > https://lists.sourceforge.net/lists/listinfo/capstone-users > |