From: Roland McGrath Date: Sat, 13 Nov 1999 23:42:53 +0000 (+0000) Subject: 1999-11-09 Roland McGrath X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9eabf042999a2dd6eb993f0b67ea4e61399a9a2d;p=thirdparty%2Fglibc.git 1999-11-09 Roland McGrath * hurd/report-wait.c (describe_port): Return char * and use __stpcpy to return the location of the null byte written into the string. (describe_number): Likewise. (describe_number): Remove assert, not always used with #. If FLAVOR is null, don't use it. (describe_number): Take signed argument and print a - if negative. (_S_msg_report_wait): Report system call number for system calls that aren't mach_msg. Soup up reporting for mach_msg: If destination port matches SS->intr_port, bracket port description with [...] to indicate a Hurd interruptible RPC; if destination port is null, examine the receive port and report that state; if receive port is also null, check for timeout and report its value. * sysdeps/mach/hurd/i386/intr-msg.h (MSG_EXAMINE): Return int that is zero iff we managed to examine the stack; take new args RCV_NAME, SEND_NAME, OPTION, and TIMEOUT to fill in with mach_msg args. --- diff --git a/sysdeps/mach/hurd/i386/intr-msg.h b/sysdeps/mach/hurd/i386/intr-msg.h index a12b2f21748..d862d5842a4 100644 --- a/sysdeps/mach/hurd/i386/intr-msg.h +++ b/sysdeps/mach/hurd/i386/intr-msg.h @@ -83,23 +83,35 @@ struct mach_msg_trap_args }; -static inline mach_port_t -MSG_EXAMINE (struct i386_thread_state *state, int *msgid) +static inline int +MSG_EXAMINE (struct i386_thread_state *state, int *msgid, + mach_port_t *rcv_name, mach_port_t *send_name, + mach_msg_option_t *option, mach_msg_timeout_t *timeout) { const struct mach_msg_trap_args *args = (const void *) state->uesp; mach_msg_header_t *msg; - mach_port_t send_port; if (_hurdsig_catch_memory_fault (args)) - return MACH_PORT_NULL; + return -1; msg = args->msg; + *option = args->option; + *timeout = args->timeout; + *rcv_name = args->rcv_name; _hurdsig_end_catch_fault (); - if (_hurdsig_catch_memory_fault (msg)) - return MACH_PORT_NULL; - send_port = msg->msgh_remote_port; - *msgid = msg->msgh_id; - _hurdsig_end_catch_fault (); + if (msg == 0) + { + *send_name = MACH_PORT_NULL; + *msgid = 0; + } + else + { + if (_hurdsig_catch_memory_fault (msg)) + return -1; + *send_name = msg->msgh_remote_port; + *msgid = msg->msgh_id; + _hurdsig_end_catch_fault (); + } - return send_port; + return 0; }