From: Nguyen A. Q. <aq...@gm...> - 2015-11-09 16:25:44
|
the related commit on bindings support for this API is at https://github.com/aquynh/capstone/commit/10647aef5899eb79171b1f39125983f7522b83d3 you can see here all the bindings got updated, but Java binding did not have the API supported yet. so i think you only need to add the API to Java to finish this job. just in case, for reference, see how Python supports this API. Thanks, Quynh http://www.capstone-engine.org http://www.unicorn-engine.org On Tue, Nov 10, 2015 at 12:17 AM, Philipp Roskosch < phi...@si...> wrote: > 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 > > > > > ------------------------------------------------------------------------------ > 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 > |