Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4380 → Rev 4490

/branches/tracing/uspace/app/debug/main.c
51,7 → 51,7
#include "include/arch.h"
#include "main.h"
 
void thread_debug_start(unsigned thread_hash);
void thread_debug_start(thash_t thread_hash);
 
#define IN_BUF_SIZE 64
static char in_buf[IN_BUF_SIZE];
321,7 → 321,7
cons_printf("thread hashes:");
 
for (i = 0; i < *n; ++i) {
cons_printf("0x%x\n", thash_buf[i]);
cons_printf("0x%lx\n", thash_buf[i]);
}
 
cons_printf("Total of %u threads\n", *n);
331,10 → 331,10
return 0;
}
 
static void event_thread_b(unsigned hash)
static void event_thread_b(thash_t hash)
{
async_serialize_start();
cons_printf("new thread, hash 0x%x\n", hash);
cons_printf("new thread, hash 0x%lx\n", hash);
async_serialize_end();
 
thread_debug_start(hash);
370,7 → 370,7
{
int rc;
udebug_event_t ev_type;
unsigned val0, val1;
sysarg_t val0, val1;
dthread_t *dt;
 
dt = (dthread_t *)dt_arg;
378,15 → 378,18
cons_printf("debug_loop(%d)\n", dt->id);
 
while (!abort_debug) {
 
/* Run thread until an event occurs */
rc = udebug_go(app_phone, dt->hash, &ev_type, &val0, &val1);
if (rc < 0) {
cons_printf("Failed resuming thread (%d).\n", rc);
return rc;
}
 
if (ev_type == UDEBUG_EVENT_FINISHED) {
cons_printf("thread %u debugging finished\n", dt->id);
break;
}
if (rc >= 0) debug_event(dt->hash, ev_type, val0);
debug_event(dt->hash, ev_type, val0);
}
 
cons_printf("debug_loop(%d) exiting\n", dt->id);
393,7 → 396,7
return 0;
}
 
void thread_debug_start(unsigned thash)
void thread_debug_start(thash_t thash)
{
fid_t fid;
dthread_t *dt;