362,7 → 362,7 |
ta = get_lock_callee_task(phone); |
|
ta->debug_go_call = call; |
t = get_task_thread_by_id(ta, IPC_GET_ARG1(call->data)); |
t = get_task_thread_by_id(ta, IPC_GET_ARG2(call->data)); |
if (t == NULL) { |
spinlock_unlock(&ta->lock); |
return ENOENT; |
389,14 → 389,14 |
|
ta = get_lock_callee_task(phone); |
klog_printf("task %llu", ta->taskid); |
t = get_task_thread_by_id(ta, IPC_GET_ARG1(call->data)); |
t = get_task_thread_by_id(ta, IPC_GET_ARG2(call->data)); |
if (t == NULL) { |
spinlock_unlock(&ta->lock); |
return ENOENT; |
} |
|
uspace_buffer = (void *)IPC_GET_ARG2(call->data); |
to_copy = IPC_GET_ARG3(call->data); |
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, t->syscall_args, to_copy); |
432,8 → 432,8 |
ta = get_lock_callee_task(phone); |
klog_printf("task %llu", ta->taskid); |
|
uspace_buffer = (void *)IPC_GET_ARG1(call->data); |
buf_size = IPC_GET_ARG2(call->data); |
uspace_buffer = (void *)IPC_GET_ARG2(call->data); |
buf_size = IPC_GET_ARG3(call->data); |
|
copied = total = 0; |
for (cur = ta->th_head.next; cur != &ta->th_head; cur = cur->next) { |
473,7 → 473,32 |
return 1; /* actually need becksend with retval 0 */ |
} |
|
#include <udebug.h> |
|
static int debug_request_preprocess(call_t *call, phone_t *phone) |
{ |
int rc; |
|
switch (IPC_GET_ARG1(call->data)) { |
case UDEBUG_M_BEGIN: |
rc = debug_begin(call, phone); |
return rc; |
case UDEBUG_M_GO: |
rc = debug_go(call, phone); |
return rc; |
case UDEBUG_M_ARGS_READ: |
rc = debug_args_read(call, phone); |
return rc; |
case UDEBUG_M_THREAD_READ: |
rc = debug_thread_read(call, phone); |
return rc; |
default: |
break; |
} |
|
return 0; |
} |
|
/** Called before the request is sent. |
* |
* @param call Call structure with the request. |
523,19 → 548,10 |
return rc; |
} |
break; |
case IPC_M_DEBUG_BEGIN: |
case IPC_M_DEBUG_ALL: |
/* actually need possibility of backsend with 0 result code */ |
rc = debug_begin(call, phone); |
rc = debug_request_preprocess(call, phone); |
return rc; |
case IPC_M_DEBUG_GO: |
rc = debug_go(call, phone); |
return rc; |
case IPC_M_DEBUG_ARGS_READ: |
rc = debug_args_read(call, phone); |
return rc; |
case IPC_M_DEBUG_THREAD_READ: |
rc = debug_thread_read(call, phone); |
return rc; |
default: |
break; |
} |
565,7 → 581,7 |
|
if (call->buffer) { |
/* This must be an affirmative answer to IPC_M_DATA_READ. */ |
/* or IPC_M_DEBUG_MEM_READ... */ |
/* or IPC_M_DEBUG_ALL/UDEBUG_M_MEM_READ... */ |
uintptr_t dst = IPC_GET_ARG1(call->data); |
size_t size = IPC_GET_ARG2(call->data); |
int rc = copy_to_uspace((void *) dst, call->buffer, size); |
598,11 → 614,7 |
IPC_SET_ARG5(call->data, phoneid); |
} |
switch (IPC_GET_METHOD(call->data)) { |
case IPC_M_DEBUG_BEGIN: |
case IPC_M_DEBUG_END: |
case IPC_M_DEBUG_GO: |
case IPC_M_DEBUG_STOP: |
case IPC_M_DEBUG_GUARD: |
case IPC_M_DEBUG_ALL: |
return -1; |
default: |
break; |