File: hello.c

package info (click to toggle)
radare2 0.9.6-3.1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 17,496 kB
  • ctags: 45,959
  • sloc: ansic: 240,999; sh: 3,645; makefile: 2,520; python: 1,212; asm: 312; ruby: 214; awk: 209; perl: 188; lisp: 169; java: 23; xml: 17; php: 6
file content (21 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include "r_syscall.h"

int main() {
	int i, num = 3;
	RSyscall *ctx = r_syscall_new ();
	r_syscall_setup (ctx, "x86", "linux", 32);

	printf("4 = %s\n", r_syscall_get_i(ctx, 4, -1));
	printf("write = %d\n", r_syscall_get_num(ctx, "write"));

	// if args = 0 { no args }
	for (i=1; i<=num; i++) {
		const char *arg = r_syscall_reg (ctx, i, num);
		printf ("%d %d: %s\n", i, num, arg);
	}

	r_syscall_free (ctx);

	return 0;
}