Lines Matching refs:context

30 obtain_pointer_data(Context &context, Type *data, void *address, uint32 what)
32 if (address == NULL || !context.GetContents(what))
37 status_t err = context.Reader().Read(address, data, sizeof(Type), bytesRead);
55 read_fdset(Context &context, void *data)
61 status_t err = context.Reader().Read(data, &tmp, sizeof(tmp), bytesRead);
63 return context.FormatPointer(data);
98 TypeHandlerImpl<fd_set *>::GetParameterValue(Context &context, Parameter *,
102 if (data != NULL && context.GetContents(Context::SIMPLE_STRUCTS))
103 return read_fdset(context, data);
104 return context.FormatPointer(data);
110 TypeHandlerImpl<fd_set *>::GetReturnValue(Context &context, uint64 value)
112 return context.FormatPointer((void *)value);
117 format_ltype(Context &context, int ltype)
119 if (context.GetContents(Context::ENUMERATIONS)) {
131 return context.FormatSigned(ltype);
136 format_lwhence(Context &context, int lwhence)
138 if (context.GetContents(Context::ENUMERATIONS)) {
152 return context.FormatSigned(lwhence);
158 format_pointer(Context &context, flock *lock)
162 r = "l_type=" + format_ltype(context, lock->l_type) + ", ";
163 r += "l_whence=" + format_lwhence(context, lock->l_whence) + ", ";
164 r += "l_start=" + context.FormatSigned(lock->l_start) + ", ";
165 r += "l_len=" + context.FormatSigned(lock->l_len);
182 read_pollfd(Context &context, void *data)
184 nfds_t numfds = context.ReadValue<nfds_t>(context.GetSibling(1));
191 status_t err = context.Reader().Read(data, &tmp, sizeof(tmp), bytesRead);
193 return context.FormatPointer(data);
204 && context.GetContents(Context::OUTPUT_VALUES)) {
210 if (tmp[i].fd != -1 && context.GetContents(Context::INPUT_VALUES)) {
226 if (context.GetContents(Context::OUTPUT_VALUES)) {
275 TypeHandlerImpl<pollfd *>::GetParameterValue(Context &context, Parameter *,
279 if (data != NULL && context.GetContents(Context::SIMPLE_STRUCTS))
280 return read_pollfd(context, data);
281 return context.FormatPointer(data);
287 TypeHandlerImpl<pollfd *>::GetReturnValue(Context &context, uint64 value)
289 return context.FormatPointer((void *)value);
295 format_pointer_value(Context &context, void *address)
299 if (obtain_pointer_data(context, &data, address, Context::COMPLEX_STRUCTS))
300 return "{" + format_pointer(context, &data) + "}";
302 return context.FormatPointer(address);
320 format_socket_family(Context &context, int family)
322 if (context.GetContents(Context::ENUMERATIONS)) {
338 return "family = " + context.FormatSigned(family);
344 format_socket_type(Context &context, int type)
346 if (context.GetContents(Context::ENUMERATIONS)) {
357 return "type = " + context.FormatSigned(type);
362 format_socket_protocol(Context &context, int protocol)
364 if (context.GetContents(Context::ENUMERATIONS)) {
379 return "protocol = " + context.FormatSigned(protocol);
385 format_pointer(Context &context, sockaddr *saddr)
389 r = format_socket_family(context, saddr->sa_family) + ", ";
416 read_sockaddr(Context &context, Parameter *param, void *address)
418 param = context.GetNextSibling(param);
420 return context.FormatPointer(address);
422 socklen_t addrlen = context.ReadValue<socklen_t>(param);
427 return context.FormatPointer(address);
430 status_t err = context.Reader().Read(address, &data, addrlen, bytesRead);
432 return context.FormatPointer(address);
434 return "{" + format_pointer(context, (sockaddr *)&data) + "}";
440 TypeHandlerImpl<sockaddr *>::GetParameterValue(Context &context,
444 if (data != NULL && context.GetContents(Context::SIMPLE_STRUCTS))
445 return read_sockaddr(context, param, data);
446 return context.FormatPointer(data);
452 TypeHandlerImpl<sockaddr *>::GetReturnValue(Context &context, uint64 value)
454 return context.FormatPointer((void *)value);
460 format_pointer(Context &context, sockaddr_args *args)
464 r = "addr = " + format_pointer_value<sockaddr>(context, args->address);
465 r += ", len = " + context.FormatUnsigned(args->address_length);
553 format_pointer(Context &context, sockopt_args *args)
560 if (context.GetContents(Context::ENUMERATIONS)) {
575 value = info->handler->GetParameterValue(context, NULL, &args->value);
577 value = "value = " + context.FormatPointer(args->value);
578 value += ", len = " + context.FormatUnsigned(args->length);
582 level = "level = " + context.FormatSigned(args->level, sizeof(int));
585 option = "option = " + context.FormatSigned(args->option, sizeof(int));
592 format_pointer(Context &context, socket_args *args)
596 r = format_socket_family(context, args->family) + ", ";
597 r += format_socket_type(context, args->type) + ", ";
598 r += format_socket_protocol(context, args->protocol);
605 format_pointer(Context &context, message_args *msg)
609 r += "header = " + format_pointer_value<msghdr>(context, msg->header);
610 r += ", flags = " + context.FormatFlags(msg->flags);
611 r += ", data = " + context.FormatPointer(msg->data);
612 r += ", length = " + context.FormatUnsigned(msg->length);
620 get_iovec(Context &context, iovec *iov, int iovlen)
629 status_t err = context.Reader().Read(iov, vecs, sizeof(vecs), bytesRead);
631 r += context.FormatPointer(iov);
632 r += ", " + context.FormatSigned(iovlen);
637 r += "{iov_base=" + context.FormatPointer(vecs[i].iov_base);
638 r += ", iov_len=" + context.FormatUnsigned(vecs[i].iov_len);
647 format_pointer(Context &context, msghdr *h)
651 r = "name = " + format_pointer_value<sockaddr>(context, h->msg_name);
652 r += ", name_len = " + context.FormatUnsigned(h->msg_namelen);
653 r += ", iov = " + get_iovec(context, h->msg_iov, h->msg_iovlen);
655 r += ", control = " + context.FormatPointer(h->msg_control);
656 r += ", control_len = " + context.FormatUnsigned(h->msg_controllen);
658 r += ", flags = " + context.FormatFlags(h->msg_flags);
665 format_pointer(Context &context, ifreq *ifr)
672 format_pointer(Context &context, ifconf *conf)
681 string r = "len = " + context.FormatSigned(conf->ifc_len);
686 status_t err = context.Reader().Read(conf->ifc_buf, buffer,
689 return r + ", buf = " + context.FormatPointer(conf->ifc_buf);
708 + format_pointer(context, &ifr->ifr_addr) + "}}";
721 format_pointer(Context &context, siginfo_t *info)
727 r = "WIFEXITED(s) && WEXITSTATUS(s) == " + context.FormatUnsigned(info->si_status & 0xff);
737 string GetParameterValue(Context &context, Parameter *,
740 return format_pointer_value<Type>(context, *(void **)address);
743 string GetReturnValue(Context &context, uint64 value)
745 return format_pointer_value<Type>(context, (void *)value);