isn't, there is some pretty busted code as it should have
isn't a frame, there is some pretty busted code as it should have
frame_register_unwind (struct frame_info *frame, int regnum,		       int *optimizedp, enum lval_type *lvalp,		       CORE_ADDR *addrp, int *realnump, void *bufferp){  struct frame_unwind_cache *cache;  if (frame_debug)    {      fprintf_unfiltered (gdb_stdlog, "\{ frame_register_unwind (frame=%d,regnum=%d(%s),...) ",			  frame->level, regnum,			  frame_map_regnum_to_name (frame, regnum));    }  /* Require all but BUFFERP to be valid.  A NULL BUFFERP indicates     that the value proper does not need to be fetched.  */  gdb_assert (optimizedp != NULL);  gdb_assert (lvalp != NULL);  gdb_assert (addrp != NULL);  gdb_assert (realnump != NULL);  /* gdb_assert (bufferp != NULL); */  /* NOTE: cagney/2002-11-27: A program trying to unwind a NULL frame     is broken.  There is always a frame.  If there, for some reason,     isn't, there is some pretty busted code as it should have     detected the problem before calling here.  */  gdb_assert (frame != NULL);  /* Find the unwinder.  */  if (frame->unwind == NULL)    {      frame->unwind = frame_unwind_find_by_frame (frame->next);      /* FIXME: cagney/2003-04-02: Rather than storing the frame's	 type in the frame, the unwinder's type should be returned	 directly.  Unfortunately, legacy code, called by	 legacy_get_prev_frame, explicitly set the frames type using	 the method deprecated_set_frame_type().  */      frame->type = frame->unwind->type;    }  /* Ask this frame to unwind its register.  See comment in     "frame-unwind.h" for why NEXT frame and this unwind cace are     passed in.  */  frame->unwind->prev_register (frame->next, &frame->prologue_cache, regnum,				optimizedp, lvalp, addrp, realnump, bufferp);  if (frame_debug)    {      fprintf_unfiltered (gdb_stdlog, "->");      fprintf_unfiltered (gdb_stdlog, " *optimizedp=%d", (*optimizedp));      fprintf_unfiltered (gdb_stdlog, " *lvalp=%d", (int) (*lvalp));      fprintf_unfiltered (gdb_stdlog, " *addrp=0x%s", paddr_nz ((*addrp)));      fprintf_unfiltered (gdb_stdlog, " *bufferp=");      if (bufferp == NULL)	fprintf_unfiltered (gdb_stdlog, "<NULL>");      else	{	  int i;	  const unsigned char *buf = bufferp;	  fprintf_unfiltered (gdb_stdlog, "[");	  for (i = 0; i < register_size (current_gdbarch, regnum); i++)	    fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);	  fprintf_unfiltered (gdb_stdlog, "]");	}      fprintf_unfiltered (gdb_stdlog, " }\n");    }}