* arch-utils.h: Update copyright.
authorAndrew Cagney <cagney@redhat.com>
Wed, 24 Apr 2002 16:28:16 +0000 (16:28 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 24 Apr 2002 16:28:16 +0000 (16:28 +0000)
* gdbarch.sh (PC_IN_SIGTRAMP): Add.
* gdbarch.h, gdbarch.c: Re-generate.

* inferior.h (IN_SIGTRAMP): Delete definition.
* arch-utils.c (legacy_pc_in_sigtramp): New function.
* arch-utils.h (legacy_pc_in_sigtramp): Declare.

* mips-tdep.c (mips_init_extra_frame_info): Use PC_IN_SIGTRAMP.
(mips_dump_tdep): Do not print value of IN_SIGTRAMP.
* hppa-tdep.c (pc_in_interrupt_handler):  Use PC_IN_SIGTRAMP.
(find_proc_framesize): Ditto.
* alpha-tdep.c (alpha_osf_skip_sigtramp_frame): Ditto.
(alpha_init_extra_frame_info): Ditto.
* infrun.c (handle_inferior_event): Ditto.
(handle_inferior_event): Ditto.
(check_sigtramp2): Ditto.
* blockframe.c (create_new_frame): Ditto.
(get_prev_frame): Ditto.
* ppc-linux-tdep.c: Update comments.
* i386-linux-tdep.c: Update comments.
* breakpoint.c (bpstat_what): Update comment.

* gdbint.texinfo (Target Architecture Definition): Replace
IN_SIGTRAMP with PC_IN_SIGTRAMP.

18 files changed:
gdb/ChangeLog
gdb/alpha-tdep.c
gdb/arch-utils.c
gdb/arch-utils.h
gdb/arm-tdep.c
gdb/blockframe.c
gdb/breakpoint.c
gdb/doc/ChangeLog
gdb/doc/gdbint.texinfo
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/hppa-tdep.c
gdb/i386-linux-tdep.c
gdb/inferior.h
gdb/infrun.c
gdb/mips-tdep.c
gdb/ppc-linux-tdep.c

index b41e30cba08d711c73338fd901a474d99aa1fb03..a865bfc6670c2c4b4119af0b399f95cdae645501 100644 (file)
@@ -1,3 +1,29 @@
+2002-04-24  Andrew Cagney  <ac131313@redhat.com>
+
+       * arch-utils.h: Update copyright.
+
+       * gdbarch.sh (PC_IN_SIGTRAMP): Add.
+       * gdbarch.h, gdbarch.c: Re-generate.
+
+       * inferior.h (IN_SIGTRAMP): Delete definition.
+       * arch-utils.c (legacy_pc_in_sigtramp): New function.
+       * arch-utils.h (legacy_pc_in_sigtramp): Declare.
+
+       * mips-tdep.c (mips_init_extra_frame_info): Use PC_IN_SIGTRAMP.
+       (mips_dump_tdep): Do not print value of IN_SIGTRAMP.
+       * hppa-tdep.c (pc_in_interrupt_handler):  Use PC_IN_SIGTRAMP.
+       (find_proc_framesize): Ditto.
+       * alpha-tdep.c (alpha_osf_skip_sigtramp_frame): Ditto.
+       (alpha_init_extra_frame_info): Ditto.
+       * infrun.c (handle_inferior_event): Ditto.
+       (handle_inferior_event): Ditto.
+       (check_sigtramp2): Ditto.
+       * blockframe.c (create_new_frame): Ditto.
+       (get_prev_frame): Ditto.
+       * ppc-linux-tdep.c: Update comments.
+       * i386-linux-tdep.c: Update comments.
+       * breakpoint.c (bpstat_what): Update comment.
+
 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
 
        * gdbserver/linux-low.c (regsets_fetch_inferior_registers),
index 537ba920fcb000bd34a4056b9e5ffae3cbbb7f1c..4dc9a907d433cc962b6c2de0e1dcda0221ce629e 100644 (file)
@@ -208,7 +208,7 @@ alpha_osf_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
 {
   char *name;
   find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
-  if (IN_SIGTRAMP (pc, name))
+  if (PC_IN_SIGTRAMP (pc, name))
     return frame->frame;
   else
     return 0;
@@ -991,7 +991,7 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
             We can't use frame->signal_handler_caller, it is not yet set.  */
          find_pc_partial_function (frame->pc, &name,
                                    (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
-         if (!IN_SIGTRAMP (frame->pc, name))
+         if (!PC_IN_SIGTRAMP (frame->pc, name))
            {
              frame->saved_regs = (CORE_ADDR *)
                frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
index bdc9d65f9fe22ea8ef44c5ef1d6be1aa75b614df..23caf9f98a3a47042dbe6fbd227c6c4f3718af14 100644 (file)
@@ -419,6 +419,24 @@ generic_register_virtual_size (int regnum)
   return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (regnum));
 }
 
+#if !defined (IN_SIGTRAMP)
+#if defined (SIGTRAMP_START)
+#define IN_SIGTRAMP(pc, name) \
+       ((pc) >= SIGTRAMP_START(pc)   \
+        && (pc) < SIGTRAMP_END(pc) \
+        )
+#else
+#define IN_SIGTRAMP(pc, name) \
+       (name && STREQ ("_sigtramp", name))
+#endif
+#endif
+\f
+int
+legacy_pc_in_sigtramp (CORE_ADDR pc, char *name)
+{
+  return IN_SIGTRAMP(pc, name);
+}
+
 \f
 /* Functions to manipulate the endianness of the target.  */
 
index 96d1b8b61745e18493bfa9e9969ccaaa4924d2e3..72200626a61dd5b2fd61e081951c11cad62e1ef4 100644 (file)
@@ -1,5 +1,6 @@
 /* Dynamic architecture support for GDB, the GNU debugger.
-   Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -156,6 +157,9 @@ extern int generic_register_raw_size (int regnum);
 
 extern int generic_register_virtual_size (int regnum);
 
+/* Prop up old targets that use various IN_SIGTRAMP() macros.  */
+extern int legacy_pc_in_sigtramp (CORE_ADDR pc, char *name);
+
 /* Initialize a ``struct info''.  Can't use memset(0) since some
    default values are not zero.  */
 extern void gdbarch_info_init (struct gdbarch_info *info);
index afe578feb9914a4cd312f003a6ea4853afe9552e..b69aef9f0817dc09187bd1c5f498ed1e60b5d82f 100644 (file)
@@ -1096,20 +1096,20 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
     sp = (fi->next->frame - fi->next->extra_info->frameoffset
          + fi->next->extra_info->framesize);
 
-  /* Determine whether or not we're in a sigtramp frame. 
+  /* Determine whether or not we're in a sigtramp frame.
      Unfortunately, it isn't sufficient to test
      fi->signal_handler_caller because this value is sometimes set
      after invoking INIT_EXTRA_FRAME_INFO.  So we test *both*
-     fi->signal_handler_caller and IN_SIGTRAMP to determine if we need
-     to use the sigcontext addresses for the saved registers.
+     fi->signal_handler_caller and PC_IN_SIGTRAMP to determine if we
+     need to use the sigcontext addresses for the saved registers.
 
-     Note: If an ARM IN_SIGTRAMP method ever needs to compare against
-     the name of the function, the code below will have to be changed
-     to first fetch the name of the function and then pass this name
-     tIN_SIGTRAMP.  */
+     Note: If an ARM PC_IN_SIGTRAMP method ever needs to compare
+     against the name of the function, the code below will have to be
+     changed to first fetch the name of the function and then pass
+     this name to PC_IN_SIGTRAMP.  */
 
   if (SIGCONTEXT_REGISTER_ADDRESS_P () 
-      && (fi->signal_handler_caller || IN_SIGTRAMP (fi->pc, (char *)0)))
+      && (fi->signal_handler_caller || PC_IN_SIGTRAMP (fi->pc, (char *)0)))
     {
       for (reg = 0; reg < NUM_REGS; reg++)
        fi->saved_regs[reg] = SIGCONTEXT_REGISTER_ADDRESS (sp, fi->pc, reg);
index 8f43ea7d8ce1b9b73a360d9c9df1a4c66a6e2029..3150f8884e8c731fd2954a873bdae6af1ce4778f 100644 (file)
@@ -227,7 +227,7 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
   fi->frame = addr;
   fi->pc = pc;
   find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
-  fi->signal_handler_caller = IN_SIGTRAMP (fi->pc, name);
+  fi->signal_handler_caller = PC_IN_SIGTRAMP (fi->pc, name);
 
   if (INIT_EXTRA_FRAME_INFO_P ())
     INIT_EXTRA_FRAME_INFO (0, fi);
@@ -458,7 +458,7 @@ get_prev_frame (struct frame_info *next_frame)
 
   find_pc_partial_function (prev->pc, &name,
                            (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
-  if (IN_SIGTRAMP (prev->pc, name))
+  if (PC_IN_SIGTRAMP (prev->pc, name))
     prev->signal_handler_caller = 1;
 
   return prev;
@@ -747,7 +747,7 @@ find_pc_sect_partial_function (CORE_ADDR pc, asection *section, char **name,
   /* If sigtramp is in the u area, it counts as a function (especially
      important for step_1).  */
 #if defined SIGTRAMP_START
-  if (IN_SIGTRAMP (mapped_pc, (char *) NULL))
+  if (PC_IN_SIGTRAMP (mapped_pc, (char *) NULL))
     {
       cache_pc_function_low = SIGTRAMP_START (mapped_pc);
       cache_pc_function_high = SIGTRAMP_END (mapped_pc);
index bdf73596b300132414bb26f6f7de0848c21ae931..5844b40f0a263b039da68c96415e13aac20e4079 100644 (file)
@@ -2850,7 +2850,7 @@ bpstat_what (bpstat bs)
 
   /* step_resume entries: a step resume breakpoint overrides another
      breakpoint of signal handling (see comment in wait_for_inferior
-     at first IN_SIGTRAMP where we set the step_resume breakpoint).  */
+     at first PC_IN_SIGTRAMP where we set the step_resume breakpoint).  */
   /* We handle the through_sigtramp_breakpoint the same way; having both
      one of those and a step_resume_breakpoint is probably very rare (?).  */
 
index 9dfa0dc2c8507073a641234aaa4107a5fa52b57a..bdfdd7e2757f1f4c1066216331cc6cc377518f06 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-24  Andrew Cagney  <ac131313@redhat.com>
+
+       * gdbint.texinfo (Target Architecture Definition): Replace
+       IN_SIGTRAMP with PC_IN_SIGTRAMP.
+
 2002-04-24  David S. Miller  <davem@redhat.com>
 
        * gdbint.texinfo (REGISTER_IN_WINDOW): Delete definition.
index fd164d8a6d9850b119f7fb0a479456f093802e73..efd817c5f19cd422ef46759eec33c7ad4d49a391 100644 (file)
@@ -3090,11 +3090,6 @@ The epilogue of a function is defined as the part of a function where
 the stack frame of the function already has been destroyed up to the
 final `return from function call' instruction.
 
-@item IN_SIGTRAMP (@var{pc}, @var{name})
-@findex IN_SIGTRAMP
-Define this to return non-zero if the given @var{pc} and/or @var{name}
-indicates that the current function is a @code{sigtramp}.
-
 @item SIGTRAMP_START (@var{pc})
 @findex SIGTRAMP_START
 @itemx SIGTRAMP_END (@var{pc})
@@ -3293,6 +3288,18 @@ them.
 @findex PC_IN_CALL_DUMMY
 See @file{inferior.h}.
 
+@item PC_IN_SIGTRAMP (@var{pc}, @var{name})
+@findex PC_IN_SIGTRAMP
+@cindex sigtramp
+The @dfn{sigtramp} is a routine that the kernel calls (which then calls
+the signal handler).  On most machines it is a library routine that is
+linked into the executable.
+
+This function, given a program counter value in @var{pc} and the
+(possibly NULL) name of the function in which that @var{pc} resides,
+returns nonzero if the @var{pc} and/or @var{name} show that we are in
+sigtramp.
+
 @item PC_LOAD_SEGMENT
 @findex PC_LOAD_SEGMENT
 If defined, print information about the load segment for the program
index bc8f47a769fd92b921054fad528e15c9043ebe3a..f7248fc75fe3a148aa175b46ac779e4ad6c866ae 100644 (file)
@@ -250,6 +250,7 @@ struct gdbarch
   gdbarch_print_insn_ftype *print_insn;
   gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
   gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
+  gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
   gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
   gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
   gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
@@ -396,6 +397,7 @@ struct gdbarch startup_gdbarch =
   0,
   0,
   0,
+  0,
   generic_in_function_epilogue_p,
   construct_inferior_arguments,
   0,
@@ -516,6 +518,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
   current_gdbarch->print_insn = legacy_print_insn;
   current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
   current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
+  current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
   current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
   current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
   current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
@@ -764,6 +767,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of print_insn, invalid_p == 0 */
   /* Skip verify of skip_trampoline_code, invalid_p == 0 */
   /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
+  /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
   /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
   /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
   /* Skip verify of dwarf2_build_frame_info, has predicate */
@@ -1461,6 +1465,17 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         (long) current_gdbarch->pc_in_call_dummy
                         /*PC_IN_CALL_DUMMY ()*/);
 #endif
+#ifdef PC_IN_SIGTRAMP
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "PC_IN_SIGTRAMP(pc, name)",
+                      XSTRING (PC_IN_SIGTRAMP (pc, name)));
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
+                        (long) current_gdbarch->pc_in_sigtramp
+                        /*PC_IN_SIGTRAMP ()*/);
+#endif
 #ifdef PC_REGNUM
   fprintf_unfiltered (file,
                       "gdbarch_dump: PC_REGNUM # %s\n",
@@ -4408,6 +4423,24 @@ set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
   gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
 }
 
+int
+gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
+{
+  if (gdbarch->pc_in_sigtramp == 0)
+    internal_error (__FILE__, __LINE__,
+                    "gdbarch: gdbarch_pc_in_sigtramp invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
+  return gdbarch->pc_in_sigtramp (pc, name);
+}
+
+void
+set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
+                            gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
+{
+  gdbarch->pc_in_sigtramp = pc_in_sigtramp;
+}
+
 int
 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
 {
index f6a690d8a13070b57e10405bc49d3d87a0e599db..0e334cff80619c9401237cbd225171aa38e12308 100644 (file)
@@ -2268,6 +2268,44 @@ extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbar
 #endif
 #endif
 
+/* Sigtramp is a routine that the kernel calls (which then calls the
+   signal handler).  On most machines it is a library routine that is
+   linked into the executable.
+  
+   This macro, given a program counter value and the name of the
+   function in which that PC resides (which can be null if the name is
+   not known), returns nonzero if the PC and name show that we are in
+   sigtramp.
+  
+   On most machines just see if the name is sigtramp (and if we have
+   no name, assume we are not in sigtramp).
+  
+   FIXME: cagney/2002-04-21: The function find_pc_partial_function
+   calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP.
+   This means PC_IN_SIGTRAMP function can't be implemented by doing its
+   own local NAME lookup.
+  
+   FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess.
+   Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
+   does not. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP)
+#define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name))
+#endif
+
+typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
+extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
+extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
+#error "Non multi-arch definition of PC_IN_SIGTRAMP"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_SIGTRAMP)
+#define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
+#endif
+#endif
+
 /* A target might have problems with watchpoints as soon as the stack
    frame of the current function has been destroyed.  This mostly happens
    as the first action in a funtion's epilogue.  in_function_epilogue_p()
index cdce9c1e9e9b9d9b0d76437b3e88fc3b22ac48ae..ee9645e4d098971cfc4719b232048bb16ecee857 100755 (executable)
@@ -608,6 +608,27 @@ f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generi
 # trampoline code in the ".plt" section.  IN_SOLIB_CALL_TRAMPOLINE evaluates
 # to nonzero if we are current stopped in one of these.
 f:2:IN_SOLIB_CALL_TRAMPOLINE:int:in_solib_call_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_call_trampoline::0
+# Sigtramp is a routine that the kernel calls (which then calls the
+# signal handler).  On most machines it is a library routine that is
+# linked into the executable.
+#
+# This macro, given a program counter value and the name of the
+# function in which that PC resides (which can be null if the name is
+# not known), returns nonzero if the PC and name show that we are in
+# sigtramp.
+#
+# On most machines just see if the name is sigtramp (and if we have
+# no name, assume we are not in sigtramp).
+#
+# FIXME: cagney/2002-04-21: The function find_pc_partial_function
+# calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP.
+# This means PC_IN_SIGTRAMP function can't be implemented by doing its
+# own local NAME lookup.
+#
+# FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess.
+# Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
+# does not.
+f:2:PC_IN_SIGTRAMP:int:pc_in_sigtramp:CORE_ADDR pc, char *name:pc, name:::legacy_pc_in_sigtramp::0
 # A target might have problems with watchpoints as soon as the stack
 # frame of the current function has been destroyed.  This mostly happens
 # as the first action in a funtion's epilogue.  in_function_epilogue_p()
index 175b70297abdf7a7bc2b025976a950f03cb29719..ed23d9a86fbf8506315d76770816e395586001cb 100644 (file)
@@ -633,7 +633,8 @@ pc_in_interrupt_handler (CORE_ADDR pc)
      its frame isn't a pure interrupt frame.  Deal with this.  */
   msym_us = lookup_minimal_symbol_by_pc (pc);
 
-  return u->HP_UX_interrupt_marker && !IN_SIGTRAMP (pc, SYMBOL_NAME (msym_us));
+  return (u->HP_UX_interrupt_marker
+         && !PC_IN_SIGTRAMP (pc, SYMBOL_NAME (msym_us)));
 }
 
 /* Called when no unwind descriptor was found for PC.  Returns 1 if it
@@ -751,7 +752,7 @@ find_proc_framesize (CORE_ADDR pc)
   if (u->Save_SP
       && !pc_in_interrupt_handler (pc)
       && msym_us
-      && !IN_SIGTRAMP (pc, SYMBOL_NAME (msym_us)))
+      && !PC_IN_SIGTRAMP (pc, SYMBOL_NAME (msym_us)))
     return -1;
 
   return u->Total_frame_size << 3;
index d67c01c2d59b907ccdc30fa8f130d4d23526bfbd..9592decee1955f7ece8dea0c33a60aa7c2cbd610 100644 (file)
@@ -92,7 +92,7 @@ i386_linux_register_raw_size (int reg)
 
    It kind of sucks that we have to read memory from the process in
    order to identify a signal trampoline, but there doesn't seem to be
-   any other way.  The IN_SIGTRAMP macro in tm-linux.h arranges to
+   any other way.  The PC_IN_SIGTRAMP macro in tm-linux.h arranges to
    only call us if no function name could be identified, which should
    be the case since the code is on the stack.
 
@@ -317,7 +317,7 @@ i386_linux_sigtramp_saved_sp (struct frame_info *frame)
    in progress when the signal trampoline was entered.  GDB mostly
    treats this frame pointer value as a magic cookie.  We detect the
    case of a signal trampoline by looking at the SIGNAL_HANDLER_CALLER
-   field, which is set based on IN_SIGTRAMP.
+   field, which is set based on PC_IN_SIGTRAMP.
 
    When a signal trampoline is invoked from a frameless function, we
    essentially have two frameless functions in a row.  In this case,
index c0f100d0838af71322cf8e5c0c63cfb0a716084c..2c05f35b3ce684131c611bcca32ac86237e3794f 100644 (file)
@@ -403,29 +403,6 @@ extern char *stop_registers;
 
 extern int attach_flag;
 \f
-/* Sigtramp is a routine that the kernel calls (which then calls the
-   signal handler).  On most machines it is a library routine that
-   is linked into the executable.
-
-   This macro, given a program counter value and the name of the
-   function in which that PC resides (which can be null if the
-   name is not known), returns nonzero if the PC and name show
-   that we are in sigtramp.
-
-   On most machines just see if the name is sigtramp (and if we have
-   no name, assume we are not in sigtramp).  */
-#if !defined (IN_SIGTRAMP)
-#if defined (SIGTRAMP_START)
-#define IN_SIGTRAMP(pc, name) \
-       ((pc) >= SIGTRAMP_START(pc)   \
-        && (pc) < SIGTRAMP_END(pc) \
-        )
-#else
-#define IN_SIGTRAMP(pc, name) \
-       (name && STREQ ("_sigtramp", name))
-#endif
-#endif
-\f
 /* Possible values for CALL_DUMMY_LOCATION.  */
 #define ON_STACK 1
 #define BEFORE_TEXT_END 2
index 2415e8a98dfb2a40dc32c8b32c1b708868c6bdaa..acb722009a3ffa4ed22e517a92dc93d1516cffa1 100644 (file)
@@ -2640,8 +2640,8 @@ handle_inferior_event (struct execution_control_state *ecs)
     ecs->update_step_sp = 1;
 
     /* Did we just take a signal?  */
-    if (IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
-       && !IN_SIGTRAMP (prev_pc, prev_func_name)
+    if (PC_IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
+       && !PC_IN_SIGTRAMP (prev_pc, prev_func_name)
        && INNER_THAN (read_sp (), step_sp))
       {
        /* We've just taken a signal; go until we are back to
@@ -2752,7 +2752,7 @@ handle_inferior_event (struct execution_control_state *ecs)
          {
            /* We're doing a "next".  */
 
-           if (IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
+           if (PC_IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
                && INNER_THAN (step_frame_address, read_sp()))
              /* We stepped out of a signal handler, and into its
                  calling trampoline.  This is misdetected as a
@@ -2961,8 +2961,8 @@ static void
 check_sigtramp2 (struct execution_control_state *ecs)
 {
   if (trap_expected
-      && IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
-      && !IN_SIGTRAMP (prev_pc, prev_func_name)
+      && PC_IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
+      && !PC_IN_SIGTRAMP (prev_pc, prev_func_name)
       && INNER_THAN (read_sp (), step_sp))
     {
       /* What has happened here is that we have just stepped the
index 3729b9c8699f78884ba7f75a50261d717cc7310a..3cee42e0740421061eeb72701fb24b087b25cbc4 100644 (file)
@@ -2108,7 +2108,7 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
             We can't use fci->signal_handler_caller, it is not yet set.  */
          find_pc_partial_function (fci->pc, &name,
                                    (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
-         if (!IN_SIGTRAMP (fci->pc, name))
+         if (!PC_IN_SIGTRAMP (fci->pc, name))
            {
              frame_saved_regs_zalloc (fci);
              memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
@@ -4576,9 +4576,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                      "mips_dump_tdep: IGNORE_HELPER_CALL # %s\n",
                      XSTRING (IGNORE_HELPER_CALL (PC)));
-  fprintf_unfiltered (file,
-                     "mips_dump_tdep: IN_SIGTRAMP # %s\n",
-                     XSTRING (IN_SIGTRAMP (PC, NAME)));
   fprintf_unfiltered (file,
                      "mips_dump_tdep: IN_SOLIB_CALL_TRAMPOLINE # %s\n",
                      XSTRING (IN_SOLIB_CALL_TRAMPOLINE (PC, NAME)));
index 667170cda05ee5171410634b0305e3b1dbfe5be6..bd765990cf3647cc2d8106ff0c21fd0fdb03d882 100644 (file)
@@ -106,10 +106,11 @@ static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc);
 /* Determine if pc is in a signal trampoline...
 
    Ha!  That's not what this does at all.  wait_for_inferior in
-   infrun.c calls IN_SIGTRAMP in order to detect entry into a signal
-   trampoline just after delivery of a signal.  But on GNU/Linux,
-   signal trampolines are used for the return path only.  The kernel
-   sets things up so that the signal handler is called directly.
+   infrun.c calls PC_IN_SIGTRAMP in order to detect entry into a
+   signal trampoline just after delivery of a signal.  But on
+   GNU/Linux, signal trampolines are used for the return path only.
+   The kernel sets things up so that the signal handler is called
+   directly.
 
    If we use in_sigtramp2() in place of in_sigtramp() (see below)
    we'll (often) end up with stop_pc in the trampoline and prev_pc in
@@ -141,11 +142,11 @@ static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc);
    first instruction long after the fact, just in case the observed
    behavior is ever fixed.)
 
-   IN_SIGTRAMP is called from blockframe.c as well in order to set
+   PC_IN_SIGTRAMP is called from blockframe.c as well in order to set
    the signal_handler_caller flag.  Because of our strange definition
-   of in_sigtramp below, we can't rely on signal_handler_caller getting
-   set correctly from within blockframe.c.  This is why we take pains
-   to set it in init_extra_frame_info().  */
+   of in_sigtramp below, we can't rely on signal_handler_caller
+   getting set correctly from within blockframe.c.  This is why we
+   take pains to set it in init_extra_frame_info().  */
 
 int
 ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name)
This page took 0.056573 seconds and 4 git commands to generate.