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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel-0-3-0-rc3/] [or1ksim/] [cpu/] [common/] [trace.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 cvs
/* trace.c -- Simulator breakpoints
2 1748 jeremybenn
 
3 2 cvs
   Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
4 1748 jeremybenn
   Copyright (C) 2008 Embecosm Limited
5 2 cvs
 
6 1748 jeremybenn
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
7 2 cvs
 
8 1748 jeremybenn
   This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
9 2 cvs
 
10 1748 jeremybenn
   This program is free software; you can redistribute it and/or modify it
11
   under the terms of the GNU General Public License as published by the Free
12
   Software Foundation; either version 3 of the License, or (at your option)
13
   any later version.
14 2 cvs
 
15 1748 jeremybenn
   This program is distributed in the hope that it will be useful, but WITHOUT
16
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
18
   more details.
19 2 cvs
 
20 1748 jeremybenn
   You should have received a copy of the GNU General Public License along
21
   with this program.  If not, see <http://www.gnu.org/licenses/>.  */
22 2 cvs
 
23 1748 jeremybenn
/* This program is commented throughout in a fashion suitable for processing
24
   with Doxygen. */
25
 
26
 
27
/* Autoconf and/or portability configuration */
28 1350 nogj
#include "config.h"
29
 
30 1748 jeremybenn
/* Package includes */
31
#include "trace.h"
32
#include "sim-config.h"
33 2 cvs
#include "abstract.h"
34 1350 nogj
#include "labels.h"
35 2 cvs
 
36
 
37 1748 jeremybenn
/*---------------------------------------------------------------------------*/
38
/*!Set instruction execution breakpoint
39
 
40
   @param[in] addr  The address for the breakpoint                           */
41
/*---------------------------------------------------------------------------*/
42
void
43
set_insnbrkpoint (oraddr_t addr)
44 2 cvs
{
45 1748 jeremybenn
  addr &= ~ADDR_C (3);          /* 32-bit aligned */
46 1436 nogj
 
47 1748 jeremybenn
  if (!verify_memoryarea (addr))
48
    {
49
      PRINTF
50
        ("WARNING: This breakpoint is out of the simulated memory range.\n");
51
    }
52 1436 nogj
 
53 1748 jeremybenn
  if (has_breakpoint (addr))
54
    {
55
      remove_breakpoint (addr);
56
      PRINTF ("\nBreakpoint at 0x%" PRIxADDR " cleared.\n", addr);
57
    }
58
  else
59
    {
60
      add_breakpoint (addr);
61
      PRINTF ("\nBreakpoint at 0x%" PRIxADDR " set.\n", addr);
62
    }
63
 
64 494 markom
  return;
65 2 cvs
 
66 1748 jeremybenn
}       /* set_insnbrkpoint () */

powered by: WebSVN 2.1.0

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