Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/trace/ipcp.c

    r228e490 rd9c8c81  
    3636#include <stdlib.h>
    3737#include <adt/hash_table.h>
    38 #include <sys/typefmt.h>
    3938
    4039#include "ipc_desc.h"
     
    4645
    4746typedef struct {
    48         sysarg_t phone_hash;
     47        ipcarg_t phone_hash;
    4948        ipc_call_t question;
    5049        oper_t *oper;
     
    124123}
    125124
    126 static void ipc_m_print(proto_t *proto, sysarg_t method)
     125static void ipc_m_print(proto_t *proto, ipcarg_t method)
    127126{
    128127        oper_t *oper;
     
    137136
    138137        if (oper != NULL) {
    139                 printf("%s (%" PRIun ")", oper->name, method);
     138                printf("%s (%ld)", oper->name, method);
    140139                return;
    141140        }
    142141
    143         printf("%" PRIun, method);
     142        printf("%ld", method);
    144143}
    145144
     
    192191        unsigned long key[1];
    193192        oper_t *oper;
    194         sysarg_t *args;
     193        ipcarg_t *args;
    195194        int i;
    196195
     
    201200
    202201        if ((display_mask & DM_IPC) != 0) {
    203                 printf("Call ID: %p, phone: %d, proto: %s, method: ",
    204                     (void *) hash, phone,
    205                     (proto ? proto->name : "n/a"));
    206                 ipc_m_print(proto, IPC_GET_IMETHOD(*call));
    207                 printf(" args: (%" PRIun ", %" PRIun ", %" PRIun ", "
    208                     "%" PRIun ", %" PRIun ")\n",
    209                     args[1], args[2], args[3], args[4], args[5]);
     202                printf("Call ID: 0x%lx, phone: %d, proto: %s, method: ", hash,
     203                        phone, (proto ? proto->name : "n/a"));
     204                ipc_m_print(proto, IPC_GET_METHOD(*call));
     205                printf(" args: (%lu, %lu, %lu, %lu, %lu)\n", args[1], args[2],
     206                    args[3], args[4], args[5]);
    210207        }
    211208
     
    214211
    215212                if (proto != NULL) {
    216                         oper = proto_get_oper(proto, IPC_GET_IMETHOD(*call));
     213                        oper = proto_get_oper(proto, IPC_GET_METHOD(*call));
    217214                } else {
    218215                        oper = NULL;
     
    262259    ipc_call_t *answer)
    263260{
    264         sysarg_t phone;
    265         sysarg_t method;
    266         sysarg_t service;
    267         sysarg_t retval;
     261        ipcarg_t phone;
     262        ipcarg_t method;
     263        ipcarg_t service;
     264        ipcarg_t retval;
    268265        proto_t *proto;
    269266        int cphone;
    270267
    271         sysarg_t *resp;
     268        ipcarg_t *resp;
    272269        oper_t *oper;
    273270        int i;
     
    276273
    277274        phone = pcall->phone_hash;
    278         method = IPC_GET_IMETHOD(pcall->question);
     275        method = IPC_GET_METHOD(pcall->question);
    279276        retval = IPC_GET_RETVAL(*answer);
    280277
     
    282279
    283280        if ((display_mask & DM_IPC) != 0) {
    284                 printf("Response to %p: retval=%" PRIdn ", args = (%" PRIun ", "
    285                     "%" PRIun ", %" PRIun ", %" PRIun ", %" PRIun ")\n",
    286                     (void *) hash, retval, IPC_GET_ARG1(*answer),
    287                     IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer),
    288                     IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer));
     281                printf("Response to 0x%lx: retval=%ld, args = (%lu, %lu, %lu, %lu, %lu)\n",
     282                        hash, retval, IPC_GET_ARG1(*answer),
     283                        IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer),
     284                        IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer));
    289285        }
    290286
     
    340336                /* Not a response */
    341337                if ((display_mask & DM_IPC) != 0) {
    342                         printf("Not a response (hash %p)\n", (void *) hash);
     338                        printf("Not a response (hash 0x%lx)\n", hash);
    343339                }
    344340                return;
Note: See TracChangeset for help on using the changeset viewer.