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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [gdb/] [tramp-frame.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
/* Signal trampoline unwinder.
/* Signal trampoline unwinder.
 
 
   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010
   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010
   Free Software Foundation, Inc.
   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 TRAMP_FRAME_H
#ifndef TRAMP_FRAME_H
#define TRAMP_FRAME_H
#define TRAMP_FRAME_H
 
 
#include "frame.h"              /* For "enum frame_type".  */
#include "frame.h"              /* For "enum frame_type".  */
 
 
struct trad_frame;
struct trad_frame;
struct frame_info;
struct frame_info;
struct trad_frame_cache;
struct trad_frame_cache;
 
 
/* A trampoline consists of a small sequence of instructions placed at
/* A trampoline consists of a small sequence of instructions placed at
   an unspecified location in the inferior's address space.  The only
   an unspecified location in the inferior's address space.  The only
   identifying attribute of the trampoline's address is that it does
   identifying attribute of the trampoline's address is that it does
   not fall inside an object file's section.
   not fall inside an object file's section.
 
 
   The only way to identify a trampoline is to perform a brute force
   The only way to identify a trampoline is to perform a brute force
   examination of the instructions at and around the PC.
   examination of the instructions at and around the PC.
 
 
   This module provides a convenient interface for performing that
   This module provides a convenient interface for performing that
   operation.  */
   operation.  */
 
 
/* A trampoline descriptor.  */
/* A trampoline descriptor.  */
 
 
/* Magic instruction that to mark the end of the signal trampoline
/* Magic instruction that to mark the end of the signal trampoline
   instruction sequence.  */
   instruction sequence.  */
#define TRAMP_SENTINEL_INSN ((LONGEST) -1)
#define TRAMP_SENTINEL_INSN ((LONGEST) -1)
 
 
struct tramp_frame
struct tramp_frame
{
{
  /* The trampoline's type, some a signal trampolines, some are normal
  /* The trampoline's type, some a signal trampolines, some are normal
     call-frame trampolines (aka thunks).  */
     call-frame trampolines (aka thunks).  */
  enum frame_type frame_type;
  enum frame_type frame_type;
  /* The trampoline's entire instruction sequence.  It consists of a
  /* The trampoline's entire instruction sequence.  It consists of a
     bytes/mask pair.  Search for this in the inferior at or around
     bytes/mask pair.  Search for this in the inferior at or around
     the frame's PC.  It is assumed that the PC is INSN_SIZE aligned,
     the frame's PC.  It is assumed that the PC is INSN_SIZE aligned,
     and that each element of TRAMP contains one INSN_SIZE
     and that each element of TRAMP contains one INSN_SIZE
     instruction.  It is also assumed that INSN[0] contains the first
     instruction.  It is also assumed that INSN[0] contains the first
     instruction of the trampoline and hence the address of the
     instruction of the trampoline and hence the address of the
     instruction matching INSN[0] is the trampoline's "func" address.
     instruction matching INSN[0] is the trampoline's "func" address.
     The instruction sequence is terminated by
     The instruction sequence is terminated by
     TRAMP_SENTINEL_INSN.  */
     TRAMP_SENTINEL_INSN.  */
  int insn_size;
  int insn_size;
  struct
  struct
  {
  {
    ULONGEST bytes;
    ULONGEST bytes;
    ULONGEST mask;
    ULONGEST mask;
  } insn[48];
  } insn[48];
  /* Initialize a trad-frame cache corresponding to the tramp-frame.
  /* Initialize a trad-frame cache corresponding to the tramp-frame.
     FUNC is the address of the instruction TRAMP[0] in memory.  */
     FUNC is the address of the instruction TRAMP[0] in memory.  */
  void (*init) (const struct tramp_frame *self,
  void (*init) (const struct tramp_frame *self,
                struct frame_info *this_frame,
                struct frame_info *this_frame,
                struct trad_frame_cache *this_cache,
                struct trad_frame_cache *this_cache,
                CORE_ADDR func);
                CORE_ADDR func);
};
};
 
 
void tramp_frame_prepend_unwinder (struct gdbarch *gdbarch,
void tramp_frame_prepend_unwinder (struct gdbarch *gdbarch,
                                   const struct tramp_frame *tramp);
                                   const struct tramp_frame *tramp);
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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