Changes made so that skin error "report this bug to" messages are distinguished
from core error ones:

  - Split up VG_(panic) into VG_(core_panic) and VG_(skin_panic)

  - Likewise, split vg_assert into vg_assert and sk_assert

  - Added a new need string: `bug_reports_to'

  - Removed VG_(skin_error) which was a previous wussy attempt at this change.
    This removed the need for the hacky redeclaration of VG_(skin_error) in
    vg_profile.c, which is good.

At the moment, Julian and Nick's email addresses are hard-coded into each skin
individually, rather than using a #define in vg_skin.h, because that didn't
feel quite right to me...  jseward@acm.org is still done with a #define for
core errors, though.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1164 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/demangle/dyn-string.c b/coregrind/demangle/dyn-string.c
index d6130a1..ed0f511 100644
--- a/coregrind/demangle/dyn-string.c
+++ b/coregrind/demangle/dyn-string.c
@@ -199,7 +199,7 @@
      dyn_string_t src;
 {
   if (dest == src)
-      VG_(panic) ("dyn_string_copy: src==dest");
+      VG_(core_panic) ("dyn_string_copy: src==dest");
 
   /* Make room in DEST.  */
   if (dyn_string_resize (dest, src->length) == NULL)
@@ -270,7 +270,7 @@
   int i;
 
   if (src == dest)
-    VG_(panic)( "dyn_string_insert: src==dest" );
+    VG_(core_panic)( "dyn_string_insert: src==dest" );
 
   if (dyn_string_resize (dest, dest->length + src->length) == NULL)
     return 0;
diff --git a/coregrind/vg_clientfuncs.c b/coregrind/vg_clientfuncs.c
index 559276f..e4d205b 100644
--- a/coregrind/vg_clientfuncs.c
+++ b/coregrind/vg_clientfuncs.c
@@ -345,22 +345,22 @@
 
 
 /* Bomb out if we get any of these. */
-/* HACK: We shouldn't call VG_(panic) or VG_(message) on the simulated
+/* HACK: We shouldn't call VG_(core_panic) or VG_(message) on the simulated
    CPU.  Really we should pass the request in the usual way, and
    Valgrind itself can do the panic.  Too tedious, however.  
 */
 void pvalloc ( void )
-{ VG_(panic)("call to pvalloc\n"); }
+{ VG_(core_panic)("call to pvalloc\n"); }
 void malloc_stats ( void )
-{ VG_(panic)("call to malloc_stats\n"); }
+{ VG_(core_panic)("call to malloc_stats\n"); }
 void malloc_usable_size ( void )
-{ VG_(panic)("call to malloc_usable_size\n"); }
+{ VG_(core_panic)("call to malloc_usable_size\n"); }
 void malloc_trim ( void )
-{ VG_(panic)("call to malloc_trim\n"); }
+{ VG_(core_panic)("call to malloc_trim\n"); }
 void malloc_get_state ( void )
-{ VG_(panic)("call to malloc_get_state\n"); }
+{ VG_(core_panic)("call to malloc_get_state\n"); }
 void malloc_set_state ( void )
-{ VG_(panic)("call to malloc_set_state\n"); }
+{ VG_(core_panic)("call to malloc_set_state\n"); }
 
 
 /* Yet another ugly hack.  Cannot include <malloc.h> because we
diff --git a/coregrind/vg_default.c b/coregrind/vg_default.c
index 2f6d575..4911e34 100644
--- a/coregrind/vg_default.c
+++ b/coregrind/vg_default.c
@@ -51,7 +51,7 @@
       "  The skin you have selected is missing the function `%s',\n"
       "  which is required.\n\n",
       fn);
-   VG_(skin_error)("Missing skin function");
+   VG_(skin_panic)("Missing skin function");
 }
 
 static __attribute__ ((noreturn))
@@ -62,7 +62,7 @@
       "  The skin you have selected is missing the function `%s'\n"
       "  required by one of its needs.\n\n",
       fn);
-   VG_(skin_error)("Missing skin function");
+   VG_(skin_panic)("Missing skin function");
 }
 
 /* ---------------------------------------------------------------------
diff --git a/coregrind/vg_dispatch.S b/coregrind/vg_dispatch.S
index 7cdb209..ddb8819 100644
--- a/coregrind/vg_dispatch.S
+++ b/coregrind/vg_dispatch.S
@@ -187,7 +187,7 @@
 
 	/* ebp has an invalid value ... crap out. */
 	pushl	$panic_msg_ebp
-	call	VG_(panic)
+	call	VG_(core_panic)
 	/* (never returns) */
 
 dispatch_syscall:
diff --git a/coregrind/vg_dummy_profile.c b/coregrind/vg_dummy_profile.c
index 2f869c9..3620ff8 100644
--- a/coregrind/vg_dummy_profile.c
+++ b/coregrind/vg_dummy_profile.c
@@ -49,17 +49,17 @@
 
 void VGP_(done_profiling) ( void )
 {
-   VG_(panic)("done_profiling");
+   VG_(core_panic)("done_profiling");
 }
 
 void VGP_(pushcc) ( UInt cc )
 {
-   VG_(panic)("pushcc");
+   VG_(core_panic)("pushcc");
 }
 
 void VGP_(popcc) ( UInt cc )
 {
-   VG_(panic)("popcc");
+   VG_(core_panic)("popcc");
 }
 
 /*--------------------------------------------------------------------*/
diff --git a/coregrind/vg_errcontext.c b/coregrind/vg_errcontext.c
index 9da03fc..198dd78 100644
--- a/coregrind/vg_errcontext.c
+++ b/coregrind/vg_errcontext.c
@@ -81,7 +81,7 @@
             VG_(printf)("\nUnhandled error type: %u. VG_(needs).skin_errors\n"
                         "probably needs to be set.\n",
                         e1->skin_err.ekind);
-            VG_(skin_error)("unhandled error type");
+            VG_(skin_panic)("unhandled error type");
          }
    }
 }
@@ -113,7 +113,7 @@
             VG_(printf)("\nUnhandled error type: %u.  VG_(needs).skin_errors\n"
                         "probably needs to be set?\n",
                         err->skin_err.ekind);
-            VG_(skin_error)("unhandled error type");
+            VG_(skin_panic)("unhandled error type");
          }
    }
 }
@@ -410,7 +410,7 @@
             p_min = p;
          }
       }
-      if (p_min == NULL) VG_(panic)("show_all_errors()");
+      if (p_min == NULL) VG_(skin_panic)("show_all_errors()");
 
       VG_(message)(Vg_UserMsg, "");
       VG_(message)(Vg_UserMsg, "%d errors in context %d of %d:",
@@ -684,7 +684,7 @@
                "\nUnhandled suppression type: %u.  VG_(needs).skin_errors\n"
                "probably needs to be set.\n",
                err->skin_err.ekind);
-            VG_(skin_error)("unhandled suppression type");
+            VG_(skin_panic)("unhandled suppression type");
          }
    }
 }
@@ -703,7 +703,7 @@
          case FunName: if (VG_(string_match)(su->caller[i], 
                                              caller_fun[i])) break;
                        return False;
-         default: VG_(panic)("is_suppressible_error");
+         default: VG_(skin_panic)("is_suppressible_error");
       }
    }
 
diff --git a/coregrind/vg_execontext.c b/coregrind/vg_execontext.c
index 24939c5..e1a0ff1 100644
--- a/coregrind/vg_execontext.c
+++ b/coregrind/vg_execontext.c
@@ -140,7 +140,7 @@
       return True;
 
    default:
-      VG_(panic)("VG_(eq_ExeContext): unrecognised VgRes");
+      VG_(core_panic)("VG_(eq_ExeContext): unrecognised VgRes");
    }
 }
 
diff --git a/coregrind/vg_from_ucode.c b/coregrind/vg_from_ucode.c
index 91ba029..23e804c 100644
--- a/coregrind/vg_from_ucode.c
+++ b/coregrind/vg_from_ucode.c
@@ -218,7 +218,7 @@
       case 2: shift = 1; break;
       case 4: shift = 2; break;
       case 8: shift = 3; break;
-      default: VG_(panic)( "mkSIB" );
+      default: VG_(core_panic)( "mkSIB" );
    }
    return ((shift & 3) << 6) | ((regindex & 7) << 3) | (regbase & 7);
 }
