/usr/share/vala/vapi/r_anal.vapi is in radare2-vala 0.9.6-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | /* radare - LGPL - Copyright 2010-2013 pancake<@nopcode.org> */
/* this vapi is broken as shit... we need to rename some stuff here ..
if we can just avoid to use cname CCode attribute... */
namespace Radare {
[Compact]
[CCode (cheader_filename="r_anal.h,r_list.h,r_types_base.h", cprefix="r_anal_", lowercase_c_prefix="r_anal_", free_function="r_anal_free", cname="RAnal")]
public class RAnal {
public int bits;
public bool big_endian;
public bool split;
public void *user;
public RList<RAnal.Function> fcns;
// public RList<RAnal.VarType> vartypes;
public RMeta meta;
public RReg reg;
public RSyscall syscall;
/* bindiffing options
-- THIS IS PRIVATE --
public bool diff_ops;
public double diff_thbb;
*/
public RAnal ();
public bool op_hexstr(uint64 addr, string hexstr);
public bool esil_eval (string str);
public bool set_bits (int bits);
public bool set_big_endian (bool big);
//public bool set_pc (uint64 addr);
public void diff_setup(bool doops, double thbb, double thfcn);
public void diff_setup_i(bool doops, int thbb, int thfcn);
public RList<RAnal.Function> get_fcns();
public Function get_fcn_at (uint64 addr);
public void trace_bb (uint64 addr);
[Compact]
[CCode (cname="RAnalValue")]
public class Value {
public bool absolute;
public bool memref;
public uint64 @base;
public int64 delta;
public int64 imm;
public int mul;
//public uint16 sel;
public RReg.Item reg;
public RReg.Item regdelta;
}
/*
[Compact]
[CCode (cname="RAnalCond")]
public class Cond {
public int type;
public Value arg[2];
}
*/
[CCode (cname="int", cprefix="R_ANAL_COND_")]
public enum Cnd {
EQ,
NE,
GE,
GT,
LE,
LT
}
/*
[CCode (cname="int", cprefix="R_ANAL_VAR_TYPE_")]
public enum VarClass {
NULL,
GLOBAL,
LOCAL,
ARG,
ARGREG
}
*/
[CCode (cname="int", cprefix="R_ANAL_FCN_TYPE_")]
public enum FunctionType {
NULL,
FCN,
LOC,
SYM,
IMP
}
[CCode (cname="int", cprefix="R_ANAL_BB_TYPE_")]
public enum BlockType {
NULL,
HEAD,
BODY,
LAST,
FOOT,
SWITCH
}
[CCode (cname="int", cprefix="R_ANAL_DIFF_TYPE_")]
public enum BlockDiff {
NULL,
MATCH,
UNMATCH
}
[CCode (cname="int", cprefix="R_ANAL_REFLINE_TYPE_")]
public enum ReflineType {
STYLE,
WIDE
}
[CCode (cname="int", cprefix="R_ANAL_RET_")]
public enum Ret {
ERROR,
DUP,
NEW,
END
}
[CCode (cname="int", cprefix="R_ANAL_STACK_")]
public enum Stack {
NULL,
NOP,
INC,
GET,
SET
}
[CCode (cname="int", cprefix="R_ANAL_DATA_")]
public enum Data {
NULL,
HEX,
STR,
CODE,
FUN,
STRUCT,
LAST
}
[CCode (cname="int", cprefix="R_ANAL_OP_FAMILY_")]
public enum OpFamily {
UNKNOWN,
CPU,
FPU,
MMX,
PRIV,
LAST
}
[CCode (cname="int", cprefix="R_ANAL_VAR_DIR_")]
public enum VarDir {
NONE,
IN,
OUT
}
[CCode (cname="int", cprefix="R_ANAL_OP_TYPE_")]
public enum OpType {
NULL,
JMP,
UJMP,
CJMP,
CALL,
UCALL,
REP,
RET,
ILL,
UNK,
NOP,
MOV,
TRAP,
SWI,
UPUSH,
PUSH,
POP,
CMP,
ADD,
SUB,
MUL,
DIV,
SHR,
SHL,
OR,
AND,
XOR,
NOT,
STORE,
LOAD,
LEA,
LEAVE,
//LAST
}
[Compact]
[CCode (cprefix="r_anal_bb_", cname="RAnalBlock")]
public class Block {
public uint64 addr;
public uint64 size;
public uint64 jump;
public uint64 fail;
public BlockType type;
public int ninstr;
public bool returnbb;
public bool conditional;
public bool traced;
public uint8* fingerprint;
public Diff diff;
//public RList<RAnal.Op> ops;
}
public void bb (Block bb, uint64 addr, uint8 *buf, uint64 len, bool head);
public Block* bb_from_offset (uint64 addr);
[Compact]
[CCode (cprefix="r_anal_op_", cname="RAnalOp")]
public class Op {
public string mnemonic;
public uint64 addr;
public int type;
public bool stackop;
public int cond;
public int length;
public int nopcode;
public int family;
public bool eob;
public int delay;
public uint64 jump;
public uint64 fail;
public uint32 selector;
public int64 ptr;
public uint64 val;
public int64 stackptr;
public bool refptr;
public char esil[64];
//TODO public uint64 ref;
public Value src[3];
public Value dst;
}
public string op_to_string(Op op);
public unowned string op_to_esil_string(Op op);
[Compact]
[CCode (cprefix="r_anal_diff_", cname="RAnalDiff")]
public class Diff {
public BlockDiff type;
public string name;
public uint64 addr;
}
[CCode (cname="RAnalFunction", free_function="", cprefix="r_anal_fcn_", ref_function="", unref_function="")]
public class Function {
public string name;
public string dsc;
public int size;
public int bits;
public short type;
public short rets;
public short fmod;
public short call;
public string attr;
public uint64 addr;
public int stack;
public int ninstr;
public int nargs;
public int depth;
//public Type args;
// MUST BE deprecated public VarSub varsubs[32];
public Diff diff;
public uint8* fingerprint;
//public FunctionType type;
public RList<RAnal.Block> bbs;
public RList<RAnal.Block> get_bbs();
public RList<RAnal.Var> vars;
public RList<RAnal.Var> get_vars();
public RList<RAnal.Ref> get_refs();
public RList<RAnal.Ref> refs;
public RList<RAnal.Ref> xrefs;
public RList<RAnal.Ref> get_xrefs();
}
[Compact]
[CCode (cname="RAnalVar")]
public class Var {
public string name;
public string type;
public int delta;
public RList<RAnal.VarAccess> accesses;
}
[Compact]
[CCode (cname="RAnalVarAccess")]
public class VarAccess {
public uint64 addr;
public bool @set;
}
#if 0
[Compact]
[CCode (cname="RAnalVarSub")]
public struct VarSub {
public char pat[1024];
public char sub[1024];
}
[Compact]
[CCode (cname="RAnalType")]
public class Type {
public string name;
public uint32 size;
public int type;
// TODO. add custom union type here
}
#endif
/*
[Compact]
[CCode (cname="RAnalVarType")]
public class VarType {
public string name;
public string fmt;
public uint size;
}
*/
[Compact]
[CCode (cname="RAnalRef", free_function="")]
public class Ref {
public int type;
public uint64 addr;
public uint64 at;
}
[Compact]
[CCode (cname="RAnalRefline", free_function="")]
public class Refline {
public uint64 from;
public uint64 to;
public int index;
}
}
/* meta */
[Compact]
[CCode (cname="RMeta", free_function="r_meta_free", cprefix="r_meta_")]
public class RMeta {
[Compact]
[CCode (cname="RMetaItem")]
public class Item {
public uint64 from;
public uint64 to;
public uint64 size;
public int type;
public string str;
}
public RList<RMeta.Item> data;
[CCode (cname="int", cprefix="R_META_WHERE_")]
public enum Where {
PREV,
HERE,
NEXT
}
[CCode (cname="int", cprefix="R_META_TYPE_")]
public enum Type {
ANY,
DATA,
CODE,
STRING,
COMMENT
}
//public int count (RMeta.Type type, uint64 from, uint64 to,
//public string get_string(RMeta.Type, uint64 addr);
public bool @add(RMeta.Type type, uint64 from, uint64 size, string str);
public bool del(RMeta.Type type, uint64 from, uint64 size, string str);
public RMeta.Item find(uint64 off, RMeta.Type type, RMeta.Where where);
public bool cleanup (uint64 from, uint64 to);
public static unowned string type_to_string(RMeta.Type type);
public int list(RMeta.Type type, uint64 rad);
}
}
|