Rev 2899 | Rev 2901 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2899 | Rev 2900 | ||
|---|---|---|---|
| Line 330... | Line 330... | ||
| 330 | 330 | ||
| 331 | klog_printf("udebug_thread_read()"); |
331 | klog_printf("udebug_thread_read()"); |
| 332 | 332 | ||
| 333 | /* Allocate a buffer to hold thread IDs */ |
333 | /* Allocate a buffer to hold thread IDs */ |
| 334 | id_buffer = malloc(buf_size, 0); |
334 | id_buffer = malloc(buf_size, 0); |
| 335 | if (!id_buffer) return ENOMEM; |
- | |
| 336 | 335 | ||
| 337 | ipl = interrupts_disable(); |
336 | ipl = interrupts_disable(); |
| 338 | spinlock_lock(&TASK->lock); |
337 | spinlock_lock(&TASK->lock); |
| 339 | 338 | ||
| 340 | /* Verify task state */ |
339 | /* Verify task state */ |
| Line 385... | Line 384... | ||
| 385 | 384 | ||
| 386 | klog_printf("udebug_args_read()"); |
385 | klog_printf("udebug_args_read()"); |
| 387 | 386 | ||
| 388 | /* Prepare a buffer to hold the arguments */ |
387 | /* Prepare a buffer to hold the arguments */ |
| 389 | arg_buffer = malloc(6 * sizeof(unative_t), 0); |
388 | arg_buffer = malloc(6 * sizeof(unative_t), 0); |
| 390 | if (!arg_buffer) return ENOMEM; |
- | |
| 391 | 389 | ||
| 392 | ipl = interrupts_disable(); |
390 | ipl = interrupts_disable(); |
| 393 | 391 | ||
| 394 | /* On success, this will lock t->debug_lock */ |
392 | /* On success, this will lock t->debug_lock */ |
| 395 | rc = _thread_op_begin(t, false); |
393 | rc = _thread_op_begin(t, false); |
| Line 425... | Line 423... | ||
| 425 | 423 | ||
| 426 | klog_printf("udebug_regs_read()"); |
424 | klog_printf("udebug_regs_read()"); |
| 427 | 425 | ||
| 428 | /* Prepare a buffer to hold the registers */ |
426 | /* Prepare a buffer to hold the registers */ |
| 429 | regs_buffer = malloc(sizeof(istate_t), 0); |
427 | regs_buffer = malloc(sizeof(istate_t), 0); |
| 430 | if (!regs_buffer) return ENOMEM; |
- | |
| 431 | 428 | ||
| 432 | ipl = interrupts_disable(); |
429 | ipl = interrupts_disable(); |
| 433 | 430 | ||
| 434 | /* On success, this will lock t->debug_lock */ |
431 | /* On success, this will lock t->debug_lock */ |
| 435 | rc = _thread_op_begin(t, false); |
432 | rc = _thread_op_begin(t, false); |
| Line 501... | Line 498... | ||
| 501 | int rc; |
498 | int rc; |
| 502 | 499 | ||
| 503 | klog_printf("udebug_mem_read()"); |
500 | klog_printf("udebug_mem_read()"); |
| 504 | 501 | ||
| 505 | data_buffer = malloc(n, 0); |
502 | data_buffer = malloc(n, 0); |
| 506 | if (!data_buffer) return ENOMEM; |
- | |
| 507 | 503 | ||
| 508 | klog_printf("udebug_mem_read: src=%u, size=%u", uspace_addr, n); |
504 | klog_printf("udebug_mem_read: src=%u, size=%u", uspace_addr, n); |
| 509 | 505 | ||
| 510 | /* NOTE: this is not strictly from a syscall... but that shouldn't |
506 | /* NOTE: this is not strictly from a syscall... but that shouldn't |
| 511 | * be a problem */ |
507 | * be a problem */ |