daily update
[deliverable/binutils-gdb.git] / gdb / alpha-osf1-tdep.c
index 4eaa3c4013c51be11cef2f917615ad9bf05c886e..b5879ad551cdabe02332f05d00142fc0576f8035 100644 (file)
 #include "value.h"
 #include "osabi.h"
 #include "gdb_string.h"
+#include "objfiles.h"
 
 #include "alpha-tdep.h"
 
-/* Under OSF/1, the __sigtramp routine is frameless and has a frame
-   size of zero, but we are able to backtrace through it.  */
-static CORE_ADDR
-alpha_osf1_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 (PC_IN_SIGTRAMP (pc, name))
-    return frame->frame;
-  return 0;
-}
-
 static int
 alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
 {
@@ -49,8 +37,12 @@ alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
 static CORE_ADDR
 alpha_osf1_sigcontext_addr (struct frame_info *frame)
 {
-  return (read_memory_integer (frame->next ? frame->next->frame
-                                          : frame->frame, 8));
+  struct frame_info *next_frame = get_next_frame (frame);
+
+  if (next_frame != NULL)
+    return (read_memory_integer (get_frame_base (next_frame), 8));
+  else
+    return (read_memory_integer (get_frame_base (frame), 8));
 }
 
 static void
@@ -59,14 +51,16 @@ alpha_osf1_init_abi (struct gdbarch_info info,
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
-  set_gdbarch_pc_in_sigtramp (gdbarch, alpha_osf1_pc_in_sigtramp);
+  /* Hook into the MDEBUG frame unwinder.  */
+  alpha_mdebug_init_abi (info, gdbarch);
+
   /* The next/step support via procfs on OSF1 is broken when running
      on multi-processor machines. We need to use software single stepping
      instead.  */
   set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
 
-  tdep->skip_sigtramp_frame = alpha_osf1_skip_sigtramp_frame;
   tdep->sigcontext_addr = alpha_osf1_sigcontext_addr;
+  tdep->pc_in_sigtramp = alpha_osf1_pc_in_sigtramp;
 
   tdep->jb_pc = 2;
   tdep->jb_elt_size = 8;
This page took 0.024327 seconds and 4 git commands to generate.