Subversion Repositories HelenOS

Rev

Rev 2899 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2899 Rev 2901
Line 253... Line 253...
253
    if (rc >= 0) {
253
    if (rc >= 0) {
254
        ipcp_call_in(&call, sc_rc);
254
        ipcp_call_in(&call, sc_rc);
255
    }
255
    }
256
}
256
}
257
 
257
 
258
void event_syscall(unsigned thread_id, unsigned thread_hash,  unsigned sc_id, int sc_rc)
258
void event_syscall_b(unsigned thread_id, unsigned thread_hash,  unsigned sc_id, int sc_rc)
259
{
259
{
260
    unsigned sc_args[6];
260
    unsigned sc_args[6];
261
    int rv_type;
261
    int rv_type;
262
    int rc;
262
    int rc;
263
 
263
 
Line 275... Line 275...
275
    }
275
    }
276
 
276
 
277
    /* Print syscall name, id and arguments */
277
    /* Print syscall name, id and arguments */
278
    printf("%s", syscall_desc[sc_id].name);
278
    printf("%s", syscall_desc[sc_id].name);
279
    print_sc_args(sc_args, syscall_desc[sc_id].n_args);
279
    print_sc_args(sc_args, syscall_desc[sc_id].n_args);
-
 
280
 
-
 
281
    async_serialize_end();
-
 
282
}
-
 
283
 
-
 
284
void event_syscall_e(unsigned thread_id, unsigned thread_hash,  unsigned sc_id, int sc_rc)
-
 
285
{
-
 
286
    unsigned sc_args[6];
-
 
287
    int rv_type;
-
 
288
    int rc;
-
 
289
 
-
 
290
    /* Read syscall arguments */
-
 
291
    rc = debug_args_read(phoneid, thread_hash, sc_args);
-
 
292
 
-
 
293
    async_serialize_start();
-
 
294
 
-
 
295
//  printf("[%d] ", thread_id);
-
 
296
 
-
 
297
    if (rc < 0) {
-
 
298
        printf("error\n");
-
 
299
        async_serialize_end();
-
 
300
        return;
-
 
301
    }
-
 
302
 
280
    rv_type = syscall_desc[sc_id].rv_type;
303
    rv_type = syscall_desc[sc_id].rv_type;
281
    print_sc_retval(sc_rc, rv_type);
304
    print_sc_retval(sc_rc, rv_type);
282
 
305
 
283
    switch (sc_id) {
306
    switch (sc_id) {
284
    case SYS_IPC_CALL_ASYNC_FAST:
307
    case SYS_IPC_CALL_ASYNC_FAST:
Line 337... Line 360...
337
            break;
360
            break;
338
        }
361
        }
339
 
362
 
340
        if (rc >= 0) {
363
        if (rc >= 0) {
341
            switch (ev_type) {
364
            switch (ev_type) {
342
            case UDEBUG_EVENT_SYSCALL:
365
            case UDEBUG_EVENT_SYSCALL_B:
-
 
366
                event_syscall_b(thread_id, thread_hash, val0, (int)val1);
-
 
367
                break;
-
 
368
            case UDEBUG_EVENT_SYSCALL_E:
343
                event_syscall(thread_id, thread_hash, val0, (int)val1);
369
                event_syscall_e(thread_id, thread_hash, val0, (int)val1);
344
                break;
370
                break;
345
            case UDEBUG_EVENT_STOP:
371
            case UDEBUG_EVENT_STOP:
346
                printf("stop event\n");
372
                printf("stop event\n");
347
                printf("waiting for resume\n");
373
                printf("waiting for resume\n");
348
                while (paused) {
374
                while (paused) {