Changeset 3550c393 in mainline for generic/src


Ignore:
Timestamp:
2005-12-11T21:36:42Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba276f7
Parents:
0c8e692
Message:

Symtab returns correct addresses even when symtab is befor bss.
Some tab completion optimization.

Location:
generic/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • generic/src/console/cmd.c

    r0c8e692 r3550c393  
    359359                printf("Calling f(): 0x%p: %s\n", symaddr, symbol);
    360360                f =  (__native (*)(void)) symaddr;
    361                 printf("Result: 0x%X\n", f());
     361                printf("Result: 0x%p\n", f());
    362362        }
    363363       
     
    383383                printf("Calling f(0x%x): 0x%p: %s\n", arg1, symaddr, symbol);
    384384                f =  (__native (*)(__native)) symaddr;
    385                 printf("Result: 0x%x\n", f(arg1));
     385                printf("Result: 0x%p\n", f(arg1));
    386386        }
    387387       
     
    409409                       arg1, arg2, symaddr, symbol);
    410410                f =  (__native (*)(__native,__native)) symaddr;
    411                 printf("Result: 0x%x\n", f(arg1, arg2));
     411                printf("Result: 0x%p\n", f(arg1, arg2));
    412412        }
    413413       
     
    436436                       arg1, arg2, arg3, symaddr, symbol);
    437437                f =  (__native (*)(__native,__native,__native)) symaddr;
    438                 printf("Result: 0x%x\n", f(arg1, arg2, arg3));
     438                printf("Result: 0x%p\n", f(arg1, arg2, arg3));
    439439        }
    440440       
  • generic/src/console/kconsole.c

    r0c8e692 r3550c393  
    216216                return 0;
    217217
    218         if (found > 1) {
     218        if (found > 1 && !strlen(output)) {
    219219                printf("\n");
    220220                startpos = NULL;
     
    287287                        for (i=0;tmp[i] && curlen < MAX_CMDLINE;i++,curlen++)
    288288                                insert_char(current, tmp[i], i+position);
    289                         if (found == 1) { /* One match */
    290                                 for (i=position;i<curlen;i++)
     289
     290                        if (strlen(tmp) || found==1) { /* If we have a hint */
     291                                for (i=position;i<curlen;i++)
    291292                                        putchar(current[i]);
    292293                                position += strlen(tmp);
    293294                                /* Add space to end */
    294                                 if (position == curlen && curlen < MAX_CMDLINE) {
     295                                if (found == 1 && position == curlen && \
     296                                    curlen < MAX_CMDLINE) {
    295297                                        current[position] = ' ';
    296298                                        curlen++;
     
    298300                                        putchar(' ');
    299301                                }
    300                         } else {
     302                        } else { /* No hint, table was printed */
    301303                                printf("%s> ", prompt);
    302304                                for (i=0; i<curlen;i++)
  • generic/src/debug/symtab.c

    r0c8e692 r3550c393  
    173173                return 0;
    174174
    175         if (found > 1) {
     175        if (found > 1 && !strlen(output)) {
    176176                printf("\n");
    177177                startpos = 0;
Note: See TracChangeset for help on using the changeset viewer.