Get rid of the VALGRIND_INTERNAL_PRINTF_BACKTRACE request -- it's no longer
used.

And move VALGRIND_INTERNAL_PRINTF() out of core.h into vg_replace_malloc.c,
which is the only place it's used now.  Also made it print it's message with
Vg_DebugMsg rather than Vg_UserMsg, which makes more sense, since it's used
for --trace-malloc which is debugging-style info.

Improved some comments about this stuff too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3290 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/core.h b/coregrind/core.h
index 47e3c55..47cf8fb 100644
--- a/coregrind/core.h
+++ b/coregrind/core.h
@@ -515,8 +515,8 @@
 
 /* Internal equivalent of VALGRIND_PRINTF . */
 #define VG_USERREQ__INTERNAL_PRINTF         0x3103
-/* Internal equivalent of VALGRIND_PRINTF_BACKTRACE . */
-#define VG_USERREQ__INTERNAL_PRINTF_BACKTRACE 0x3104
+/* Internal equivalent of VALGRIND_PRINTF_BACKTRACE . (no longer used) */
+//#define VG_USERREQ__INTERNAL_PRINTF_BACKTRACE 0x3104
 
 /* Denote the finish of __libc_freeres_wrapper(). 
    A synonym for exit. */
@@ -912,38 +912,6 @@
    use. */
 extern void VG_(send_bytes_to_logging_sink) ( Char* msg, Int nbytes );
 
-// Functions for printing from code within Valgrind, but which runs on the
-// sim'd CPU.  Defined here because needed for vg_replace_malloc.c.  The
-// weak attribute ensures the multiple definitions are not a problem.  They
-// must be functions rather than macros so that va_list can be used.
-
-__attribute__((weak))
-int
-VALGRIND_INTERNAL_PRINTF(char *format, ...)
-{
-   UWord _qzz_res = 0;
-   va_list vargs;
-   va_start(vargs, format);
-   VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__INTERNAL_PRINTF,
-                           (UWord)format, (UWord)vargs, 0, 0);
-   va_end(vargs);
-   return _qzz_res;
-}
-
-__attribute__((weak))
-int
-VALGRIND_INTERNAL_PRINTF_BACKTRACE(char *format, ...)
-{
-   UWord _qzz_res = 0;
-   va_list vargs;
-   va_start(vargs, format);
-   VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__INTERNAL_PRINTF_BACKTRACE,
-                           (UWord)format, (UWord)vargs, 0, 0);
-   va_end(vargs);
-   return _qzz_res;
-}
-
-
 /* ---------------------------------------------------------------------
    Exports of vg_demangle.c
    ------------------------------------------------------------------ */