Ignore:
Timestamp:
May 16, 2018, 4:15:22 PM (6 years ago)
Author:
alain
Message:

Fix few bugs whike debugging the sort multi-thread application.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/mini-libc/stdlib.c

    r441 r443  
    553553    printf("\n[ERROR] in %s : not implemented yet : do nothing\n", __FUNCTION__ );
    554554}
     555
     556///////////
     557void idbg()
     558{
     559   char          cmd;
     560   unsigned int  cxy;
     561   unsigned int  lid;
     562   unsigned int  txt;
     563   unsigned int  active;
     564
     565   while( 1 )
     566   {
     567        printf("\n[idbg] cmd = ");
     568        cmd = (char)getchar();
     569
     570        if( cmd == 'h' )
     571        {
     572            printf("h\n"
     573                   "p : display on TXT0 process descriptors in cluster[cxy]\n"
     574                   "s : display on TXT0 scheduler state for core[cxy,lid]\n"
     575                   "v : display on TXT0 VMM for calling process in cluster [cxy]\n"
     576                   "t : display on TXT0 process decriptors attached to TXT[tid]\n"
     577                   "y : activate/desactivate trace for core[cxy,lid]\n"
     578                   "x : force calling process to exit\n"
     579                   "c : resume calling process execution\n"
     580                   "h : list supported commands\n");
     581        }
     582        else if( cmd == 'p' )
     583        {
     584            printf("p / cxy = ");
     585            cxy = getint();
     586            display_cluster_processes( cxy );
     587        }
     588        else if( cmd == 's' )
     589        {
     590            printf("s / cxy = ");
     591            cxy = getint();
     592            printf(" / lid = ");
     593            lid = getint();
     594            display_sched( cxy , lid );
     595        }
     596        else if( cmd == 'v' )
     597        {
     598            printf("v / cxy = ");
     599            cxy = getint();
     600            display_vmm( cxy , (unsigned int)getpid() );
     601        }
     602        else if( cmd == 't' )
     603        {
     604            printf("t / txt_id = ");
     605            txt = getint();
     606            display_txt_processes( txt );
     607        }
     608        else if( cmd == 'y' )
     609        {
     610            printf("y / active = ");
     611            active = getint();
     612            printf(" / cxy = ");
     613            cxy    = getint();
     614            printf(" / lid = ");
     615            lid    = getint();
     616            trace( active , cxy , lid );
     617        }
     618        else if( cmd == 'x' )
     619        {
     620            printf("x\n");
     621            exit( 0 );
     622        }
     623        else if( cmd == 'c' )
     624        {
     625            printf("c\n");
     626            break;
     627        }
     628    }
     629}  // end idbg()
     630
     631
     632
Note: See TracChangeset for help on using the changeset viewer.