diff --git a/deprecated.diff b/deprecated.diff index aa8240e..4d890e9 100644 --- a/deprecated.diff +++ b/deprecated.diff @@ -1,6 +1,8 @@ ---- memcheck/memcheck.h (revision 7274) -+++ memcheck/memcheck.h (revision 7273) -@@ -131,6 +131,18 @@ typedef +Index: memcheck/memcheck.h +=================================================================== +--- memcheck/memcheck.h.orig ++++ memcheck/memcheck.h +@@ -134,6 +134,18 @@ typedef _qzz_res; \ })) @@ -19,9 +21,9 @@ /* Similar to VALGRIND_MAKE_MEM_DEFINED except that addressability is not altered: bytes which are addressable are marked as defined, but those which are not addressable are left unchanged. */ -@@ -202,6 +214,18 @@ typedef +@@ -205,6 +217,18 @@ typedef (volatile unsigned char *)&(__lvalue), \ - (unsigned int)(sizeof (__lvalue))) + (unsigned long)(sizeof (__lvalue))) +/* This is the old name for VALGRIND_CHECK_MEM_IS_ADDRESSABLE. Deprecated. */ +#define VALGRIND_CHECK_WRITABLE(_qzz_addr,_qzz_len) \ @@ -36,5 +38,5 @@ + VALGRIND_CHECK_VALUE_IS_DEFINED(__lvalue) + - /* Do a memory leak check mid-execution. */ + /* Do a full memory leak check (like --leak-check=full) mid-execution. */ #define VALGRIND_DO_LEAK_CHECK \ diff --git a/jit-runtime-support.diff b/jit-register-unregister.diff similarity index 71% rename from jit-runtime-support.diff rename to jit-register-unregister.diff index 70f85b4..5042c43 100644 --- a/jit-runtime-support.diff +++ b/jit-register-unregister.diff @@ -1,22 +1,22 @@ Index: include/valgrind.h =================================================================== ---- include/valgrind.h (revision 7276) +--- include/valgrind.h (revision 10894) +++ include/valgrind.h (working copy) -@@ -3625,7 +3625,11 @@ - /* Stack support. */ - VG_USERREQ__STACK_REGISTER = 0x1501, - VG_USERREQ__STACK_DEREGISTER = 0x1502, -- VG_USERREQ__STACK_CHANGE = 0x1503 -+ VG_USERREQ__STACK_CHANGE = 0x1503, +@@ -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 = 0x1601, -+ VG_USERREQ__JIT_UNREGISTER_MAP = 0x1602 ++ VG_USERREQ__JIT_REGISTER_MAP = 0x1701, ++ VG_USERREQ__JIT_UNREGISTER_MAP = 0x1702 } Vg_ClientRequest; #if !defined(__GNUC__) -@@ -3904,7 +3908,21 @@ - id, start, end, 0, 0); \ +@@ -4009,7 +4013,21 @@ + fd, ptr, total_size, delta, 0); \ } +#define VALGRIND_JIT_REGISTER_MAP(name, start, end) \ @@ -39,13 +39,20 @@ Index: include/valgrind.h #undef PLAT_ppc32_linux 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) -@@ -576,6 +576,132 @@ - return True; - } +@@ -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. */ + @@ -71,13 +78,13 @@ Index: coregrind/m_debuginfo/debuginfo.c + if (jit_entry_count + 1 >= jit_entries_size) { + if (jit_entries == NULL) { + jit_entries = VG_(arena_calloc)( -+ VG_AR_SYMTAB, ++ VG_AR_DINFO, "jit-register", + JITSYMS_START_SIZE, sizeof(JitEntry) + ); + jit_entries_size = JITSYMS_START_SIZE; + } else { + jit_entries = VG_(arena_realloc)( -+ VG_AR_SYMTAB, jit_entries, ++ VG_AR_DINFO, "jit-register", jit_entries, + (jit_entries_size + JITSYMS_INCREMENT) + * sizeof(JitEntry) + ); @@ -111,7 +118,7 @@ Index: coregrind/m_debuginfo/debuginfo.c + 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].end = start + len; + jit_entry_count++; @@ -145,7 +152,7 @@ Index: coregrind/m_debuginfo/debuginfo.c +} + +static -+Bool jit_lookup ( Addr pc, Char* buf, Int nbuf ) ++JitEntry* jit_lookup ( Addr pc, Char* buf, Int nbuf ) +{ + Int l, u, mid; + JitEntry* e = NULL; @@ -166,32 +173,43 @@ Index: coregrind/m_debuginfo/debuginfo.c + } + if (e != NULL && pc >= e->start && pc < e->end){ + 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 @@ - buf_dirname, BUF_LEN, &know_dirinfo, - &lineno - ); -+ if (!know_fnname){ -+ know_fnname = jit_lookup (eip, buf_fn, BUF_LEN); -+ } -+ - if (VG_(clo_xml)) { ++ + /*------------------------------------------------------------*/ + /*--- ---*/ + /*--- TOP LEVEL: QUERYING EXISTING DEBUG INFO ---*/ +@@ -1263,8 +1390,19 @@ + PtrdiffT offset; - 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 =================================================================== ---- coregrind/pub_core_debuginfo.h (revision 7276) +--- coregrind/pub_core_debuginfo.h (revision 10894) +++ coregrind/pub_core_debuginfo.h (working copy) -@@ -75,6 +75,10 @@ - extern Bool VG_(get_fnname_nodemangle)( Addr a, - Char* fnname, Int n_fnname ); +@@ -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 ); @@ -202,19 +220,11 @@ Index: coregrind/pub_core_debuginfo.h /*MOD*/Addr* spP, 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) -@@ -83,6 +83,7 @@ - #include "pub_core_tooliface.h" - #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; +@@ -1478,6 +1478,16 @@ + goto my_default; + } + case VG_USERREQ__JIT_REGISTER_MAP: + VG_(register_jited_code)( (Char*)arg[1], arg[2], arg[3] ); @@ -227,5 +237,5 @@ Index: coregrind/m_scheduler/scheduler.c + break; + default: + my_default: if (os_client_request(tid, arg)) { - // do nothing, os_client_request() handled it diff --git a/valgrind.changes b/valgrind.changes index 2f981aa..1cea803 100644 --- a/valgrind.changes +++ b/valgrind.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +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 + +- updated patches to apply with fuzz=0 + ------------------------------------------------------------------- Tue Sep 8 09:34:49 CEST 2009 - dmueller@suse.de diff --git a/valgrind.spec b/valgrind.spec index 25a2827..0e5653d 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -28,11 +28,11 @@ Group: Development/Tools/Debuggers Summary: Valgrind Suite of Tools for Debugging and Profiling BuildRoot: %{_tmppath}/%{name}-%{version}-build Version: 3.5.0 -Release: 1 +Release: 2 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 Provides: callgrind = %version Obsoletes: callgrind < %version @@ -116,7 +116,7 @@ Authors: %setup -q -n %{name}-%{version} cd VEX cd .. -#%patch1 +%patch1 %patch2 %build