@@ -234,7 +234,7 @@
 {
    /* (regmem), reg */
    if (regmem == R_ESP) 
-      VG_(panic)("emit_amode_regmem_reg");
+      VG_(core_panic)("emit_amode_regmem_reg");
    if (regmem == R_EBP) {
       VG_(emitB) ( mkModRegRM(1, reg, 5) );
       VG_(emitB) ( 0x00 );
@@ -246,7 +246,7 @@
 void VG_(emit_amode_offregmem_reg) ( Int off, Int regmem, Int reg )
 {
    if (regmem == R_ESP)
-      VG_(panic)("emit_amode_offregmem_reg(ESP)");
+      VG_(core_panic)("emit_amode_offregmem_reg(ESP)");
    if (off < -128 || off > 127) {
       /* Use a large offset */
       /* d32(regmem), reg */
@@ -263,7 +263,7 @@
                                             Int regindex, Int reg )
 {
    if (regindex == R_ESP)
-      VG_(panic)("emit_amode_sib_reg(ESP)");
+      VG_(core_panic)("emit_amode_sib_reg(ESP)");
    if (off < -128 || off > 127) {
       /* Use a 32-bit offset */
       VG_(emitB) ( mkModRegRM(2, reg, 4) ); /* SIB with 32-bit displacement */
@@ -304,7 +304,7 @@
       case AND: return 4;
       case SUB: return 5;
       case XOR: return 6;
-      default: VG_(panic)("mkGrp1opcode");
+      default: VG_(core_panic)("mkGrp1opcode");
    }
 }
 
@@ -318,7 +318,7 @@
       case SHL: return 4;
       case SHR: return 5;
       case SAR: return 7;
-      default: VG_(panic)("mkGrp2opcode");
+      default: VG_(core_panic)("mkGrp2opcode");
    }
 }
 
@@ -327,7 +327,7 @@
    switch (opc) {
       case NOT: return 2;
       case NEG: return 3;
-      default: VG_(panic)("mkGrp3opcode");
+      default: VG_(core_panic)("mkGrp3opcode");
    }
 }
 
@@ -336,7 +336,7 @@
    switch (opc) {
       case INC: return 0;
       case DEC: return 1;
-      default: VG_(panic)("mkGrp4opcode");
+      default: VG_(core_panic)("mkGrp4opcode");
    }
 }
 
@@ -345,7 +345,7 @@
    switch (opc) {
       case CALLM: return 2;
       case JMP:   return 4;
-      default: VG_(panic)("mkGrp5opcode");
+      default: VG_(core_panic)("mkGrp5opcode");
    }
 }
 
@@ -359,7 +359,7 @@
       case OR:  return 0x08;
       case SBB: return 0x18;
       case SUB: return 0x28;
-      default: VG_(panic)("mkPrimaryOpcode");
+      default: VG_(core_panic)("mkPrimaryOpcode");
   }
 }
 
@@ -560,7 +560,7 @@
                          nameISize(sz), nameIReg(sz,reg));
          break;
       default: 
-         VG_(panic)("VG_(emit_unaryopv_reg)");
+         VG_(core_panic)("VG_(emit_unaryopv_reg)");
    }
 }
 
@@ -794,7 +794,7 @@
             VG_(printf)( "\n\t\tnegb\t%s\n", nameIReg(1,reg));
          break;
       default: 
-         VG_(panic)("VG_(emit_unaryopb_reg)");
+         VG_(core_panic)("VG_(emit_unaryopb_reg)");
    }
 }
 
@@ -947,7 +947,7 @@
 
 void VG_(emit_add_lit_to_esp) ( Int lit )
 {
-   if (lit < -128 || lit > 127) VG_(panic)("VG_(emit_add_lit_to_esp)");
+   if (lit < -128 || lit > 127) VG_(core_panic)("VG_(emit_add_lit_to_esp)");
    VG_(new_emit)();
    VG_(emitB) ( 0x83 );
    VG_(emitB) ( 0xC4 );
@@ -1122,7 +1122,7 @@
       VG_(printf)("%p ", VG_(noncompact_helper_addrs)[i]);
 
    VG_(printf)("\n");
-   VG_(skin_error)("Unfound helper");
+   VG_(skin_panic)("Unfound helper");
 }
 
 /*----------------------------------------------------*/
@@ -1165,7 +1165,7 @@
       ccall_arg_setup_instrs++;
    }
    else
-      VG_(panic)("emit_movl_litOrReg_reg: unexpected tag");
+      VG_(core_panic)("emit_movl_litOrReg_reg: unexpected tag");
 }
 
 static
@@ -1225,7 +1225,7 @@
          emit_swapl_arg_regs ( dst1, dst2 );
 
       } else {
-         VG_(panic)("impossible 3-cycle");
+         VG_(core_panic)("impossible 3-cycle");
       }
    }
 }
@@ -1321,7 +1321,7 @@
          break;
       default:
          VG_(printf)("tag=%d\n", tagv[i]);
-         VG_(panic)("VG_(synth_ccall): bad tag");
+         VG_(core_panic)("VG_(synth_ccall): bad tag");
       }
       stack_used += 4;
       ccall_arg_setup_instrs++;
@@ -1353,7 +1353,7 @@
       break;
 
    default:
-      VG_(panic)("VG_(synth_call): regparms_n value not in range 0..3");
+      VG_(core_panic)("VG_(synth_call): regparms_n value not in range 0..3");
    }
    
    /* Call the function */
@@ -1396,7 +1396,7 @@
          VG_(emit_movv_lit_reg) ( 4, VG_TRC_EBP_JMP_CLIENTREQ, R_EBP );
          break;
       default: 
-         VG_(panic)("load_ebp_from_JmpKind");
+         VG_(core_panic)("load_ebp_from_JmpKind");
    }
 }
 
@@ -1471,7 +1471,7 @@
       case 4: emit_movv_regmem_reg ( 4, reg1, reg2 ); break;
       case 2: emit_movzwl_regmem_reg ( reg1, reg2 ); break;
       case 1: emit_movzbl_regmem_reg ( reg1, reg2 ); break;
-      default: VG_(panic)("synth_mov_regmem_reg");
+      default: VG_(core_panic)("synth_mov_regmem_reg");
    }  
 }
 
@@ -1482,7 +1482,7 @@
       case 4: VG_(emit_movv_offregmem_reg) ( 4, off, areg, reg ); break;
       case 2: VG_(emit_movzwl_offregmem_reg) ( off, areg, reg ); break;
       case 1: VG_(emit_movzbl_offregmem_reg) ( off, areg, reg ); break;
-      default: VG_(panic)("synth_mov_offregmem_reg");
+      default: VG_(core_panic)("synth_mov_offregmem_reg");
    }  
 }
 
@@ -1502,7 +1502,7 @@
                  VG_(emit_swapl_reg_EAX) ( reg );
               }
               break;
-      default: VG_(panic)("synth_mov_reg_offregmem");
+      default: VG_(core_panic)("synth_mov_reg_offregmem");
    }
 }
 
@@ -1524,7 +1524,7 @@
                  emit_swapl_reg_reg ( s1, reg1 );
               }
               break;
-      default: VG_(panic)("synth_mov_reg_litmem");
+      default: VG_(core_panic)("synth_mov_reg_litmem");
    }
 }
 
@@ -1555,7 +1555,7 @@
                  VG_(emit_swapl_reg_EAX) ( reg );
               }
               break;
-      default: VG_(panic)("synth_unaryop_reg");
+      default: VG_(core_panic)("synth_unaryop_reg");
    }
 }
 
@@ -1623,9 +1623,9 @@
             emit_swapl_reg_reg ( reg1, s1 );
             break;
          }
-         VG_(panic)("synth_nonshiftopb_reg_reg");
+         VG_(core_panic)("synth_nonshiftopb_reg_reg");
       }
-      default: VG_(panic)("synth_nonshiftop_reg_reg");
+      default: VG_(core_panic)("synth_nonshiftop_reg_reg");
    }
 }
 
@@ -1660,7 +1660,7 @@
          }
          break;
       default: 
-         VG_(panic)("synth_nonshiftop_offregmem_reg");
+         VG_(core_panic)("synth_nonshiftop_offregmem_reg");
    }
 }
 
@@ -1690,7 +1690,7 @@
                  VG_(emit_swapl_reg_EAX) ( reg );
               }
               break;
-      default: VG_(panic)("synth_nonshiftop_lit_reg");
+      default: VG_(core_panic)("synth_nonshiftop_lit_reg");
    }
 }
 
@@ -1714,7 +1714,7 @@
          if (reg != R_EAX) VG_(emit_swapl_reg_EAX) ( reg );
          break;
      default: 
-         VG_(panic)("synth_push_reg");
+         VG_(core_panic)("synth_push_reg");
    }
 }
 
