/[dynamips]/upstream/dynamips-0.2.6-RC1/mips64.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-RC1/mips64.c

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

upstream/dynamips-0.2.5/mips64.c revision 1 by dpavlin, Sat Oct 6 16:01:44 2007 UTC upstream/dynamips-0.2.6-RC1/mips64.c revision 2 by dpavlin, Sat Oct 6 16:03:58 2007 UTC
# Line 491  fastcall void mips64_run_breakpoint(cpu_ Line 491  fastcall void mips64_run_breakpoint(cpu_
491     cpu_log(cpu,"BREAKPOINT",     cpu_log(cpu,"BREAKPOINT",
492             "Virtual breakpoint reached at PC=0x%llx\n",cpu->pc);             "Virtual breakpoint reached at PC=0x%llx\n",cpu->pc);
493    
494     printf("[[[ Virtual Breakpoint reached at PC=0x%llx ]]]\n",cpu->pc);     printf("[[[ Virtual Breakpoint reached at PC=0x%llx RA=0x%llx]]]\n",
495              cpu->pc,cpu->gpr[MIPS_GPR_RA]);
496    
497     mips64_dump_regs(cpu);     mips64_dump_regs(cpu);
498     memlog_dump(cpu);     memlog_dump(cpu);
499  }  }
500    
501    /* Add a virtual breakpoint */
502    int mips64_add_breakpoint(cpu_mips_t *cpu,m_uint64_t pc)
503    {
504       int i;
505    
506       for(i=0;i<MIPS64_MAX_BREAKPOINTS;i++)
507          if (!cpu->breakpoints[i])
508             break;
509    
510       if (i == MIPS64_MAX_BREAKPOINTS)
511          return(-1);
512    
513       cpu->breakpoints[i] = pc;
514       cpu->breakpoints_enabled = TRUE;
515       return(0);
516    }
517    
518    /* Remove a virtual breakpoint */
519    void mips64_remove_breakpoint(cpu_mips_t *cpu,m_uint64_t pc)
520    {
521       int i,j;
522    
523       for(i=0;i<MIPS64_MAX_BREAKPOINTS;i++)
524          if (cpu->breakpoints[i] == pc)
525          {
526             for(j=i;j<MIPS64_MAX_BREAKPOINTS-1;j++)
527                cpu->breakpoints[j] = cpu->breakpoints[j+1];
528    
529             cpu->breakpoints[MIPS64_MAX_BREAKPOINTS-1] = 0;
530          }
531    
532       for(i=0;i<MIPS64_MAX_BREAKPOINTS;i++)
533          if (cpu->breakpoints[i] != 0)
534             return;
535    
536       cpu->breakpoints_enabled = TRUE;
537    }
538    
539  /* Debugging for register-jump to address 0 */  /* Debugging for register-jump to address 0 */
540  fastcall void mips64_debug_jr0(cpu_mips_t *cpu)  fastcall void mips64_debug_jr0(cpu_mips_t *cpu)
541  {  {

Legend:
Removed from v.1  
changed lines
  Added in v.2

  ViewVC Help
Powered by ViewVC 1.1.26