Initial public source release
Split reusable rendering and format support into vectorail-core and vectorail-gc.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// GhidraScript: dump 32-bit words as hex, signed integer, and IEEE-754 float.
|
||||
// Usage: DumpScalars.java <address> [count]
|
||||
|
||||
import ghidra.app.script.GhidraScript;
|
||||
import ghidra.program.model.address.Address;
|
||||
|
||||
public class DumpScalars extends GhidraScript {
|
||||
@Override
|
||||
public void run() throws Exception {
|
||||
String[] args = getScriptArgs();
|
||||
if (args == null || args.length == 0) {
|
||||
printerr("DumpScalars: needs address and optional count");
|
||||
return;
|
||||
}
|
||||
|
||||
Address start = toAddr(Long.decode(args[0]));
|
||||
int count = args.length > 1 ? Integer.decode(args[1]) : 1;
|
||||
for (int i = 0; i < count; ++i) {
|
||||
Address slot = start.add(i * 4L);
|
||||
int raw = getInt(slot);
|
||||
println(String.format(
|
||||
"%s hex=%08x int=%d float=%.9g",
|
||||
slot, raw, raw, Float.intBitsToFloat(raw)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user