Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2898 → Rev 2899

/branches/tracing/uspace/app/sctrace/debug_api.c
50,6 → 50,12
return async_req_1_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_END);
}
 
int debug_set_evmask(unsigned phoneid, udebug_evmask_t mask)
{
return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_SET_EVMASK,
mask);
}
 
int debug_thread_read(unsigned phoneid, void *buffer, unsigned n,
unsigned *copied, unsigned *needed)
{
/branches/tracing/uspace/app/sctrace/debug_api.h
35,8 → 35,11
#ifndef DEBUG_API_H_
#define DEBUG_API_H_
 
#include <udebug.h>
 
int debug_begin(unsigned phoneid);
int debug_end(unsigned phoneid);
int debug_set_evmask(unsigned phoneid, udebug_evmask_t mask);
int debug_thread_read(unsigned phoneid, void *buffer, unsigned n,
unsigned *copied, unsigned *needed);
int debug_mem_read(unsigned phoneid, void *buffer, unsigned addr, unsigned n);
/branches/tracing/uspace/app/sctrace/sctrace.c
73,17 → 73,22
{
int rc;
 
printf("ipc_connect_task(%d)...\n", taskid);
printf("ipc_connect_task(%d)... ", taskid);
rc = ipc_connect_kbox(taskid);
printf("-> %d\n", rc);
phoneid = rc;
if (rc < 0) return rc;
 
printf("debug_begin()\n");
printf("debug_begin()... ");
rc = debug_begin(phoneid);
printf("-> %d\n", rc);
if (rc < 0) return rc;
 
printf("debug_set_evmask(0x%x)... ", UDEBUG_EM_ALL);
rc = debug_set_evmask(phoneid, UDEBUG_EM_ALL);
printf("-> %d\n", rc);
if (rc < 0) return rc;
 
return 0;
}