@@ -1736,7 +1736,7 @@
          if (reg != R_EAX) VG_(emit_swapl_reg_EAX) ( reg );
          VG_(emit_add_lit_to_esp)(1);
          break;
-      default: VG_(panic)("synth_pop_reg");
+      default: VG_(core_panic)("synth_pop_reg");
    }
 }
 
@@ -1752,7 +1752,7 @@
       case 4: emit_shiftopv_cl_stack0 ( 4, opcode ); break;
       case 2: emit_shiftopv_cl_stack0 ( 2, opcode ); break;
       case 1: emit_shiftopb_cl_stack0 ( opcode ); break;
-      default: VG_(panic)("synth_shiftop_reg_reg");
+      default: VG_(core_panic)("synth_shiftop_reg_reg");
    }
    if (wr_cc) emit_put_eflags();
    if (regs != R_ECX) emit_swapl_reg_ECX ( regs );
@@ -1785,7 +1785,7 @@
                  VG_(emit_swapl_reg_EAX) ( reg );
               }
               break;
-      default: VG_(panic)("synth_shiftop_lit_reg");
+      default: VG_(core_panic)("synth_shiftop_lit_reg");
    }
 }
 
@@ -1869,7 +1869,7 @@
                      else return 4 * VGOFF_(m_edi);
       }
    }
-   VG_(panic)("spillOrArchOffset");
+   VG_(core_panic)("spillOrArchOffset");
 }
 
 static Int eflagsOffset ( void )
@@ -1886,7 +1886,7 @@
       case R_ES: return 4 * VGOFF_(m_es);
       case R_FS: return 4 * VGOFF_(m_fs);
       case R_GS: return 4 * VGOFF_(m_gs);
-      default: VG_(panic)("segRegOffset");
+      default: VG_(core_panic)("segRegOffset");
    }
 }
 
@@ -1904,7 +1904,7 @@
       case R_EBP: return 4 * VGOFF_(sh_ebp);
       case R_ESI: return 4 * VGOFF_(sh_esi);
       case R_EDI: return 4 * VGOFF_(sh_edi);
-      default:    VG_(panic)( "shadowOffset");
+      default:    VG_(core_panic)( "shadowOffset");
    }
 }
 
@@ -1930,7 +1930,7 @@
       VG_(emit_shiftopv_lit_reg) ( 2, SAR, 8, reg );
    }
    else
-      VG_(panic)("synth_WIDEN");
+      VG_(core_panic)("synth_WIDEN");
 }
 
 
@@ -2191,7 +2191,7 @@
                           break;
             case Literal: synth_mov_lit_reg ( u->size, u->lit32, u->val2 ); 
                           break;
-            default: VG_(panic)("emitUInstr:mov");
+            default: VG_(core_panic)("emitUInstr:mov");
 	 }
          break;
       }
@@ -2241,7 +2241,7 @@
                              R_EBP,
                              u->val2 );
                           break;
-            default: VG_(panic)("emitUInstr:non-shift-op");
+            default: VG_(core_panic)("emitUInstr:non-shift-op");
          }
          break;
       }
@@ -2265,7 +2265,7 @@
                              readFlagUse(u), writeFlagUse(u),
                              u->opcode, u->size, u->val1, u->val2 );
                           break;
-            default: VG_(panic)("emitUInstr:non-shift-op");
+            default: VG_(core_panic)("emitUInstr:non-shift-op");
          }
          break;
       }
@@ -2307,20 +2307,20 @@
                   synth_jmp_lit ( u->lit32, u->jmpkind );
                   break;
                default: 
-                  VG_(panic)("emitUInstr(JMP, unconditional, default)");
+                  VG_(core_panic)("emitUInstr(JMP, unconditional, default)");
                   break;
             }
          } else {
             switch (u->tag1) {
                case RealReg:
-                  VG_(panic)("emitUInstr(JMP, conditional, RealReg)");
+                  VG_(core_panic)("emitUInstr(JMP, conditional, RealReg)");
                   break;
                case Literal:
                   vg_assert(u->jmpkind == JmpBoring);
                   synth_jcond_lit ( u->cond, u->lit32 );
                   break;
                default: 
-                  VG_(panic)("emitUInstr(JMP, conditional, default)");
+                  VG_(core_panic)("emitUInstr(JMP, conditional, default)");
                   break;
             }
          }
@@ -2421,7 +2421,7 @@
                         " VG_(needs).extended_UCode should be set?\n",
                         u->opcode);
             VG_(pp_UInstr)(0,u);
-            VG_(panic)("emitUInstr: unimplemented opcode");
+            VG_(core_panic)("emitUInstr: unimplemented opcode");
          }
    }
 
diff --git a/coregrind/vg_helpers.S b/coregrind/vg_helpers.S
index 2315da4..1511bc1 100644
--- a/coregrind/vg_helpers.S
+++ b/coregrind/vg_helpers.S
@@ -58,7 +58,7 @@
 	roll $19, %eax
 	# should never get here
 	pushl	$signalreturn_bogusRA_panic_msg
-	call	VG_(panic)
+	call	VG_(core_panic)
 	
 .data
 signalreturn_bogusRA_panic_msg:
diff --git a/coregrind/vg_include.h b/coregrind/vg_include.h
index eccd05a..d0c8f08 100644
--- a/coregrind/vg_include.h
+++ b/coregrind/vg_include.h
@@ -798,9 +798,16 @@
    Exports of vg_mylibc.c
    ------------------------------------------------------------------ */
 
-/* Note: this function is re-declared (cough, hack) in include/vg_profile.c */
-__attribute__((noreturn))
-extern void VG_(skin_error) ( Char* s );
+#define vg_assert(expr)                                               \
+  ((void) ((expr) ? 0 :						      \
+	   (VG_(core_assert_fail) (VG__STRING(expr),	              \
+			           __FILE__, __LINE__,                \
+                                   __PRETTY_FUNCTION__), 0)))
+__attribute__ ((__noreturn__))
+extern void VG_(core_assert_fail) ( Char* expr, Char* file, 
+                                    Int line, Char* fn );
+__attribute__ ((__noreturn__))
+extern void  VG_(core_panic)      ( Char* str );
 
 /* VG_(brk) not public so skins cannot screw with curr_dataseg_end */
 extern void* VG_(brk) ( void* end_data_segment );
diff --git a/coregrind/vg_instrument.c b/coregrind/vg_instrument.c
index 9f787eb..dd870ec 100644
--- a/coregrind/vg_instrument.c
+++ b/coregrind/vg_instrument.c
@@ -56,7 +56,7 @@
 {
    UInt t1 = newTemp(cb);
 
-   vg_assert(regparms_n <= 1);
+   sk_assert(regparms_n <= 1);
    uInstr2(cb, MOV,   4, Literal, 0, TempReg, t1);
    uLiteral(cb, arg1);
    uInstr1(cb, CCALL, 0, TempReg, t1);
@@ -69,7 +69,7 @@
    UInt t1 = newTemp(cb);
    UInt t2 = newTemp(cb);
 
-   vg_assert(regparms_n <= 2);
+   sk_assert(regparms_n <= 2);
    uInstr2(cb, MOV,   4, Literal, 0, TempReg, t1);
    uLiteral(cb, arg1);
    uInstr2(cb, MOV,   4, Literal, 0, TempReg, t2);
diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c
index 665dcfb..99c17e3 100644
--- a/coregrind/vg_main.c
+++ b/coregrind/vg_main.c
@@ -126,7 +126,7 @@
    Int off = baB_off;
    baB_off += words;
    if (baB_off >= VG_BASEBLOCK_WORDS)
-      VG_(panic)( "alloc_BaB: baseBlock is too small");
+      VG_(core_panic)( "alloc_BaB: baseBlock is too small");
 
    return off;   
 }
@@ -147,7 +147,7 @@
    if (MAX_COMPACT_HELPERS <= VG_(n_compact_helpers)) {
       VG_(printf)("Can only register %d compact helpers\n", 
                   MAX_COMPACT_HELPERS);
-      VG_(panic)("Too many compact helpers registered");
+      VG_(core_panic)("Too many compact helpers registered");
    }
    VG_(compact_helper_addrs)[VG_(n_compact_helpers)] = a;
    VG_(n_compact_helpers)++;
@@ -162,7 +162,7 @@
       VG_(printf)("Can only register %d non-compact helpers\n", 
                   MAX_NONCOMPACT_HELPERS);
       VG_(printf)("Try increasing MAX_NON_COMPACT_HELPERS\n");
