/[dynamips]/upstream/dynamips-0.2.6-RC3/dev_vtty.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /upstream/dynamips-0.2.6-RC3/dev_vtty.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.6-RC2/dev_vtty.c revision 3 by dpavlin, Sat Oct 6 16:05:34 2007 UTC upstream/dynamips-0.2.6-RC3/dev_vtty.c revision 4 by dpavlin, Sat Oct 6 16:06:49 2007 UTC
# Line 496  static int vtty_store(vtty_t *vtty,u_cha Line 496  static int vtty_store(vtty_t *vtty,u_cha
496     return(0);     return(0);
497  }  }
498    
499    /* Store a string in the FIFO buffer */
500    int vtty_store_str(vtty_t *vtty,char *str)
501    {
502       if (!vtty)
503          return(0);
504    
505       while(*str != 0) {
506          if (vtty_store(vtty,*str) == -1)
507             return(-1);
508          
509          str++;
510       }
511    
512       vtty->input_pending = TRUE;
513       return(0);
514    }
515    
516  /* Store CTRL+C in buffer */  /* Store CTRL+C in buffer */
517  int vtty_store_ctrlc(vtty_t *vtty)  int vtty_store_ctrlc(vtty_t *vtty)
518  {  {
# Line 639  static void remote_control(vtty_t *vtty, Line 656  static void remote_control(vtty_t *vtty,
656           if (cpu0) tlb_dump(cpu0);           if (cpu0) tlb_dump(cpu0);
657           break;           break;
658        
659          /* Dump the MIPS TLB (raw mode) */
660          case 'z':
661             if (cpu0) tlb_raw_dump(cpu0);
662             break;
663      
664        /* Show information about JIT compiled pages */        /* Show information about JIT compiled pages */
665        case 'b':        case 'b':
666           if (cpu0) {           if (cpu0) {
# Line 653  static void remote_control(vtty_t *vtty, Line 675  static void remote_control(vtty_t *vtty,
675        /* MTS64 cache statistics */        /* MTS64 cache statistics */
676        case 'l':        case 'l':
677           if (cpu0) {           if (cpu0) {
678              mts64_show_stats(cpu0);              cpu0->mts_show_stats(cpu0);
679           }           }
680           break;           break;
681        
# Line 679  static void remote_control(vtty_t *vtty, Line 701  static void remote_control(vtty_t *vtty,
701           if (cpu0) {           if (cpu0) {
702              /* IRQ triggering */              /* IRQ triggering */
703              mips64_set_irq(cpu0,2/*C7200_PA_MGMT_IRQ*/);              mips64_set_irq(cpu0,2/*C7200_PA_MGMT_IRQ*/);
704                //mips64_set_irq(cpu0,3/*C7200_PA_MGMT_IRQ*/);
705              //mips64_set_irq(cpu0,C7200_PA_MGMT_IRQ);              //mips64_set_irq(cpu0,C7200_PA_MGMT_IRQ);
706           }           }
707           break;           break;
708      
709        /* Twice Ctrl + ']' (0x1d, 29), or Alt-Gr + '*' (0xb3, 179) */        /* Twice Ctrl + ']' (0x1d, 29), or Alt-Gr + '*' (0xb3, 179) */
710        case 0x1d:        case 0x1d:
711        case 0xb3:        case 0xb3:
# Line 696  static void remote_control(vtty_t *vtty, Line 719  static void remote_control(vtty_t *vtty,
719                  "d     - Show the device list\n"                  "d     - Show the device list\n"
720                  "r     - Dump MIPS CPU registers\n"                  "r     - Dump MIPS CPU registers\n"
721                  "t     - Dump MIPS TLB entries\n"                  "t     - Dump MIPS TLB entries\n"
722                    "z     - Dump MIPS TLB entries (raw mode)\n"
723                  "m     - Dump the latest memory accesses\n"                  "m     - Dump the latest memory accesses\n"
724                  "s     - Suspend CPU emulation\n"                  "s     - Suspend CPU emulation\n"
725                  "u     - Resume CPU emulation\n"                  "u     - Resume CPU emulation\n"
# Line 998  static void *vtty_thread_main(void *arg) Line 1022  static void *vtty_thread_main(void *arg)
1022                    
1023           if (FD_ISSET(fd,&rfds)) {           if (FD_ISSET(fd,&rfds)) {
1024              vtty_read_and_store(vtty);              vtty_read_and_store(vtty);
1025                vtty->input_pending = TRUE;
1026             }
1027    
1028             if (vtty->input_pending) {
1029              if (vtty->read_notifier != NULL)              if (vtty->read_notifier != NULL)
1030                 vtty->read_notifier(vtty);                             vtty->read_notifier(vtty);
1031    
1032                vtty->input_pending = FALSE;
1033           }           }
1034    
1035           /* Flush any pending output */           /* Flush any pending output */

Legend:
Removed from v.3  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26