]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Disable core dumps, and remove the previous attempts at factoring out
authorNicholas Nethercote <njn@valgrind.org>
Fri, 26 Nov 2004 14:07:24 +0000 (14:07 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 26 Nov 2004 14:07:24 +0000 (14:07 +0000)
the arch-specific bits, which were just plain wrong.  This is a problem for a
later day.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3115

coregrind/core.h
coregrind/vg_signals.c
coregrind/x86/signal.c

index 5f33c67b23c4a4b6bcdacc09ece728a5cb966f69..7d131eab07ba73a86a9f29587666e4bc29dfb83d 100644 (file)
@@ -1779,14 +1779,6 @@ extern Bool VGA_(setup_pointercheck) ( void );
 // For attaching the debugger
 extern Int  VGA_(ptrace_setregs_from_tst) ( Int pid, ThreadArchState* arch );
 
-// Making coredumps
-extern void VGA_(fill_elfregs_from_tst)    ( struct vki_user_regs_struct* regs,
-                                             ThreadArchState* arch );
-extern void VGA_(fill_elffpregs_from_tst)  ( vki_elf_fpregset_t* fpu,
-                                             const ThreadArchState* arch );
-extern void VGA_(fill_elffpxregs_from_tst) ( vki_elf_fpxregset_t* xfpu,
-                                             const ThreadArchState* arch );
-
 // Signal stuff
 extern void VGA_(push_signal_frame) ( ThreadId tid, Addr sp_top_of_frame,
                                       const vki_siginfo_t *siginfo,
index 4613afd957e18200802fcea69a600b575ee146eb..0093c4dfa33b6a5db6884ddb6c085cc75eabdeda 100644 (file)
@@ -979,6 +979,9 @@ void VG_(kill_self)(Int sigNo)
    VG_(sigprocmask)(VKI_SIG_SETMASK, &origmask, NULL);
 }
 
+// Core dumping is disabled until someone can work out how to abstract out
+// the arch-specific and word-size-specific parts neatly.
+#if 0
 /*
   Dump core
    
@@ -1300,6 +1303,7 @@ static void make_coredump(ThreadId tid, const vki_siginfo_t *si, UInt max_size)
 
    VG_(close)(core_fd);
 }
+#endif
 
 /* 
    Perform the default action of a signal.  Returns if the default
@@ -1433,6 +1437,8 @@ static void vg_default_action(const vki_siginfo_t *info, ThreadId tid)
          VG_(start_debugger)( tid );
       }
 
+      // See comment above about this temporary disabling of core dumps.
+      #if 0
       if (core) {
         static struct vki_rlimit zero = { 0, 0 };
 
@@ -1441,6 +1447,7 @@ static void vg_default_action(const vki_siginfo_t *info, ThreadId tid)
         /* make sure we don't get a confusing kernel-generated coredump */
         VG_(setrlimit)(VKI_RLIMIT_CORE, &zero);
       }
+      #endif
 
       VG_(scheduler_handle_fatal_signal)( sigNo );
    }
index 6c499691142888d4bfcdc528dcec8dfaf0a7f75a..f021b695c00f572e5080861f02f3948676ecf5eb 100644 (file)
@@ -301,6 +301,9 @@ Int VGA_(pop_signal_frame)(ThreadId tid)
 /*--- Making coredumps                                     ---*/
 /*------------------------------------------------------------*/
 
+// Nb: these functions do *not* represent the right way to abstract out the
+// arch-specific parts of coredumps.  Some rethinking is required.
+#if 0
 void VGA_(fill_elfregs_from_tst)(struct vki_user_regs_struct* regs, 
                                  ThreadArchState* arch)
 {
@@ -324,7 +327,6 @@ void VGA_(fill_elfregs_from_tst)(struct vki_user_regs_struct* regs,
    regs->gs     = arch->vex.guest_GS;
 }
 
-#if 0
 static void fill_fpu(vki_elf_fpregset_t *fpu, const Char *from)
 {
    if (VG_(have_ssestate)) {
@@ -342,29 +344,29 @@ static void fill_fpu(vki_elf_fpregset_t *fpu, const Char *from)
    } else
       VG_(memcpy)(fpu, from, sizeof(*fpu));
 }
-#endif
 
 void VGA_(fill_elffpregs_from_BB)( vki_elf_fpregset_t* fpu )
 {
-  //fill_fpu(fpu, (const Char *)&VG_(baseBlock)[VGOFF_(m_ssestate)]);
+   fill_fpu(fpu, (const Char *)&VG_(baseBlock)[VGOFF_(m_ssestate)]);
 }
 
 void VGA_(fill_elffpregs_from_tst)( vki_elf_fpregset_t* fpu,
                                     const ThreadArchState* arch)
 {
-  //fill_fpu(fpu, (const Char *)&arch->m_sse);
+   fill_fpu(fpu, (const Char *)&arch->m_sse);
 }
 
 void VGA_(fill_elffpxregs_from_BB) ( vki_elf_fpxregset_t* xfpu )
 {
-  //VG_(memcpy)(xfpu, &VG_(baseBlock)[VGOFF_(m_ssestate)], sizeof(*xfpu));
+   VG_(memcpy)(xfpu, &VG_(baseBlock)[VGOFF_(m_ssestate)], sizeof(*xfpu));
 }
 
 void VGA_(fill_elffpxregs_from_tst) ( vki_elf_fpxregset_t* xfpu,
                                       const ThreadArchState* arch )
 {
-  //VG_(memcpy)(xfpu, arch->m_sse, sizeof(*xfpu));
+   VG_(memcpy)(xfpu, arch->m_sse, sizeof(*xfpu));
 }
+#endif
 
 /*--------------------------------------------------------------------*/
 /*--- end                                                          ---*/