Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2832 → Rev 2833

/branches/tracing/kernel/generic/include/udebug/udebug.h
44,11 → 44,7
*
* - ARG2 - thread identification
* - ARG3 - destination address in the caller's address space
* - ARG4 - size of receiving buffer in bytes
*
* on answer, the kernel will set:
*
* - ARG1 - actual size in bytes of data read
*/
UDEBUG_M_ARGS_READ,
 
/branches/tracing/kernel/generic/src/udebug/udebug_ipc.c
163,7 → 163,6
thread_t *t;
task_t *ta;
void *uspace_buffer;
unative_t to_copy;
int rc;
ipl_t ipl;
unative_t buffer[6];
203,10 → 202,8
/* Now copy to userspace */
 
uspace_buffer = (void *)IPC_GET_ARG3(call->data);
to_copy = IPC_GET_ARG4(call->data);
if (to_copy > 6 * sizeof(unative_t)) to_copy = 6 * sizeof(unative_t);
 
rc = copy_to_uspace(uspace_buffer, buffer, to_copy);
rc = copy_to_uspace(uspace_buffer, buffer, 6 * sizeof(unative_t));
if (rc != 0) {
spinlock_unlock(&ta->lock);
klog_printf("debug_args_read() - copy failed");
213,8 → 210,6
return rc;
}
 
IPC_SET_ARG1(call->data, to_copy);
 
klog_printf("debug_args_read() done");
return 1; /* actually need becksend with retval 0 */
}
/branches/tracing/uspace/app/sctrace/debug_api.c
32,18 → 32,8
 
int debug_args_read(unsigned phoneid, unsigned tid, unsigned *buffer)
{
unsigned copied;
int rc;
 
rc = ipc_call_sync_4_1(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_ARGS_READ,
tid, (sysarg_t)buffer, 6 * sizeof(unsigned), &copied);
 
if (copied != 6 * sizeof(unsigned)) {
printf("Warning: read %d bytes from syscall args instead of 24!\n",
copied);
}
 
return rc;
return ipc_call_sync_3_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_ARGS_READ,
tid, (sysarg_t)buffer);
}
 
int debug_go(unsigned phoneid, unsigned tid, unsigned *ev_type,