Ignore:
Timestamp:
2008-09-17T13:38:18Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c9a29d6
Parents:
fb9b0b0
Message:

Use LOG() instead of printf() for debug messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/udebug/udebug_ops.c

    rfb9b0b0 r0108984a  
    3636 */
    3737 
    38 #include <print.h>
     38#include <debug.h>
    3939#include <proc/task.h>
    4040#include <proc/thread.h>
     
    163163        link_t *cur;
    164164
    165         printf("udebug_begin()\n");
    166 
    167         mutex_lock(&TASK->udebug.lock);
    168         printf("debugging task %llu\n", TASK->taskid);
     165        LOG("udebug_begin()\n");
     166
     167        mutex_lock(&TASK->udebug.lock);
     168        LOG("debugging task %llu\n", TASK->taskid);
    169169
    170170        if (TASK->udebug.dt_state != UDEBUG_TS_INACTIVE) {
    171171                mutex_unlock(&TASK->udebug.lock);
    172                 printf("udebug_begin(): busy error\n");
     172                LOG("udebug_begin(): busy error\n");
    173173
    174174                return EBUSY;
     
    200200        mutex_unlock(&TASK->udebug.lock);
    201201
    202         printf("udebug_begin() done (%s)\n",
     202        LOG("udebug_begin() done (%s)\n",
    203203            reply ? "reply" : "stoppability wait");
    204204
     
    210210        int rc;
    211211
    212         printf("udebug_end()\n");
    213 
    214         mutex_lock(&TASK->udebug.lock);
    215         printf("task %llu\n", TASK->taskid);
     212        LOG("udebug_end()\n");
     213
     214        mutex_lock(&TASK->udebug.lock);
     215        LOG("task %" PRIu64 "\n", TASK->taskid);
    216216
    217217        rc = udebug_task_cleanup(TASK);
     
    224224int udebug_set_evmask(udebug_evmask_t mask)
    225225{
    226         printf("udebug_set_mask()\n");
    227 
    228         printf("debugging task %llu\n", TASK->taskid);
     226        LOG("udebug_set_mask()\n");
    229227
    230228        mutex_lock(&TASK->udebug.lock);
     
    232230        if (TASK->udebug.dt_state != UDEBUG_TS_ACTIVE) {
    233231                mutex_unlock(&TASK->udebug.lock);
    234                 printf("udebug_set_mask(): not active debuging session\n");
     232                LOG("udebug_set_mask(): not active debuging session\n");
    235233
    236234                return EINVAL;
     
    248246{
    249247        int rc;
    250 
    251 //      printf("udebug_go()\n");
    252248
    253249        /* On success, this will lock t->udebug.lock */
     
    275271        int rc;
    276272
    277         printf("udebug_stop()\n");
     273        LOG("udebug_stop()\n");
    278274        mutex_lock(&TASK->udebug.lock);
    279275
     
    299295         * Answer GO call
    300296         */
    301         printf("udebug_stop - answering go call\n");
     297        LOG("udebug_stop - answering go call\n");
    302298
    303299        /* Make sure nobody takes this call away from us */
     
    307303        IPC_SET_RETVAL(call->data, 0);
    308304        IPC_SET_ARG1(call->data, UDEBUG_EVENT_STOP);
    309         printf("udebug_stop/ipc_answer\n");
     305        LOG("udebug_stop/ipc_answer\n");
    310306
    311307        THREAD->udebug.cur_event = UDEBUG_EVENT_STOP;
     
    316312        mutex_unlock(&TASK->udebug.lock);
    317313
    318         printf("udebog_stop/done\n");
     314        LOG("udebog_stop/done\n");
    319315        return 0;
    320316}
     
    331327        size_t max_ids;
    332328
    333         printf("udebug_thread_read()\n");
     329        LOG("udebug_thread_read()\n");
    334330
    335331        /* Allocate a buffer to hold thread IDs */
     
    386382        unative_t *arg_buffer;
    387383
    388 //      printf("udebug_args_read()\n");
    389 
    390384        /* Prepare a buffer to hold the arguments */
    391385        arg_buffer = malloc(6 * sizeof(unative_t), 0);
     
    428422        data_buffer = malloc(n, 0);
    429423
    430 //      printf("udebug_mem_read: src=%u, size=%u\n", uspace_addr, n);
    431 
    432424        /* NOTE: this is not strictly from a syscall... but that shouldn't
    433425         * be a problem */
Note: See TracChangeset for help on using the changeset viewer.