ADD_STRING ("\n", 1);
ADD_STRING ("\n");
register_dump (int fd, struct sigcontext *ctx){  char regs[32][8];  char fpregs[32][8];  struct iovec iov[97]; XXX  size_t nr = 0;  int i;#define ADD_STRING(str) \  iov[nr].iov_base = (char *) str;					      \  iov[nr].iov_len = strlen (str);					      \  ++nr#define ADD_MEM(str, len) \  iov[nr].iov_base = str;						      \  iov[nr].iov_len = len;						      \  ++nr  /* Generate strings of register contents.  */  for (i = 0; i < 31; i++)    hexvalue (ctx->sc_regs, regs[i], 8);  hexvalue (ctx->sc_pc, regs[32], 8);  hexvalue (ctx->sc_cause, regs[33], 8);  hexvalue (ctx->sc_status, regs[34], 8);  hexvalue (ctx->badvaddr, regs[35], 8);  hexvalue (ctx->sc_mdhi, regs[36], 8);  hexvalue (ctx->sc_mdlo, regs[37], 8);  /* Generate the output.  */  ADD_STRING ("Register dump:\n\n R0   ");  for (i = 0; i < 8; i++)    {      ADD_MEM (regs[i], 8);      ADD_STRING (" ", 1);    }  ADD_STRING ("\n R8   ");  for (i = 8; i < 16; i++)    {      ADD_MEM (regs[i], 8);      ADD_STRING (" ", 1);    }  ADD_STRING ("\n R16  ");  for (i = 16; i < 24; i++)    {      ADD_MEM (regs[i], 8);      ADD_STRING (" ", 1);    }  ADD_STRING ("\n R24  ");  for (i = 24; i < 32; i++)    {      ADD_MEM (regs[i], 8);      ADD_STRING (" ", 1);    }  ADD_STRING ("\n           pc    cause  status   badvaddr       lo       hi\n      ");  ADD_MEM (regs[], 8);  for (i = 32; i < 38; i++)    {      ADD_MEM (regs[i], 8);      ADD_STRING (" ", 1);    }  ADD_STRING ("\n", 1);  /* Write the stuff out.  */  writev (fd, iov, nr);}