]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Moved *definitions* of VALGRIND_INTERNAL_PRINTF and
authorNicholas Nethercote <n.nethercote@gmail.com>
Tue, 3 Aug 2004 17:26:39 +0000 (17:26 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Tue, 3 Aug 2004 17:26:39 +0000 (17:26 +0000)
VALGRIND_INTERNAL_PRINTF_BACKTRACE from vg_include.h to vg_messages.c.  The
*declarations* stayed.

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

coregrind/vg_include.h
coregrind/vg_messages.c

index ff6735bf9ea45761079387c6f42571ff821f64d2..f7e1657fae54d181185648510a4c6e26308bf33e 100644 (file)
@@ -519,33 +519,6 @@ struct vg_mallocfunc_info {
    Bool        clo_trace_malloc;
 };
 
-__attribute__((weak))
-int
-VALGRIND_INTERNAL_PRINTF(char *format, ...)
-{
-   unsigned int _qzz_res = 0;
-   va_list vargs;
-   va_start(vargs, format);
-   VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__INTERNAL_PRINTF,
-                           (unsigned int)format, (unsigned int)vargs, 0, 0);
-   va_end(vargs);
-   return _qzz_res;
-}
-
-__attribute__((weak))
-int
-VALGRIND_INTERNAL_PRINTF_BACKTRACE(char *format, ...)
-{
-   unsigned int _qzz_res = 0;
-   va_list vargs;
-   va_start(vargs, format);
-   VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__INTERNAL_PRINTF_BACKTRACE,
-                           (unsigned int)format, (unsigned int)vargs, 0, 0);
-   va_end(vargs);
-   return _qzz_res;
-}
-
-
 /* ---------------------------------------------------------------------
    Constants pertaining to the simulated CPU state, VG_(baseBlock),
    which need to go here to avoid ugly circularities.
@@ -1109,6 +1082,11 @@ extern void   VG_(env_remove_valgrind_env_stuff) ( Char** env );
    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.
+int VALGRIND_INTERNAL_PRINTF           ( char *format, ... );
+int VALGRIND_INTERNAL_PRINTF_BACKTRACE ( char *format, ... );
+
 
 /* ---------------------------------------------------------------------
    Exports of vg_demangle.c
index 5c0fd892d033443b6da993e77d3e2c295c784cae..948cdca1dc207f589def3571539f3d8b54b5be8d 100644 (file)
@@ -126,6 +126,29 @@ void VG_(send_bytes_to_logging_sink) ( Char* msg, Int nbytes )
    }
 }
 
+int VALGRIND_INTERNAL_PRINTF(char *format, ...)
+{
+   unsigned int _qzz_res = 0;
+   va_list vargs;
+   va_start(vargs, format);
+   VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__INTERNAL_PRINTF,
+                           (unsigned int)format, (unsigned int)vargs, 0, 0);
+   va_end(vargs);
+   return _qzz_res;
+}
+
+int VALGRIND_INTERNAL_PRINTF_BACKTRACE(char *format, ...)
+{
+   unsigned int _qzz_res = 0;
+   va_list vargs;
+   va_start(vargs, format);
+   VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__INTERNAL_PRINTF_BACKTRACE,
+                           (unsigned int)format, (unsigned int)vargs, 0, 0);
+   va_end(vargs);
+   return _qzz_res;
+}
+
+
 /*--------------------------------------------------------------------*/
 /*--- end                                            vg_messages.c ---*/
 /*--------------------------------------------------------------------*/