mirror of
https://github.com/yuzu-mirror/unicorn.git
synced 2026-04-05 22:45:40 +00:00
Java bindings (#709)
* Remove glib from samples makefile * support new APIs * reimplement register batch mode interface * stop using deprecated java API
This commit is contained in:
parent
d00f773e8e
commit
21ffaf7d10
10 changed files with 377 additions and 252 deletions
|
|
@ -69,9 +69,9 @@ public class Sample_sparc {
|
|||
|
||||
static void test_sparc()
|
||||
{
|
||||
byte[] g1 = toBytes(0x1230); // G1 register
|
||||
byte[] g2 = toBytes(0x6789); // G2 register
|
||||
byte[] g3 = toBytes(0x5555); // G3 register
|
||||
Long g1 = new Long(0x1230); // G1 register
|
||||
Long g2 = new Long(0x6789); // G2 register
|
||||
Long g3 = new Long(0x5555); // G3 register
|
||||
|
||||
System.out.print("Emulate SPARC code\n");
|
||||
|
||||
|
|
@ -102,8 +102,8 @@ public class Sample_sparc {
|
|||
// now print out some registers
|
||||
System.out.print(">>> Emulation done. Below is the CPU context\n");
|
||||
|
||||
g3 = u.reg_read(Unicorn.UC_SPARC_REG_G3, 4);
|
||||
System.out.print(String.format(">>> G3 = 0x%x\n", toInt(g3)));
|
||||
g3 = (Long)u.reg_read(Unicorn.UC_SPARC_REG_G3);
|
||||
System.out.print(String.format(">>> G3 = 0x%x\n", g3.intValue()));
|
||||
|
||||
u.close();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue