switch inferior/thread before calling target methods
[deliverable/binutils-gdb.git] / gdb / tramp-frame.h
index 58f175b00d6d81bacfedb974da21d62c1af4fa31..f40e47bf62fc3eff73f9fd613187fcf8a897b47d 100644 (file)
@@ -1,12 +1,12 @@
 /* Signal trampoline unwinder.
 
 /* Signal trampoline unwinder.
 
-   Copyright 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    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
 
    This file is part of GDB.
 
    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
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -15,9 +15,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifndef TRAMP_FRAME_H
 #define TRAMP_FRAME_H
 
 #ifndef TRAMP_FRAME_H
 #define TRAMP_FRAME_H
@@ -36,14 +34,14 @@ struct trad_frame_cache;
    The only way to identify a trampoline is to perform a brute force
    examination of the instructions at and around the PC.
 
    The only way to identify a trampoline is to perform a brute force
    examination of the instructions at and around the PC.
 
-   This module provides a convent interface for performing that
+   This module provides a convenient interface for performing that
    operation.  */
 
 /* A trampoline descriptor.  */
 
 /* Magic instruction that to mark the end of the signal trampoline
    instruction sequence.  */
    operation.  */
 
 /* A trampoline descriptor.  */
 
 /* Magic instruction that to mark the end of the signal trampoline
    instruction sequence.  */
-#define TRAMP_SENTINEL_INSN ((LONGEST) -1)
+#define TRAMP_SENTINEL_INSN ULONGEST_MAX
 
 struct tramp_frame
 {
 
 struct tramp_frame
 {
@@ -64,13 +62,20 @@ struct tramp_frame
   {
     ULONGEST bytes;
     ULONGEST mask;
   {
     ULONGEST bytes;
     ULONGEST mask;
-  } insn[16];
+  } insn[48];
   /* Initialize a trad-frame cache corresponding to the tramp-frame.
      FUNC is the address of the instruction TRAMP[0] in memory.  */
   void (*init) (const struct tramp_frame *self,
   /* Initialize a trad-frame cache corresponding to the tramp-frame.
      FUNC is the address of the instruction TRAMP[0] in memory.  */
   void (*init) (const struct tramp_frame *self,
-               struct frame_info *next_frame,
+               struct frame_info *this_frame,
                struct trad_frame_cache *this_cache,
                CORE_ADDR func);
                struct trad_frame_cache *this_cache,
                CORE_ADDR func);
+  /* Return non-zero if the tramp-frame is valid for the PC requested.
+     Adjust the PC to point to the address to check the instruction
+     sequence against if required.  If this is NULL, then the tramp-frame
+     is valid for any PC.  */
+  int (*validate) (const struct tramp_frame *self,
+                  struct frame_info *this_frame,
+                  CORE_ADDR *pc);
 };
 
 void tramp_frame_prepend_unwinder (struct gdbarch *gdbarch,
 };
 
 void tramp_frame_prepend_unwinder (struct gdbarch *gdbarch,
This page took 0.026282 seconds and 4 git commands to generate.