-      VG_(panic)("Too many non-compact helpers registered");
+      VG_(core_panic)("Too many non-compact helpers registered");
    }
    VG_(noncompact_helper_addrs)[VG_(n_noncompact_helpers)] = a;
    VG_(n_noncompact_helpers)++;
@@ -441,6 +441,7 @@
 VgNeeds VG_(needs) = {
    .name                    = NULL,
    .description             = NULL,
+   .bug_reports_to          = NULL,
 
    .core_errors             = False,
    .skin_errors             = False,
@@ -496,14 +497,16 @@
 
 static void sanity_check_needs ( void )
 {
-#define CHECK_NOT(var, value)                                     \
-   if ((var)==(value)) {                                          \
-      VG_(printf)("\n`%s' not initialised\n", VG__STRING(var));   \
-      VG_(skin_error)("Uninitialised needs field\n");             \
+#define CHECK_NOT(var, value)                               \
+   if ((var)==(value)) {                                    \
+      VG_(printf)("\nSkin error: `%s' not initialised\n",   \
+                  VG__STRING(var));                         \
+      VG_(skin_panic)("Uninitialised needs field\n");       \
    }
    
-   CHECK_NOT(VG_(needs).name,        NULL);
-   CHECK_NOT(VG_(needs).description, NULL);
+   CHECK_NOT(VG_(needs).name,           NULL);
+   CHECK_NOT(VG_(needs).description,    NULL);
+   CHECK_NOT(VG_(needs).bug_reports_to, NULL);
 
 #undef CHECK_NOT
 #undef INVALID_Bool
@@ -1319,13 +1322,13 @@
             that arg. */
          VG_(exit)( VG_(exitcode) );
          /* NOT ALIVE HERE! */
-         VG_(panic)("entered the afterlife in vg_main() -- ExitSyscall");
+         VG_(core_panic)("entered the afterlife in vg_main() -- ExitSyscall");
          break; /* what the hell :) */
 
       case VgSrc_Deadlock:
          /* Just exit now.  No point in continuing. */
          VG_(exit)(0);
-         VG_(panic)("entered the afterlife in vg_main() -- Deadlock");
+         VG_(core_panic)("entered the afterlife in vg_main() -- Deadlock");
          break;
 
       case VgSrc_BbsDone: 
@@ -1345,7 +1348,7 @@
          VG_(switch_to_real_CPU)();
 
       default:
-         VG_(panic)("vg_main(): unexpected scheduler return code");
+         VG_(core_panic)("vg_main(): unexpected scheduler return code");
    }
 }
 
@@ -1460,7 +1463,7 @@
       "scripts is also likely to cause problems.\n"
       "\n"
    );
-   VG_(panic)("VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH) failed\n");
+   VG_(core_panic)("VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH) failed\n");
 }
 
 
diff --git a/coregrind/vg_malloc2.c b/coregrind/vg_malloc2.c
index 92358c1..ffe7159 100644
--- a/coregrind/vg_malloc2.c
+++ b/coregrind/vg_malloc2.c
@@ -262,7 +262,7 @@
          return sb;
    VG_(printf)("findSb: can't find pointer %p in arena `%s'\n",
                ch, a->name );
-   VG_(panic)("findSb: vg_free() in wrong arena?");
+   VG_(core_panic)("findSb: vg_free() in wrong arena?");
    return NULL; /*NOTREACHED*/
 }
 
@@ -710,7 +710,7 @@
    UInt        arena_bytes_on_loan;
    Arena*      a;
 
-#  define BOMB VG_(panic)("mallocSanityCheckArena")
+#  define BOMB VG_(core_panic)("mallocSanityCheckArena")
 
    a = arenaId_to_ArenaP(aid);
    
@@ -1105,7 +1105,7 @@
       default:
          VG_(printf)("vg_malloc_aligned(%p, %d, %d)\nbad alignment request", 
                      a, req_alignB, req_pszB );
-         VG_(panic)("vg_malloc_aligned");
+         VG_(core_panic)("vg_malloc_aligned");
          /*NOTREACHED*/
    }
 
diff --git a/coregrind/vg_memory.c b/coregrind/vg_memory.c
index 8966d39..85d0688 100644
--- a/coregrind/vg_memory.c
+++ b/coregrind/vg_memory.c
@@ -175,7 +175,7 @@
             "naively assumes it is the executable.  ");
          VG_(message)(Vg_UserMsg,
             "In that case, rename it appropriately.");
-         VG_(panic)("VG_ASSUMED_EXE_BASE doesn't match reality");
+         VG_(core_panic)("VG_ASSUMED_EXE_BASE doesn't match reality");
       }
    }
 
@@ -187,7 +187,7 @@
 
    if (rr != 'r' && xx != 'x' && ww != 'w') {
       VG_(printf)("No permissions on the segment named %s\n", filename);
-      VG_(panic)("Non-readable, writable, executable segment at startup");
+      VG_(core_panic)("Non-readable, writable, executable segment at startup");
    }
 
    /* This parallels what happens when we mmap some new memory */
diff --git a/coregrind/vg_mylibc.c b/coregrind/vg_mylibc.c
index ac75b5a..7eab2f7 100644
--- a/coregrind/vg_mylibc.c
+++ b/coregrind/vg_mylibc.c
@@ -984,38 +984,56 @@
    Assertery.
    ------------------------------------------------------------------ */
 
-void VG_(assert_fail) ( Char* expr, Char* file, Int line, Char* fn )
+__attribute__ ((noreturn))
+static void report_and_quit ( Char* report )
+{
+   VG_(pp_sched_status)();
+   VG_(printf)("Please report this bug to: %s\n\n", report);
+   VG_(shutdown_logging)();
+   VG_(exit)(1);
+}
+
+__attribute__ ((noreturn))
+static void assert_fail ( Char* expr, Char* name, Char* report,
+                          Char* file, Int line,   Char* fn )
 {
    static Bool entered = False;
    if (entered) 
      VG_(exit)(2);
    entered = True;
    VG_(printf)("\n%s: %s:%d (%s): Assertion `%s' failed.\n",
-               "valgrind", file, line, fn, expr );
-   VG_(pp_sched_status)();
-   VG_(printf)("Please report this bug to me at: %s\n\n", VG_EMAIL_ADDR);
-   VG_(shutdown_logging)();
-   VG_(exit)(1);
+               name, file, line, fn, expr );
+   report_and_quit(report);
 }
 
-void VG_(panic) ( Char* str )
+void VG_(skin_assert_fail) ( Char* expr, Char* file, Int line, Char* fn )
 {
-   VG_(printf)("\nvalgrind: the `impossible' happened:\n   %s\n", str);
+   assert_fail(expr, VG_(needs).name, VG_(needs).bug_reports_to, 
+               file, line, fn);
+}
+
+void VG_(core_assert_fail) ( Char* expr, Char* file, Int line, Char* fn )
+{
+   assert_fail(expr, "valgrind", VG_EMAIL_ADDR, file, line, fn);
+}
+
+__attribute__ ((noreturn))
+static void panic ( Char* name, Char* report, Char* str )
+{
+   VG_(printf)("\n%s: the `impossible' happened:\n   %s\n", name, str);
    VG_(printf)("Basic block ctr is approximately %llu\n", VG_(bbs_done) );
-   VG_(pp_sched_status)();
-   VG_(printf)("Please report this bug to me at: %s\n\n", VG_EMAIL_ADDR);
-   VG_(shutdown_logging)();
-   VG_(exit)(1);
+   report_and_quit(report);
 }
 
-void VG_(skin_error) ( Char* str )
+void VG_(core_panic) ( Char* str )
 {
-   VG_(printf)("\n%s: misconfigured skin:\n   %s\n\n", VG_(needs).name, str);
-   //VG_(printf)("Please report this bug to me at: %s\n\n", VG_EMAIL_ADDR);
-   VG_(shutdown_logging)();
-   VG_(exit)(1);
+   panic("valgrind", VG_EMAIL_ADDR, str);
 }
 
+void VG_(skin_panic) ( Char* str )
+{
+   panic(VG_(needs).name, VG_(needs).bug_reports_to, str);
+}
 
 /* ---------------------------------------------------------------------
    Primitive support for reading files.
@@ -1206,7 +1224,7 @@
       req = rem;
       loops++;
       if (loops > 100) 
-         VG_(panic)("calibration nanosleep loop failed?!");
+         VG_(core_panic)("calibration nanosleep loop failed?!");
    }
 
    /* Now read both timers, and do the Math. */
@@ -1245,7 +1263,7 @@
       VG_(message)(Vg_UserMsg, "Estimated CPU clock rate is %d MHz",
                                (UInt)cpu_clock_MHZ);
    if (cpu_clock_MHZ < 50 || cpu_clock_MHZ > 10000)
-      VG_(panic)("end_rdtsc_calibration: "
+      VG_(core_panic)("end_rdtsc_calibration: "
                  "estimated CPU MHz outside range 50 .. 10000");
    /* Paranoia about division by zero later. */
    vg_assert(rdtsc_ticks_per_millisecond != 0);
diff --git a/coregrind/vg_scheduler.c b/coregrind/vg_scheduler.c
index e6b8eea..70ef7d6 100644
--- a/coregrind/vg_scheduler.c
+++ b/coregrind/vg_scheduler.c
@@ -263,7 +263,7 @@
          break;
 
    if (i == VG_N_WAITING_FDS)
-      VG_(panic)("add_waiting_fd: VG_N_WAITING_FDS is too low");
+      VG_(core_panic)("add_waiting_fd: VG_N_WAITING_FDS is too low");
    /*
    VG_(printf)("add_waiting_fd: add (tid %d, fd %d) at slot %d\n", 
                tid, fd, i);
@@ -357,7 +357,7 @@
    }
    VG_(printf)("vg_alloc_ThreadState: no free slots available\n");
    VG_(printf)("Increase VG_N_THREADS, rebuild and try again.\n");
-   VG_(panic)("VG_N_THREADS is too low");
+   VG_(core_panic)("VG_N_THREADS is too low");
    /*NOTREACHED*/
 }
 
@@ -661,7 +661,7 @@
          (void*)VG_STARTUP_STACK_BASE_3,
          (void*)VG_STARTUP_STACK_BASE_4 
       );
-      VG_(panic)("unexpected %esp at startup");
+      VG_(core_panic)("unexpected %esp at startup");
    }
 
    for (i = 0 /* NB; not 1 */; i < VG_N_THREADS; i++) {
@@ -828,7 +828,7 @@
    }
 
    if (VG_(threads)[tid].status == VgTs_WaitFD) {
-      VG_(panic)("handle_signal_return: unknown interrupted syscall");
+      VG_(core_panic)("handle_signal_return: unknown interrupted syscall");
    }
 
    /* All other cases?  Just return. */
@@ -1055,7 +1055,7 @@
          case __NR_write: 
             VKI_FD_SET(fd, &writefds); break;
          default: 
-            VG_(panic)("poll_for_ready_fds: unexpected syscall");
+            VG_(core_panic)("poll_for_ready_fds: unexpected syscall");
             /*NOTREACHED*/
             break;
       }
@@ -1073,7 +1073,7 @@
                 ( fd_max+1, &readfds, &writefds, &exceptfds, &timeout);
    if (VG_(is_kerror)(n_ready)) {
       VG_(printf)("poll_for_ready_fds: select returned %d\n", n_ready);
-      VG_(panic)("poll_for_ready_fds: select failed?!");
+      VG_(core_panic)("poll_for_ready_fds: select failed?!");
       /*NOTREACHED*/
    }
    
@@ -1105,7 +1105,7 @@
          continue;
       if (n_ok > 1) {
          VG_(printf)("offending fd = %d\n", fd);
-         VG_(panic)("poll_for_ready_fds: multiple events on fd");
+         VG_(core_panic)("poll_for_ready_fds: multiple events on fd");
       }
 
       /* An I/O event completed for fd.  Find the thread which
@@ -1425,7 +1425,7 @@
                   tid, VG_(threads)[tid].m_eip ); 
                trans_addr = VG_(search_transtab) ( VG_(threads)[tid].m_eip ); 
                if (trans_addr == (Addr)0)
-                  VG_(panic)("VG_TRC_INNER_FASTMISS: missing tt_fast entry");
+                  VG_(core_panic)("VG_TRC_INNER_FASTMISS: missing tt_fast entry");
             }
             continue; /* with this thread */
          }
@@ -1585,8 +1585,8 @@
 
          default: 
             VG_(printf)("\ntrc = %d\n", trc);
-            VG_(panic)("VG_(scheduler), phase 3: "
-                       "unexpected thread return code");
+            VG_(core_panic)("VG_(scheduler), phase 3: "
+                            "unexpected thread return code");
             /* NOTREACHED */
             break;
 
@@ -1599,7 +1599,7 @@
 
 
    /* NOTREACHED */
-   VG_(panic)("scheduler: post-main-loop ?!");
+   VG_(core_panic)("scheduler: post-main-loop ?!");
    /* NOTREACHED */
 
   debug_stop:
@@ -1790,7 +1790,7 @@
    }
    vg_assert(sp >= 0 && sp <= VG_N_CLEANUPSTACK);
    if (sp == VG_N_CLEANUPSTACK)
-      VG_(panic)("do__cleanup_push: VG_N_CLEANUPSTACK is too small."
+      VG_(core_panic)("do__cleanup_push: VG_N_CLEANUPSTACK is too small."
                  "  Increase and recompile.");
    VG_(threads)[tid].custack[sp] = *cu;
    sp++;
@@ -1880,7 +1880,7 @@
    if (state == PTHREAD_CANCEL_DISABLE) {
       VG_(threads)[tid].cancel_st = False;
    } else {
-      VG_(panic)("do__set_cancelstate");
+      VG_(core_panic)("do__set_cancelstate");
    }
    SET_EDX(tid, old_st ? PTHREAD_CANCEL_ENABLE 
                        : PTHREAD_CANCEL_DISABLE);
@@ -1907,7 +1907,7 @@
    if (type == PTHREAD_CANCEL_DEFERRED) {
       VG_(threads)[tid].cancel_ty = True;
    } else {
-      VG_(panic)("do__set_canceltype");
+      VG_(core_panic)("do__set_canceltype");
    }
    SET_EDX(tid, old_ty ? PTHREAD_CANCEL_DEFERRED 
                        : PTHREAD_CANCEL_ASYNCHRONOUS);
@@ -1965,7 +1965,7 @@
          SET_EDX(tid, 0);
          return;
       default:
-         VG_(panic)("do__set_or_get_detach");
+         VG_(core_panic)("do__set_or_get_detach");
    }
 }
 
@@ -2123,7 +2123,7 @@
 static 
 void do__apply_in_new_thread_bogusRA ( void )
 {
-   VG_(panic)("do__apply_in_new_thread_bogusRA");
+   VG_(core_panic)("do__apply_in_new_thread_bogusRA");
 }
 
 /* (Fn, Arg): Create a new thread and run Fn applied to Arg in it.  Fn
@@ -2814,8 +2814,8 @@
       /* SET_EDX(tid, EAGAIN); 
          return; 
       */
-      VG_(panic)("pthread_key_create: VG_N_THREAD_KEYS is too low;"
-                 " increase and recompile");
+      VG_(core_panic)("pthread_key_create: VG_N_THREAD_KEYS is too low;"
+                      " increase and recompile");
    }
 
    vg_thread_keys[i].inuse      = True;
@@ -3440,7 +3440,7 @@
                         "  unhandled client request: 0x%x.  Perhaps\n" 
                         "  VG_(needs).client_requests should be set?\n",
                         arg[0]);
-            VG_(panic)("do_client_request: unknown request");
+            VG_(core_panic)("do_client_request: unknown request");
             /*NOTREACHED*/
          }
          break;
diff --git a/coregrind/vg_signals.c b/coregrind/vg_signals.c
index 1b30c7c..90726c0 100644
--- a/coregrind/vg_signals.c
+++ b/coregrind/vg_signals.c
@@ -631,7 +631,7 @@
          *orig_set = *modifier;
          break;
       default:
-         VG_(panic)("do_sigprocmask_bitops");
+         VG_(core_panic)("do_sigprocmask_bitops");
 	 break;
    }
 }
@@ -1353,7 +1353,7 @@
       }
       /* Note: we panic with all signals blocked here.  Don't think
          that matters. */
-      VG_(panic)("vg_oursignalhandler: unexpected signal");
+      VG_(core_panic)("vg_oursignalhandler: unexpected signal");
    }
    /* End of the sanity check. */
 
