Home | History | Annotate | Download | only in qemu

Lines Matching refs:ARG

169 #define ARG(n)					\
194 if (!(s = lock_user_string(ARG(0))))
197 if (ARG(1) >= 12)
200 if (ARG(1) < 4)
206 gdb_do_syscall(arm_semi_cb, "open,%s,%x,1a4", ARG(0),
207 (int)ARG(2)+1, gdb_open_modeflags[ARG(1)]);
210 ret = set_swi_errno(ts, open(s, open_modeflags[ARG(1)], 0644));
212 unlock_user(s, ARG(0), 0);
216 gdb_do_syscall(arm_semi_cb, "close,%x", ARG(0));
219 return set_swi_errno(ts, close(ARG(0)));
250 len = ARG(2);
253 gdb_do_syscall(arm_semi_cb, "write,%x,%x,%x", ARG(0), ARG(1), len);
256 if (!(s = lock_user(VERIFY_READ, ARG(1), len, 1)))
259 ret = set_swi_errno(ts, write(ARG(0), s, len));
260 unlock_user(s, ARG(1), 0);
266 len = ARG(2);
269 gdb_do_syscall(arm_semi_cb, "read,%x,%x,%x", ARG(0), ARG(1), len);
272 if (!(s = lock_user(VERIFY_WRITE, ARG(1), len, 0)))
276 ret = set_swi_errno(ts, read(ARG(0), s, len));
278 unlock_user(s, ARG(1), len);
288 gdb_do_syscall(arm_semi_cb, "isatty,%x", ARG(0));
291 return isatty(ARG(0));
295 gdb_do_syscall(arm_semi_cb, "lseek,%x,%x,0", ARG(0), ARG(1));
298 ret = set_swi_errno(ts, lseek(ARG(0), ARG(1), SEEK_SET));
306 ARG(0), env->regs[13]-64);
310 ret = set_swi_errno(ts, fstat(ARG(0), &buf));
320 gdb_do_syscall(arm_semi_cb, "unlink,%s", ARG(0), (int)ARG(1)+1);
323 if (!(s = lock_user_string(ARG(0))))
327 unlock_user(s, ARG(0), 0);
333 ARG(0), (int)ARG(1)+1, ARG(2), (int)ARG(3)+1);
337 s = lock_user_string(ARG(0));
338 s2 = lock_user_string(ARG(2));
345 unlock_user(s2, ARG(2), 0);
347 unlock_user(s, ARG(0), 0);
356 gdb_do_syscall(arm_semi_cb, "system,%s", ARG(0), (int)ARG(1)+1);
359 if (!(s = lock_user_string(ARG(0))))
363 unlock_user(s, ARG(0), 0);
376 char **arg = ts->info->host_argv;
377 int len = ARG(1);
379 char *cmdline_buffer = (char*)lock_user(VERIFY_WRITE, ARG(0), len, 0);
386 while (*arg && len > 2) {
387 int n = strlen(*arg);
395 memcpy(s, *arg, n);
398 arg++;
405 unlock_user(cmdline_buffer, ARG(0), len);
411 return *arg ? -1 : 0;
439 if (!(ptr = lock_user(VERIFY_WRITE, ARG(0), 16, 0)))
446 unlock_user(ptr, ARG(0), 16);
449 if (!(ptr = lock_user(VERIFY_WRITE, ARG(0), 16, 0)))
457 unlock_user(ptr, ARG(0), 16);