Accepting request 28162 from devel:tools
Copy from devel:tools/valgrind based on submit request 28162 from user dirkmueller OBS-URL: https://build.opensuse.org/request/show/28162 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/valgrind?expand=0&rev=31
This commit is contained in:
commit
a9deebae0b
43
glibc-211.diff
Normal file
43
glibc-211.diff
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
--- configure.in
|
||||||
|
+++ configure.in
|
||||||
|
@@ -656,6 +656,17 @@
|
||||||
|
],
|
||||||
|
GLIBC_VERSION="2.10")
|
||||||
|
|
||||||
|
+AC_EGREP_CPP([GLIBC_211], [
|
||||||
|
+#include <features.h>
|
||||||
|
+#ifdef __GNU_LIBRARY__
|
||||||
|
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 11)
|
||||||
|
+ GLIBC_211
|
||||||
|
+ #endif
|
||||||
|
+#endif
|
||||||
|
+],
|
||||||
|
+GLIBC_VERSION="2.11")
|
||||||
|
+
|
||||||
|
+
|
||||||
|
AC_EGREP_CPP([AIX5_LIBC], [
|
||||||
|
#include <standards.h>
|
||||||
|
#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])
|
||||||
|
;;
|
@ -1,22 +1,22 @@
|
|||||||
Index: include/valgrind.h
|
Index: include/valgrind.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- include/valgrind.h (revision 7276)
|
--- include/valgrind.h (revision 10894)
|
||||||
+++ include/valgrind.h (working copy)
|
+++ include/valgrind.h (working copy)
|
||||||
@@ -3625,7 +3625,11 @@
|
@@ -3648,7 +3648,11 @@
|
||||||
/* Stack support. */
|
VG_USERREQ__STACK_CHANGE = 0x1503,
|
||||||
VG_USERREQ__STACK_REGISTER = 0x1501,
|
|
||||||
VG_USERREQ__STACK_DEREGISTER = 0x1502,
|
/* Wine support */
|
||||||
- VG_USERREQ__STACK_CHANGE = 0x1503
|
- VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601
|
||||||
+ VG_USERREQ__STACK_CHANGE = 0x1503,
|
+ VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601,
|
||||||
+
|
+
|
||||||
+ /* JIT support */
|
+ /* JIT support */
|
||||||
+ VG_USERREQ__JIT_REGISTER_MAP = 0x1601,
|
+ VG_USERREQ__JIT_REGISTER_MAP = 0x1701,
|
||||||
+ VG_USERREQ__JIT_UNREGISTER_MAP = 0x1602
|
+ VG_USERREQ__JIT_UNREGISTER_MAP = 0x1702
|
||||||
} Vg_ClientRequest;
|
} Vg_ClientRequest;
|
||||||
|
|
||||||
#if !defined(__GNUC__)
|
#if !defined(__GNUC__)
|
||||||
@@ -3904,7 +3908,21 @@
|
@@ -4009,7 +4013,21 @@
|
||||||
id, start, end, 0, 0); \
|
fd, ptr, total_size, delta, 0); \
|
||||||
}
|
}
|
||||||
|
|
||||||
+#define VALGRIND_JIT_REGISTER_MAP(name, start, end) \
|
+#define VALGRIND_JIT_REGISTER_MAP(name, start, end) \
|
||||||
@ -39,13 +39,20 @@ Index: include/valgrind.h
|
|||||||
#undef PLAT_ppc32_linux
|
#undef PLAT_ppc32_linux
|
||||||
Index: coregrind/m_debuginfo/debuginfo.c
|
Index: coregrind/m_debuginfo/debuginfo.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- coregrind/m_debuginfo/debuginfo.c (revision 7276)
|
--- coregrind/m_debuginfo/debuginfo.c (revision 10894)
|
||||||
+++ coregrind/m_debuginfo/debuginfo.c (working copy)
|
+++ coregrind/m_debuginfo/debuginfo.c (working copy)
|
||||||
@@ -576,6 +576,132 @@
|
@@ -47,6 +47,7 @@
|
||||||
return True;
|
#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:
|
+/* Storing and retrieving information caused by JITted code. TODO:
|
||||||
+ move somewhere more suitable. */
|
+ move somewhere more suitable. */
|
||||||
+
|
+
|
||||||
@ -71,13 +78,13 @@ Index: coregrind/m_debuginfo/debuginfo.c
|
|||||||
+ if (jit_entry_count + 1 >= jit_entries_size) {
|
+ if (jit_entry_count + 1 >= jit_entries_size) {
|
||||||
+ if (jit_entries == NULL) {
|
+ if (jit_entries == NULL) {
|
||||||
+ jit_entries = VG_(arena_calloc)(
|
+ jit_entries = VG_(arena_calloc)(
|
||||||
+ VG_AR_SYMTAB,
|
+ VG_AR_DINFO, "jit-register",
|
||||||
+ JITSYMS_START_SIZE, sizeof(JitEntry)
|
+ JITSYMS_START_SIZE, sizeof(JitEntry)
|
||||||
+ );
|
+ );
|
||||||
+ jit_entries_size = JITSYMS_START_SIZE;
|
+ jit_entries_size = JITSYMS_START_SIZE;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ jit_entries = VG_(arena_realloc)(
|
+ jit_entries = VG_(arena_realloc)(
|
||||||
+ VG_AR_SYMTAB, jit_entries,
|
+ VG_AR_DINFO, "jit-register", jit_entries,
|
||||||
+ (jit_entries_size + JITSYMS_INCREMENT)
|
+ (jit_entries_size + JITSYMS_INCREMENT)
|
||||||
+ * sizeof(JitEntry)
|
+ * sizeof(JitEntry)
|
||||||
+ );
|
+ );
|
||||||
@ -111,7 +118,7 @@ Index: coregrind/m_debuginfo/debuginfo.c
|
|||||||
+ jit_entries [j] = jit_entries [j-1];
|
+ jit_entries [j] = jit_entries [j-1];
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ jit_entries [slot].name = VG_(strdup)(name);
|
+ jit_entries [slot].name = VG_(strdup)("jit-register", name);
|
||||||
+ jit_entries [slot].start = start;
|
+ jit_entries [slot].start = start;
|
||||||
+ jit_entries [slot].end = start + len;
|
+ jit_entries [slot].end = start + len;
|
||||||
+ jit_entry_count++;
|
+ jit_entry_count++;
|
||||||
@ -145,7 +152,7 @@ Index: coregrind/m_debuginfo/debuginfo.c
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static
|
+static
|
||||||
+Bool jit_lookup ( Addr pc, Char* buf, Int nbuf )
|
+JitEntry* jit_lookup ( Addr pc, Char* buf, Int nbuf )
|
||||||
+{
|
+{
|
||||||
+ Int l, u, mid;
|
+ Int l, u, mid;
|
||||||
+ JitEntry* e = NULL;
|
+ JitEntry* e = NULL;
|
||||||
@ -166,32 +173,43 @@ Index: coregrind/m_debuginfo/debuginfo.c
|
|||||||
+ }
|
+ }
|
||||||
+ if (e != NULL && pc >= e->start && pc < e->end){
|
+ if (e != NULL && pc >= e->start && pc < e->end){
|
||||||
+ VG_(strncpy_safely)(buf, e->name, nbuf);
|
+ VG_(strncpy_safely)(buf, e->name, nbuf);
|
||||||
+ return True;
|
+ return e;
|
||||||
+ }
|
+ }
|
||||||
+ return False;
|
+ return NULL;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
/* ppc64-linux only: find the TOC pointer (R2 value) that should be in
|
+
|
||||||
force at the entry point address of the function containing
|
/*------------------------------------------------------------*/
|
||||||
guest_code_addr. Returns 0 if not known. */
|
/*--- ---*/
|
||||||
@@ -894,6 +1020,10 @@
|
/*--- TOP LEVEL: QUERYING EXISTING DEBUG INFO ---*/
|
||||||
buf_dirname, BUF_LEN, &know_dirinfo,
|
@@ -1263,8 +1390,19 @@
|
||||||
&lineno
|
PtrdiffT offset;
|
||||||
);
|
|
||||||
+ if (!know_fnname){
|
|
||||||
+ know_fnname = jit_lookup (eip, buf_fn, BUF_LEN);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (VG_(clo_xml)) {
|
|
||||||
|
|
||||||
Bool human_readable = True;
|
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
|
Index: coregrind/pub_core_debuginfo.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- coregrind/pub_core_debuginfo.h (revision 7276)
|
--- coregrind/pub_core_debuginfo.h (revision 10894)
|
||||||
+++ coregrind/pub_core_debuginfo.h (working copy)
|
+++ coregrind/pub_core_debuginfo.h (working copy)
|
||||||
@@ -75,6 +75,10 @@
|
@@ -106,6 +106,10 @@
|
||||||
extern Bool VG_(get_fnname_nodemangle)( Addr a,
|
extern
|
||||||
Char* fnname, Int n_fnname );
|
Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, Char* buf, Int nbuf );
|
||||||
|
|
||||||
+/* Register/deregister symbols created by JITs. */
|
+/* Register/deregister symbols created by JITs. */
|
||||||
+extern void VG_(register_jited_code)( Char* name, Addr start, SizeT len );
|
+extern void VG_(register_jited_code)( Char* name, Addr start, SizeT len );
|
||||||
@ -202,19 +220,11 @@ Index: coregrind/pub_core_debuginfo.h
|
|||||||
/*MOD*/Addr* spP,
|
/*MOD*/Addr* spP,
|
||||||
Index: coregrind/m_scheduler/scheduler.c
|
Index: coregrind/m_scheduler/scheduler.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- coregrind/m_scheduler/scheduler.c (revision 7276)
|
--- coregrind/m_scheduler/scheduler.c (revision 10894)
|
||||||
+++ coregrind/m_scheduler/scheduler.c (working copy)
|
+++ coregrind/m_scheduler/scheduler.c (working copy)
|
||||||
@@ -83,6 +83,7 @@
|
@@ -1478,6 +1478,16 @@
|
||||||
#include "pub_core_tooliface.h"
|
goto my_default;
|
||||||
#include "pub_core_translate.h" // For VG_(translate)()
|
}
|
||||||
#include "pub_core_transtab.h"
|
|
||||||
+#include "pub_core_debuginfo.h" // VG_({un}register_jited_code)
|
|
||||||
#include "priv_sema.h"
|
|
||||||
#include "pub_core_scheduler.h" // self
|
|
||||||
|
|
||||||
@@ -1367,6 +1368,16 @@
|
|
||||||
SET_CLREQ_RETVAL( tid, VG_(get_n_errs_found)() );
|
|
||||||
break;
|
|
||||||
|
|
||||||
+ case VG_USERREQ__JIT_REGISTER_MAP:
|
+ case VG_USERREQ__JIT_REGISTER_MAP:
|
||||||
+ VG_(register_jited_code)( (Char*)arg[1], arg[2], arg[3] );
|
+ VG_(register_jited_code)( (Char*)arg[1], arg[2], arg[3] );
|
||||||
@ -227,5 +237,5 @@ Index: coregrind/m_scheduler/scheduler.c
|
|||||||
+ break;
|
+ break;
|
||||||
+
|
+
|
||||||
default:
|
default:
|
||||||
|
my_default:
|
||||||
if (os_client_request(tid, arg)) {
|
if (os_client_request(tid, arg)) {
|
||||||
// do nothing, os_client_request() handled it
|
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 3 19:09:50 UTC 2009 - coolo@novell.com
|
Tue Nov 3 19:09:50 UTC 2009 - coolo@novell.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package valgrind (Version 3.5.0)
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,17 +23,18 @@ BuildRequires: gcc-c++ glibc-devel-32bit xorg-x11-devel
|
|||||||
BuildRequires: gcc-32bit
|
BuildRequires: gcc-32bit
|
||||||
%endif
|
%endif
|
||||||
Url: http://valgrind.org/
|
Url: http://valgrind.org/
|
||||||
License: GPL v2 only
|
License: GPLv2
|
||||||
Group: Development/Tools/Debuggers
|
Group: Development/Tools/Debuggers
|
||||||
Summary: Valgrind Suite of Tools for Debugging and Profiling
|
Summary: Valgrind Suite of Tools for Debugging and Profiling
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Version: 3.5.0
|
Version: 3.5.0
|
||||||
Release: 2
|
Release: 3
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
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/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
|
# 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
|
Patch2: deprecated.diff
|
||||||
|
Patch3: glibc-211.diff
|
||||||
Provides: callgrind = %version
|
Provides: callgrind = %version
|
||||||
Obsoletes: callgrind < %version
|
Obsoletes: callgrind < %version
|
||||||
ExclusiveArch: %ix86 x86_64 ppc ppc64
|
ExclusiveArch: %ix86 x86_64 ppc ppc64
|
||||||
@ -73,7 +74,7 @@ Authors:
|
|||||||
Robert Walsh
|
Robert Walsh
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
License: GPL v2 or later
|
License: GPLv2+
|
||||||
Summary: Valgrind Suite of Tools for Debugging and Profiling
|
Summary: Valgrind Suite of Tools for Debugging and Profiling
|
||||||
Group: Development/Tools/Debuggers
|
Group: Development/Tools/Debuggers
|
||||||
Requires: %name = %version
|
Requires: %name = %version
|
||||||
@ -116,8 +117,9 @@ Authors:
|
|||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
cd VEX
|
cd VEX
|
||||||
cd ..
|
cd ..
|
||||||
#%patch1
|
%patch1
|
||||||
%patch2
|
%patch2
|
||||||
|
%patch3
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
export CFLAGS="$RPM_OPT_FLAGS"
|
||||||
|
Loading…
Reference in New Issue
Block a user