Changeset 8565a42 in mainline for uspace/app/trace


Ignore:
Timestamp:
2018-03-02T20:34:50Z (8 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

Location:
uspace/app/trace
Files:
4 edited

Legend:

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

    r3061bc1 r8565a42  
    253253        proto_t *proto;
    254254        int cphone;
    255        
     255
    256256        sysarg_t *resp;
    257257        oper_t *oper;
    258258        int i;
    259        
     259
    260260        phone = pcall->phone_hash;
    261261        method = IPC_GET_IMETHOD(pcall->question);
    262262        retval = IPC_GET_RETVAL(*answer);
    263        
     263
    264264        resp = answer->args;
    265        
     265
    266266        if ((display_mask & DM_IPC) != 0) {
    267267                printf("Response to %d: retval=%s, args = (%" PRIun ", "
     
    271271                    IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer));
    272272        }
    273        
     273
    274274        if ((display_mask & DM_USER) != 0) {
    275275                oper = pcall->oper;
    276                
     276
    277277                if ((oper != NULL) &&
    278278                    ((oper->rv_type != V_VOID) || (oper->respc > 0))) {
    279279                        printf("->");
    280                        
     280
    281281                        if (oper->rv_type != V_VOID) {
    282282                                putchar(' ');
    283283                                val_print((sysarg_t) retval, oper->rv_type);
    284284                        }
    285                        
     285
    286286                        if (oper->respc > 0) {
    287287                                putchar(' ');
     
    294294                                putchar(')');
    295295                        }
    296                        
     296
    297297                        putchar('\n');
    298298                }
    299299        }
    300        
     300
    301301        if ((phone == PHONE_NS) && (method == IPC_M_CONNECT_ME_TO) &&
    302302            (retval == 0)) {
     
    306306                if (proto == NULL)
    307307                        proto = proto_unknown;
    308                
     308
    309309                cphone = IPC_GET_ARG5(*answer);
    310310                if ((display_mask & DM_SYSTEM) != 0) {
     
    312312                    proto->name);
    313313                }
    314                
     314
    315315                ipcp_connection_set(cphone, 0, proto);
    316316        }
     
    321321        ht_link_t *item;
    322322        pending_call_t *pcall;
    323        
     323
    324324        if ((call->flags & IPC_CALL_ANSWERED) == 0) {
    325325                /* Not a response */
     
    329329                return;
    330330        }
    331        
     331
    332332        item = hash_table_find(&pending_calls, &hash);
    333333        if (item == NULL)
    334334                return; /* No matching question found */
    335        
     335
    336336        /*
    337337         * Response matched to question.
    338338         */
    339        
     339
    340340        pcall = hash_table_get_inst(item, pending_call_t, link);
    341341        hash_table_remove(&pending_calls, &hash);
    342        
     342
    343343        parse_answer(hash, pcall, call);
    344344        free(pcall);
  • uspace/app/trace/proto.h

    r3061bc1 r8565a42  
    4444typedef struct {
    4545        const char *name;
    46        
     46
    4747        int argc;
    4848        val_type_t arg_type[OPER_MAX_ARGS];
    49        
     49
    5050        val_type_t rv_type;
    51        
     51
    5252        int respc;
    5353        val_type_t resp_type[OPER_MAX_ARGS];
     
    5757        /** Protocol name */
    5858        const char *name;
    59        
     59
    6060        /** Maps method number to operation */
    6161        hash_table_t method_oper;
  • uspace/app/trace/trace.c

    r3061bc1 r8565a42  
    146146{
    147147        async_sess_t *ksess = async_connect_kbox(task_id);
    148        
     148
    149149        if (!ksess) {
    150150                if (errno == ENOTSUP) {
     
    155155                        return errno;
    156156                }
    157                
     157
    158158                printf("Error connecting\n");
    159159                printf("ipc_connect_task(%" PRIu64 ") -> %s ", task_id, str_error_name(errno));
    160160                return errno;
    161161        }
    162        
     162
    163163        errno_t rc = udebug_begin(ksess);
    164164        if (rc != EOK) {
     
    166166                return rc;
    167167        }
    168        
     168
    169169        rc = udebug_set_evmask(ksess, UDEBUG_EM_ALL);
    170170        if (rc != EOK) {
     
    172172                return rc;
    173173        }
    174        
     174
    175175        sess = ksess;
    176176        return 0;
     
    283283        ipc_call_t call;
    284284        sysarg_t phoneid;
    285        
     285
    286286        if (sc_rc != EOK)
    287287                return;
     
    324324        memset(&call, 0, sizeof(call));
    325325        rc = udebug_mem_read(sess, &call, sc_args[0], sizeof(call));
    326        
     326
    327327        if (rc == EOK)
    328328                ipcp_call_in(&call, sc_rc);
     
    525525        int fd_stdout;
    526526        int fd_stderr;
    527        
     527
    528528        fd_root = vfs_root();
    529529        if (fd_root >= 0) {
     
    533533                        goto error;
    534534        }
    535        
     535
    536536        if ((stdin != NULL) && (vfs_fhandle(stdin, &fd_stdin) == EOK)) {
    537537                rc = loader_add_inbox(ldr, "stdin", fd_stdin);
     
    539539                        goto error;
    540540        }
    541        
     541
    542542        if ((stdout != NULL) && (vfs_fhandle(stdout, &fd_stdout) == EOK)) {
    543543                rc = loader_add_inbox(ldr, "stdout", fd_stdout);
     
    545545                        goto error;
    546546        }
    547        
     547
    548548        if ((stderr != NULL) && (vfs_fhandle(stderr, &fd_stderr) == EOK)) {
    549549                rc = loader_add_inbox(ldr, "stderr", fd_stderr);
     
    551551                        goto error;
    552552        }
    553        
     553
    554554        /* Load the program. */
    555555        rc = loader_load_program(ldr);
     
    571571
    572572        (void) arg;
    573        
     573
    574574        console_ctrl_t *console = console_init(stdin, stdout);
    575        
     575
    576576        while (true) {
    577577                fibril_mutex_lock(&state_lock);
     
    579579                        fibril_condvar_wait(&state_cv, &state_lock);
    580580                fibril_mutex_unlock(&state_lock);
    581                
     581
    582582                if (!console_get_event(console, &event))
    583583                        return EINVAL;
    584                
     584
    585585                if (event.type == CEV_KEY) {
    586586                        fibril_mutex_lock(&state_lock);
     
    750750        display_mask_t dm = 0;
    751751        const char *c = text;
    752        
     752
    753753        while (*c) {
    754754                switch (*c) {
     
    769769                        exit(1);
    770770                }
    771                
     771
    772772                ++c;
    773773        }
    774        
     774
    775775        return dm;
    776776}
     
    810810                        break;
    811811                }
    812                
     812
    813813                --argc;
    814814                ++argv;
     
    831831        /* Preload the specified program file. */
    832832        printf("Spawning '%s' with arguments:\n", *argv);
    833        
     833
    834834        char **cp = argv;
    835835        while (*cp)
    836836                printf("'%s'\n", *cp++);
    837        
     837
    838838        task_ldr = preload_task(*argv, argv, &task_id);
    839839        task_wait_for = true;
  • uspace/app/trace/trace.h

    r3061bc1 r8565a42  
    4242 */
    4343typedef enum {
    44        
     44
    4545        DM_THREAD       = 1,    /**< Thread creation and termination events */
    4646        DM_SYSCALL      = 2,    /**< System calls */
Note: See TracChangeset for help on using the changeset viewer.