OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_67/] [or1ksim/] [cpu/] [common/] [trace.c] - Diff between revs 494 and 997

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 494 Rev 997
Line 26... Line 26...
 
 
#include "arch.h"
#include "arch.h"
#include "parse.h"
#include "parse.h"
#include "abstract.h"
#include "abstract.h"
#include "execute.h"
#include "execute.h"
 
#include "sim-config.h"
 
 
/* Set instruction execution breakpoint. */
/* Set instruction execution breakpoint. */
 
 
void set_insnbrkpoint(unsigned long addr)
void set_insnbrkpoint(unsigned long addr)
{
{
Line 37... Line 38...
  addr &= 0xfffffffc;   /* 32-bit aligned */
  addr &= 0xfffffffc;   /* 32-bit aligned */
 
 
  if (verify_memoryarea(addr))
  if (verify_memoryarea(addr))
    if (has_breakpoint (addr)) {
    if (has_breakpoint (addr)) {
      remove_breakpoint (addr);
      remove_breakpoint (addr);
      printf("\nBreakpoint at 0x%.8lx cleared.\n", addr);
      PRINTF("\nBreakpoint at 0x%.8lx cleared.\n", addr);
    } else {
    } else {
      add_breakpoint (addr);
      add_breakpoint (addr);
      printf("\nBreakpoint at 0x%.8lx set.\n", addr);
      PRINTF("\nBreakpoint at 0x%.8lx set.\n", addr);
    }
    }
  else
  else
    printf("ERROR: Can't set this breakpoint out of memory.\n");
    PRINTF("ERROR: Can't set this breakpoint out of memory.\n");
 
 
  return;
  return;
}
}
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.