@@ -1486,7 +1486,7 @@
    altstack_info.ss_flags = 0;
    ret = VG_(ksigaltstack)(&altstack_info, NULL);
    if (ret != 0) {
-      VG_(panic)(
+      VG_(core_panic)(
          "vg_sigstartup_actions: couldn't install alternative sigstack");
    }
    if (VG_(clo_trace_signals)) {
diff --git a/coregrind/vg_symtab2.c b/coregrind/vg_symtab2.c
index 66e397f..eaa7223 100644
--- a/coregrind/vg_symtab2.c
+++ b/coregrind/vg_symtab2.c
@@ -780,13 +780,13 @@
                      } else {
                         VG_(printf)("unhandled N_SOL stabs case: %d %d %d", 
                                     stab[i+1].n_type, i, n_stab_entries);
-                        VG_(panic)("unhandled N_SOL stabs case");
+                        VG_(core_panic)("unhandled N_SOL stabs case");
                      }
 
                   default:
                      VG_(printf)("unhandled (other) stabs case: %d %d", 
                                  stab[i+1].n_type,i);
-                     /* VG_(panic)("unhandled (other) stabs case"); */
+                     /* VG_(core_panic)("unhandled (other) stabs case"); */
                      next_addr = this_addr + 4;
                      break;
                }
diff --git a/coregrind/vg_syscalls.c b/coregrind/vg_syscalls.c
index 825baa1..1735b60 100644
--- a/coregrind/vg_syscalls.c
+++ b/coregrind/vg_syscalls.c
@@ -405,7 +405,7 @@
 {
    curr_dataseg_end = (Addr)VG_(brk)(0);
    if (curr_dataseg_end == (Addr)(-1))
-      VG_(panic)("can't determine data-seg end for brk()");
+      VG_(core_panic)("can't determine data-seg end for brk()");
    if (0)
       VG_(printf)("DS END is %p\n", (void*)curr_dataseg_end);
 }
@@ -463,7 +463,7 @@
    switch (syscallno) {
 
       case __NR_exit:
-         VG_(panic)("syscall exit() not caught by the scheduler?!");
+         VG_(core_panic)("syscall exit() not caught by the scheduler?!");
          break;
 
       case __NR_clone:
@@ -1623,7 +1623,7 @@
                VG_(message)(Vg_DebugMsg,
                             "FATAL: unhandled syscall(ipc) %d",
                             arg1 );
-               VG_(panic)("... bye!\n");
+               VG_(core_panic)("... bye!\n");
                break; /*NOTREACHED*/
          }
          }
@@ -2340,7 +2340,7 @@
                if (nReadThisBuf > res) nReadThisBuf = res;
                VG_TRACK( post_mem_write, (UInt)vec[i].iov_base, nReadThisBuf );
                res -= nReadThisBuf;
-               if (res < 0) VG_(panic)("readv: res < 0");
+               if (res < 0) VG_(core_panic)("readv: res < 0");
             }
          }
          break;
@@ -2768,7 +2768,7 @@
 
             default:
                VG_(message)(Vg_DebugMsg,"FATAL: unhandled socketcall 0x%x",arg1);
-               VG_(panic)("... bye!\n");
+               VG_(core_panic)("... bye!\n");
                break; /*NOTREACHED*/
          }
          break;
@@ -3102,7 +3102,7 @@
 
       default:
          VG_(printf)("pre_known_blocking_syscall: unexpected %d\n", syscallno);
-         VG_(panic)("pre_known_blocking_syscall");
+         VG_(core_panic)("pre_known_blocking_syscall");
          /*NOTREACHED*/
          break;
    }
@@ -3162,7 +3162,7 @@
       default:
          VG_(printf)("post_known_blocking_syscall: unexpected %d\n", 
                      syscallno);
-         VG_(panic)("post_known_blocking_syscall");
+         VG_(core_panic)("post_known_blocking_syscall");
          /*NOTREACHED*/
          break;
    }
diff --git a/coregrind/vg_to_ucode.c b/coregrind/vg_to_ucode.c
index 56c1ad4..7250a4d 100644
--- a/coregrind/vg_to_ucode.c
+++ b/coregrind/vg_to_ucode.c
@@ -78,7 +78,7 @@
 {
    static Char* grp1_names[8] 
      = { "add", "or", "adc", "sbb", "and", "sub", "xor", "cmp" };
-   if (opc_aux < 0 || opc_aux > 7) VG_(panic)("nameGrp1");
+   if (opc_aux < 0 || opc_aux > 7) VG_(core_panic)("nameGrp1");
    return grp1_names[opc_aux];
 }
 
@@ -86,7 +86,7 @@
 {
    static Char* grp2_names[8] 
      = { "rol", "ror", "rcl", "rcr", "shl", "shr", "shl", "sar" };
-   if (opc_aux < 0 || opc_aux > 7) VG_(panic)("nameGrp2");
+   if (opc_aux < 0 || opc_aux > 7) VG_(core_panic)("nameGrp2");
    return grp2_names[opc_aux];
 }
 
@@ -94,7 +94,7 @@
 {
    static Char* grp4_names[8] 
      = { "inc", "dec", "???", "???", "???", "???", "???", "???" };
-   if (opc_aux < 0 || opc_aux > 1) VG_(panic)("nameGrp4");
+   if (opc_aux < 0 || opc_aux > 1) VG_(core_panic)("nameGrp4");
    return grp4_names[opc_aux];
 }
 
@@ -102,7 +102,7 @@
 {
    static Char* grp5_names[8] 
      = { "inc", "dec", "call*", "call*", "jmp*", "jmp*", "push", "???" };
-   if (opc_aux < 0 || opc_aux > 6) VG_(panic)("nameGrp5");
+   if (opc_aux < 0 || opc_aux > 6) VG_(core_panic)("nameGrp5");
    return grp5_names[opc_aux];
 }
 
@@ -110,7 +110,7 @@
 {
    static Char* grp8_names[8] 
      = { "???", "???", "???", "???", "bt", "bts", "btr", "btc" };
-   if (opc_aux < 4 || opc_aux > 7) VG_(panic)("nameGrp8");
+   if (opc_aux < 4 || opc_aux > 7) VG_(core_panic)("nameGrp8");
    return grp8_names[opc_aux];
 }
 
@@ -130,7 +130,7 @@
       case 1: return ireg8_names[reg];
    }
   bad:
-   VG_(panic)("name_of_int_reg");
+   VG_(core_panic)("name_of_int_reg");
    return NULL; /*notreached*/
 }
 
@@ -143,7 +143,7 @@
       case R_DS: return "%ds";
       case R_FS: return "%fs";
       case R_GS: return "%gs";
-      default: VG_(panic)("nameOfSegReg");
+      default: VG_(core_panic)("nameOfSegReg");
    }
 }
 
@@ -153,7 +153,7 @@
       case 4: return 'l';
       case 2: return 'w';
       case 1: return 'b';
-      default: VG_(panic)("name_of_int_size");
+      default: VG_(core_panic)("name_of_int_size");
    }
 }
 
@@ -225,7 +225,7 @@
       case 4: return getUDisp32(eip);
       case 2: return getUDisp16(eip);
       case 1: return getUChar(eip);
-      default: VG_(panic)("getUDisp");
+      default: VG_(core_panic)("getUDisp");
   }
   return 0; /*notreached*/
 }
@@ -236,7 +236,7 @@
       case 4: return getUDisp32(eip);
       case 2: return getSDisp16(eip);
       case 1: return getSDisp8(eip);
-      default: VG_(panic)("getUDisp");
+      default: VG_(core_panic)("getUDisp");
   }
   return 0; /*notreached*/
 }
@@ -281,7 +281,7 @@
       default: 
          VG_(printf)("unhandled case is %s\n", 
                      VG_(name_UOpcode)(True, uopc));
-         VG_(panic)("setFlagsFromUOpcode: unhandled case");
+         VG_(core_panic)("setFlagsFromUOpcode: unhandled case");
    }
 }
 
@@ -304,7 +304,7 @@
       case 0x26: return "%es:";
       case 0x64: return "%fs:";
       case 0x65: return "%gs:";
-      default: VG_(panic)("sorbTxt");
+      default: VG_(core_panic)("sorbTxt");
    }
 }
 
@@ -326,7 +326,7 @@
       case 0x26: sreg = R_ES; break;
       case 0x64: sreg = R_FS; break;
       case 0x65: sreg = R_GS; break;
-      default: VG_(panic)("handleSegOverride");
+      default: VG_(core_panic)("handleSegOverride");
    }
 
    tsreg = newTemp(cb);
@@ -412,7 +412,7 @@
       /* a register, %eax .. %edi.  This shouldn't happen. */
       case 0x18: case 0x19: case 0x1A: case 0x1B:
       case 0x1C: case 0x1D: case 0x1E: case 0x1F:
