Ignore:
File:
1 edited

Legend:

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

    rd9c8c81 r228e490  
    3636#include <stdlib.h>
    3737#include <adt/hash_table.h>
     38#include <sys/typefmt.h>
    3839
    3940#include "ipc_desc.h"
     
    4546
    4647typedef struct {
    47         ipcarg_t phone_hash;
     48        sysarg_t phone_hash;
    4849        ipc_call_t question;
    4950        oper_t *oper;
     
    123124}
    124125
    125 static void ipc_m_print(proto_t *proto, ipcarg_t method)
     126static void ipc_m_print(proto_t *proto, sysarg_t method)
    126127{
    127128        oper_t *oper;
     
    136137
    137138        if (oper != NULL) {
    138                 printf("%s (%ld)", oper->name, method);
     139                printf("%s (%" PRIun ")", oper->name, method);
    139140                return;
    140141        }
    141142
    142         printf("%ld", method);
     143        printf("%" PRIun, method);
    143144}
    144145
     
    191192        unsigned long key[1];
    192193        oper_t *oper;
    193         ipcarg_t *args;
     194        sysarg_t *args;
    194195        int i;
    195196
     
    200201
    201202        if ((display_mask & DM_IPC) != 0) {
    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]);
     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]);
    207210        }
    208211
     
    211214
    212215                if (proto != NULL) {
    213                         oper = proto_get_oper(proto, IPC_GET_METHOD(*call));
     216                        oper = proto_get_oper(proto, IPC_GET_IMETHOD(*call));
    214217                } else {
    215218                        oper = NULL;
     
    259262    ipc_call_t *answer)
    260263{
    261         ipcarg_t phone;
    262         ipcarg_t method;
    263         ipcarg_t service;
    264         ipcarg_t retval;
     264        sysarg_t phone;
     265        sysarg_t method;
     266        sysarg_t service;
     267        sysarg_t retval;
    265268        proto_t *proto;
    266269        int cphone;
    267270
    268         ipcarg_t *resp;
     271        sysarg_t *resp;
    269272        oper_t *oper;
    270273        int i;
     
    273276
    274277        phone = pcall->phone_hash;
    275         method = IPC_GET_METHOD(pcall->question);
     278        method = IPC_GET_IMETHOD(pcall->question);
    276279        retval = IPC_GET_RETVAL(*answer);
    277280
     
    279282
    280283        if ((display_mask & DM_IPC) != 0) {
    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));
     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));
    285289        }
    286290
     
    336340                /* Not a response */
    337341                if ((display_mask & DM_IPC) != 0) {
    338                         printf("Not a response (hash 0x%lx)\n", hash);
     342                        printf("Not a response (hash %p)\n", (void *) hash);
    339343                }
    340344                return;
Note: See TracChangeset for help on using the changeset viewer.