Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lookup_dcookie.c 531B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
  3. * Copyright (c) 2015-2018 The strace developers.
  4. * All rights reserved.
  5. *
  6. * SPDX-License-Identifier: LGPL-2.1-or-later
  7. */
  8. #include "defs.h"
  9. SYS_FUNC(lookup_dcookie)
  10. {
  11. if (entering(tcp))
  12. return 0;
  13. /* cookie */
  14. int argn = printllval(tcp, "%llu", 0);
  15. tprints(", ");
  16. /* buffer */
  17. if (syserror(tcp))
  18. printaddr(tcp->u_arg[argn]);
  19. else
  20. printstrn(tcp, tcp->u_arg[argn], tcp->u_rval);
  21. /* len */
  22. tprintf(", %" PRI_klu, tcp->u_arg[argn + 1]);
  23. return 0;
  24. }