From: Nicholas Nethercote Date: Mon, 7 Nov 2005 04:52:41 +0000 (+0000) Subject: Improve factoring in m_coredump a little. X-Git-Tag: svn/VALGRIND_3_1_0~207 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b09521f1c5c3e687f5b5d3d5e9071f45519251e;p=thirdparty%2Fvalgrind.git Improve factoring in m_coredump a little. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5025 --- diff --git a/coregrind/m_coredump/coredump-amd64-linux.c b/coregrind/m_coredump/coredump-amd64-linux.c index ffa69f9409..22716953c0 100644 --- a/coregrind/m_coredump/coredump-amd64-linux.c +++ b/coregrind/m_coredump/coredump-amd64-linux.c @@ -84,7 +84,6 @@ void ML_(fill_elffpregs_from_tst)(vki_elf_fpregset_t* fpu, VG_(memset)(fpu->padding, 0, sizeof(fpu->padding)); } -void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size) -{ - ML_(make_elf_coredump)(tid, si, max_size); -} +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ diff --git a/coregrind/m_coredump/coredump-elf.c b/coregrind/m_coredump/coredump-elf.c index 82b1a7eaf6..60d18db46c 100644 --- a/coregrind/m_coredump/coredump-elf.c +++ b/coregrind/m_coredump/coredump-elf.c @@ -281,7 +281,8 @@ static void fill_xfpu(const ThreadState *tst, vki_elf_fpxregset_t *xfpu) } #endif -void ML_(make_elf_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size) +static +void make_elf_coredump(ThreadId tid, const vki_siginfo_t *si, UInt max_size) { Char buf[1000]; Char *basename = "vgcore"; @@ -434,6 +435,11 @@ void ML_(make_elf_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size VG_(close)(core_fd); } +void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size) +{ + make_elf_coredump(tid, si, max_size); +} + /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ diff --git a/coregrind/m_coredump/coredump-ppc32-linux.c b/coregrind/m_coredump/coredump-ppc32-linux.c index 0155c4c028..c3ca45adf9 100644 --- a/coregrind/m_coredump/coredump-ppc32-linux.c +++ b/coregrind/m_coredump/coredump-ppc32-linux.c @@ -71,7 +71,6 @@ void ML_(fill_elffpregs_from_tst)(vki_elf_fpregset_t* fpu, # undef DO } -void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size) -{ - ML_(make_elf_coredump)(tid, si, max_size); -} +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ diff --git a/coregrind/m_coredump/coredump-x86-linux.c b/coregrind/m_coredump/coredump-x86-linux.c index 320c532bf0..79a91bed8b 100644 --- a/coregrind/m_coredump/coredump-x86-linux.c +++ b/coregrind/m_coredump/coredump-x86-linux.c @@ -104,7 +104,6 @@ void ML_(fill_elffpxregs_from_tst)(vki_elf_fpxregset_t* xfpu, VG_(memset)(xfpu->padding, 0, sizeof(xfpu->padding)); } -void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size) -{ - ML_(make_elf_coredump)(tid, si, max_size); -} +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ diff --git a/coregrind/m_coredump/priv_elf.h b/coregrind/m_coredump/priv_elf.h index b21641cd70..a1340a42e9 100644 --- a/coregrind/m_coredump/priv_elf.h +++ b/coregrind/m_coredump/priv_elf.h @@ -31,8 +31,6 @@ #ifndef __PRIV_SYMTAB_H #define __PRIV_SYMTAB_H -void ML_(make_elf_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size); - void ML_(fill_elfregs_from_tst)(struct vki_user_regs_struct* regs, const ThreadArchState* arch);