* configure.host: Add arm*-*-openbsd*.
[deliverable/binutils-gdb.git] / gdb / dwarf2-frame.c
index 7b46c78dbaaee59754e78b42b9b078f401956133..22b8ae6f2f551b6024c9ef1fd6f56313d680f7e3 100644 (file)
@@ -445,6 +445,31 @@ bad CFI data; mismatched DW_CFA_restore_state at 0x%s"), paddr (fs->pc));
              /* cfa_how deliberately not set.  */
              break;
 
+           case DW_CFA_GNU_window_save:
+             /* This is SPARC-specific code, and contains hard-coded
+                constants for the register numbering scheme used by
+                GCC.  Rather than having a architecture-specific
+                operation that's only ever used by a single
+                architecture, we provide the implementation here.
+                Incidentally that's what GCC does too in its
+                unwinder.  */
+             {
+               struct gdbarch *gdbarch = get_frame_arch (next_frame);
+               int size = register_size(gdbarch, 0);
+               dwarf2_frame_state_alloc_regs (&fs->regs, 32);
+               for (reg = 8; reg < 16; reg++)
+                 {
+                   fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_REG;
+                   fs->regs.reg[reg].loc.reg = reg + 16;
+                 }
+               for (reg = 16; reg < 32; reg++)
+                 {
+                   fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_OFFSET;
+                   fs->regs.reg[reg].loc.offset = (reg - 16) * size;
+                 }
+             }
+             break;
+
            case DW_CFA_GNU_args_size:
              /* Ignored.  */
              insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
@@ -585,6 +610,9 @@ struct dwarf2_frame_cache
   /* DWARF Call Frame Address.  */
   CORE_ADDR cfa;
 
+  /* Set if the return address column was marked as undefined.  */
+  int undefined_retaddr;
+
   /* Saved registers, indexed by GDB register number, not by DWARF
      register number.  */
   struct dwarf2_frame_state_reg *reg;
@@ -766,6 +794,10 @@ incomplete CFI data; unspecified registers (e.g., %s) at 0x%s"),
       }
   }
 
+  if (fs->retaddr_column < fs->regs.num_regs
+      && fs->regs.reg[fs->retaddr_column].how == DWARF2_FRAME_REG_UNDEFINED)
+    cache->undefined_retaddr = 1;
+
   do_cleanups (old_chain);
 
   *this_cache = cache;
@@ -779,6 +811,9 @@ dwarf2_frame_this_id (struct frame_info *next_frame, void **this_cache,
   struct dwarf2_frame_cache *cache =
     dwarf2_frame_cache (next_frame, this_cache);
 
+  if (cache->undefined_retaddr)
+    return;
+
   (*this_id) = frame_id_build (cache->cfa, frame_func_unwind (next_frame));
 }
 
This page took 0.02389 seconds and 4 git commands to generate.