|
From: <sv...@va...> - 2005-12-21 20:22:55
|
Author: njn
Date: 2005-12-21 20:22:52 +0000 (Wed, 21 Dec 2005)
New Revision: 5398
Log:
Renamed coregrind.h to pub_core_clreq.h and introduced pub_tool_clreq.h t=
o
be consistent with the module naming scheme.
Added:
trunk/coregrind/pub_core_clreq.h
trunk/include/pub_tool_clreq.h
Removed:
trunk/coregrind/coregrind.h
Modified:
trunk/coregrind/Makefile.am
trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/vg_preloaded.c
trunk/include/Makefile.am
Modified: trunk/coregrind/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/Makefile.am 2005-12-21 19:47:06 UTC (rev 5397)
+++ trunk/coregrind/Makefile.am 2005-12-21 20:22:52 UTC (rev 5398)
@@ -48,11 +48,11 @@
endif
=20
noinst_HEADERS =3D \
- coregrind.h \
pub_core_aspacemgr.h \
pub_core_basics.h \
pub_core_basics_asm.h \
pub_core_clientstate.h \
+ pub_core_clreq.h \
pub_core_commandline.h \
pub_core_coredump.h \
pub_core_cpuid.h \
Deleted: trunk/coregrind/coregrind.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/coregrind.h 2005-12-21 19:47:06 UTC (rev 5397)
+++ trunk/coregrind/coregrind.h 2005-12-21 20:22:52 UTC (rev 5398)
@@ -1,80 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Internal client requests. coregrind.h ---*/
-/*--------------------------------------------------------------------*/
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Julian Seward
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#ifndef __COREGRIND_H
-#define __COREGRIND_H
-
-//--------------------------------------------------------------------
-// PURPOSE: This file is the counterpart to valgrind.h. It contains
-// the client requests that are internal to Valgrind, and not to be seen
-// by client programs.
-//--------------------------------------------------------------------
-
-#include <stdarg.h>
-
-// The strange choice of values here is due to historical reasons -- the=
re
-// used to be many more internal client requests.
-typedef
- enum {=20
- /* Denote the finish of __libc_freeres_wrapper(). Also causes exi=
t. */
- VG_USERREQ__LIBC_FREERES_DONE =3D 0x3029,
-
- /* Get the tool's malloc-wrapping functions */
- VG_USERREQ__GET_MALLOCFUNCS =3D 0x3030,
-
- /* Internal equivalent of VALGRIND_PRINTF . */
- VG_USERREQ__INTERNAL_PRINTF =3D 0x3103,
-
- } Vg_InternalClientRequest;
-
-// Function for printing from code within Valgrind, but which runs on th=
e
-// sim'd CPU. Must be a function rather than macros so that va_list can
-// be used.
-
-int VALGRIND_INTERNAL_PRINTF(char *format, ...);
-__attribute__((format(__printf__, 1, 2)))
-__attribute__((weak))
-int VALGRIND_INTERNAL_PRINTF(char *format, ...)
-{
- unsigned long _qzz_res =3D 0;
- va_list vargs;
- va_start(vargs, format);
- VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__INTERNAL_PRINTF,
- (unsigned long)format, (unsigned long)vargs, =
0, 0);
- va_end(vargs);
- return _qzz_res;
-}
-
-
-#endif // __COREGRIND_H
-
-/*--------------------------------------------------------------------*/
-/*--- end ---*/
-/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2005-12-21 19:47:=
06 UTC (rev 5397)
+++ trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2005-12-21 20:22:=
52 UTC (rev 5398)
@@ -44,10 +44,9 @@
traces, so we want the name to be (hopefully!) meaningful to users.
------------------------------------------------------------------ */
=20
-#include "valgrind.h" // for VALGRIND_NON_SIMD_CALL[12]
-#include "coregrind.h" // for VALGRIND_INTERNAL_PRINTF
-
#include "pub_core_basics.h"
+#include "pub_core_clreq.h" // for VALGRIND_INTERNAL_PRINTF,
+ // VALGRIND_NON_SIMD_CALL[12]
#include "pub_core_debuginfo.h" // needed for pub_core_redir.h :(
#include "pub_core_mallocfree.h" // for VG_MIN_MALLOC_SZB, VG_AR_CLIE=
NT
#include "pub_core_redir.h" // for VG_REPLACE_FUNCTION
Modified: trunk/coregrind/m_scheduler/scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_scheduler/scheduler.c 2005-12-21 19:47:06 UTC (rev =
5397)
+++ trunk/coregrind/m_scheduler/scheduler.c 2005-12-21 20:22:52 UTC (rev =
5398)
@@ -57,12 +57,10 @@
way back for the moment, until we do an OS port in earnest...]
*/
=20
-#include "valgrind.h" // for VG_USERREQ__*
-#include "coregrind.h" // for VG_USERREQ__*
-
#include "pub_core_basics.h"
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
+#include "pub_core_clreq.h" // for VG_USERREQ__*
#include "pub_core_dispatch.h"
#include "pub_core_errormgr.h" // For VG_(get_n_errs_found)()
#include "pub_core_libcbase.h"
Copied: trunk/coregrind/pub_core_clreq.h (from rev 5397, trunk/coregrind/=
coregrind.h)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_clreq.h (rev 0)
+++ trunk/coregrind/pub_core_clreq.h 2005-12-21 20:22:52 UTC (rev 5398)
@@ -0,0 +1,78 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Internal client requests. pub_core_clreq.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward
+ js...@ac...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __PUB_CORE_CLREQ_H
+#define __PUB_CORE_CLREQ_H
+
+//--------------------------------------------------------------------
+// PURPOSE: This module defined client requests.
+//--------------------------------------------------------------------
+
+#include "pub_tool_clreq.h"
+
+// The strange choice of values here is due to historical reasons -- the=
re
+// used to be many more internal client requests.
+typedef
+ enum {=20
+ /* Denote the finish of __libc_freeres_wrapper(). Also causes exi=
t. */
+ VG_USERREQ__LIBC_FREERES_DONE =3D 0x3029,
+
+ /* Get the tool's malloc-wrapping functions */
+ VG_USERREQ__GET_MALLOCFUNCS =3D 0x3030,
+
+ /* Internal equivalent of VALGRIND_PRINTF . */
+ VG_USERREQ__INTERNAL_PRINTF =3D 0x3103,
+
+ } Vg_InternalClientRequest;
+
+// Function for printing from code within Valgrind, but which runs on th=
e
+// sim'd CPU. Must be a function rather than macros so that va_list can
+// be used.
+
+int VALGRIND_INTERNAL_PRINTF(char *format, ...);
+__attribute__((format(__printf__, 1, 2)))
+__attribute__((weak))
+int VALGRIND_INTERNAL_PRINTF(char *format, ...)
+{
+ unsigned long _qzz_res =3D 0;
+ va_list vargs;
+ va_start(vargs, format);
+ VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__INTERNAL_PRINTF,
+ (unsigned long)format, (unsigned long)vargs, =
0, 0);
+ va_end(vargs);
+ return _qzz_res;
+}
+
+
+#endif // __PUB_CORE_CLREQ_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/vg_preloaded.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_preloaded.c 2005-12-21 19:47:06 UTC (rev 5397)
+++ trunk/coregrind/vg_preloaded.c 2005-12-21 20:22:52 UTC (rev 5398)
@@ -42,10 +42,8 @@
originates from Valgrind.
------------------------------------------------------------------ */
=20
-#include "valgrind.h"
-#include "coregrind.h"
-
#include "pub_core_basics.h"
+#include "pub_core_clreq.h"
#include "pub_core_debuginfo.h" // Needed for pub_core_redir.h
#include "pub_core_redir.h" // For VG_NOTIFY_ON_LOAD
=20
Modified: trunk/include/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/Makefile.am 2005-12-21 19:47:06 UTC (rev 5397)
+++ trunk/include/Makefile.am 2005-12-21 20:22:52 UTC (rev 5398)
@@ -6,6 +6,7 @@
pub_tool_basics_asm.h \
pub_tool_aspacemgr.h \
pub_tool_clientstate.h \
+ pub_tool_clreq.h \
pub_tool_cpuid.h \
pub_tool_debuginfo.h \
pub_tool_errormgr.h \
Added: trunk/include/pub_tool_clreq.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_clreq.h (rev 0)
+++ trunk/include/pub_tool_clreq.h 2005-12-21 20:22:52 UTC (rev 5398)
@@ -0,0 +1,40 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Client requests. pub_tool_clreq.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward
+ js...@ac...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __PUB_TOOL_CLREQ_H
+#define __PUB_TOOL_CLREQ_H
+
+#include "valgrind.h"
+
+#endif // __PUB_TOOL_CLREQ_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
|