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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [sim/] [common/] [sim-watch.h] - Diff between revs 834 and 842

Only display areas with differences | Details | Blame | View Log

Rev 834 Rev 842
/* Simulator watchpoint support.
/* Simulator watchpoint support.
   Copyright (C) 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
   Copyright (C) 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
   Contributed by Cygnus Support.
   Contributed by Cygnus Support.
 
 
This file is part of GDB, the GNU debugger.
This file is part of GDB, the GNU debugger.
 
 
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
(at your option) any later version.
 
 
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
GNU General Public License for more details.
 
 
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 
 
#ifndef SIM_WATCH_H
#ifndef SIM_WATCH_H
#define SIM_WATCH_H
#define SIM_WATCH_H
 
 
typedef enum {
typedef enum {
  invalid_watchpoint = -1,
  invalid_watchpoint = -1,
  pc_watchpoint,
  pc_watchpoint,
  clock_watchpoint,
  clock_watchpoint,
  cycles_watchpoint,
  cycles_watchpoint,
  nr_watchpoint_types,
  nr_watchpoint_types,
} watchpoint_type;
} watchpoint_type;
 
 
typedef struct _sim_watch_point sim_watch_point;
typedef struct _sim_watch_point sim_watch_point;
struct _sim_watch_point {
struct _sim_watch_point {
  int ident;
  int ident;
  watchpoint_type type;
  watchpoint_type type;
  int interrupt_nr; /* == nr_interrupts -> breakpoint */
  int interrupt_nr; /* == nr_interrupts -> breakpoint */
  int is_periodic;
  int is_periodic;
  int is_within;
  int is_within;
  unsigned long arg0;
  unsigned long arg0;
  unsigned long arg1;
  unsigned long arg1;
  sim_event *event;
  sim_event *event;
  sim_watch_point *next;
  sim_watch_point *next;
};
};
 
 
 
 
typedef struct _sim_watchpoints {
typedef struct _sim_watchpoints {
 
 
  /* Pointer into the host's data structures specifying the
  /* Pointer into the host's data structures specifying the
     address/size of the program-counter */
     address/size of the program-counter */
  /* FIXME: In the future this shall be generalized so that any of the
  /* FIXME: In the future this shall be generalized so that any of the
     N processors M registers can be watched */
     N processors M registers can be watched */
  void *pc;
  void *pc;
  int sizeof_pc;
  int sizeof_pc;
 
 
  /* Pointer to the handler for interrupt watchpoints */
  /* Pointer to the handler for interrupt watchpoints */
  /* FIXME: can this be done better? */
  /* FIXME: can this be done better? */
  /* NOTE: For the DATA arg, the handler is passed a (char**) pointer
  /* NOTE: For the DATA arg, the handler is passed a (char**) pointer
     that is an offset into the INTERRUPT_NAMES vector.  Use
     that is an offset into the INTERRUPT_NAMES vector.  Use
     arithmetic to determine the interrupt-nr. */
     arithmetic to determine the interrupt-nr. */
  sim_event_handler *interrupt_handler;
  sim_event_handler *interrupt_handler;
 
 
  /* Pointer to a null terminated list of interrupt names */
  /* Pointer to a null terminated list of interrupt names */
  /* FIXME: can this be done better?  Look at the PPC's interrupt
  /* FIXME: can this be done better?  Look at the PPC's interrupt
     mechanism and table for a rough idea of where it will go next */
     mechanism and table for a rough idea of where it will go next */
  int nr_interrupts;
  int nr_interrupts;
  char **interrupt_names;
  char **interrupt_names;
 
 
  /* active watchpoints */
  /* active watchpoints */
  int last_point_nr;
  int last_point_nr;
  sim_watch_point *points;
  sim_watch_point *points;
 
 
} sim_watchpoints;
} sim_watchpoints;
 
 
/* Watch install handler.  */
/* Watch install handler.  */
MODULE_INSTALL_FN sim_watchpoint_install;
MODULE_INSTALL_FN sim_watchpoint_install;
 
 
#endif /* SIM_WATCH_H */
#endif /* SIM_WATCH_H */
 
 

powered by: WebSVN 2.1.0

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