Changeset 0108984a in mainline for kernel/generic/src/udebug/udebug.c


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.c

    rfb9b0b0 r0108984a  
    4949 
    5050#include <synch/waitq.h>
    51 #include <print.h>
     51#include <debug.h>
    5252#include <udebug/udebug.h>
    5353#include <errno.h>
     
    332332        mutex_lock(&THREAD->udebug.lock);
    333333
    334         printf("udebug_thread_b_event\n");
    335         printf("- check state\n");
     334        LOG("udebug_thread_b_event\n");
     335        LOG("- check state\n");
    336336
    337337        /* Must only generate events when in debugging session */
    338338        if (THREAD->udebug.debug_active != true) {
    339                 printf("- debug_active: %s, udebug.stop: %s\n",
     339                LOG("- debug_active: %s, udebug.stop: %s\n",
    340340                        THREAD->udebug.debug_active ? "yes(+)" : "no(-)",
    341341                        THREAD->udebug.stop ? "yes(-)" : "no(+)");
     
    345345        }
    346346
    347         printf("- trigger event\n");
     347        LOG("- trigger event\n");
    348348
    349349        call = THREAD->udebug.go_call;
     
    366366        mutex_unlock(&TASK->udebug.lock);
    367367
    368         printf("- sleep\n");
     368        LOG("- sleep\n");
    369369        udebug_wait_for_go(&THREAD->udebug.go_wq);
    370370
     
    381381        mutex_lock(&THREAD->udebug.lock);
    382382
    383 //      printf("udebug_thread_e_event\n");
    384 //      printf("- check state\n");
     383        LOG("udebug_thread_e_event\n");
     384        LOG("- check state\n");
    385385
    386386        /* Must only generate events when in debugging session */
     
    394394        }
    395395
    396 //      printf("- trigger event\n");
     396        LOG("- trigger event\n");
    397397
    398398        call = THREAD->udebug.go_call;
     
    428428        ipl_t ipl;
    429429
    430         printf("udebug_task_cleanup()\n");
    431         printf("task %llu\n", ta->taskid);
     430        LOG("udebug_task_cleanup()\n");
     431        LOG("task %" PRIu64 "\n", ta->taskid);
    432432
    433433        udebug_int_lock();
     
    435435        if (ta->udebug.dt_state != UDEBUG_TS_BEGINNING &&
    436436            ta->udebug.dt_state != UDEBUG_TS_ACTIVE) {
    437                 printf("udebug_task_cleanup(): task not being debugged\n");
     437                LOG("udebug_task_cleanup(): task not being debugged\n");
    438438                return EINVAL;
    439439        }
     
    468468
    469469                                /* Answer GO call */
    470                                 printf("answer GO call with EVENT_FINISHED\n");
     470                                LOG("answer GO call with EVENT_FINISHED\n");
    471471                                IPC_SET_RETVAL(t->udebug.go_call->data, 0);
    472472                                IPC_SET_ARG1(t->udebug.go_call->data, UDEBUG_EVENT_FINISHED);
Note: See TracChangeset for help on using the changeset viewer.