-         VG_(panic)("disAMode: not an addr!");
+         VG_(core_panic)("disAMode: not an addr!");
 
       /* a 32-bit literal address
          --> MOV d32, tmp 
@@ -590,7 +590,7 @@
       }
 
       default:
-         VG_(panic)("disAMode");
+         VG_(core_panic)("disAMode");
          return 0; /*notreached*/
    }
 }
@@ -649,7 +649,7 @@
       case 0x14: return 6;
 
       default:
-         VG_(panic)("amode_from_RM");
+         VG_(core_panic)("amode_from_RM");
          return 0; /*notreached*/
    }
 }
@@ -1084,7 +1084,7 @@
       case 1: helper = (signed_divide ? VGOFF_(helper_idiv_16_8)
                                       : VGOFF_(helper_div_16_8));
               break;
-      default: VG_(panic)("codegen_div");
+      default: VG_(core_panic)("codegen_div");
    }
    uInstr0(cb, CALLM_S, 0);
    if (sz == 4 || sz == 2) {
@@ -1137,7 +1137,7 @@
          case 2: uopc = ADC; break;  case 3: uopc = SBB; break;
          case 4: uopc = AND; break;  case 5: uopc = SUB; break;
          case 6: uopc = XOR; break;  case 7: uopc = SUB; break;
-         default: VG_(panic)("dis_Grp1(Reg): unhandled case");
+         default: VG_(core_panic)("dis_Grp1(Reg): unhandled case");
       }
       if (uopc == AND || uopc == OR) {
          Int tao = newTemp(cb);
@@ -1169,7 +1169,7 @@
          case 2: uopc = ADC; break;  case 3: uopc = SBB; break;
          case 4: uopc = AND; break;  case 5: uopc = SUB; break;
          case 6: uopc = XOR; break;  case 7: uopc = SUB; break;
-         default: VG_(panic)("dis_Grp1(Mem): unhandled case");
+         default: VG_(core_panic)("dis_Grp1(Mem): unhandled case");
       }
       if (uopc == AND || uopc == OR) {
          Int tao = newTemp(cb);
@@ -1229,7 +1229,7 @@
          case 2: uopc = RCL; break;  case 3: uopc = RCR; break;
          case 4: uopc = SHL; break;  case 5: uopc = SHR; break;
          case 7: uopc = SAR; break;
-         default: VG_(panic)("dis_Grp2(Reg): unhandled case");
+         default: VG_(core_panic)("dis_Grp2(Reg): unhandled case");
       }
       if (src_tag == Literal) {
           uInstr2(cb, uopc, sz, Literal, 0, TempReg, t1);
@@ -1263,7 +1263,7 @@
          case 2: uopc = RCL; break;  case 3: uopc = RCR; break;
          case 4: uopc = SHL; break;  case 5: uopc = SHR; break;
          case 7: uopc = SAR; break;
-         default: VG_(panic)("dis_Grp2(Reg): unhandled case");
+         default: VG_(core_panic)("dis_Grp2(Reg): unhandled case");
       }
       if (src_tag == Literal) {
          uInstr2(cb, uopc, sz, Literal, 0, TempReg, t2);
@@ -1338,7 +1338,7 @@
    switch (sz) {
       case 2: src_val &= 15; break;
       case 4: src_val &= 31; break;
-      default: VG_(panic)("dis_Grp8_BT: invalid size");
+      default: VG_(core_panic)("dis_Grp8_BT: invalid size");
    }
 
    /* Invent a mask suitable for the operation. */
@@ -1352,7 +1352,7 @@
             new function to handle the other cases (0 .. 3).  The
             Intel docs do however not indicate any use for 0 .. 3, so
             we don't expect this to happen. */
-      default: VG_(panic)("dis_Grp8_BT");
+      default: VG_(core_panic)("dis_Grp8_BT");
    }
    /* Probably excessively paranoid. */
    if (sz == 2)
@@ -1561,7 +1561,7 @@
          default: 
             VG_(printf)(
                "unhandled Grp3(R) case %d\n", (UInt)gregOfRM(modrm));
-            VG_(panic)("Grp3");
+            VG_(core_panic)("Grp3");
       }
    } else {
       pair = disAMode ( cb, sorb, eip, dis?dis_buf:NULL );
@@ -1616,7 +1616,7 @@
          default: 
             VG_(printf)(
                "unhandled Grp3(M) case %d\n", (UInt)gregOfRM(modrm));
-            VG_(panic)("Grp3");
+            VG_(core_panic)("Grp3");
       }
    }
    return eip;
@@ -1653,7 +1653,7 @@
          default: 
             VG_(printf)(
                "unhandled Grp4(R) case %d\n", (UInt)gregOfRM(modrm));
-            VG_(panic)("Grp4");
+            VG_(core_panic)("Grp4");
       }
       eip++;
       if (dis)
@@ -1678,7 +1678,7 @@
          default: 
             VG_(printf)(
                "unhandled Grp4(M) case %d\n", (UInt)gregOfRM(modrm));
-            VG_(panic)("Grp4");
+            VG_(core_panic)("Grp4");
       }
       eip += HI8(pair);
       if (dis)
@@ -1737,7 +1737,7 @@
          default: 
             VG_(printf)(
                "unhandled Grp5(R) case %d\n", (UInt)gregOfRM(modrm));
-            VG_(panic)("Grp5");
+            VG_(core_panic)("Grp5");
       }
       eip++;
       if (dis)
@@ -1789,7 +1789,7 @@
          default: 
             VG_(printf)(
                "unhandled Grp5(M) case %d\n", (UInt)gregOfRM(modrm));
-            VG_(panic)("Grp5");
+            VG_(core_panic)("Grp5");
       }
       eip += HI8(pair);
       if (dis)
@@ -2212,7 +2212,7 @@
       case 1: helper = signed_multiply ? VGOFF_(helper_imul_8_16)
                                        : VGOFF_(helper_mul_8_16);
               break;
-      default: VG_(panic)("dis_mul_E_G");
+      default: VG_(core_panic)("dis_mul_E_G");
    }
 
    uInstr0(cb, CALLM_S, 0);
@@ -2274,7 +2274,7 @@
       case 4: helper = VGOFF_(helper_imul_32_64); break;
       case 2: helper = VGOFF_(helper_imul_16_32); break;
       case 1: helper = VGOFF_(helper_imul_8_16); break;
-      default: VG_(panic)("dis_imul_I_E_G");
+      default: VG_(core_panic)("dis_imul_I_E_G");
    }
 
    uInstr0(cb, CALLM_S, 0);
@@ -2591,7 +2591,7 @@
    VG_(printf)("dis_fpu: unhandled memory case 0x%2x:0x%2x(%d)\n",
                (UInt)first_byte, (UInt)second_byte, 
                (UInt)((second_byte >> 3) & 7) );
-   VG_(panic)("dis_fpu: unhandled opcodes");
+   VG_(core_panic)("dis_fpu: unhandled opcodes");
 }
 
 
@@ -2689,7 +2689,7 @@
       case BtOpSet:   return "s";
       case BtOpReset: return "r";
       case BtOpComp:  return "c";
-      default: VG_(panic)("nameBtOp");
+      default: VG_(core_panic)("nameBtOp");
    }
 }
 
@@ -2786,7 +2786,7 @@
             uInstr2(cb, AND, 4, TempReg, t_mask, TempReg, temp); 
             break;
          default: 
-            VG_(panic)("dis_bt_G_E");
+            VG_(core_panic)("dis_bt_G_E");
       }
       uInstr2(cb, STORE, 1, TempReg, temp, TempReg, t_addr);
    }
@@ -3491,7 +3491,7 @@
 
    case 0xCD: /* INT imm8 */
       d32 = getUChar(eip); eip++;
-      if (d32 != 0x80) VG_(panic)("disInstr: INT but not 0x80 !");
+      if (d32 != 0x80) VG_(core_panic)("disInstr: INT but not 0x80 !");
       /* It's important that all ArchRegs carry their up-to-date value
          at this point.  So we declare an end-of-block here, which
          forces any TempRegs caching ArchRegs to be flushed. */
@@ -3623,7 +3623,7 @@
    case 0x8D: /* LEA M,Gv */
       modrm = getUChar(eip);
       if (epartIsReg(modrm)) 
-         VG_(panic)("LEA M,Gv: modRM refers to register");
+         VG_(core_panic)("LEA M,Gv: modRM refers to register");
       /* NOTE!  this is the one place where a segment override prefix
          has no effect on the address calculation.  Therefore we pass
          zero instead of sorb here. */
