rpms/valgrind/F-12 valgrind-3.5.0-helgrind-race-supp.patch, NONE, 1.1 valgrind-3.5.0-ppc-tests.patch, NONE, 1.1 valgrind-3.5.0-dwarf3.patch, 1.1, 1.2 valgrind.spec, 1.69, 1.70
Jakub Jelinek
jakub at fedoraproject.org
Wed Oct 21 14:54:08 UTC 2009
Author: jakub
Update of /cvs/pkgs/rpms/valgrind/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3150
Modified Files:
valgrind-3.5.0-dwarf3.patch valgrind.spec
Added Files:
valgrind-3.5.0-helgrind-race-supp.patch
valgrind-3.5.0-ppc-tests.patch
Log Message:
3.5.0-4
valgrind-3.5.0-helgrind-race-supp.patch:
glibc-2.34567-NPTL-helgrind.supp | 6 ++++++
1 file changed, 6 insertions(+)
--- NEW FILE valgrind-3.5.0-helgrind-race-supp.patch ---
--- valgrind/glibc-2.34567-NPTL-helgrind.supp.jj 2009-08-19 15:37:48.000000000 +0200
+++ valgrind/glibc-2.34567-NPTL-helgrind.supp 2009-10-21 16:46:31.000000000 +0200
@@ -88,6 +88,12 @@
obj:/lib*/libpthread-2.*so*
}
{
+ helgrind-glibc2X-102a
+ Helgrind:Race
+ fun:mythread_wrapper
+ obj:*vgpreload_helgrind*.so
+}
+{
helgrind-glibc2X-103
Helgrind:Race
fun:pthread_cond_*@@GLIBC_2.*
valgrind-3.5.0-ppc-tests.patch:
jm-insns.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- NEW FILE valgrind-3.5.0-ppc-tests.patch ---
--- valgrind/none/tests/ppc32/jm-insns.c.jj 2009-10-09 12:52:01.000000000 +0200
+++ valgrind/none/tests/ppc32/jm-insns.c 2009-10-20 17:25:32.000000000 +0200
@@ -210,10 +210,10 @@ typedef uint64_t HWord_t;
/* XXXX these must all be callee-save regs! */
-register double f14 __asm__ ("f14");
-register double f15 __asm__ ("f15");
-register double f16 __asm__ ("f16");
-register double f17 __asm__ ("f17");
+register double f14 __asm__ ("46");
+register double f15 __asm__ ("47");
+register double f16 __asm__ ("48");
+register double f17 __asm__ ("49");
register HWord_t r14 __asm__ ("r14");
register HWord_t r15 __asm__ ("r15");
register HWord_t r16 __asm__ ("r16");
valgrind-3.5.0-dwarf3.patch:
d3basics.c | 257 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
debuginfo.c | 66 +++++++++++++-
priv_d3basics.h | 10 +-
priv_readdwarf.h | 2
priv_storage.h | 2
readdwarf.c | 113 +++++++++++++++++-------
readelf.c | 11 ++
storage.c | 4
tytypes.c | 2
9 files changed, 418 insertions(+), 49 deletions(-)
Index: valgrind-3.5.0-dwarf3.patch
===================================================================
RCS file: /cvs/pkgs/rpms/valgrind/F-12/valgrind-3.5.0-dwarf3.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- valgrind-3.5.0-dwarf3.patch 14 Oct 2009 15:03:39 -0000 1.1
+++ valgrind-3.5.0-dwarf3.patch 21 Oct 2009 14:54:07 -0000 1.2
@@ -1,5 +1,254 @@
---- valgrind/coregrind/m_debuginfo/priv_d3basics.h.jj 2009-10-09 12:52:05.000000000 +0200
-+++ valgrind/coregrind/m_debuginfo/priv_d3basics.h 2009-10-13 14:55:12.000000000 +0200
+--- valgrind/coregrind/m_debuginfo/readdwarf.c.jj 2009-08-19 15:37:44.000000000 +0200
++++ valgrind/coregrind/m_debuginfo/readdwarf.c 2009-10-21 13:18:25.000000000 +0200
+@@ -3446,23 +3446,37 @@ static CIE the_CIEs[N_CIEs];
+
+
+ void ML_(read_callframe_info_dwarf3)
+- ( /*OUT*/struct _DebugInfo* di, UChar* ehframe_image )
++ ( /*OUT*/struct _DebugInfo* di, UChar* frame_image, SizeT frame_size,
++ Bool for_eh )
+ {
+ Int nbytes;
+ HChar* how = NULL;
+ Int n_CIEs = 0;
+- UChar* data = ehframe_image;
++ UChar* data = frame_image;
++ UWord ehframe_cfsis = 0;
+
+ # if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+- /* These targets don't use CFI-based stack unwinding. */
+- return;
++ if (!VG_(needs).var_info /* the tool requires it */
++ && !VG_(clo_read_var_info) /* the user asked for it */) {
++ /* These targets don't use CFI-based stack unwinding, but still might
++ need it for DW_OP_call_frame_cfa support. */
++ return;
++ }
+ # endif
+
++ /* If we are reading .debug_frame after .eh_frame has been read, only
++ add FDEs which weren't covered in .eh_frame. To be able to quickly
++ search the FDEs, the records must be sorted. */
++ if ( ! for_eh && di->ehframe_size && di->cfsi_used ) {
++ ML_(canonicaliseCFI) ( di );
++ ehframe_cfsis = di->cfsi_used;
++ }
++
+ if (di->trace_cfi) {
+ VG_(printf)("\n-----------------------------------------------\n");
+ VG_(printf)("CFI info: szB %ld, _avma %#lx, _image %p\n",
+- di->ehframe_size, di->ehframe_avma,
+- ehframe_image );
++ frame_size, for_eh ? di->ehframe_avma : 0,
++ frame_image );
+ VG_(printf)("CFI info: name %s\n",
+ di->filename );
+ }
+@@ -3495,11 +3509,11 @@ void ML_(read_callframe_info_dwarf3)
+ Bool dw64;
+
+ /* Are we done? */
+- if (data == ehframe_image + di->ehframe_size)
++ if (data == frame_image + frame_size)
+ return;
+
+ /* Overshot the end? Means something is wrong */
+- if (data > ehframe_image + di->ehframe_size) {
++ if (data > frame_image + frame_size) {
+ how = "overran the end of .eh_frame";
+ goto bad;
+ }
+@@ -3509,9 +3523,9 @@ void ML_(read_callframe_info_dwarf3)
+
+ ciefde_start = data;
+ if (di->trace_cfi)
+- VG_(printf)("\ncie/fde.start = %p (ehframe_image + 0x%lx)\n",
++ VG_(printf)("\ncie/fde.start = %p (frame_image + 0x%lx)\n",
+ ciefde_start,
+- ciefde_start - ehframe_image + 0UL);
++ ciefde_start - frame_image + 0UL);
+
+ ciefde_len = (ULong) read_UInt(data); data += sizeof(UInt);
+ if (di->trace_cfi)
+@@ -3524,7 +3538,7 @@ void ML_(read_callframe_info_dwarf3)
+ if (ciefde_len == 0) {
+ if (di->ddump_frames)
+ VG_(printf)("%08lx ZERO terminator\n\n",
+- ((Addr)ciefde_start) - ((Addr)ehframe_image));
++ ((Addr)ciefde_start) - ((Addr)frame_image));
+ return;
+ }
+
+@@ -3550,8 +3564,10 @@ void ML_(read_callframe_info_dwarf3)
+ if (di->trace_cfi)
+ VG_(printf)("cie.pointer = %lld\n", cie_pointer);
+
+- /* If cie_pointer is zero, we've got a CIE; else it's an FDE. */
+- if (cie_pointer == 0) {
++ /* If cie_pointer is zero for .eh_frame or all ones for .debug_frame,
++ we've got a CIE; else it's an FDE. */
++ if (cie_pointer == (for_eh ? 0ULL
++ : dw64 ? 0xFFFFFFFFFFFFFFFFULL : 0xFFFFFFFFULL)) {
+
+ Int this_CIE;
+ UChar cie_version;
+@@ -3575,11 +3591,11 @@ void ML_(read_callframe_info_dwarf3)
+
+ /* Record its offset. This is how we will find it again
+ later when looking at an FDE. */
+- the_CIEs[this_CIE].offset = (ULong)(ciefde_start - ehframe_image);
++ the_CIEs[this_CIE].offset = (ULong)(ciefde_start - frame_image);
+
+ if (di->ddump_frames)
+ VG_(printf)("%08lx %08lx %08lx CIE\n",
+- ((Addr)ciefde_start) - ((Addr)ehframe_image),
++ ((Addr)ciefde_start) - ((Addr)frame_image),
+ (Addr)ciefde_len,
+ (Addr)(UWord)cie_pointer );
+
+@@ -3623,8 +3639,13 @@ void ML_(read_callframe_info_dwarf3)
+ VG_(printf)(" Data alignment factor: %d\n",
+ (Int)the_CIEs[this_CIE].data_a_f);
+
+- the_CIEs[this_CIE].ra_reg = (Int)read_UChar(data);
+- data += sizeof(UChar);
++ if (cie_version == 1) {
++ the_CIEs[this_CIE].ra_reg = (Int)read_UChar(data);
++ data += sizeof(UChar);
++ } else {
++ the_CIEs[this_CIE].ra_reg = read_leb128( data, &nbytes, 0);
++ data += nbytes;
++ }
+ if (di->trace_cfi)
+ VG_(printf)("cie.ra_reg = %d\n",
+ the_CIEs[this_CIE].ra_reg);
+@@ -3702,7 +3723,7 @@ void ML_(read_callframe_info_dwarf3)
+ }
+
+ if (the_CIEs[this_CIE].ilen < 0
+- || the_CIEs[this_CIE].ilen > di->ehframe_size) {
++ || the_CIEs[this_CIE].ilen > frame_size) {
+ how = "implausible # cie initial insns";
+ goto bad;
+ }
+@@ -3717,8 +3738,8 @@ void ML_(read_callframe_info_dwarf3)
+ if (di->trace_cfi || di->ddump_frames) {
+ AddressDecodingInfo adi;
+ adi.encoding = the_CIEs[this_CIE].address_encoding;
+- adi.ehframe_image = ehframe_image;
+- adi.ehframe_avma = di->ehframe_avma;
++ adi.ehframe_image = frame_image;
++ adi.ehframe_avma = for_eh ? di->ehframe_avma : 0;
+ adi.text_bias = di->text_debug_bias;
+ show_CF_instructions( the_CIEs[this_CIE].instrs,
+ the_CIEs[this_CIE].ilen, &adi,
+@@ -3747,9 +3768,12 @@ void ML_(read_callframe_info_dwarf3)
+ cie_pointer bytes back from here. */
+
+ /* re sizeof(UInt) / sizeof(ULong), matches XXX above. */
+- look_for = (data - (dw64 ? sizeof(ULong) : sizeof(UInt))
+- - ehframe_image)
+- - cie_pointer;
++ if (for_eh)
++ look_for = (data - (dw64 ? sizeof(ULong) : sizeof(UInt))
++ - frame_image)
++ - cie_pointer;
++ else
++ look_for = cie_pointer;
+
+ for (cie = 0; cie < n_CIEs; cie++) {
+ if (0) VG_(printf)("look for %lld %lld\n",
+@@ -3764,8 +3788,8 @@ void ML_(read_callframe_info_dwarf3)
+ }
+
+ adi.encoding = the_CIEs[cie].address_encoding;
+- adi.ehframe_image = ehframe_image;
+- adi.ehframe_avma = di->ehframe_avma;
++ adi.ehframe_image = frame_image;
++ adi.ehframe_avma = for_eh ? di->ehframe_avma : 0;
+ adi.text_bias = di->text_debug_bias;
+ fde_initloc = read_encoded_Addr(&nbytes, &adi, data);
+ data += nbytes;
+@@ -3773,8 +3797,8 @@ void ML_(read_callframe_info_dwarf3)
+ VG_(printf)("fde.initloc = %#lx\n", fde_initloc);
+
+ adi.encoding = the_CIEs[cie].address_encoding & 0xf;
+- adi.ehframe_image = ehframe_image;
+- adi.ehframe_avma = di->ehframe_avma;
++ adi.ehframe_image = frame_image;
++ adi.ehframe_avma = for_eh ? di->ehframe_avma : 0;
+ adi.text_bias = di->text_debug_bias;
+
+ /* WAS (incorrectly):
+@@ -3800,7 +3824,7 @@ void ML_(read_callframe_info_dwarf3)
+
+ if (di->ddump_frames)
+ VG_(printf)("%08lx %08lx %08lx FDE cie=%08lx pc=%08lx..%08lx\n",
+- ((Addr)ciefde_start) - ((Addr)ehframe_image),
++ ((Addr)ciefde_start) - ((Addr)frame_image),
+ (Addr)ciefde_len,
+ (Addr)(UWord)cie_pointer,
+ (Addr)look_for,
+@@ -3827,16 +3851,43 @@ void ML_(read_callframe_info_dwarf3)
+ VG_(printf)("fde.ilen = %d\n", (Int)fde_ilen);
+ }
+
+- if (fde_ilen < 0 || fde_ilen > di->ehframe_size) {
++ if (fde_ilen < 0 || fde_ilen > frame_size) {
+ how = "implausible # fde insns";
+ goto bad;
+ }
+
+ data += fde_ilen;
+
++ if (ehframe_cfsis) {
++ Addr a_mid_lo, a_mid_hi;
++ Word mid, size,
++ lo = 0,
++ hi = ehframe_cfsis-1;
++ while (True) {
++ /* current unsearched space is from lo to hi, inclusive. */
++ if (lo > hi) break; /* not found */
++ mid = (lo + hi) / 2;
++ a_mid_lo = di->cfsi[mid].base;
++ size = di->cfsi[mid].len;
++ a_mid_hi = a_mid_lo + size - 1;
++ vg_assert(a_mid_hi >= a_mid_lo);
++ if (fde_initloc + fde_arange <= a_mid_lo) {
++ hi = mid-1; continue;
++ }
++ if (fde_initloc > a_mid_hi) { lo = mid+1; continue; }
++ break;
++ }
++
++ /* The range this .debug_frame FDE covers has been already
++ covered in .eh_frame section. Don't add it from .debug_frame
++ section again. */
++ if (lo <= hi)
++ continue;
++ }
++
+ adi.encoding = the_CIEs[cie].address_encoding;
+- adi.ehframe_image = ehframe_image;
+- adi.ehframe_avma = di->ehframe_avma;
++ adi.ehframe_image = frame_image;
++ adi.ehframe_avma = for_eh ? di->ehframe_avma : 0;
+ adi.text_bias = di->text_debug_bias;
+
+ if (di->trace_cfi)
+--- valgrind/coregrind/m_debuginfo/priv_readdwarf.h.jj 2009-08-19 15:37:44.000000000 +0200
++++ valgrind/coregrind/m_debuginfo/priv_readdwarf.h 2009-10-21 11:51:38.000000000 +0200
+@@ -62,7 +62,7 @@ void ML_(read_debuginfo_dwarf1) ( struct
+ -------------------- */
+ extern
+ void ML_(read_callframe_info_dwarf3)
+- ( /*OUT*/struct _DebugInfo* di, UChar* ehframe );
++ ( /*OUT*/struct _DebugInfo* di, UChar* frame, SizeT sz, Bool for_eh );
+
+
+ #endif /* ndef __PRIV_READDWARF_H */
+--- valgrind/coregrind/m_debuginfo/priv_d3basics.h.jj 2009-08-19 15:37:44.000000000 +0200
++++ valgrind/coregrind/m_debuginfo/priv_d3basics.h 2009-10-21 10:49:47.000000000 +0200
@@ -522,6 +522,9 @@ typedef enum
DW_OP_form_tls_address = 0x9b,
DW_OP_call_frame_cfa = 0x9c,
@@ -36,8 +285,87 @@
#endif /* ndef __PRIV_D3BASICS_H */
/*--------------------------------------------------------------------*/
---- valgrind/coregrind/m_debuginfo/d3basics.c.jj 2009-10-09 12:52:05.000000000 +0200
-+++ valgrind/coregrind/m_debuginfo/d3basics.c 2009-10-13 14:54:40.000000000 +0200
+--- valgrind/coregrind/m_debuginfo/readelf.c.jj 2009-10-21 10:49:47.000000000 +0200
++++ valgrind/coregrind/m_debuginfo/readelf.c 2009-10-21 11:52:12.000000000 +0200
+@@ -1688,6 +1688,7 @@ Bool ML_(read_elf_debug_info) ( struct _
+ UChar* debug_str_img = NULL; /* .debug_str (dwarf2) */
+ UChar* debug_ranges_img = NULL; /* .debug_ranges (dwarf2) */
+ UChar* debug_loc_img = NULL; /* .debug_loc (dwarf2) */
++ UChar* debug_frame_img = NULL; /* .debug_frame (dwarf2) */
+ UChar* dwarf1d_img = NULL; /* .debug (dwarf1) */
+ UChar* dwarf1l_img = NULL; /* .line (dwarf1) */
+ UChar* ehframe_img = NULL; /* .eh_frame (dwarf2) */
+@@ -1707,6 +1708,7 @@ Bool ML_(read_elf_debug_info) ( struct _
+ SizeT debug_str_sz = 0;
+ SizeT debug_ranges_sz = 0;
+ SizeT debug_loc_sz = 0;
++ SizeT debug_frame_sz = 0;
+ SizeT dwarf1d_sz = 0;
+ SizeT dwarf1l_sz = 0;
+ SizeT ehframe_sz = 0;
+@@ -1764,6 +1766,7 @@ Bool ML_(read_elf_debug_info) ( struct _
+ FIND(".debug_str", debug_str_sz, debug_str_img)
+ FIND(".debug_ranges", debug_ranges_sz, debug_ranges_img)
+ FIND(".debug_loc", debug_loc_sz, debug_loc_img)
++ FIND(".debug_frame", debug_frame_sz, debug_frame_img)
+
+ FIND(".debug", dwarf1d_sz, dwarf1d_img)
+ FIND(".line", dwarf1l_sz, dwarf1l_img)
+@@ -1956,6 +1959,8 @@ Bool ML_(read_elf_debug_info) ( struct _
+ FIND(need_dwarf2, ".debug_ranges", debug_ranges_sz,
+ debug_ranges_img)
+ FIND(need_dwarf2, ".debug_loc", debug_loc_sz, debug_loc_img)
++ FIND(need_dwarf2, ".debug_frame", debug_frame_sz,
++ debug_frame_img)
+ FIND(need_dwarf1, ".debug", dwarf1d_sz, dwarf1d_img)
+ FIND(need_dwarf1, ".line", dwarf1l_sz, dwarf1l_img)
+
+@@ -1996,7 +2001,11 @@ Bool ML_(read_elf_debug_info) ( struct _
+ /* Read .eh_frame (call-frame-info) if any */
+ if (ehframe_img) {
+ vg_assert(ehframe_sz == di->ehframe_size);
+- ML_(read_callframe_info_dwarf3)( di, ehframe_img );
++ ML_(read_callframe_info_dwarf3)( di, ehframe_img, ehframe_sz, True );
++ }
++ if (debug_frame_sz) {
++ ML_(read_callframe_info_dwarf3)( di, debug_frame_img,
++ debug_frame_sz, False );
+ }
+
+ /* Read the stabs and/or dwarf2 debug information, if any. It
+--- valgrind/coregrind/m_debuginfo/priv_storage.h.jj 2009-10-21 10:49:47.000000000 +0200
++++ valgrind/coregrind/m_debuginfo/priv_storage.h 2009-10-21 12:45:31.000000000 +0200
+@@ -649,6 +649,8 @@ extern void ML_(addVar)( struct _DebugIn
+ this after finishing adding entries to these tables. */
+ extern void ML_(canonicaliseTables) ( struct _DebugInfo* di );
+
++extern void ML_(canonicaliseCFI) ( struct _DebugInfo* di );
++
+ /* ------ Searching ------ */
+
+ /* Find a symbol-table index containing the specified pointer, or -1
+--- valgrind/coregrind/m_debuginfo/storage.c.jj 2009-08-19 15:37:44.000000000 +0200
++++ valgrind/coregrind/m_debuginfo/storage.c 2009-10-21 12:44:16.000000000 +0200
+@@ -1435,7 +1435,7 @@ static Int compare_DiCfSI ( void* va, vo
+ return 0;
+ }
+
+-static void canonicaliseCFI ( struct _DebugInfo* di )
++void ML_(canonicaliseCFI) ( struct _DebugInfo* di )
+ {
+ Word i, j;
+ const Addr minAvma = 0;
+@@ -1528,7 +1528,7 @@ void ML_(canonicaliseTables) ( struct _D
+ {
+ canonicaliseSymtab ( di );
+ canonicaliseLoctab ( di );
+- canonicaliseCFI ( di );
++ ML_(canonicaliseCFI) ( di );
+ canonicaliseVarInfo ( di );
+ }
+
+--- valgrind/coregrind/m_debuginfo/d3basics.c.jj 2009-08-19 15:37:44.000000000 +0200
++++ valgrind/coregrind/m_debuginfo/d3basics.c 2009-10-21 13:40:50.000000000 +0200
@@ -443,7 +443,7 @@ static Bool bias_address( Addr* a, const
@@ -99,7 +427,7 @@
FAIL("evaluate_Dwarf3_Expr: DW_OP_reg* "
"whilst evaluating for a value");
break;
-@@ -637,6 +652,297 @@ GXResult ML_(evaluate_Dwarf3_Expr) ( UCh
+@@ -637,6 +652,229 @@ GXResult ML_(evaluate_Dwarf3_Expr) ( UCh
"address not valid for client");
}
break;
@@ -213,12 +541,6 @@
+ sw1 = -sw1;
+ PUSH(sw1);
+ break;
-+ case DW_OP_and:
-+ POP(uw2);
-+ POP(uw1);
-+ uw1 &= uw2;
-+ PUSH(uw1);
-+ break;
+ case DW_OP_div:
+ POP(sw2);
+ if (sw2 == 0)
@@ -227,12 +549,6 @@
+ sw1 /= sw2;
+ PUSH(sw1);
+ break;
-+ case DW_OP_minus:
-+ POP(uw2);
-+ POP(uw1);
-+ uw1 -= uw2;
-+ PUSH(uw1);
-+ break;
+ case DW_OP_mod:
+ POP(sw2);
+ if (sw2 == 0)
@@ -241,94 +557,38 @@
+ sw1 %= sw2;
+ PUSH(sw1);
+ break;
-+ case DW_OP_mul:
-+ POP(uw2);
-+ POP(uw1);
-+ uw1 *= uw2;
-+ PUSH(uw1);
-+ break;
-+ case DW_OP_neg:
-+ POP(uw1);
-+ uw1 = -uw1;
-+ PUSH(uw1);
-+ break;
-+ case DW_OP_not:
-+ POP(uw1);
-+ uw1 = ~uw1;
-+ PUSH(uw1);
-+ break;
-+ case DW_OP_or:
-+ POP(uw2);
-+ POP(uw1);
-+ uw1 |= uw2;
-+ PUSH(uw1);
-+ break;
-+ case DW_OP_plus:
-+ POP(uw2);
-+ POP(uw1);
-+ uw1 += uw2;
-+ PUSH(uw1);
-+ break;
-+ case DW_OP_shl:
-+ POP(uw2);
-+ POP(uw1);
-+ uw1 <<= uw2;
-+ PUSH(uw1);
-+ break;
-+ case DW_OP_shr:
-+ POP(uw2);
-+ POP(uw1);
-+ uw1 >>= uw2;
-+ PUSH(uw1);
-+ break;
-+ case DW_OP_shra:
-+ POP(uw2);
-+ POP(sw1);
-+ sw1 >>= uw2;
-+ PUSH(sw1);
-+ break;
-+ case DW_OP_xor:
-+ POP(uw2);
-+ POP(uw1);
-+ uw1 ^= uw2;
-+ PUSH(uw1);
-+ break;
-+ case DW_OP_le:
-+ POP(sw2);
-+ POP(sw1);
-+ sw1 = sw1 <= sw2;
-+ PUSH(sw1);
-+ break;
-+ case DW_OP_lt:
-+ POP(sw2);
-+ POP(sw1);
-+ sw1 = sw1 < sw2;
-+ PUSH(sw1);
-+ break;
-+ case DW_OP_ge:
-+ POP(sw2);
-+ POP(sw1);
-+ sw1 = sw1 >= sw2;
-+ PUSH(sw1);
-+ break;
-+ case DW_OP_gt:
-+ POP(sw2);
-+ POP(sw1);
-+ sw1 = sw1 > sw2;
-+ PUSH(sw1);
-+ break;
-+ case DW_OP_ne:
-+ POP(sw2);
-+ POP(sw1);
-+ sw1 = sw1 != sw2;
-+ PUSH(sw1);
-+ break;
-+ case DW_OP_eq:
-+ POP(sw2);
-+ POP(sw1);
-+ sw1 = sw1 == sw2;
-+ PUSH(sw1);
-+ break;
++#define BINARY(name, op, s) \
++ case DW_OP_##name: \
++ POP(s##w2); \
++ POP(s##w1); \
++ s##w1 = s##w1 op s##w2; \
++ PUSH(s##w1); \
++ break
++#define UNARY(name, op, s) \
++ case DW_OP_##name: \
++ POP(s##w1); \
++ s##w1 = op s##w1; \
++ PUSH(s##w1); \
++ break
++ BINARY (and, &, u);
++ BINARY (minus, -, u);
++ BINARY (mul, *, u);
++ UNARY (neg, -, u);
++ UNARY (not, ~, u);
++ BINARY (or, |, u);
++ BINARY (plus, +, u);
++ BINARY (shl, <<, u);
++ BINARY (shr, >>, u);
++ BINARY (shra, >>, s);
++ BINARY (xor, ^, u);
++ BINARY (le, <=, s);
++ BINARY (lt, <, s);
++ BINARY (ge, >=, s);
++ BINARY (gt, >, s);
++ BINARY (ne, !=, u);
++ BINARY (eq, ==, u);
++#undef UNARY
++#undef BINARY
+ case DW_OP_skip:
+ sw1 = *(Short *)expr;
+ expr += 2;
@@ -397,7 +657,7 @@
default:
if (!VG_(clo_xml))
VG_(message)(Vg_DebugMsg,
-@@ -650,7 +956,7 @@ GXResult ML_(evaluate_Dwarf3_Expr) ( UCh
+@@ -650,7 +888,7 @@ GXResult ML_(evaluate_Dwarf3_Expr) ( UCh
vg_assert(sp >= 0 && sp < N_EXPR_STACK);
res.word = stack[sp];
@@ -406,7 +666,24 @@
return res;
# undef POP
-@@ -884,7 +1190,7 @@ GXResult ML_(evaluate_trivial_GX)( GExpr
+@@ -829,12 +1067,15 @@ GXResult ML_(evaluate_trivial_GX)( GExpr
+ if (!badness)
+ badness = "trivial GExpr denotes register (2)";
+ }
+- else {
++ else if (0) {
+ VG_(printf)(" ML_(evaluate_trivial_GX): unhandled:\n ");
+ ML_(pp_GX)( gx );
+ VG_(printf)("\n");
+ tl_assert(0);
+ }
++ else
++ if (!badness)
++ badness = "non-trivial GExpr";
+
+ VG_(addToXA)( results, &thisResult );
+
+@@ -884,7 +1125,7 @@ GXResult ML_(evaluate_trivial_GX)( GExpr
/* Well, we have success. All subexpressions evaluated, and
they all agree. Hurrah. */
@@ -415,7 +692,7 @@
res.word = (UWord)mul->ul; /* NB: narrowing from ULong */
VG_(deleteXA)( results );
return res;
-@@ -896,6 +1202,8 @@ void ML_(pp_GXResult) ( GXResult res )
+@@ -896,6 +1137,8 @@ void ML_(pp_GXResult) ( GXResult res )
switch (res.kind) {
case GXR_Failure:
VG_(printf)("GXR_Failure(%s)", (HChar*)res.word); break;
@@ -424,8 +701,8 @@
case GXR_Value:
VG_(printf)("GXR_Value(0x%lx)", res.word); break;
case GXR_RegNo:
---- valgrind/coregrind/m_debuginfo/debuginfo.c.jj 2009-10-09 12:52:05.000000000 +0200
-+++ valgrind/coregrind/m_debuginfo/debuginfo.c 2009-10-13 14:55:45.000000000 +0200
+--- valgrind/coregrind/m_debuginfo/debuginfo.c.jj 2009-10-21 10:49:47.000000000 +0200
++++ valgrind/coregrind/m_debuginfo/debuginfo.c 2009-10-21 10:49:47.000000000 +0200
@@ -2003,6 +2003,62 @@ static void cfsi_cache__invalidate ( voi
}
@@ -534,8 +811,8 @@
if (0) VG_(printf)("FAIL\n");
continue;
}
---- valgrind/coregrind/m_debuginfo/tytypes.c.jj 2009-10-09 12:52:05.000000000 +0200
-+++ valgrind/coregrind/m_debuginfo/tytypes.c 2009-10-13 13:52:57.000000000 +0200
+--- valgrind/coregrind/m_debuginfo/tytypes.c.jj 2009-08-19 15:37:44.000000000 +0200
++++ valgrind/coregrind/m_debuginfo/tytypes.c 2009-10-21 10:49:47.000000000 +0200
@@ -766,7 +766,7 @@ XArray* /*UChar*/ ML_(describe_type)( /*
ML_(pp_GXResult)(res);
VG_(printf)("\n");
Index: valgrind.spec
===================================================================
RCS file: /cvs/pkgs/rpms/valgrind/F-12/valgrind.spec,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -p -r1.69 -r1.70
--- valgrind.spec 14 Oct 2009 15:03:39 -0000 1.69
+++ valgrind.spec 21 Oct 2009 14:54:08 -0000 1.70
@@ -1,7 +1,7 @@
Summary: Tool for finding memory management bugs in programs
Name: valgrind
Version: 3.5.0
-Release: 3
+Release: 4
Epoch: 1
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
Patch1: valgrind-3.5.0-cachegrind-improvements.patch
@@ -12,6 +12,8 @@ Patch5: valgrind-3.5.0-inotify-init1.pat
Patch6: valgrind-3.5.0-mmap-mprotect.patch
Patch7: valgrind-3.5.0-dwarf3.patch
Patch8: valgrind-3.5.0-pr40659.patch
+Patch9: valgrind-3.5.0-helgrind-race-supp.patch
+Patch10: valgrind-3.5.0-ppc-tests.patch
License: GPLv2
URL: http://www.valgrind.org/
Group: Development/Debuggers
@@ -73,13 +75,15 @@ or valgrind plugins.
%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
+%patch10 -p1
%build
%ifarch x86_64 ppc64
# Ugly hack - libgcc 32-bit package might not be installed
mkdir -p libgcc/32
-touch libgcc/32/libgcc_s.a
-touch libgcc/libgcc_s_32.a
+ar r libgcc/32/libgcc_s.a
+ar r libgcc/libgcc_s_32.a
%configure CC="gcc -B `pwd`/libgcc/" GDB=%{_bindir}/gdb
%else
%configure GDB=%{_bindir}/gdb
@@ -158,6 +162,12 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/*
%changelog
+* Wed Oct 21 2009 Jakub Jelinek <jakub at redhat.com> 3.5.0-4
+- handle reading of .debug_frame in addition to .eh_frame
+- ignore unknown DWARF3 expressions in evaluate_trivial_GX
+- suppress helgrind race errors in helgrind's own mythread_wrapper
+- fix compilation of x86 tests on x86_64 and ppc tests
+
* Wed Oct 14 2009 Jakub Jelinek <jakub at redhat.com> 3.5.0-3
- handle many more DW_OP_* ops that GCC now uses
- handle the more compact form of DW_AT_data_member_location
More information about the fedora-extras-commits
mailing list