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

Subversion Repositories openrisc

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

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 834 Rev 842
/* JIT declarations for GDB, the GNU Debugger.
/* JIT declarations for GDB, the GNU Debugger.
 
 
   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 
 
   This file is part of GDB.
   This file is part of GDB.
 
 
   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 JIT_H
#ifndef JIT_H
#define JIT_H
#define JIT_H
 
 
/* When the JIT breakpoint fires, the inferior wants us to take one of these
/* When the JIT breakpoint fires, the inferior wants us to take one of these
   actions.  These values are used by the inferior, so the values of these enums
   actions.  These values are used by the inferior, so the values of these enums
   cannot be changed.  */
   cannot be changed.  */
 
 
typedef enum
typedef enum
{
{
  JIT_NOACTION = 0,
  JIT_NOACTION = 0,
  JIT_REGISTER,
  JIT_REGISTER,
  JIT_UNREGISTER
  JIT_UNREGISTER
} jit_actions_t;
} jit_actions_t;
 
 
/* This struct describes a single symbol file in a linked list of symbol files
/* This struct describes a single symbol file in a linked list of symbol files
   describing generated code.  As the inferior generates code, it adds these
   describing generated code.  As the inferior generates code, it adds these
   entries to the list, and when we attach to the inferior, we read them all.
   entries to the list, and when we attach to the inferior, we read them all.
   For the first element prev_entry should be NULL, and for the last element
   For the first element prev_entry should be NULL, and for the last element
   next_entry should be NULL.  */
   next_entry should be NULL.  */
 
 
struct jit_code_entry
struct jit_code_entry
{
{
  CORE_ADDR next_entry;
  CORE_ADDR next_entry;
  CORE_ADDR prev_entry;
  CORE_ADDR prev_entry;
  CORE_ADDR symfile_addr;
  CORE_ADDR symfile_addr;
  uint64_t symfile_size;
  uint64_t symfile_size;
};
};
 
 
/* This is the global descriptor that the inferior uses to communicate
/* This is the global descriptor that the inferior uses to communicate
   information to the debugger.  To alert the debugger to take an action, the
   information to the debugger.  To alert the debugger to take an action, the
   inferior sets the action_flag to the appropriate enum value, updates
   inferior sets the action_flag to the appropriate enum value, updates
   relevant_entry to point to the relevant code entry, and calls the function at
   relevant_entry to point to the relevant code entry, and calls the function at
   the well-known symbol with our breakpoint.  We then read this descriptor from
   the well-known symbol with our breakpoint.  We then read this descriptor from
   another global well-known symbol.  */
   another global well-known symbol.  */
 
 
struct jit_descriptor
struct jit_descriptor
{
{
  uint32_t version;
  uint32_t version;
  /* This should be jit_actions_t, but we want to be specific about the
  /* This should be jit_actions_t, but we want to be specific about the
     bit-width.  */
     bit-width.  */
  uint32_t action_flag;
  uint32_t action_flag;
  CORE_ADDR relevant_entry;
  CORE_ADDR relevant_entry;
  CORE_ADDR first_entry;
  CORE_ADDR first_entry;
};
};
 
 
/* Looks for the descriptor and registration symbols and breakpoints the
/* Looks for the descriptor and registration symbols and breakpoints the
   registration function.  If it finds both, it registers all the already JITed
   registration function.  If it finds both, it registers all the already JITed
   code.  If it has already found the symbols, then it doesn't try again.  */
   code.  If it has already found the symbols, then it doesn't try again.  */
 
 
extern void jit_inferior_created_hook (void);
extern void jit_inferior_created_hook (void);
 
 
/* Re-establish the jit breakpoint(s).  */
/* Re-establish the jit breakpoint(s).  */
 
 
extern void jit_breakpoint_re_set (void);
extern void jit_breakpoint_re_set (void);
 
 
/* This function is called by handle_inferior_event when it decides that the JIT
/* This function is called by handle_inferior_event when it decides that the JIT
   event breakpoint has fired.  */
   event breakpoint has fired.  */
 
 
extern void jit_event_handler (struct gdbarch *gdbarch);
extern void jit_event_handler (struct gdbarch *gdbarch);
 
 
#endif /* JIT_H */
#endif /* JIT_H */
 
 

powered by: WebSVN 2.1.0

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