@@ -4210,7 +4210,7 @@
       }
       else {
          VG_(printf)("REPNE then 0x%x\n", (UInt)abyte);
-         VG_(panic)("Unhandled REPNE case");
+         VG_(core_panic)("Unhandled REPNE case");
       }
       break;
    }
@@ -4246,7 +4246,7 @@
          /* do nothing; apparently a hint to the P4 re spin-wait loop */
       } else {
          VG_(printf)("REPE then 0x%x\n", (UInt)abyte);
-         VG_(panic)("Unhandled REPE case");
+         VG_(core_panic)("Unhandled REPE case");
       }
       break;
    }
@@ -4692,7 +4692,7 @@
    default:
       VG_(printf)("disInstr: unhandled opcode 0x%x then 0x%x\n", 
                   (UInt)opc, (UInt)getUChar(eip));
-      VG_(panic)("unhandled x86 opcode");
+      VG_(core_panic)("unhandled x86 opcode");
    }
 
    if (dis)
diff --git a/coregrind/vg_translate.c b/coregrind/vg_translate.c
index de6ac13..a6d9028 100644
--- a/coregrind/vg_translate.c
+++ b/coregrind/vg_translate.c
@@ -280,7 +280,7 @@
       case 1: return R_ESI;
       case 0: return R_EDI;
 #     endif
-      default: VG_(panic)("VG_(rank_to_realreg)");
+      default: VG_(core_panic)("VG_(rank_to_realreg)");
    }
 }
 
@@ -306,7 +306,7 @@
       case R_ESI: return 1;
       case R_EDI: return 0;
 #     endif
-      default: VG_(panic)("VG_(realreg_to_rank)");
+      default: VG_(core_panic)("VG_(realreg_to_rank)");
    }
 }
 
@@ -536,7 +536,7 @@
          VG_(printf)("unhandled opcode: %u.  Perhaps " 
                      "VG_(needs).extended_UCode should be set?",
                      u->opcode);
-         VG_(panic)("VG_(saneUInstr): unhandled opcode");
+         VG_(core_panic)("VG_(saneUInstr): unhandled opcode");
       }
    }
 #  undef LIT0
@@ -718,7 +718,7 @@
       case CondLE:     return "le";
       case CondNLE:    return "nle";
       case CondAlways: return "MP"; /* hack! */
-      default: VG_(panic)("nameCondcode");
+      default: VG_(core_panic)("nameCondcode");
    }
 }
 
@@ -752,7 +752,7 @@
       case 1: tag = u->tag1; val = u->val1; break;
       case 2: tag = u->tag2; val = u->val2; break;
       case 3: tag = u->tag3; val = u->val3; break;
-      default: VG_(panic)("VG_(pp_UOperand)(1)");
+      default: VG_(core_panic)("VG_(pp_UOperand)(1)");
    }
    if (tag == Literal) val = u->lit32;
 
@@ -766,7 +766,7 @@
       case ArchReg:  VG_(printf)("%S",nameIReg(sz,val)); break;
       case ArchRegS: VG_(printf)("%S",nameSReg(val)); break;
       case SpillNo:  VG_(printf)("spill%d", val); break;
-      default: VG_(panic)("VG_(ppUOperand)(2)");
+      default: VG_(core_panic)("VG_(ppUOperand)(2)");
    }
    if (parens) VG_(printf)(")");
 }
@@ -796,7 +796,7 @@
       case BSWAP: return (upper ? "BSWAP" : "bswap");
       default:    break;
    }
-   if (!upper) VG_(panic)("vg_name_UOpcode: invalid !upper");
+   if (!upper) VG_(core_panic)("vg_name_UOpcode: invalid !upper");
    switch (opc) {
       case CALLM_S: return "CALLM_S";
       case CALLM_E: return "CALLM_E";
@@ -834,7 +834,7 @@
             VG_(printf)("unhandled opcode: %u.  Perhaps " 
                         "VG_(needs).extended_UCode should be set?",
                         opc);
-            VG_(panic)("name_UOpcode: unhandled opcode");
+            VG_(core_panic)("name_UOpcode: unhandled opcode");
          }
    }
 }
@@ -1031,7 +1031,7 @@
             VG_(printf)("unhandled opcode: %u.  Perhaps " 
                         "VG_(needs).extended_UCode should be set?",
                         u->opcode);
-            VG_(panic)("pp_UInstr: unhandled opcode");
+            VG_(core_panic)("pp_UInstr: unhandled opcode");
          }
    }
    if (u->flags_r != FlagsEmpty || u->flags_w != FlagsEmpty) {
@@ -1150,7 +1150,7 @@
             VG_(printf)("unhandled opcode: %u.  Perhaps " 
                         "VG_(needs).extended_UCode should be set?",
                         u->opcode);
-            VG_(panic)("VG_(get_reg_usage): unhandled opcode");
+            VG_(core_panic)("VG_(get_reg_usage): unhandled opcode");
          }
    }
    return n;
@@ -1169,21 +1169,21 @@
    if (u->tag1 == TempReg) {
       for (i = 0; i < n_tmap; i++)
          if (temps[i].num == u->val1) break;
-      if (i == n_tmap) VG_(panic)("patchUInstr(1)");
+      if (i == n_tmap) VG_(core_panic)("patchUInstr(1)");
       u->tag1 = RealReg;
       u->val1 = reals[i];
    }
    if (u->tag2 == TempReg) {
       for (i = 0; i < n_tmap; i++)
          if (temps[i].num == u->val2) break;
-      if (i == n_tmap) VG_(panic)("patchUInstr(2)");
+      if (i == n_tmap) VG_(core_panic)("patchUInstr(2)");
       u->tag2 = RealReg;
       u->val2 = reals[i];
    }
    if (u->tag3 == TempReg) {
       for (i = 0; i < n_tmap; i++)
          if (temps[i].num == u->val3) break;
-      if (i == n_tmap) VG_(panic)("patchUInstr(3)");
+      if (i == n_tmap) VG_(core_panic)("patchUInstr(3)");
       u->tag3 = RealReg;
       u->val3 = reals[i];
    }
@@ -1201,7 +1201,7 @@
       case 4: return aregno;
       case 2: return aregno;
       case 1: return aregno >= 4 ? aregno-4 : aregno;
-      default: VG_(panic)("containingArchRegOf");
+      default: VG_(core_panic)("containingArchRegOf");
    }
 }
 
@@ -1249,7 +1249,7 @@
 
       default: 
          VG_(pp_UInstr)(0,u);
-         VG_(panic)("maybe_uinstrReadsArchReg: unhandled opcode");
+         VG_(core_panic)("maybe_uinstrReadsArchReg: unhandled opcode");
    }
 }
 
@@ -1704,7 +1704,7 @@
             break;
       if (j == VG_MAX_SPILLSLOTS) {
          VG_(printf)("VG_MAX_SPILLSLOTS is too low; increase and recompile.\n");
-         VG_(panic)("register allocation failed -- out of spill slots");
+         VG_(core_panic)("register allocation failed -- out of spill slots");
       }
       ss_busy_until_before[j] = temp_info[i].dead_before;
       temp_info[i].spill_no = j;
@@ -1880,7 +1880,7 @@
 
          have_spill_cand:
          if (r == VG_MAX_REALREGS)
-            VG_(panic)("new reg alloc: out of registers ?!");
+            VG_(core_panic)("new reg alloc: out of registers ?!");
 
          /* Eject r.  Important refinement: don't bother if the
             associated TempReg is now dead. */
diff --git a/coregrind/vg_transtab.c b/coregrind/vg_transtab.c
index 09e8fa2..d327429 100644
--- a/coregrind/vg_transtab.c
+++ b/coregrind/vg_transtab.c
@@ -370,7 +370,7 @@
    i = ((UInt)(tte->orig_addr)) % VG_TT_SIZE;
    while (True) {
       if (vg_tt[i].orig_addr == tte->orig_addr)
-         VG_(panic)("add_to_trans_tab: duplicate");
+         VG_(core_panic)("add_to_trans_tab: duplicate");
       if (vg_tt[i].orig_addr == VG_TTE_EMPTY) {
          /* Put it here, and set the back pointer. */
          vg_tt[i] = *tte;
@@ -393,7 +393,7 @@
    Int i;
    Addr ret_addr;
    if (4+trans_size > VG_TC_SIZE-vg_tc_used)
-      VG_(panic)("copy_to_transcache: not enough free space?!");
+      VG_(core_panic)("copy_to_transcache: not enough free space?!");
    /* Leave a hole for the back pointer to the TT entry. */
    vg_tc_used += 4;
    ret_addr = (Addr)&vg_tc[vg_tc_used];