Hello community,
here is the log from the commit of package valgrind for openSUSE:Factory
checked in at Thu Jan 7 13:04:08 CET 2010.
--------
--- valgrind/valgrind.changes 2009-11-03 20:23:23.000000000 +0100
+++ /mounts/work_src_done/STABLE/valgrind/valgrind.changes 2010-01-06 17:55:31.000000000 +0100
@@ -1,0 +2,10 @@
+Wed Jan 6 17:54:54 CET 2010 - dmueller@suse.de
+
+- fix build against glibc 2.11
+
+-------------------------------------------------------------------
+Wed Dec 2 22:25:34 CET 2009 - dmueller@suse.de
+
+- update and reenable jit-register-unregister.diff
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
jit-runtime-support.diff
New:
----
glibc-211.diff
jit-register-unregister.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ valgrind.spec ++++++
--- /var/tmp/diff_new_pack.M5w1dl/_old 2010-01-07 13:04:01.000000000 +0100
+++ /var/tmp/diff_new_pack.M5w1dl/_new 2010-01-07 13:04:01.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package valgrind (Version 3.5.0)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,17 +23,18 @@
BuildRequires: gcc-32bit
%endif
Url: http://valgrind.org/
-License: GPL v2 only
+License: GPLv2
Group: Development/Tools/Debuggers
Summary: Valgrind Suite of Tools for Debugging and Profiling
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Version: 3.5.0
-Release: 2
+Release: 3
Source0: %{name}-%{version}.tar.bz2
# svn di svn://svn.valgrind.org/valgrind/tags/VALGRIND_3_2_1 svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH > 3_2_BRANCH.diff
# svn di svn://svn.valgrind.org/vex/tags/VEX_3_2_1 svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH > VEX_3_2_BRANCH.diff
-Patch1: jit-runtime-support.diff
+Patch1: jit-register-unregister.diff
Patch2: deprecated.diff
+Patch3: glibc-211.diff
Provides: callgrind = %version
Obsoletes: callgrind < %version
ExclusiveArch: %ix86 x86_64 ppc ppc64
@@ -73,7 +74,7 @@
Robert Walsh
%package devel
-License: GPL v2 or later
+License: GPLv2+
Summary: Valgrind Suite of Tools for Debugging and Profiling
Group: Development/Tools/Debuggers
Requires: %name = %version
@@ -116,8 +117,9 @@
%setup -q -n %{name}-%{version}
cd VEX
cd ..
-#%patch1
+%patch1
%patch2
+%patch3
%build
export CFLAGS="$RPM_OPT_FLAGS"
++++++ glibc-211.diff ++++++
--- configure.in
+++ configure.in
@@ -656,6 +656,17 @@
],
GLIBC_VERSION="2.10")
+AC_EGREP_CPP([GLIBC_211], [
+#include
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 11)
+ GLIBC_211
+ #endif
+#endif
+],
+GLIBC_VERSION="2.11")
+
+
AC_EGREP_CPP([AIX5_LIBC], [
#include
#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
@@ -742,6 +753,13 @@
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
+ 2.11)
+ AC_MSG_RESULT(2.11 family)
+ AC_DEFINE([GLIBC_2_11], 1, [Define to 1 if you're using glibc 2.11.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
aix5)
AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
@@ -755,7 +773,7 @@
*)
AC_MSG_RESULT(unsupported version)
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.10])
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.11])
AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
AC_MSG_ERROR([or Darwin libc])
;;
++++++ jit-register-unregister.diff ++++++
Index: include/valgrind.h
===================================================================
--- include/valgrind.h (revision 10894)
+++ include/valgrind.h (working copy)
@@ -3648,7 +3648,11 @@
VG_USERREQ__STACK_CHANGE = 0x1503,
/* Wine support */
- VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601
+ VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601,
+
+ /* JIT support */
+ VG_USERREQ__JIT_REGISTER_MAP = 0x1701,
+ VG_USERREQ__JIT_UNREGISTER_MAP = 0x1702
} Vg_ClientRequest;
#if !defined(__GNUC__)
@@ -4009,7 +4013,21 @@
fd, ptr, total_size, delta, 0); \
}
+#define VALGRIND_JIT_REGISTER_MAP(name, start, end) \
+ {unsigned int _qzz_res; \
+ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
+ VG_USERREQ__JIT_REGISTER_MAP, \
+ name, start, end, 0, 0); \
+ }
+#define VALGRIND_JIT_UNREGISTER_MAP(name, start) \
+ {unsigned int _qzz_res; \
+ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
+ VG_USERREQ__JIT_REGISTER_MAP, \
+ start, 0, 0, 0, 0); \
+ }
+
+
#undef PLAT_x86_linux
#undef PLAT_amd64_linux
#undef PLAT_ppc32_linux
Index: coregrind/m_debuginfo/debuginfo.c
===================================================================
--- coregrind/m_debuginfo/debuginfo.c (revision 10894)
+++ coregrind/m_debuginfo/debuginfo.c (working copy)
@@ -47,6 +47,7 @@
#include "pub_core_oset.h"
#include "pub_core_stacktrace.h" // VG_(get_StackTrace) XXX: circular dependency
#include "pub_core_ume.h"
+#include "pub_core_mallocfree.h"
#include "priv_misc.h" /* dinfo_zalloc/free */
#include "priv_d3basics.h" /* ML_(pp_GX) */
@@ -1131,6 +1132,132 @@
#endif /* defined(VGO_aix5) */
+/* Storing and retrieving information caused by JITted code. TODO:
+ move somewhere more suitable. */
+
+typedef
+ struct {
+ Char *name;
+ Addr start, end;
+ }
+ JitEntry;
+
+static JitEntry *jit_entries;
+static Int jit_entries_size;
+static Int jit_entry_count;
+
+#define JITSYMS_START_SIZE 128
+#define JITSYMS_INCREMENT 64
+
+void VG_(register_jited_code) ( Char *name, Addr start, SizeT len)
+{
+ Int l, u, mid, slot, j;
+ JitEntry* e = NULL;
+
+ if (jit_entry_count + 1 >= jit_entries_size) {
+ if (jit_entries == NULL) {
+ jit_entries = VG_(arena_calloc)(
+ VG_AR_DINFO, "jit-register",
+ JITSYMS_START_SIZE, sizeof(JitEntry)
+ );
+ jit_entries_size = JITSYMS_START_SIZE;
+ } else {
+ jit_entries = VG_(arena_realloc)(
+ VG_AR_DINFO, "jit-register", jit_entries,
+ (jit_entries_size + JITSYMS_INCREMENT)
+ * sizeof(JitEntry)
+ );
+ jit_entries_size += JITSYMS_INCREMENT;
+ }
+ }
+ l = 0;
+ u = jit_entry_count;
+ while (l < u) {
+ mid = (l + u) / 2;
+ e = &jit_entries [mid];
+ if (e->start < start) {
+ l = mid + 1;
+ } else if (e->start > start) {
+ u = mid;
+ } else
+ break;
+ }
+ if (e == NULL) {
+ if (jit_entry_count != 0) {
+ /* this would be an error */
+ }
+ slot = 0;
+ } else if (e->start < start)
+ slot = mid + 1;
+ else
+ slot = mid;
+
+ if (e != NULL) {
+ for (j = jit_entry_count; j > mid+1; j--)
+ jit_entries [j] = jit_entries [j-1];
+ }
+
+ jit_entries [slot].name = VG_(strdup)("jit-register", name);
+ jit_entries [slot].start = start;
+ jit_entries [slot].end = start + len;
+ jit_entry_count++;
+}
+
+void VG_(unregister_jited_code) ( Addr start )
+{
+ Int l, u, mid;
+ JitEntry* e = NULL;
+
+ l = 0;
+ u = jit_entry_count;
+ while (l < u) {
+ mid = (l + u) / 2;
+ e = &jit_entries [mid];
+
+ if (e->start < start) {
+ l = mid + 1;
+ } else if (e->start > start) {
+ u = mid;
+ } else {
+ break;
+ }
+ }
+ if (e != NULL && start == e->start){
+ Int j;
+ VG_(free)(e->name);
+ for (j = mid + 1; j < jit_entry_count; j++)
+ jit_entries [j-1] = jit_entries [j];
+ }
+}
+
+static
+JitEntry* jit_lookup ( Addr pc, Char* buf, Int nbuf )
+{
+ Int l, u, mid;
+ JitEntry* e = NULL;
+
+ l = 0;
+ u = jit_entry_count;
+ while (l < u) {
+ mid = (l + u) / 2;
+ e = &jit_entries [mid];
+
+ if (e->end < pc) {
+ l = mid + 1;
+ } else if (e->start > pc) {
+ u = mid;
+ } else {
+ break;
+ }
+ }
+ if (e != NULL && pc >= e->start && pc < e->end){
+ VG_(strncpy_safely)(buf, e->name, nbuf);
+ return e;
+ }
+ return NULL;
+}
+
+
/*------------------------------------------------------------*/
/*--- ---*/
/*--- TOP LEVEL: QUERYING EXISTING DEBUG INFO ---*/
@@ -1263,8 +1390,19 @@
PtrdiffT offset;
search_all_symtabs ( a, &di, &sno, match_anywhere_in_sym, findText );
- if (di == NULL)
+ if (di == NULL)
+ {
+ if (findText)
+ {
+ JitEntry* je = jit_lookup (a, buf, nbuf);
+ if (!je)
+ return False;
+ if (offsetP)
+ *offsetP = a - je->start;
+ return True;
+ }
return False;
+ }
VG_(demangle) ( do_cxx_demangling, do_z_demangling,
di->symtab[sno].name, buf, nbuf );
Index: coregrind/pub_core_debuginfo.h
===================================================================
--- coregrind/pub_core_debuginfo.h (revision 10894)
+++ coregrind/pub_core_debuginfo.h (working copy)
@@ -106,6 +106,10 @@
extern
Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, Char* buf, Int nbuf );
+/* Register/deregister symbols created by JITs. */
+extern void VG_(register_jited_code)( Char* name, Addr start, SizeT len );
+extern void VG_(unregister_jited_code)( Addr start );
+
/* Use DWARF2/3 CFA information to do one step of stack unwinding. */
extern Bool VG_(use_CF_info) ( /*MOD*/Addr* ipP,
/*MOD*/Addr* spP,
Index: coregrind/m_scheduler/scheduler.c
===================================================================
--- coregrind/m_scheduler/scheduler.c (revision 10894)
+++ coregrind/m_scheduler/scheduler.c (working copy)
@@ -1478,6 +1478,16 @@
goto my_default;
}
+ case VG_USERREQ__JIT_REGISTER_MAP:
+ VG_(register_jited_code)( (Char*)arg[1], arg[2], arg[3] );
+ SET_CLREQ_RETVAL( tid, 0 ); /* return value is meaningless */
+ break;
+
+ case VG_USERREQ__JIT_UNREGISTER_MAP:
+ VG_(unregister_jited_code)( arg[1] );
+ SET_CLREQ_RETVAL( tid, 0 ); /* return value is meaningless */
+ break;
+
default:
my_default:
if (os_client_request(tid, arg)) {
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org