Changeset b7fd2a0 in mainline for kernel/generic/src/udebug
- Timestamp:
- 2018-01-13T03:10:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- Location:
- kernel/generic/src/udebug
- Files:
-
- 3 edited
-
udebug.c (modified) (1 diff)
-
udebug_ipc.c (modified) (10 diffs)
-
udebug_ops.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug.c
r36f0738 rb7fd2a0 397 397 * 398 398 */ 399 int udebug_task_cleanup(struct task *task)399 errno_t udebug_task_cleanup(struct task *task) 400 400 { 401 401 assert(mutex_locked(&task->udebug.lock)); -
kernel/generic/src/udebug/udebug_ipc.c
r36f0738 rb7fd2a0 51 51 #include <udebug/udebug_ipc.h> 52 52 53 int udebug_request_preprocess(call_t *call, phone_t *phone)53 errno_t udebug_request_preprocess(call_t *call, phone_t *phone) 54 54 { 55 55 switch (IPC_GET_ARG1(call->data)) { … … 71 71 static void udebug_receive_begin(call_t *call) 72 72 { 73 int rc;73 errno_t rc; 74 74 bool active; 75 75 … … 98 98 static void udebug_receive_end(call_t *call) 99 99 { 100 int rc;100 errno_t rc; 101 101 102 102 rc = udebug_end(); … … 113 113 static void udebug_receive_set_evmask(call_t *call) 114 114 { 115 int rc;115 errno_t rc; 116 116 udebug_evmask_t mask; 117 117 … … 132 132 { 133 133 thread_t *t; 134 int rc;134 errno_t rc; 135 135 136 136 t = (thread_t *)IPC_GET_ARG2(call->data); … … 152 152 { 153 153 thread_t *t; 154 int rc;154 errno_t rc; 155 155 156 156 t = (thread_t *)IPC_GET_ARG2(call->data); … … 172 172 void *buffer; 173 173 size_t copied, needed; 174 int rc;174 errno_t rc; 175 175 176 176 uspace_addr = IPC_GET_ARG2(call->data); /* Destination address */ … … 307 307 thread_t *t; 308 308 sysarg_t uspace_addr; 309 int rc;309 errno_t rc; 310 310 void *buffer; 311 311 … … 346 346 sysarg_t to_copy; 347 347 void *buffer = NULL; 348 int rc;348 errno_t rc; 349 349 350 350 t = (thread_t *) IPC_GET_ARG2(call->data); … … 390 390 unsigned size; 391 391 void *buffer = NULL; 392 int rc;392 errno_t rc; 393 393 394 394 uspace_dst = IPC_GET_ARG2(call->data); -
kernel/generic/src/udebug/udebug_ops.c
r36f0738 rb7fd2a0 79 79 * 80 80 */ 81 static int _thread_op_begin(thread_t *thread, bool being_go)81 static errno_t _thread_op_begin(thread_t *thread, bool being_go) 82 82 { 83 83 mutex_lock(&TASK->udebug.lock); … … 174 174 * debugging session. 175 175 */ 176 int udebug_begin(call_t *call, bool *active)176 errno_t udebug_begin(call_t *call, bool *active) 177 177 { 178 178 LOG("Debugging task %" PRIu64, TASK->taskid); … … 219 219 * 220 220 */ 221 int udebug_end(void)221 errno_t udebug_end(void) 222 222 { 223 223 LOG("Task %" PRIu64, TASK->taskid); 224 224 225 225 mutex_lock(&TASK->udebug.lock); 226 int rc = udebug_task_cleanup(TASK);226 errno_t rc = udebug_task_cleanup(TASK); 227 227 mutex_unlock(&TASK->udebug.lock); 228 228 … … 239 239 * 240 240 */ 241 int udebug_set_evmask(udebug_evmask_t mask)241 errno_t udebug_set_evmask(udebug_evmask_t mask) 242 242 { 243 243 LOG("mask = 0x%x", mask); … … 266 266 * 267 267 */ 268 int udebug_go(thread_t *thread, call_t *call)268 errno_t udebug_go(thread_t *thread, call_t *call) 269 269 { 270 270 /* On success, this will lock thread->udebug.lock. */ 271 int rc = _thread_op_begin(thread, false);271 errno_t rc = _thread_op_begin(thread, false); 272 272 if (rc != EOK) 273 273 return rc; … … 297 297 * 298 298 */ 299 int udebug_stop(thread_t *thread, call_t *call)299 errno_t udebug_stop(thread_t *thread, call_t *call) 300 300 { 301 301 LOG("udebug_stop()"); … … 306 306 * 307 307 */ 308 int rc = _thread_op_begin(thread, true);308 errno_t rc = _thread_op_begin(thread, true); 309 309 if (rc != EOK) 310 310 return rc; … … 364 364 * 365 365 */ 366 int udebug_thread_read(void **buffer, size_t buf_size, size_t *stored,366 errno_t udebug_thread_read(void **buffer, size_t buf_size, size_t *stored, 367 367 size_t *needed) 368 368 { … … 428 428 * 429 429 */ 430 int udebug_name_read(char **data, size_t *data_size)430 errno_t udebug_name_read(char **data, size_t *data_size) 431 431 { 432 432 size_t name_size = str_size(TASK->name) + 1; … … 457 457 * 458 458 */ 459 int udebug_args_read(thread_t *thread, void **buffer)459 errno_t udebug_args_read(thread_t *thread, void **buffer) 460 460 { 461 461 /* On success, this will lock t->udebug.lock. */ 462 int rc = _thread_op_begin(thread, false);462 errno_t rc = _thread_op_begin(thread, false); 463 463 if (rc != EOK) 464 464 return rc; … … 500 500 * 501 501 */ 502 int udebug_regs_read(thread_t *thread, void **buffer)502 errno_t udebug_regs_read(thread_t *thread, void **buffer) 503 503 { 504 504 /* On success, this will lock t->udebug.lock */ 505 int rc = _thread_op_begin(thread, false);505 errno_t rc = _thread_op_begin(thread, false); 506 506 if (rc != EOK) 507 507 return rc; … … 536 536 * 537 537 */ 538 int udebug_mem_read(sysarg_t uspace_addr, size_t n, void **buffer)538 errno_t udebug_mem_read(sysarg_t uspace_addr, size_t n, void **buffer) 539 539 { 540 540 /* Verify task state */ … … 553 553 * 554 554 */ 555 int rc = copy_from_uspace(data_buffer, (void *) uspace_addr, n);555 errno_t rc = copy_from_uspace(data_buffer, (void *) uspace_addr, n); 556 556 mutex_unlock(&TASK->udebug.lock); 557 557
Note:
See TracChangeset
for help on using the changeset viewer.
