Update to 3.8.0-TEST1
This commit is contained in:
parent
7a98f80d9b
commit
f4ddfbdeaa
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/valgrind-3.7.0.tar.bz2
|
||||
/valgrind-3.8.0-TEST1.tar.bz2
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
a855fda56edf05614f099dca316d1775 valgrind-3.7.0.tar.bz2
|
||||
7f757e3e8fc47c5ea2766385bfacdf7e valgrind-3.8.0-TEST1.tar.bz2
|
||||
|
@ -1,22 +0,0 @@
|
||||
--- valgrind-3.7.0/coregrind/m_debuginfo/readdwarf3.c (revision 12418)
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/readdwarf3.c (revision 12419)
|
||||
@@ -3644,9 +3644,6 @@ void new_dwarf3_reader_wrk (
|
||||
cu_amount_used = cu_offset_now - cc.cu_start_offset;
|
||||
}
|
||||
|
||||
- if (cu_offset_now == debug_info_sz)
|
||||
- break;
|
||||
-
|
||||
/* Preen to level -2. DIEs have level >= 0 so -2 cannot occur
|
||||
anywhere else at all. Our fake the-entire-address-space
|
||||
range is at level -1, so preening to -2 should completely
|
||||
@@ -3655,6 +3652,9 @@ void new_dwarf3_reader_wrk (
|
||||
varstack_preen( &varparser, td3, -2 );
|
||||
/* Similarly, empty the type stack out. */
|
||||
typestack_preen( &typarser, td3, -2 );
|
||||
+
|
||||
+ if (cu_offset_now == debug_info_sz)
|
||||
+ break;
|
||||
/* else keep going */
|
||||
|
||||
TRACE_D3("set_abbv_Cursor cache: %lu queries, %lu misses\n",
|
File diff suppressed because it is too large
Load Diff
@ -1,909 +0,0 @@
|
||||
diff -ru valgrind-3.7.0.orig/config.h valgrind-3.7.0/config.h
|
||||
--- valgrind-3.7.0.orig/config.h 2012-07-25 12:33:29.212949007 +0200
|
||||
+++ valgrind-3.7.0/config.h 2012-07-25 12:44:42.847307554 +0200
|
||||
@@ -29,7 +29,7 @@
|
||||
/* #undef GLIBC_2_10 */
|
||||
|
||||
/* Define to 1 if you're using glibc 2.11.x */
|
||||
-#define GLIBC_2_11 1
|
||||
+/* #undef GLIBC_2_11 */
|
||||
|
||||
/* Define to 1 if you're using glibc 2.12.x */
|
||||
/* #undef GLIBC_2_12 */
|
||||
@@ -38,7 +38,10 @@
|
||||
/* #undef GLIBC_2_13 */
|
||||
|
||||
/* Define to 1 if you're using glibc 2.14.x */
|
||||
-/* #undef GLIBC_2_14 */
|
||||
+#define GLIBC_2_14 1
|
||||
+
|
||||
+/* Define to 1 if you're using glibc 2.15.x */
|
||||
+/* #undef GLIBC_2_15 */
|
||||
|
||||
/* Define to 1 if you're using glibc 2.2.x */
|
||||
/* #undef GLIBC_2_2 */
|
||||
diff -ru valgrind-3.7.0.orig/coregrind/m_debuginfo/d3basics.c valgrind-3.7.0/coregrind/m_debuginfo/d3basics.c
|
||||
--- valgrind-3.7.0.orig/coregrind/m_debuginfo/d3basics.c 2012-07-25 12:33:29.191948686 +0200
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/d3basics.c 2012-07-25 12:44:30.217112438 +0200
|
||||
@@ -180,6 +180,8 @@
|
||||
case DW_FORM_exprloc: return "DW_FORM_exprloc";
|
||||
case DW_FORM_flag_present:return "DW_FORM_flag_present";
|
||||
case DW_FORM_ref_sig8: return "DW_FORM_ref_sig8";
|
||||
+ case DW_FORM_GNU_ref_alt:return "DW_FORM_GNU_ref_alt";
|
||||
+ case DW_FORM_GNU_strp_alt:return "DW_FORM_GNU_strp_alt";
|
||||
default: return "DW_FORM_???";
|
||||
}
|
||||
}
|
||||
diff -ru valgrind-3.7.0.orig/coregrind/m_debuginfo/debuginfo.c valgrind-3.7.0/coregrind/m_debuginfo/debuginfo.c
|
||||
--- valgrind-3.7.0.orig/coregrind/m_debuginfo/debuginfo.c 2012-07-25 12:33:29.191948686 +0200
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/debuginfo.c 2012-07-25 12:44:30.219112468 +0200
|
||||
@@ -859,7 +859,7 @@
|
||||
|
||||
/* We're only interested in mappings of object files. */
|
||||
# if defined(VGO_linux)
|
||||
- if (!ML_(is_elf_object_file)( buf1k, (SizeT)sr_Res(preadres) ))
|
||||
+ if (!ML_(is_elf_object_file)( buf1k, (SizeT)sr_Res(preadres), False ))
|
||||
return 0;
|
||||
# elif defined(VGO_darwin)
|
||||
if (!ML_(is_macho_object_file)( buf1k, (SizeT)sr_Res(preadres) ))
|
||||
diff -ru valgrind-3.7.0.orig/coregrind/m_debuginfo/priv_d3basics.h valgrind-3.7.0/coregrind/m_debuginfo/priv_d3basics.h
|
||||
--- valgrind-3.7.0.orig/coregrind/m_debuginfo/priv_d3basics.h 2012-07-25 12:33:29.192948701 +0200
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/priv_d3basics.h 2012-07-25 12:44:30.235112717 +0200
|
||||
@@ -199,7 +199,11 @@
|
||||
DW_FORM_sec_offset = 0x17,
|
||||
DW_FORM_exprloc = 0x18,
|
||||
DW_FORM_flag_present = 0x19,
|
||||
- DW_FORM_ref_sig8 = 0x20
|
||||
+ DW_FORM_ref_sig8 = 0x20,
|
||||
+ /* Extensions for DWZ multifile.
|
||||
+ See http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open . */
|
||||
+ DW_FORM_GNU_ref_alt = 0x1f20,
|
||||
+ DW_FORM_GNU_strp_alt = 0x1f21
|
||||
}
|
||||
DW_FORM;
|
||||
|
||||
diff -ru valgrind-3.7.0.orig/coregrind/m_debuginfo/priv_readdwarf3.h valgrind-3.7.0/coregrind/m_debuginfo/priv_readdwarf3.h
|
||||
--- valgrind-3.7.0.orig/coregrind/m_debuginfo/priv_readdwarf3.h 2012-07-25 12:33:29.192948701 +0200
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/priv_readdwarf3.h 2012-07-25 12:44:30.237112747 +0200
|
||||
@@ -48,7 +48,11 @@
|
||||
UChar* debug_line_img, SizeT debug_line_sz,
|
||||
UChar* debug_str_img, SizeT debug_str_sz,
|
||||
UChar* debug_ranges_img, SizeT debug_ranges_sz,
|
||||
- UChar* debug_loc_img, SizeT debug_loc_sz
|
||||
+ UChar* debug_loc_img, SizeT debug_loc_sz,
|
||||
+ UChar* debug_info_alt_img, SizeT debug_info_alt_sz,
|
||||
+ UChar* debug_abbv_alt_img, SizeT debug_abbv_alt_sz,
|
||||
+ UChar* debug_line_alt_img, SizeT debug_line_alt_sz,
|
||||
+ UChar* debug_str_alt_img, SizeT debug_str_alt_sz
|
||||
);
|
||||
|
||||
#endif /* ndef __PRIV_READDWARF3_H */
|
||||
diff -ru valgrind-3.7.0.orig/coregrind/m_debuginfo/priv_readdwarf.h valgrind-3.7.0/coregrind/m_debuginfo/priv_readdwarf.h
|
||||
--- valgrind-3.7.0.orig/coregrind/m_debuginfo/priv_readdwarf.h 2012-07-25 12:33:29.192948701 +0200
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/priv_readdwarf.h 2012-07-25 12:44:30.238112762 +0200
|
||||
@@ -48,7 +48,8 @@
|
||||
UChar* debug_types_img, Word debug_types_sz, /* .debug_types */
|
||||
UChar* debug_abbv_img, Word debug_abbv_sz, /* .debug_abbrev */
|
||||
UChar* debug_line_img, Word debug_line_sz, /* .debug_line */
|
||||
- UChar* debug_str_img, Word debug_str_sz ); /* .debug_str */
|
||||
+ UChar* debug_str_img, Word debug_str_sz, /* .debug_str */
|
||||
+ UChar* debug_str_alt_img, Word debug_str_alt_sz ); /* .debug_str */
|
||||
|
||||
/* --------------------
|
||||
DWARF1 reader
|
||||
diff -ru valgrind-3.7.0.orig/coregrind/m_debuginfo/priv_readelf.h valgrind-3.7.0/coregrind/m_debuginfo/priv_readelf.h
|
||||
--- valgrind-3.7.0.orig/coregrind/m_debuginfo/priv_readelf.h 2012-07-25 12:33:29.192948701 +0200
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/priv_readelf.h 2012-07-25 12:44:30.239112777 +0200
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/* Identify an ELF object file by peering at the first few bytes of
|
||||
it. */
|
||||
-extern Bool ML_(is_elf_object_file)( void* image, SizeT n_image );
|
||||
+extern Bool ML_(is_elf_object_file)( void* image, SizeT n_image, Bool rel_ok );
|
||||
|
||||
/* The central function for reading ELF debug info. For the
|
||||
object/exe specified by the SegInfo, find ELF sections, then read
|
||||
diff -ru valgrind-3.7.0.orig/coregrind/m_debuginfo/readdwarf3.c valgrind-3.7.0/coregrind/m_debuginfo/readdwarf3.c
|
||||
--- valgrind-3.7.0.orig/coregrind/m_debuginfo/readdwarf3.c 2012-07-25 12:33:29.192948701 +0200
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/readdwarf3.c 2012-07-25 12:44:30.240112792 +0200
|
||||
@@ -420,6 +420,16 @@
|
||||
/* Where is .debug_types? */
|
||||
UChar* debug_types_img;
|
||||
UWord debug_types_sz;
|
||||
+ /* Where is alternate .debug_info? */
|
||||
+ UChar* debug_info_alt_img;
|
||||
+ UWord debug_info_alt_sz;
|
||||
+ /* Where is alternate .debug_str ? */
|
||||
+ UChar* debug_str_alt_img;
|
||||
+ UWord debug_str_alt_sz;
|
||||
+ /* How much to add to .debug_types resp. alternate .debug_info offsets
|
||||
+ in cook_die*. */
|
||||
+ UWord types_cuOff_bias;
|
||||
+ UWord alt_cuOff_bias;
|
||||
/* --- Needed so we can add stuff to the string table. --- */
|
||||
struct _DebugInfo* di;
|
||||
/* --- a cache for set_abbv_Cursor --- */
|
||||
@@ -440,40 +450,58 @@
|
||||
/* Signatured type hash; computed once and then shared by all
|
||||
CUs. */
|
||||
VgHashTable signature_types;
|
||||
+
|
||||
+ /* True if this came from alternate .debug_info; otherwise
|
||||
+ it came from normal .debug_info or .debug_types. */
|
||||
+ Bool is_alt_info;
|
||||
}
|
||||
CUConst;
|
||||
|
||||
|
||||
/* Return the cooked value of DIE depending on whether CC represents a
|
||||
- .debug_types unit. To cook a DIE, we pretend that the .debug_info
|
||||
- and .debug_types sections form a contiguous whole, so that DIEs
|
||||
- coming from .debug_types are numbered starting at the end of
|
||||
- .debug_info. */
|
||||
+ .debug_types unit. To cook a DIE, we pretend that the .debug_info,
|
||||
+ .debug_types and optional alternate .debug_info sections form
|
||||
+ a contiguous whole, so that DIEs coming from .debug_types are numbered
|
||||
+ starting at the end of .debug_info and DIEs coming from alternate
|
||||
+ .debug_info are numbered starting at the end of .debug_types. */
|
||||
static UWord cook_die( CUConst* cc, UWord die )
|
||||
{
|
||||
if (cc->is_type_unit)
|
||||
- die += cc->debug_info_sz;
|
||||
+ die += cc->types_cuOff_bias;
|
||||
+ else if (cc->is_alt_info)
|
||||
+ die += cc->alt_cuOff_bias;
|
||||
return die;
|
||||
}
|
||||
|
||||
/* Like cook_die, but understand that DIEs coming from a
|
||||
- DW_FORM_ref_sig8 reference are already cooked. */
|
||||
+ DW_FORM_ref_sig8 reference are already cooked. Also, handle
|
||||
+ DW_FORM_GNU_ref_alt from within primary .debug_info or .debug_types
|
||||
+ as reference to alternate .debug_info. */
|
||||
static UWord cook_die_using_form( CUConst *cc, UWord die, DW_FORM form)
|
||||
{
|
||||
if (form == DW_FORM_ref_sig8)
|
||||
return die;
|
||||
+ if (form == DW_FORM_GNU_ref_alt)
|
||||
+ return die + cc->alt_cuOff_bias;
|
||||
return cook_die( cc, die );
|
||||
}
|
||||
|
||||
-/* Return the uncooked offset of DIE and set *FLAG to true if the DIE
|
||||
- came from the .debug_types section. */
|
||||
-static UWord uncook_die( CUConst *cc, UWord die, /*OUT*/Bool *flag )
|
||||
+/* Return the uncooked offset of DIE and set *TYPE_FLAG to true if the DIE
|
||||
+ came from the .debug_types section and *ALT_FLAG to true if the DIE
|
||||
+ came from alternate .debug_info section. */
|
||||
+static UWord uncook_die( CUConst *cc, UWord die, /*OUT*/Bool *type_flag,
|
||||
+ Bool *alt_flag )
|
||||
{
|
||||
+ *alt_flag = False;
|
||||
+ *type_flag = False;
|
||||
if (die >= cc->debug_info_sz) {
|
||||
- *flag = True;
|
||||
- die -= cc->debug_info_sz;
|
||||
- } else {
|
||||
- *flag = False;
|
||||
+ if (die >= cc->debug_info_sz + cc->debug_types_sz) {
|
||||
+ *alt_flag = True;
|
||||
+ die -= cc->debug_info_sz + cc->debug_types_sz;
|
||||
+ } else {
|
||||
+ *type_flag = True;
|
||||
+ die -= cc->debug_info_sz;
|
||||
+ }
|
||||
}
|
||||
return die;
|
||||
}
|
||||
@@ -831,7 +859,8 @@
|
||||
Bool td3,
|
||||
Cursor* c,
|
||||
UChar* debug_abbv_img, UWord debug_abbv_sz,
|
||||
- Bool type_unit )
|
||||
+ Bool type_unit,
|
||||
+ Bool alt_info )
|
||||
{
|
||||
UChar address_size;
|
||||
UWord debug_abbrev_offset;
|
||||
@@ -870,6 +899,7 @@
|
||||
TRACE_D3(" Pointer Size: %d\n", (Int)address_size );
|
||||
|
||||
cc->is_type_unit = type_unit;
|
||||
+ cc->is_alt_info = alt_info;
|
||||
|
||||
if (type_unit) {
|
||||
cc->type_signature = get_ULong( c );
|
||||
@@ -1289,6 +1319,37 @@
|
||||
(DW_FORM)get_ULEB128(c));
|
||||
return;
|
||||
|
||||
+ case DW_FORM_GNU_ref_alt:
|
||||
+ *cts = get_Dwarfish_UWord(c, cc->is_dw64);
|
||||
+ *ctsSzB = cc->is_dw64 ? sizeof(ULong) : sizeof(UInt);
|
||||
+ TRACE_D3("0x%lx", (UWord)*cts);
|
||||
+ if (0) VG_(printf)("DW_FORM_GNU_ref_alt 0x%lx\n", (UWord)*cts);
|
||||
+ if (/* the following 2 are surely impossible, but ... */
|
||||
+ cc->debug_info_alt_img == NULL || cc->debug_info_alt_sz == 0
|
||||
+ || *cts >= (ULong)cc->debug_info_alt_sz) {
|
||||
+ /* Hmm. Offset is nonsensical for this object's .debug_info
|
||||
+ section. Be safe and reject it. */
|
||||
+ cc->barf("get_Form_contents: DW_FORM_ref_addr points "
|
||||
+ "outside alternate .debug_info");
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case DW_FORM_GNU_strp_alt: {
|
||||
+ /* this is an offset into alternate .debug_str */
|
||||
+ UChar* str;
|
||||
+ UWord uw = (UWord)get_Dwarfish_UWord( c, cc->is_dw64 );
|
||||
+ if (cc->debug_str_alt_img == NULL || uw >= cc->debug_str_alt_sz)
|
||||
+ cc->barf("get_Form_contents: DW_FORM_GNU_strp_alt "
|
||||
+ "points outside alternate .debug_str");
|
||||
+ /* FIXME: check the entire string lies inside debug_str,
|
||||
+ not just the first byte of it. */
|
||||
+ str = (UChar*)cc->debug_str_alt_img + uw;
|
||||
+ TRACE_D3("(indirect alt string, offset: 0x%lx): %s", uw, str);
|
||||
+ *cts = (ULong)(UWord)str;
|
||||
+ *ctsMemSzB = 1 + (ULong)VG_(strlen)(str);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
default:
|
||||
VG_(printf)(
|
||||
"get_Form_contents: unhandled %d (%s) at <%lx>\n",
|
||||
@@ -1579,10 +1640,13 @@
|
||||
UWord saved_die_c_offset = get_position_of_Cursor( c_die );
|
||||
UWord saved_abbv_c_offset = get_position_of_Cursor( c_abbv );
|
||||
Bool debug_types_flag;
|
||||
+ Bool alt_flag;
|
||||
|
||||
varstack_preen( parser, td3, level-1 );
|
||||
|
||||
- if (dtag == DW_TAG_compile_unit || dtag == DW_TAG_type_unit) {
|
||||
+ if (dtag == DW_TAG_compile_unit
|
||||
+ || dtag == DW_TAG_type_unit
|
||||
+ || dtag == DW_TAG_partial_unit) {
|
||||
Bool have_lo = False;
|
||||
Bool have_hi1 = False;
|
||||
Bool have_range = False;
|
||||
@@ -2028,11 +2092,14 @@
|
||||
set_position_of_Cursor( c_die, saved_die_c_offset );
|
||||
set_position_of_Cursor( c_abbv, saved_abbv_c_offset );
|
||||
VG_(printf)("\nparse_var_DIE: confused by:\n");
|
||||
- posn = uncook_die( cc, posn, &debug_types_flag );
|
||||
+ posn = uncook_die( cc, posn, &debug_types_flag, &alt_flag );
|
||||
VG_(printf)(" <%d><%lx>: %s", level, posn, ML_(pp_DW_TAG)( dtag ) );
|
||||
if (debug_types_flag) {
|
||||
VG_(printf)(" (in .debug_types)");
|
||||
}
|
||||
+ else if (alt_flag) {
|
||||
+ VG_(printf)(" (in alternate .debug_info)");
|
||||
+ }
|
||||
VG_(printf)("\n");
|
||||
while (True) {
|
||||
DW_AT attr = (DW_AT) get_ULEB128( c_abbv );
|
||||
@@ -2214,6 +2281,7 @@
|
||||
TyEnt fieldE;
|
||||
TyEnt boundE;
|
||||
Bool debug_types_flag;
|
||||
+ Bool alt_flag;
|
||||
|
||||
UWord saved_die_c_offset = get_position_of_Cursor( c_die );
|
||||
UWord saved_abbv_c_offset = get_position_of_Cursor( c_abbv );
|
||||
@@ -2228,7 +2296,9 @@
|
||||
its children. */
|
||||
typestack_preen( parser, td3, level-1 );
|
||||
|
||||
- if (dtag == DW_TAG_compile_unit || dtag == DW_TAG_type_unit) {
|
||||
+ if (dtag == DW_TAG_compile_unit
|
||||
+ || dtag == DW_TAG_type_unit
|
||||
+ || dtag == DW_TAG_partial_unit) {
|
||||
/* See if we can find DW_AT_language, since it is important for
|
||||
establishing array bounds (see DW_TAG_subrange_type below in
|
||||
this fn) */
|
||||
@@ -2947,10 +3017,12 @@
|
||||
set_position_of_Cursor( c_die, saved_die_c_offset );
|
||||
set_position_of_Cursor( c_abbv, saved_abbv_c_offset );
|
||||
VG_(printf)("\nparse_type_DIE: confused by:\n");
|
||||
- posn = uncook_die( cc, posn, &debug_types_flag );
|
||||
+ posn = uncook_die( cc, posn, &debug_types_flag, &alt_flag );
|
||||
VG_(printf)(" <%d><%lx>: %s", level, posn, ML_(pp_DW_TAG)( dtag ) );
|
||||
if (debug_types_flag) {
|
||||
VG_(printf)(" (in .debug_types)");
|
||||
+ } else if (alt_flag) {
|
||||
+ VG_(printf)(" (in alternate .debug_info)");
|
||||
}
|
||||
VG_(printf)("\n");
|
||||
while (True) {
|
||||
@@ -3428,7 +3500,11 @@
|
||||
UChar* debug_line_img, SizeT debug_line_sz,
|
||||
UChar* debug_str_img, SizeT debug_str_sz,
|
||||
UChar* debug_ranges_img, SizeT debug_ranges_sz,
|
||||
- UChar* debug_loc_img, SizeT debug_loc_sz
|
||||
+ UChar* debug_loc_img, SizeT debug_loc_sz,
|
||||
+ UChar* debug_info_alt_img, SizeT debug_info_alt_sz,
|
||||
+ UChar* debug_abbv_alt_img, SizeT debug_abbv_alt_sz,
|
||||
+ UChar* debug_line_alt_img, SizeT debug_line_alt_sz,
|
||||
+ UChar* debug_str_alt_img, SizeT debug_str_alt_sz
|
||||
)
|
||||
{
|
||||
XArray* /* of TyEnt */ tyents;
|
||||
@@ -3668,10 +3744,10 @@
|
||||
(saC_cache) */
|
||||
parse_CU_Header( &cc, td3, &info,
|
||||
(UChar*)debug_abbv_img, debug_abbv_sz,
|
||||
- True );
|
||||
+ True, False );
|
||||
|
||||
/* Needed by cook_die. */
|
||||
- cc.debug_info_sz = debug_info_sz;
|
||||
+ cc.types_cuOff_bias = debug_info_sz;
|
||||
|
||||
record_signatured_type( signature_types, cc.type_signature,
|
||||
cook_die( &cc, cc.type_offset ));
|
||||
@@ -3689,15 +3765,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
- /* Perform two DIE-reading passes. The first pass reads DIEs from
|
||||
- .debug_info, and the second pass reads DIEs from .debug_types.
|
||||
+ /* Perform three DIE-reading passes. The first pass reads DIEs from
|
||||
+ alternate .debug_info (if any), the second pass reads DIEs from
|
||||
+ .debug_info, and the third pass reads DIEs from .debug_types.
|
||||
Moving the body of this loop into a separate function would
|
||||
require a large number of arguments to be passed in, so it is
|
||||
kept inline instead. */
|
||||
- for (pass = 0; pass < 2; ++pass) {
|
||||
+ for (pass = 0; pass < 3; ++pass) {
|
||||
UWord section_size;
|
||||
|
||||
if (pass == 0) {
|
||||
+ if (debug_info_alt_img == NULL)
|
||||
+ continue;
|
||||
+ /* Now loop over the Compilation Units listed in the alternate
|
||||
+ .debug_info section (see D3SPEC sec 7.5) paras 1 and 2.
|
||||
+ Each compilation unit contains a Compilation Unit Header
|
||||
+ followed by precisely one DW_TAG_compile_unit or
|
||||
+ DW_TAG_partial_unit DIE. */
|
||||
+ init_Cursor( &info, debug_info_alt_img, debug_info_alt_sz, 0, barf,
|
||||
+ "Overrun whilst reading alternate .debug_info section" );
|
||||
+ section_size = debug_info_alt_sz;
|
||||
+
|
||||
+ TRACE_D3("\n------ Parsing alternate .debug_info section ------\n");
|
||||
+ } else if (pass == 1) {
|
||||
/* Now loop over the Compilation Units listed in the .debug_info
|
||||
section (see D3SPEC sec 7.5) paras 1 and 2. Each compilation
|
||||
unit contains a Compilation Unit Header followed by precisely
|
||||
@@ -3769,21 +3859,32 @@
|
||||
TRACE_D3(" Compilation Unit @ offset 0x%lx:\n", cu_start_offset);
|
||||
/* parse_CU_header initialises the CU's set_abbv_Cursor cache
|
||||
(saC_cache) */
|
||||
- parse_CU_Header( &cc, td3, &info,
|
||||
- (UChar*)debug_abbv_img, debug_abbv_sz,
|
||||
- pass != 0 );
|
||||
- cc.debug_str_img = debug_str_img;
|
||||
- cc.debug_str_sz = debug_str_sz;
|
||||
+ if (pass == 0)
|
||||
+ parse_CU_Header( &cc, td3, &info,
|
||||
+ (UChar*)debug_abbv_alt_img, debug_abbv_alt_sz,
|
||||
+ False, True );
|
||||
+ else
|
||||
+ parse_CU_Header( &cc, td3, &info,
|
||||
+ (UChar*)debug_abbv_img, debug_abbv_sz,
|
||||
+ pass == 2, False );
|
||||
+ cc.debug_str_img = pass == 0 ? debug_str_alt_img : debug_str_img;
|
||||
+ cc.debug_str_sz = pass == 0 ? debug_str_alt_sz : debug_str_sz;
|
||||
cc.debug_ranges_img = debug_ranges_img;
|
||||
cc.debug_ranges_sz = debug_ranges_sz;
|
||||
cc.debug_loc_img = debug_loc_img;
|
||||
cc.debug_loc_sz = debug_loc_sz;
|
||||
- cc.debug_line_img = debug_line_img;
|
||||
- cc.debug_line_sz = debug_line_sz;
|
||||
- cc.debug_info_img = debug_info_img;
|
||||
- cc.debug_info_sz = debug_info_sz;
|
||||
+ cc.debug_line_img = pass == 0 ? debug_line_alt_img : debug_line_img;
|
||||
+ cc.debug_line_sz = pass == 0 ? debug_line_alt_sz : debug_line_sz;
|
||||
+ cc.debug_info_img = pass == 0 ? debug_info_alt_img : debug_info_img;
|
||||
+ cc.debug_info_sz = pass == 0 ? debug_info_alt_sz : debug_info_sz;
|
||||
cc.debug_types_img = debug_types_img;
|
||||
cc.debug_types_sz = debug_types_sz;
|
||||
+ cc.debug_info_alt_img = debug_info_alt_img;
|
||||
+ cc.debug_info_alt_sz = debug_info_alt_sz;
|
||||
+ cc.debug_str_alt_img = debug_str_alt_img;
|
||||
+ cc.debug_str_alt_sz = debug_str_alt_sz;
|
||||
+ cc.types_cuOff_bias = debug_info_sz;
|
||||
+ cc.alt_cuOff_bias = debug_info_sz + debug_types_sz;
|
||||
cc.cu_start_offset = cu_start_offset;
|
||||
cc.di = di;
|
||||
/* The CU's svma can be deduced by looking at the AT_low_pc
|
||||
@@ -3966,10 +4067,19 @@
|
||||
vg_assert(dioff_lookup_tab);
|
||||
|
||||
n = VG_(sizeXA)( tempvars );
|
||||
+ Word first_primary_var;
|
||||
+ for (first_primary_var = 0;
|
||||
+ debug_info_alt_sz && first_primary_var < n;
|
||||
+ first_primary_var++) {
|
||||
+ varp = *(TempVar**)VG_(indexXA)( tempvars, first_primary_var );
|
||||
+ if (varp->dioff < debug_info_sz + debug_types_sz)
|
||||
+ break;
|
||||
+ }
|
||||
for (i = 0; i < n; i++) {
|
||||
- varp = *(TempVar**)VG_(indexXA)( tempvars, i );
|
||||
- if (i > 0) {
|
||||
- varp2 = *(TempVar**)VG_(indexXA)( tempvars, i-1 );
|
||||
+ varp = *(TempVar**)VG_(indexXA)( tempvars, (i + first_primary_var) % n );
|
||||
+ if (i > first_primary_var) {
|
||||
+ varp2 = *(TempVar**)VG_(indexXA)( tempvars,
|
||||
+ (i + first_primary_var - 1) % n );
|
||||
/* why should this hold? Only, I think, because we've
|
||||
constructed the array by reading .debug_info sequentially,
|
||||
and so the array .dioff fields should reflect that, and be
|
||||
@@ -4223,7 +4333,11 @@
|
||||
UChar* debug_line_img, SizeT debug_line_sz,
|
||||
UChar* debug_str_img, SizeT debug_str_sz,
|
||||
UChar* debug_ranges_img, SizeT debug_ranges_sz,
|
||||
- UChar* debug_loc_img, SizeT debug_loc_sz
|
||||
+ UChar* debug_loc_img, SizeT debug_loc_sz,
|
||||
+ UChar* debug_info_alt_img, SizeT debug_info_alt_sz,
|
||||
+ UChar* debug_abbv_alt_img, SizeT debug_abbv_alt_sz,
|
||||
+ UChar* debug_line_alt_img, SizeT debug_line_alt_sz,
|
||||
+ UChar* debug_str_alt_img, SizeT debug_str_alt_sz
|
||||
)
|
||||
{
|
||||
volatile Int jumped;
|
||||
@@ -4247,7 +4361,11 @@
|
||||
debug_line_img, debug_line_sz,
|
||||
debug_str_img, debug_str_sz,
|
||||
debug_ranges_img, debug_ranges_sz,
|
||||
- debug_loc_img, debug_loc_sz );
|
||||
+ debug_loc_img, debug_loc_sz,
|
||||
+ debug_info_alt_img, debug_info_alt_sz,
|
||||
+ debug_abbv_alt_img, debug_abbv_alt_sz,
|
||||
+ debug_line_alt_img, debug_line_alt_sz,
|
||||
+ debug_str_alt_img, debug_str_alt_sz);
|
||||
d3rd_jmpbuf_valid = False;
|
||||
TRACE_D3("\n------ .debug_info reading was successful ------\n");
|
||||
} else {
|
||||
diff -ru valgrind-3.7.0.orig/coregrind/m_debuginfo/readdwarf.c valgrind-3.7.0/coregrind/m_debuginfo/readdwarf.c
|
||||
--- valgrind-3.7.0.orig/coregrind/m_debuginfo/readdwarf.c 2012-07-25 12:33:29.191948686 +0200
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/readdwarf.c 2012-07-25 12:44:30.257113055 +0200
|
||||
@@ -985,7 +985,8 @@
|
||||
void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui,
|
||||
UChar* unitblock_img,
|
||||
UChar* debugabbrev_img,
|
||||
- UChar* debugstr_img )
|
||||
+ UChar* debugstr_img,
|
||||
+ UChar* debugstr_alt_img )
|
||||
{
|
||||
UInt acode, abcode;
|
||||
ULong atoffs, blklen;
|
||||
@@ -1128,6 +1129,14 @@
|
||||
case 0x18: /* FORM_exprloc */ p += read_leb128U( &p ); break;
|
||||
case 0x19: /* FORM_flag_present */break;
|
||||
case 0x20: /* FORM_ref_sig8 */ p += 8; break;
|
||||
+ case 0x1f20: /* FORM_GNU_ref_alt */ p += ui->dw64 ? 8 : 4; break;
|
||||
+ case 0x1f21: /* FORM_GNU_strp_alt */
|
||||
+ if (debugstr_alt_img && !ui->dw64)
|
||||
+ sval = debugstr_alt_img + ML_(read_UInt)(p);
|
||||
+ if (debugstr_alt_img && ui->dw64)
|
||||
+ sval = debugstr_alt_img + ML_(read_ULong)(p);
|
||||
+ p += ui->dw64 ? 8 : 4;
|
||||
+ break;
|
||||
|
||||
default:
|
||||
VG_(printf)( "### unhandled dwarf2 abbrev form code 0x%x\n", form );
|
||||
@@ -1169,7 +1178,8 @@
|
||||
UChar* debug_types_img, Word debug_types_sz, /* .debug_types */
|
||||
UChar* debug_abbv_img, Word debug_abbv_sz, /* .debug_abbrev */
|
||||
UChar* debug_line_img, Word debug_line_sz, /* .debug_line */
|
||||
- UChar* debug_str_img, Word debug_str_sz ) /* .debug_str */
|
||||
+ UChar* debug_str_img, Word debug_str_sz, /* .debug_str */
|
||||
+ UChar* debug_str_alt_img, Word debug_str_alt_sz ) /* .debug_str */
|
||||
{
|
||||
UnitInfo ui;
|
||||
UShort ver;
|
||||
@@ -1218,7 +1228,8 @@
|
||||
VG_(printf)( "Reading UnitInfo at 0x%lx.....\n",
|
||||
block_img - debug_info_img + 0UL );
|
||||
read_unitinfo_dwarf2( &ui, block_img,
|
||||
- debug_abbv_img, debug_str_img );
|
||||
+ debug_abbv_img, debug_str_img,
|
||||
+ debug_str_alt_img );
|
||||
if (0)
|
||||
VG_(printf)( " => LINES=0x%llx NAME=%s DIR=%s\n",
|
||||
ui.stmt_list, ui.name, ui.compdir );
|
||||
diff -ru valgrind-3.7.0.orig/coregrind/m_debuginfo/readelf.c valgrind-3.7.0/coregrind/m_debuginfo/readelf.c
|
||||
--- valgrind-3.7.0.orig/coregrind/m_debuginfo/readelf.c 2012-07-25 12:33:29.191948686 +0200
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/readelf.c 2012-07-25 12:53:09.377151832 +0200
|
||||
@@ -111,7 +111,7 @@
|
||||
/* Identify an ELF object file by peering at the first few bytes of
|
||||
it. */
|
||||
|
||||
-Bool ML_(is_elf_object_file)( void* image, SizeT n_image )
|
||||
+Bool ML_(is_elf_object_file)( void* image, SizeT n_image, Bool rel_ok )
|
||||
{
|
||||
ElfXX_Ehdr* ehdr = (ElfXX_Ehdr*)image;
|
||||
Int ok = 1;
|
||||
@@ -126,12 +126,14 @@
|
||||
ok &= (ehdr->e_ident[EI_CLASS] == VG_ELF_CLASS
|
||||
&& ehdr->e_ident[EI_DATA] == VG_ELF_DATA2XXX
|
||||
&& ehdr->e_ident[EI_VERSION] == EV_CURRENT);
|
||||
- ok &= (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN);
|
||||
+ ok &= (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN
|
||||
+ || (rel_ok && ehdr->e_type == ET_REL));
|
||||
ok &= (ehdr->e_machine == VG_ELF_MACHINE);
|
||||
ok &= (ehdr->e_version == EV_CURRENT);
|
||||
ok &= (ehdr->e_shstrndx != SHN_UNDEF);
|
||||
ok &= (ehdr->e_shoff != 0 && ehdr->e_shnum != 0);
|
||||
- ok &= (ehdr->e_phoff != 0 && ehdr->e_phnum != 0);
|
||||
+ ok &= ((ehdr->e_phoff != 0 && ehdr->e_phnum != 0)
|
||||
+ || ehdr->e_type == ET_REL);
|
||||
|
||||
if (ok)
|
||||
return True;
|
||||
@@ -887,7 +889,7 @@
|
||||
* http://fedoraproject.org/wiki/RolandMcGrath/BuildID
|
||||
*/
|
||||
static
|
||||
-Char *find_buildid(Addr image, UWord n_image)
|
||||
+Char *find_buildid(Addr image, UWord n_image, Bool rel_ok)
|
||||
{
|
||||
Char* buildid = NULL;
|
||||
__attribute__((unused)) /* on Android, at least */
|
||||
@@ -895,7 +897,7 @@
|
||||
|
||||
#ifdef NT_GNU_BUILD_ID
|
||||
if (n_image >= sizeof(ElfXX_Ehdr) &&
|
||||
- ML_(is_elf_object_file)(ehdr, n_image)) {
|
||||
+ ML_(is_elf_object_file)(ehdr, n_image, rel_ok)) {
|
||||
Word i;
|
||||
|
||||
for (i = 0; i < ehdr->e_phnum; i++) {
|
||||
@@ -927,7 +929,41 @@
|
||||
+ ((note->n_descsz + 3) & ~3);
|
||||
}
|
||||
}
|
||||
- }
|
||||
+ }
|
||||
+
|
||||
+ if (buildid || !rel_ok)
|
||||
+ return buildid;
|
||||
+
|
||||
+ for (i = 0; i < ehdr->e_shnum; i++) {
|
||||
+ ElfXX_Shdr* shdr
|
||||
+ = (ElfXX_Shdr*)(image + ehdr->e_shoff + i * ehdr->e_shentsize);
|
||||
+
|
||||
+ if (shdr->sh_type == SHT_NOTE) {
|
||||
+ ElfXX_Off offset = shdr->sh_offset;
|
||||
+
|
||||
+ while (offset < shdr->sh_offset + shdr->sh_size) {
|
||||
+ ElfXX_Nhdr* note = (ElfXX_Nhdr*)(image + offset);
|
||||
+ Char* name = (Char *)note + sizeof(ElfXX_Nhdr);
|
||||
+ UChar *desc = (UChar *)name + ((note->n_namesz + 3) & ~3);
|
||||
+ Word j2;
|
||||
+
|
||||
+ if (VG_(strcmp)(name, ELF_NOTE_GNU) == 0 &&
|
||||
+ note->n_type == NT_GNU_BUILD_ID) {
|
||||
+ buildid = ML_(dinfo_zalloc)("di.fbi.1",
|
||||
+ note->n_descsz * 2 + 1);
|
||||
+
|
||||
+ for (j2 = 0; j2 < note->n_descsz; j2++) {
|
||||
+ VG_(sprintf)(buildid + VG_(strlen)(buildid),
|
||||
+ "%02x", desc[j2]);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ offset = offset + sizeof(ElfXX_Nhdr)
|
||||
+ + ((note->n_namesz + 3) & ~3)
|
||||
+ + ((note->n_descsz + 3) & ~3);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1009,7 +1045,8 @@
|
||||
* not match the value from the main object file.
|
||||
*/
|
||||
static
|
||||
-Addr open_debug_file( Char* name, Char* buildid, UInt crc, /*OUT*/UWord* size )
|
||||
+Addr open_debug_file( Char* name, Char* buildid, UInt crc, Bool rel_ok,
|
||||
+ /*OUT*/UWord* size )
|
||||
{
|
||||
SysRes fd, sres;
|
||||
struct vg_stat stat_buf;
|
||||
@@ -1038,7 +1075,7 @@
|
||||
return 0;
|
||||
|
||||
if (buildid) {
|
||||
- Char* debug_buildid = find_buildid(sr_Res(sres), *size);
|
||||
+ Char* debug_buildid = find_buildid(sr_Res(sres), *size, rel_ok);
|
||||
if (debug_buildid == NULL || VG_(strcmp)(buildid, debug_buildid) != 0) {
|
||||
SysRes res = VG_(am_munmap_valgrind)(sr_Res(sres), *size);
|
||||
vg_assert(!sr_isError(res));
|
||||
@@ -1157,7 +1194,7 @@
|
||||
static
|
||||
void find_debug_file( struct _DebugInfo* di,
|
||||
Char* objpath, Char* buildid,
|
||||
- Char* debugname, UInt crc,
|
||||
+ Char* debugname, UInt crc, Bool rel_ok,
|
||||
/*OUT*/Addr* dimage,
|
||||
/*OUT*/SizeT* n_dimage )
|
||||
{
|
||||
@@ -1175,13 +1212,14 @@
|
||||
VG_(sprintf)(debugpath, "/usr/lib/debug/.build-id/%c%c/%s.debug",
|
||||
buildid[0], buildid[1], buildid + 2);
|
||||
|
||||
- if ((addr = open_debug_file(debugpath, buildid, 0, &size)) == 0) {
|
||||
+ if ((addr = open_debug_file(debugpath, buildid, 0,
|
||||
+ rel_ok, &size)) == 0) {
|
||||
ML_(dinfo_free)(debugpath);
|
||||
debugpath = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
- if (addr == 0 && debugname != NULL) {
|
||||
+ if (addr == 0 && debugname != NULL && !rel_ok) {
|
||||
Char *objdir = ML_(dinfo_strdup)("di.fdf.2", objpath);
|
||||
Char *objdirptr;
|
||||
|
||||
@@ -1194,11 +1232,11 @@
|
||||
|
||||
VG_(sprintf)(debugpath, "%s/%s", objdir, debugname);
|
||||
|
||||
- if ((addr = open_debug_file(debugpath, NULL, crc, &size)) == 0) {
|
||||
+ if ((addr = open_debug_file(debugpath, NULL, crc, rel_ok, &size)) == 0) {
|
||||
VG_(sprintf)(debugpath, "%s/.debug/%s", objdir, debugname);
|
||||
- if ((addr = open_debug_file(debugpath, NULL, crc, &size)) == 0) {
|
||||
+ if ((addr = open_debug_file(debugpath, NULL, crc, rel_ok, &size)) == 0) {
|
||||
VG_(sprintf)(debugpath, "/usr/lib/debug%s/%s", objdir, debugname);
|
||||
- addr = open_debug_file(debugpath, NULL, crc, &size);
|
||||
+ addr = open_debug_file(debugpath, NULL, crc, rel_ok, &size);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1283,7 +1321,7 @@
|
||||
/* TOPLEVEL */
|
||||
Bool res, ok;
|
||||
SysRes fd, sres;
|
||||
- Word i;
|
||||
+ Word i, i2;
|
||||
Bool dynbss_present = False;
|
||||
Bool sdynbss_present = False;
|
||||
|
||||
@@ -1295,6 +1333,10 @@
|
||||
Addr dimage = 0;
|
||||
UWord n_dimage = 0;
|
||||
|
||||
+ /* Ditto for alternate ELF debuginfo file that we might happen to load. */
|
||||
+ Addr aimage = 0;
|
||||
+ UWord n_aimage = 0;
|
||||
+
|
||||
/* ELF header for the main file. Should == oimage since is at
|
||||
start of file. */
|
||||
ElfXX_Ehdr* ehdr_img = NULL;
|
||||
@@ -1417,7 +1459,7 @@
|
||||
ehdr_img = (ElfXX_Ehdr*)oimage;
|
||||
|
||||
if (ok)
|
||||
- ok &= ML_(is_elf_object_file)(ehdr_img, n_oimage);
|
||||
+ ok &= ML_(is_elf_object_file)(ehdr_img, n_oimage, False);
|
||||
|
||||
if (!ok) {
|
||||
ML_(symerr)(di, True, "Invalid ELF Header");
|
||||
@@ -2068,6 +2110,7 @@
|
||||
UChar* dynstr_img = NULL; /* .dynstr */
|
||||
ElfXX_Sym* dynsym_img = NULL; /* .dynsym */
|
||||
UChar* debuglink_img = NULL; /* .gnu_debuglink */
|
||||
+ UChar* debugaltlink_img = NULL; /* .gnu_debugaltlink */
|
||||
UChar* stab_img = NULL; /* .stab (stabs) */
|
||||
UChar* stabstr_img = NULL; /* .stabstr (stabs) */
|
||||
UChar* debug_line_img = NULL; /* .debug_line (dwarf2) */
|
||||
@@ -2078,6 +2121,10 @@
|
||||
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* debug_line_alt_img = NULL; /* .debug_line (alternate) */
|
||||
+ UChar* debug_info_alt_img = NULL; /* .debug_info (alternate) */
|
||||
+ UChar* debug_abbv_alt_img = NULL; /* .debug_abbrev (alternate) */
|
||||
+ UChar* debug_str_alt_img = NULL; /* .debug_str (alternate) */
|
||||
UChar* dwarf1d_img = NULL; /* .debug (dwarf1) */
|
||||
UChar* dwarf1l_img = NULL; /* .line (dwarf1) */
|
||||
UChar* opd_img = NULL; /* .opd (dwarf2,
|
||||
@@ -2090,16 +2137,21 @@
|
||||
SizeT dynstr_sz = 0;
|
||||
SizeT dynsym_sz = 0;
|
||||
SizeT debuglink_sz = 0;
|
||||
+ SizeT debugaltlink_sz = 0;
|
||||
SizeT stab_sz = 0;
|
||||
SizeT stabstr_sz = 0;
|
||||
SizeT debug_line_sz = 0;
|
||||
SizeT debug_info_sz = 0;
|
||||
- SizeT debug_types_sz = 0;
|
||||
+ SizeT debug_types_sz = 0;
|
||||
SizeT debug_abbv_sz = 0;
|
||||
SizeT debug_str_sz = 0;
|
||||
SizeT debug_ranges_sz = 0;
|
||||
SizeT debug_loc_sz = 0;
|
||||
SizeT debug_frame_sz = 0;
|
||||
+ SizeT debug_line_alt_sz = 0;
|
||||
+ SizeT debug_info_alt_sz = 0;
|
||||
+ SizeT debug_abbv_alt_sz = 0;
|
||||
+ SizeT debug_str_alt_sz = 0;
|
||||
SizeT dwarf1d_sz = 0;
|
||||
SizeT dwarf1l_sz = 0;
|
||||
SizeT opd_sz_unused = 0;
|
||||
@@ -2164,6 +2216,7 @@
|
||||
FIND(".strtab", strtab_sz, strtab_img)
|
||||
|
||||
FIND(".gnu_debuglink", debuglink_sz, debuglink_img)
|
||||
+ FIND(".gnu_debugaltlink", debugaltlink_sz, debugaltlink_img)
|
||||
|
||||
FIND(".stab", stab_sz, stab_img)
|
||||
FIND(".stabstr", stabstr_sz, stabstr_img)
|
||||
@@ -2209,7 +2262,7 @@
|
||||
vg_assert(dimage == 0 && n_dimage == 0);
|
||||
|
||||
/* Look for a build-id */
|
||||
- buildid = find_buildid(oimage, n_oimage);
|
||||
+ buildid = find_buildid(oimage, n_oimage, False);
|
||||
|
||||
/* Look for a debug image */
|
||||
if (buildid != NULL || debuglink_img != NULL) {
|
||||
@@ -2225,11 +2278,11 @@
|
||||
|
||||
/* See if we can find a matching debug file */
|
||||
find_debug_file( di, di->fsm.filename, buildid,
|
||||
- debuglink_img, crc, &dimage, &n_dimage );
|
||||
+ debuglink_img, crc, False, &dimage, &n_dimage );
|
||||
} else {
|
||||
/* See if we can find a matching debug file */
|
||||
find_debug_file( di, di->fsm.filename, buildid,
|
||||
- NULL, 0, &dimage, &n_dimage );
|
||||
+ NULL, 0, False, &dimage, &n_dimage );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2252,7 +2305,7 @@
|
||||
SVMA/bias/size and image addresses out of it. */
|
||||
if (dimage != 0
|
||||
&& n_dimage >= sizeof(ElfXX_Ehdr)
|
||||
- && ML_(is_elf_object_file)((void*)dimage, n_dimage)) {
|
||||
+ && ML_(is_elf_object_file)((void*)dimage, n_dimage, False)) {
|
||||
|
||||
/* Pull out and validate program header and section header info */
|
||||
ElfXX_Ehdr* ehdr_dimg = (ElfXX_Ehdr*)dimage;
|
||||
@@ -2437,6 +2490,8 @@
|
||||
FIND(need_dwarf2, ".debug_loc", debug_loc_sz, debug_loc_img)
|
||||
FIND(need_dwarf2, ".debug_frame", debug_frame_sz,
|
||||
debug_frame_img)
|
||||
+ FIND(need_dwarf2, ".gnu_debugaltlink", debugaltlink_sz,
|
||||
+ debugaltlink_img)
|
||||
FIND(need_dwarf1, ".debug", dwarf1d_sz, dwarf1d_img)
|
||||
FIND(need_dwarf1, ".line", dwarf1l_sz, dwarf1l_img)
|
||||
|
||||
@@ -2444,6 +2499,100 @@
|
||||
} /* Find all interesting sections */
|
||||
} /* do we have a debug image? */
|
||||
|
||||
+ /* Look for alternate debug image */
|
||||
+ if (debugaltlink_img != NULL) {
|
||||
+ UInt buildid_offset = VG_(strlen)(debugaltlink_img)+1;
|
||||
+
|
||||
+ vg_assert(buildid_offset < debugaltlink_sz);
|
||||
+
|
||||
+ Char *altbuildid
|
||||
+ = ML_(dinfo_zalloc)("di.fbi.4",
|
||||
+ (debugaltlink_sz - buildid_offset)
|
||||
+ * 2 + 1);
|
||||
+
|
||||
+ for (i2 = 0; i2 < debugaltlink_sz - buildid_offset; i2++)
|
||||
+ VG_(sprintf)(altbuildid + 2 * i2,
|
||||
+ "%02x", debugaltlink_img[buildid_offset + i2]);
|
||||
+
|
||||
+ /* See if we can find a matching debug file */
|
||||
+ find_debug_file( di, di->fsm.filename, altbuildid,
|
||||
+ NULL, 0, True, &aimage, &n_aimage );
|
||||
+
|
||||
+ ML_(dinfo_free)(altbuildid);
|
||||
+ }
|
||||
+
|
||||
+ /* TOPLEVEL */
|
||||
+ /* If we were successful in finding alternate debug image, pull various
|
||||
+ size and image addresses out of it. */
|
||||
+ if (aimage != 0
|
||||
+ && n_aimage >= sizeof(ElfXX_Ehdr)
|
||||
+ && ML_(is_elf_object_file)((void*)aimage, n_aimage, True)) {
|
||||
+
|
||||
+ /* Pull out and validate program header and section header info */
|
||||
+ ElfXX_Ehdr* ehdr_aimg = (ElfXX_Ehdr*)aimage;
|
||||
+ ElfXX_Shdr* shdr_aimg = (ElfXX_Shdr*)( ((UChar*)ehdr_aimg)
|
||||
+ + ehdr_aimg->e_shoff );
|
||||
+ UWord shdr_dnent = ehdr_aimg->e_shnum;
|
||||
+ UWord shdr_dent_szB = ehdr_aimg->e_shentsize;
|
||||
+ UChar* shdr_strtab_aimg = NULL;
|
||||
+
|
||||
+ if (shdr_dnent == 0
|
||||
+ || !contained_within(
|
||||
+ aimage, n_aimage,
|
||||
+ (Addr)shdr_aimg, shdr_dnent * shdr_dent_szB)) {
|
||||
+ ML_(symerr)(di, True,
|
||||
+ "Missing or invalid ELF Section Header Table"
|
||||
+ " (alternate debuginfo file)");
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* Also find the section header's string table, and validate. */
|
||||
+ /* checked previously by is_elf_object_file: */
|
||||
+ vg_assert( ehdr_aimg->e_shstrndx != SHN_UNDEF );
|
||||
+
|
||||
+ shdr_strtab_aimg
|
||||
+ = (UChar*)( ((UChar*)ehdr_aimg)
|
||||
+ + shdr_aimg[ehdr_aimg->e_shstrndx].sh_offset);
|
||||
+ if (!contained_within(
|
||||
+ aimage, n_aimage,
|
||||
+ (Addr)shdr_strtab_aimg,
|
||||
+ 1/*bogus, but we don't know the real size*/ )) {
|
||||
+ ML_(symerr)(di, True,
|
||||
+ "Invalid ELF Section Header String Table"
|
||||
+ " (alternate debuginfo file)");
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* Find all interesting sections */
|
||||
+ for (i = 0; i < ehdr_aimg->e_shnum; i++) {
|
||||
+
|
||||
+# define FIND(sec_name, sec_size, sec_img) \
|
||||
+ do { ElfXX_Shdr* shdr \
|
||||
+ = INDEX_BIS( shdr_aimg, i, shdr_dent_szB ); \
|
||||
+ if (0 == VG_(strcmp)(sec_name, \
|
||||
+ shdr_strtab_aimg + shdr->sh_name)) { \
|
||||
+ if (0 != sec_img) \
|
||||
+ VG_(core_panic)("repeated section!\n"); \
|
||||
+ sec_img = (void*)(aimage + shdr->sh_offset); \
|
||||
+ sec_size = shdr->sh_size; \
|
||||
+ TRACE_SYMTAB( "%18s: aimg %p .. %p\n", \
|
||||
+ sec_name, \
|
||||
+ (UChar*)sec_img, \
|
||||
+ ((UChar*)sec_img) + sec_size - 1); \
|
||||
+ } \
|
||||
+ } while (0);
|
||||
+
|
||||
+ /* NAME SIZE IMAGE addr */
|
||||
+ FIND(".debug_line", debug_line_alt_sz, debug_line_alt_img)
|
||||
+ FIND(".debug_info", debug_info_alt_sz, debug_info_alt_img)
|
||||
+ FIND(".debug_abbrev", debug_abbv_alt_sz, debug_abbv_alt_img)
|
||||
+ FIND(".debug_str", debug_str_alt_sz, debug_str_alt_img)
|
||||
+
|
||||
+# undef FIND
|
||||
+ } /* Find all interesting sections */
|
||||
+ } /* do we have a debug image? */
|
||||
+
|
||||
+
|
||||
/* TOPLEVEL */
|
||||
/* Check some sizes */
|
||||
vg_assert((dynsym_sz % sizeof(ElfXX_Sym)) == 0);
|
||||
@@ -2524,7 +2673,8 @@
|
||||
debug_types_img, debug_types_sz,
|
||||
debug_abbv_img, debug_abbv_sz,
|
||||
debug_line_img, debug_line_sz,
|
||||
- debug_str_img, debug_str_sz );
|
||||
+ debug_str_img, debug_str_sz,
|
||||
+ debug_str_alt_img, debug_str_alt_sz );
|
||||
|
||||
/* The new reader: read the DIEs in .debug_info to acquire
|
||||
information on variable types and locations. But only if
|
||||
@@ -2539,7 +2689,11 @@
|
||||
debug_line_img, debug_line_sz,
|
||||
debug_str_img, debug_str_sz,
|
||||
debug_ranges_img, debug_ranges_sz,
|
||||
- debug_loc_img, debug_loc_sz
|
||||
+ debug_loc_img, debug_loc_sz,
|
||||
+ debug_info_alt_img, debug_info_alt_sz,
|
||||
+ debug_abbv_alt_img, debug_abbv_alt_sz,
|
||||
+ debug_line_alt_img, debug_line_alt_sz,
|
||||
+ debug_str_alt_img, debug_str_alt_sz
|
||||
);
|
||||
}
|
||||
}
|
@ -1,180 +0,0 @@
|
||||
--- valgrind-3.7.0/include/vki/vki-ppc64-linux.h.jj 2010-10-08 11:14:21.000000000 +0200
|
||||
+++ valgrind-3.7.0/include/vki/vki-ppc64-linux.h 2012-01-27 16:45:19.418707191 +0100
|
||||
@@ -386,6 +386,16 @@ struct vki_sigcontext {
|
||||
#define VKI_F_SETSIG 10 /* for sockets. */
|
||||
#define VKI_F_GETSIG 11 /* for sockets. */
|
||||
|
||||
+#define VKI_F_SETOWN_EX 15
|
||||
+#define VKI_F_GETOWN_EX 16
|
||||
+
|
||||
+struct vki_f_owner_ex
|
||||
+{
|
||||
+ enum { VKI_F_OWNER_TID, VKI_F_OWNER_PID, VKI_F_OWNER_PGRP }
|
||||
+ type; /* Owner type of ID. */
|
||||
+ __vki_kernel_pid_t pid; /* ID of owner. */
|
||||
+};
|
||||
+
|
||||
/* for F_[GET|SET]FL */
|
||||
#define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */
|
||||
|
||||
--- valgrind-3.7.0/include/vki/vki-arm-linux.h.jj 2011-03-28 16:09:17.000000000 +0200
|
||||
+++ valgrind-3.7.0/include/vki/vki-arm-linux.h 2012-01-27 16:44:48.356887209 +0100
|
||||
@@ -270,6 +270,16 @@ struct vki_sigcontext {
|
||||
#define VKI_F_SETLK64 13
|
||||
#define VKI_F_SETLKW64 14
|
||||
|
||||
+#define VKI_F_SETOWN_EX 15
|
||||
+#define VKI_F_GETOWN_EX 16
|
||||
+
|
||||
+struct vki_f_owner_ex
|
||||
+{
|
||||
+ enum { VKI_F_OWNER_TID, VKI_F_OWNER_PID, VKI_F_OWNER_PGRP }
|
||||
+ type; /* Owner type of ID. */
|
||||
+ __vki_kernel_pid_t pid; /* ID of owner. */
|
||||
+};
|
||||
+
|
||||
/* for F_[GET|SET]FL */
|
||||
#define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */
|
||||
|
||||
--- valgrind-3.7.0/include/vki/vki-x86-linux.h.jj 2010-10-08 11:14:21.000000000 +0200
|
||||
+++ valgrind-3.7.0/include/vki/vki-x86-linux.h 2012-01-27 16:43:45.727249836 +0100
|
||||
@@ -308,6 +308,16 @@ struct vki_sigcontext {
|
||||
#define VKI_F_SETLK64 13
|
||||
#define VKI_F_SETLKW64 14
|
||||
|
||||
+#define VKI_F_SETOWN_EX 15
|
||||
+#define VKI_F_GETOWN_EX 16
|
||||
+
|
||||
+struct vki_f_owner_ex
|
||||
+{
|
||||
+ enum { VKI_F_OWNER_TID, VKI_F_OWNER_PID, VKI_F_OWNER_PGRP }
|
||||
+ type; /* Owner type of ID. */
|
||||
+ __vki_kernel_pid_t pid; /* ID of owner. */
|
||||
+};
|
||||
+
|
||||
/* for F_[GET|SET]FL */
|
||||
#define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */
|
||||
|
||||
--- valgrind-3.7.0/include/vki/vki-ppc32-linux.h.jj 2010-10-08 11:14:21.000000000 +0200
|
||||
+++ valgrind-3.7.0/include/vki/vki-ppc32-linux.h 2012-01-27 16:45:11.912752106 +0100
|
||||
@@ -337,6 +337,16 @@ struct vki_sigcontext {
|
||||
#define VKI_F_SETLK64 13
|
||||
#define VKI_F_SETLKW64 14
|
||||
|
||||
+#define VKI_F_SETOWN_EX 15
|
||||
+#define VKI_F_GETOWN_EX 16
|
||||
+
|
||||
+struct vki_f_owner_ex
|
||||
+{
|
||||
+ enum { VKI_F_OWNER_TID, VKI_F_OWNER_PID, VKI_F_OWNER_PGRP }
|
||||
+ type; /* Owner type of ID. */
|
||||
+ __vki_kernel_pid_t pid; /* ID of owner. */
|
||||
+};
|
||||
+
|
||||
/* for F_[GET|SET]FL */
|
||||
#define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */
|
||||
|
||||
--- valgrind-3.7.0/include/vki/vki-s390x-linux.h.jj 2011-06-08 17:26:29.000000000 +0200
|
||||
+++ valgrind-3.7.0/include/vki/vki-s390x-linux.h 2012-01-27 16:45:31.078639504 +0100
|
||||
@@ -332,6 +332,16 @@ typedef struct vki_sigaltstack {
|
||||
#define VKI_F_SETSIG 10 /* for sockets. */
|
||||
#define VKI_F_GETSIG 11 /* for sockets. */
|
||||
|
||||
+#define VKI_F_SETOWN_EX 15
|
||||
+#define VKI_F_GETOWN_EX 16
|
||||
+
|
||||
+struct vki_f_owner_ex
|
||||
+{
|
||||
+ enum { VKI_F_OWNER_TID, VKI_F_OWNER_PID, VKI_F_OWNER_PGRP }
|
||||
+ type; /* Owner type of ID. */
|
||||
+ __vki_kernel_pid_t pid; /* ID of owner. */
|
||||
+};
|
||||
+
|
||||
#define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */
|
||||
|
||||
#define VKI_F_LINUX_SPECIFIC_BASE 1024
|
||||
--- valgrind-3.7.0/include/vki/vki-amd64-linux.h.jj 2010-10-08 11:14:21.000000000 +0200
|
||||
+++ valgrind-3.7.0/include/vki/vki-amd64-linux.h 2012-01-27 16:44:23.592030914 +0100
|
||||
@@ -268,6 +268,16 @@ struct vki_sigcontext {
|
||||
#define VKI_F_SETSIG 10 /* for sockets. */
|
||||
#define VKI_F_GETSIG 11 /* for sockets. */
|
||||
|
||||
+#define VKI_F_SETOWN_EX 15
|
||||
+#define VKI_F_GETOWN_EX 16
|
||||
+
|
||||
+struct vki_f_owner_ex
|
||||
+{
|
||||
+ enum { VKI_F_OWNER_TID, VKI_F_OWNER_PID, VKI_F_OWNER_PGRP }
|
||||
+ type; /* Owner type of ID. */
|
||||
+ __vki_kernel_pid_t pid; /* ID of owner. */
|
||||
+};
|
||||
+
|
||||
#define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */
|
||||
|
||||
#define VKI_F_LINUX_SPECIFIC_BASE 1024
|
||||
--- valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c.jj 2011-08-02 14:49:29.000000000 +0200
|
||||
+++ valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c 2012-01-27 17:08:11.621732289 +0100
|
||||
@@ -3778,6 +3778,22 @@ PRE(sys_fcntl)
|
||||
struct flock64 *, lock);
|
||||
break;
|
||||
|
||||
+ case VKI_F_SETOWN_EX:
|
||||
+ PRINT("sys_fcntl[F_SETOWN_EX] ( %ld, %ld, %ld )", ARG1,ARG2,ARG3);
|
||||
+ PRE_REG_READ3(long, "fcntl",
|
||||
+ unsigned int, fd, unsigned int, cmd,
|
||||
+ struct vki_f_owner_ex *, arg);
|
||||
+ PRE_MEM_READ("fcntl(F_SETOWN_EX)", ARG3, sizeof(struct vki_f_owner_ex));
|
||||
+ break;
|
||||
+
|
||||
+ case VKI_F_GETOWN_EX:
|
||||
+ PRINT("sys_fcntl[F_GETOWN_EX] ( %ld, %ld, %ld )", ARG1,ARG2,ARG3);
|
||||
+ PRE_REG_READ3(long, "fcntl",
|
||||
+ unsigned int, fd, unsigned int, cmd,
|
||||
+ struct vki_f_owner_ex *, arg);
|
||||
+ PRE_MEM_WRITE("fcntl(F_GETOWN_EX)", ARG3, sizeof(struct vki_f_owner_ex));
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
PRINT("sys_fcntl[UNKNOWN] ( %ld, %ld, %ld )", ARG1,ARG2,ARG3);
|
||||
I_die_here;
|
||||
@@ -3812,6 +3828,8 @@ POST(sys_fcntl)
|
||||
if (VG_(clo_track_fds))
|
||||
ML_(record_fd_open_named)(tid, RES);
|
||||
}
|
||||
+ } else if (ARG2 == VKI_F_GETOWN_EX) {
|
||||
+ POST_MEM_WRITE(ARG3, sizeof(struct vki_f_owner_ex));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3857,6 +3875,22 @@ PRE(sys_fcntl64)
|
||||
unsigned int, fd, unsigned int, cmd,
|
||||
struct flock64 *, lock);
|
||||
break;
|
||||
+
|
||||
+ case VKI_F_SETOWN_EX:
|
||||
+ PRINT("sys_fcntl[F_SETOWN_EX] ( %ld, %ld, %ld )", ARG1,ARG2,ARG3);
|
||||
+ PRE_REG_READ3(long, "fcntl",
|
||||
+ unsigned int, fd, unsigned int, cmd,
|
||||
+ struct vki_f_owner_ex *, arg);
|
||||
+ PRE_MEM_READ("fcntl(F_SETOWN_EX)", ARG3, sizeof(struct vki_f_owner_ex));
|
||||
+ break;
|
||||
+
|
||||
+ case VKI_F_GETOWN_EX:
|
||||
+ PRINT("sys_fcntl[F_GETOWN_EX] ( %ld, %ld, %ld )", ARG1,ARG2,ARG3);
|
||||
+ PRE_REG_READ3(long, "fcntl",
|
||||
+ unsigned int, fd, unsigned int, cmd,
|
||||
+ struct vki_f_owner_ex *, arg);
|
||||
+ PRE_MEM_WRITE("fcntl(F_GETOWN_EX)", ARG3, sizeof(struct vki_f_owner_ex));
|
||||
+ break;
|
||||
}
|
||||
|
||||
# if defined(VGP_x86_linux)
|
||||
@@ -3887,6 +3921,8 @@ POST(sys_fcntl64)
|
||||
if (VG_(clo_track_fds))
|
||||
ML_(record_fd_open_named)(tid, RES);
|
||||
}
|
||||
+ } else if (ARG2 == VKI_F_GETOWN_EX) {
|
||||
+ POST_MEM_WRITE(ARG3, sizeof(struct vki_f_owner_ex));
|
||||
}
|
||||
}
|
||||
|
@ -1,65 +0,0 @@
|
||||
--- valgrind-3.7.0/configure.in.jj 2011-11-05 12:13:30.000000000 +0100
|
||||
+++ valgrind-3.7.0/configure.in 2011-12-09 17:48:21.409848842 +0100
|
||||
@@ -775,6 +775,13 @@ case "${GLIBC_VERSION}" in
|
||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
||||
;;
|
||||
+ 2.15)
|
||||
+ AC_MSG_RESULT(2.15 family)
|
||||
+ AC_DEFINE([GLIBC_2_15], 1, [Define to 1 if you're using glibc 2.15.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}"
|
||||
+ ;;
|
||||
darwin)
|
||||
AC_MSG_RESULT(Darwin)
|
||||
AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
|
||||
@@ -788,7 +795,7 @@ case "${GLIBC_VERSION}" in
|
||||
|
||||
*)
|
||||
AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
|
||||
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.14])
|
||||
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.15])
|
||||
AC_MSG_ERROR([or Darwin libc])
|
||||
;;
|
||||
esac
|
||||
--- valgrind-3.7.0/config.h.in.jj 2011-10-26 23:25:55.000000000 +0200
|
||||
+++ valgrind-3.7.0/config.h.in 2011-12-09 17:47:42.385804043 +0100
|
||||
@@ -39,6 +39,9 @@
|
||||
/* Define to 1 if you're using glibc 2.14.x */
|
||||
#undef GLIBC_2_14
|
||||
|
||||
+/* Define to 1 if you're using glibc 2.15.x */
|
||||
+#undef GLIBC_2_15
|
||||
+
|
||||
/* Define to 1 if you're using glibc 2.2.x */
|
||||
#undef GLIBC_2_2
|
||||
|
||||
--- valgrind-3.7.0/configure.jj 2011-11-05 12:24:39.000000000 +0100
|
||||
+++ valgrind-3.7.0/configure 2011-12-09 17:48:58.371930777 +0100
|
||||
@@ -6402,6 +6402,16 @@ $as_echo "#define GLIBC_2_14 1" >>confde
|
||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
||||
;;
|
||||
+ 2.15)
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.15 family" >&5
|
||||
+$as_echo "2.15 family" >&6; }
|
||||
+
|
||||
+$as_echo "#define GLIBC_2_15 1" >>confdefs.h
|
||||
+
|
||||
+ 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}"
|
||||
+ ;;
|
||||
darwin)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
|
||||
$as_echo "Darwin" >&6; }
|
||||
@@ -6422,7 +6432,7 @@ $as_echo "#define BIONIC_LIBC 1" >>confd
|
||||
*)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5
|
||||
$as_echo "unsupported version ${GLIBC_VERSION}" >&6; }
|
||||
- as_fn_error "Valgrind requires glibc version 2.2 - 2.14" "$LINENO" 5
|
||||
+ as_fn_error "Valgrind requires glibc version 2.2 - 2.15" "$LINENO" 5
|
||||
as_fn_error "or Darwin libc" "$LINENO" 5
|
||||
;;
|
||||
esac
|
@ -1,57 +0,0 @@
|
||||
diff -ur valgrind-3.7.0.orig/configure valgrind-3.7.0/configure
|
||||
--- valgrind-3.7.0.orig/configure 2012-07-25 15:08:56.846744849 +0200
|
||||
+++ valgrind-3.7.0/configure 2012-07-25 15:12:59.690471999 +0200
|
||||
@@ -6414,6 +6426,16 @@
|
||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
||||
;;
|
||||
+ 2.16)
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.16 family" >&5
|
||||
+$as_echo "2.16 family" >&6; }
|
||||
+
|
||||
+$as_echo "#define GLIBC_2_16 1" >>confdefs.h
|
||||
+
|
||||
+ 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}"
|
||||
+ ;;
|
||||
darwin)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
|
||||
$as_echo "Darwin" >&6; }
|
||||
@@ -6434,8 +6456,8 @@
|
||||
*)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5
|
||||
$as_echo "unsupported version ${GLIBC_VERSION}" >&6; }
|
||||
- as_fn_error "Valgrind requires glibc version 2.2 - 2.15" "$LINENO" 5
|
||||
- as_fn_error "or Darwin libc" "$LINENO" 5
|
||||
+ as_fn_error "Valgrind requires glibc version 2.2 - 2.16" "$LINENO" 5
|
||||
+ as_fn_error "or Darwin libc" "$LINENO" 5
|
||||
;;
|
||||
esac
|
||||
|
||||
diff -ur valgrind-3.7.0.orig/configure.in valgrind-3.7.0/configure.in
|
||||
--- valgrind-3.7.0.orig/configure.in 2012-07-25 15:08:56.757743484 +0200
|
||||
+++ valgrind-3.7.0/configure.in 2012-07-25 15:11:40.138250933 +0200
|
||||
@@ -782,6 +782,13 @@
|
||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
||||
;;
|
||||
+ 2.16)
|
||||
+ AC_MSG_RESULT(2.16 family)
|
||||
+ AC_DEFINE([GLIBC_2_16], 1, [Define to 1 if you're using glibc 2.16.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}"
|
||||
+ ;;
|
||||
darwin)
|
||||
AC_MSG_RESULT(Darwin)
|
||||
AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
|
||||
@@ -795,7 +802,7 @@
|
||||
|
||||
*)
|
||||
AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
|
||||
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.15])
|
||||
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.16])
|
||||
AC_MSG_ERROR([or Darwin libc])
|
||||
;;
|
||||
esac
|
@ -1,29 +0,0 @@
|
||||
r12545 | sewardj | 2012-04-29 13:35:37 +0200 (Sun, 29 Apr 2012) | 3 lines
|
||||
|
||||
Correctly parse DW_FORM_ref_addr -- its format is different in Dwarf2
|
||||
vs Dwarf3 and later. Fixes #298864. (Tom Tromey, tromey@redhat.com)
|
||||
|
||||
Index: coregrind/m_debuginfo/readdwarf3.c
|
||||
===================================================================
|
||||
--- valgrind-3.7.0/coregrind/m_debuginfo/readdwarf3.c (revision 12544)
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/readdwarf3.c (revision 12545)
|
||||
@@ -1152,9 +1152,17 @@
|
||||
So for the moment we merely range-check, to see that they
|
||||
actually do specify a plausible offset within this
|
||||
object's .debug_info, and return the value unchanged.
|
||||
+
|
||||
+ In DWARF 2, DW_FORM_ref_addr is address-sized, but in
|
||||
+ DWARF 3 and later, it is offset-sized.
|
||||
*/
|
||||
- *cts = (ULong)(UWord)get_UWord(c);
|
||||
- *ctsSzB = sizeof(UWord);
|
||||
+ if (cc->version == 2) {
|
||||
+ *cts = (ULong)(UWord)get_UWord(c);
|
||||
+ *ctsSzB = sizeof(UWord);
|
||||
+ } else {
|
||||
+ *cts = get_Dwarfish_UWord(c, cc->is_dw64);
|
||||
+ *ctsSzB = cc->is_dw64 ? sizeof(ULong) : sizeof(UInt);
|
||||
+ }
|
||||
TRACE_D3("0x%lx", (UWord)*cts);
|
||||
if (0) VG_(printf)("DW_FORM_ref_addr 0x%lx\n", (UWord)*cts);
|
||||
if (/* the following 2 are surely impossible, but ... */
|
@ -1,201 +0,0 @@
|
||||
--- valgrind-3.7.0/coregrind/m_debuginfo/tytypes.c (revision 12361)
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/tytypes.c (revision 12362)
|
||||
@@ -54,9 +54,10 @@ Bool ML_(TyEnt__is_type)( TyEnt* te )
|
||||
case Te_EMPTY: case Te_INDIR: case Te_UNKNOWN:
|
||||
case Te_Atom: case Te_Field: case Te_Bound:
|
||||
return False;
|
||||
- case Te_TyBase: case Te_TyPorR: case Te_TyTyDef:
|
||||
- case Te_TyStOrUn: case Te_TyEnum: case Te_TyArray:
|
||||
- case Te_TyFn: case Te_TyQual: case Te_TyVoid:
|
||||
+ case Te_TyBase: case Te_TyPtr: case Te_TyRef:
|
||||
+ case Te_TyPtrMbr: case Te_TyRvalRef: case Te_TyTyDef:
|
||||
+ case Te_TyStOrUn: case Te_TyEnum: case Te_TyArray:
|
||||
+ case Te_TyFn: case Te_TyQual: case Te_TyVoid:
|
||||
return True;
|
||||
default:
|
||||
vg_assert(0);
|
||||
@@ -127,10 +128,20 @@ void ML_(pp_TyEnt)( TyEnt* te )
|
||||
te->Te.TyBase.name ? te->Te.TyBase.name
|
||||
: (UChar*)"(null)" );
|
||||
break;
|
||||
- case Te_TyPorR:
|
||||
- VG_(printf)("Te_TyPorR(%d,%c,0x%05lx)",
|
||||
- te->Te.TyPorR.szB,
|
||||
- te->Te.TyPorR.isPtr ? 'P' : 'R',
|
||||
+ case Te_TyPtr:
|
||||
+ VG_(printf)("Te_TyPtr(%d,0x%05lx)", te->Te.TyPorR.szB,
|
||||
+ te->Te.TyPorR.typeR);
|
||||
+ break;
|
||||
+ case Te_TyRef:
|
||||
+ VG_(printf)("Te_TyRef(%d,0x%05lx)", te->Te.TyPorR.szB,
|
||||
+ te->Te.TyPorR.typeR);
|
||||
+ break;
|
||||
+ case Te_TyPtrMbr:
|
||||
+ VG_(printf)("Te_TyMbr(%d,0x%05lx)", te->Te.TyPorR.szB,
|
||||
+ te->Te.TyPorR.typeR);
|
||||
+ break;
|
||||
+ case Te_TyRvalRef:
|
||||
+ VG_(printf)("Te_TyRvalRef(%d,0x%05lx)", te->Te.TyPorR.szB,
|
||||
te->Te.TyPorR.typeR);
|
||||
break;
|
||||
case Te_TyTyDef:
|
||||
@@ -237,9 +248,21 @@ void ML_(pp_TyEnt_C_ishly)( XArray* /* o
|
||||
if (!ent->Te.TyBase.name) goto unhandled;
|
||||
VG_(printf)("%s", ent->Te.TyBase.name);
|
||||
break;
|
||||
- case Te_TyPorR:
|
||||
+ case Te_TyPtr:
|
||||
ML_(pp_TyEnt_C_ishly)(tyents, ent->Te.TyPorR.typeR);
|
||||
- VG_(printf)("%s", ent->Te.TyPorR.isPtr ? "*" : "&");
|
||||
+ VG_(printf)("*");
|
||||
+ break;
|
||||
+ case Te_TyRef:
|
||||
+ ML_(pp_TyEnt_C_ishly)(tyents, ent->Te.TyPorR.typeR);
|
||||
+ VG_(printf)("&");
|
||||
+ break;
|
||||
+ case Te_TyPtrMbr:
|
||||
+ ML_(pp_TyEnt_C_ishly)(tyents, ent->Te.TyPorR.typeR);
|
||||
+ VG_(printf)("*");
|
||||
+ break;
|
||||
+ case Te_TyRvalRef:
|
||||
+ ML_(pp_TyEnt_C_ishly)(tyents, ent->Te.TyPorR.typeR);
|
||||
+ VG_(printf)("&&");
|
||||
break;
|
||||
case Te_TyEnum:
|
||||
if (!ent->Te.TyEnum.name) goto unhandled;
|
||||
@@ -503,12 +526,13 @@ Word ML_(TyEnt__cmp_by_all_except_cuOff)
|
||||
if (r != 0) return r;
|
||||
r = Asciiz__cmp(te1->Te.TyBase.name, te2->Te.TyBase.name);
|
||||
return r;
|
||||
- case Te_TyPorR:
|
||||
+ case Te_TyPtr:
|
||||
+ case Te_TyRef:
|
||||
+ case Te_TyPtrMbr:
|
||||
+ case Te_TyRvalRef:
|
||||
r = Int__cmp(te1->Te.TyPorR.szB, te2->Te.TyPorR.szB);
|
||||
if (r != 0) return r;
|
||||
r = UWord__cmp(te1->Te.TyPorR.typeR, te2->Te.TyPorR.typeR);
|
||||
- if (r != 0) return r;
|
||||
- r = Bool__cmp(te1->Te.TyPorR.isPtr, te2->Te.TyPorR.isPtr);
|
||||
return r;
|
||||
case Te_TyTyDef:
|
||||
r = UWord__cmp(te1->Te.TyTyDef.typeR, te2->Te.TyTyDef.typeR);
|
||||
@@ -584,7 +608,10 @@ void ML_(TyEnt__make_EMPTY) ( TyEnt* te
|
||||
case Te_TyBase:
|
||||
if (te->Te.TyBase.name) ML_(dinfo_free)(te->Te.TyBase.name);
|
||||
break;
|
||||
- case Te_TyPorR:
|
||||
+ case Te_TyPtr:
|
||||
+ case Te_TyRef:
|
||||
+ case Te_TyPtrMbr:
|
||||
+ case Te_TyRvalRef:
|
||||
break;
|
||||
case Te_TyTyDef:
|
||||
if (te->Te.TyTyDef.name) ML_(dinfo_free)(te->Te.TyTyDef.name);
|
||||
@@ -661,7 +688,10 @@ MaybeULong ML_(sizeOfType)( XArray* /* o
|
||||
if (ent2->tag == Te_UNKNOWN)
|
||||
return mk_MaybeULong_Nothing(); /*UNKNOWN*/
|
||||
return ML_(sizeOfType)( tyents, ent->Te.TyTyDef.typeR );
|
||||
- case Te_TyPorR:
|
||||
+ case Te_TyPtr:
|
||||
+ case Te_TyRef:
|
||||
+ case Te_TyPtrMbr:
|
||||
+ case Te_TyRvalRef:
|
||||
vg_assert(ent->Te.TyPorR.szB == 4 || ent->Te.TyPorR.szB == 8);
|
||||
return mk_MaybeULong_Just( ent->Te.TyPorR.szB );
|
||||
case Te_TyStOrUn:
|
||||
@@ -738,7 +768,10 @@ XArray* /*UChar*/ ML_(describe_type)( /*
|
||||
case Te_TyEnum:
|
||||
case Te_TyFn:
|
||||
case Te_TyVoid:
|
||||
- case Te_TyPorR:
|
||||
+ case Te_TyPtr:
|
||||
+ case Te_TyRef:
|
||||
+ case Te_TyPtrMbr:
|
||||
+ case Te_TyRvalRef:
|
||||
case Te_TyBase:
|
||||
goto done;
|
||||
|
||||
--- valgrind-3.7.0/coregrind/m_debuginfo/readdwarf3.c (revision 12361)
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/readdwarf3.c (revision 12362)
|
||||
@@ -2221,19 +2221,41 @@ static void parse_type_DIE ( /*MOD*/XArr
|
||||
goto acquire_Type;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * An example of DW_TAG_rvalue_reference_type:
|
||||
+ *
|
||||
+ * $ readelf --debug-dump /usr/lib/debug/usr/lib/libstdc++.so.6.0.16.debug
|
||||
+ * <1><1014>: Abbrev Number: 55 (DW_TAG_rvalue_reference_type)
|
||||
+ * <1015> DW_AT_byte_size : 4
|
||||
+ * <1016> DW_AT_type : <0xe52>
|
||||
+ */
|
||||
if (dtag == DW_TAG_pointer_type || dtag == DW_TAG_reference_type
|
||||
- || dtag == DW_TAG_ptr_to_member_type) {
|
||||
+ || dtag == DW_TAG_ptr_to_member_type
|
||||
+ || dtag == DW_TAG_rvalue_reference_type) {
|
||||
/* This seems legit for _pointer_type and _reference_type. I
|
||||
don't know if rolling _ptr_to_member_type in here really is
|
||||
legit, but it's better than not handling it at all. */
|
||||
VG_(memset)(&typeE, 0, sizeof(typeE));
|
||||
typeE.cuOff = D3_INVALID_CUOFF;
|
||||
- typeE.tag = Te_TyPorR;
|
||||
+ switch (dtag) {
|
||||
+ case DW_TAG_pointer_type:
|
||||
+ typeE.tag = Te_TyPtr;
|
||||
+ break;
|
||||
+ case DW_TAG_reference_type:
|
||||
+ typeE.tag = Te_TyRef;
|
||||
+ break;
|
||||
+ case DW_TAG_ptr_to_member_type:
|
||||
+ typeE.tag = Te_TyPtrMbr;
|
||||
+ break;
|
||||
+ case DW_TAG_rvalue_reference_type:
|
||||
+ typeE.tag = Te_TyRvalRef;
|
||||
+ break;
|
||||
+ default:
|
||||
+ vg_assert(False);
|
||||
+ }
|
||||
/* target type defaults to void */
|
||||
typeE.Te.TyPorR.typeR = D3_FAKEVOID_CUOFF;
|
||||
- typeE.Te.TyPorR.isPtr = dtag == DW_TAG_pointer_type
|
||||
- || dtag == DW_TAG_ptr_to_member_type;
|
||||
- /* These three type kinds don't *have* to specify their size, in
|
||||
+ /* These four type kinds don't *have* to specify their size, in
|
||||
which case we assume it's a machine word. But if they do
|
||||
specify it, it must be a machine word :-) This probably
|
||||
assumes that the word size of the Dwarf3 we're reading is the
|
||||
@@ -2882,7 +2904,10 @@ static Bool TyEnt__subst_R_fields ( XArr
|
||||
break;
|
||||
case Te_TyBase:
|
||||
break;
|
||||
- case Te_TyPorR:
|
||||
+ case Te_TyPtr:
|
||||
+ case Te_TyRef:
|
||||
+ case Te_TyPtrMbr:
|
||||
+ case Te_TyRvalRef:
|
||||
te->Te.TyPorR.typeR
|
||||
= chase_cuOff( &b, ents, ents_cache, te->Te.TyPorR.typeR );
|
||||
if (b) changed = True;
|
||||
--- valgrind-3.7.0/coregrind/m_debuginfo/priv_tytypes.h (revision 12361)
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/priv_tytypes.h (revision 12362)
|
||||
@@ -45,7 +45,10 @@ typedef
|
||||
Te_Field, /* struct/class field defn */
|
||||
Te_Bound, /* array bounds indication, for one dimension */
|
||||
Te_TyBase, /* base type */
|
||||
- Te_TyPorR, /* pointer or reference type */
|
||||
+ Te_TyPtr, /* pointer type */
|
||||
+ Te_TyRef, /* reference type */
|
||||
+ Te_TyPtrMbr, /* pointer to member type */
|
||||
+ Te_TyRvalRef,/* rvalue reference type */
|
||||
Te_TyTyDef, /* a renaming of some other type */
|
||||
Te_TyStOrUn, /* structure or union type */
|
||||
Te_TyEnum, /* an enum type */
|
||||
@@ -101,7 +104,6 @@ typedef
|
||||
struct {
|
||||
Int szB;
|
||||
UWord typeR;
|
||||
- Bool isPtr;
|
||||
} TyPorR;
|
||||
struct {
|
||||
UChar* name; /* in mallocville */
|
@ -1,72 +0,0 @@
|
||||
--- valgrind-3.7.0/include/vki/vki-linux.h.jj 2011-10-26 23:24:31.000000000 +0200
|
||||
+++ valgrind-3.7.0/include/vki/vki-linux.h 2012-01-27 16:11:53.373379491 +0100
|
||||
@@ -1730,6 +1730,15 @@ typedef struct vki_sg_scsi_id { /* used
|
||||
#define VKI_SG_SET_COMMAND_Q 0x2271 /* Change queuing state with 0 or 1 */
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
+// From linux-2.6.34/include/scsi/scsi.h and scsi/scsi_ioctl.h
|
||||
+//----------------------------------------------------------------------
|
||||
+
|
||||
+#define VKI_SCSI_IOCTL_DOORLOCK 0x5380 /* Lock the eject mechanism. */
|
||||
+#define VKI_SCSI_IOCTL_DOORUNLOCK 0x5381 /* Unlock the mechanism. */
|
||||
+#define VKI_SCSI_IOCTL_GET_IDLUN 0x5382
|
||||
+#define VKI_SCSI_IOCTL_GET_BUS_NUMBER 0x5386
|
||||
+
|
||||
+//----------------------------------------------------------------------
|
||||
// From linux-2.6.8.1/include/linux/cdrom.h
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
--- valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c.jj 2012-01-27 13:27:26.000000000 +0100
|
||||
+++ valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c 2012-01-27 16:18:05.377177786 +0100
|
||||
@@ -3935,6 +3935,10 @@ PRE(sys_ioctl)
|
||||
case VKI_SNDRV_TIMER_IOCTL_STOP:
|
||||
case VKI_SNDRV_TIMER_IOCTL_CONTINUE:
|
||||
case VKI_SNDRV_TIMER_IOCTL_PAUSE:
|
||||
+
|
||||
+ /* SCSI no operand */
|
||||
+ case VKI_SCSI_IOCTL_DOORLOCK:
|
||||
+ case VKI_SCSI_IOCTL_DOORUNLOCK:
|
||||
PRINT("sys_ioctl ( %ld, 0x%lx )",ARG1,ARG2);
|
||||
PRE_REG_READ2(long, "ioctl",
|
||||
unsigned int, fd, unsigned int, request);
|
||||
@@ -4420,6 +4424,14 @@ PRE(sys_ioctl)
|
||||
VKI_SIZEOF_STRUCT_HD_DRIVEID );
|
||||
break;
|
||||
|
||||
+ /* SCSI */
|
||||
+ case VKI_SCSI_IOCTL_GET_IDLUN: /* 0x5382 */
|
||||
+ PRE_MEM_WRITE( "ioctl(SCSI_IOCTL_GET_IDLUN)", ARG3, 2*sizeof(int));
|
||||
+ break;
|
||||
+ case VKI_SCSI_IOCTL_GET_BUS_NUMBER: /* 0x5386 */
|
||||
+ PRE_MEM_WRITE( "ioctl(SCSI_IOCTL_GET_BUS_NUMBER)", ARG3, sizeof(int));
|
||||
+ break;
|
||||
+
|
||||
/* CD ROM stuff (??) */
|
||||
case VKI_CDROM_GET_MCN:
|
||||
PRE_MEM_READ( "ioctl(CDROM_GET_MCN)", ARG3,
|
||||
@@ -5521,6 +5533,10 @@ POST(sys_ioctl)
|
||||
case VKI_SNDRV_TIMER_IOCTL_STOP:
|
||||
case VKI_SNDRV_TIMER_IOCTL_CONTINUE:
|
||||
case VKI_SNDRV_TIMER_IOCTL_PAUSE:
|
||||
+
|
||||
+ /* SCSI no operand */
|
||||
+ case VKI_SCSI_IOCTL_DOORLOCK:
|
||||
+ case VKI_SCSI_IOCTL_DOORUNLOCK:
|
||||
break;
|
||||
|
||||
/* Real Time Clock (/dev/rtc) ioctls */
|
||||
@@ -5587,6 +5603,14 @@ POST(sys_ioctl)
|
||||
POST_MEM_WRITE(ARG3, VKI_SIZEOF_STRUCT_HD_DRIVEID );
|
||||
break;
|
||||
|
||||
+ /* SCSI */
|
||||
+ case VKI_SCSI_IOCTL_GET_IDLUN: /* 0x5382 */
|
||||
+ POST_MEM_WRITE(ARG3, 2*sizeof(int));
|
||||
+ break;
|
||||
+ case VKI_SCSI_IOCTL_GET_BUS_NUMBER: /* 0x5386 */
|
||||
+ POST_MEM_WRITE(ARG3, sizeof(int));
|
||||
+ break;
|
||||
+
|
||||
/* CD ROM stuff (??) */
|
||||
case VKI_CDROMSUBCHNL:
|
||||
POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_subchnl));
|
@ -1,60 +0,0 @@
|
||||
Disable some hanging tests, fix up bug125959-x86.c undefined behavior.
|
||||
|
||||
--- valgrind-3.7.0/helgrind/tests/Makefile.am.jj 2011-10-26 23:24:25.000000000 +0200
|
||||
+++ valgrind-3.7.0/helgrind/tests/Makefile.am 2012-01-27 15:01:58.955624195 +0100
|
||||
@@ -94,7 +94,6 @@ EXTRA_DIST = \
|
||||
# XXX: tc18_semabuse uses operations that are unsupported on Darwin. It
|
||||
# should be conditionally compiled like tc20_verifywrap is.
|
||||
check_PROGRAMS = \
|
||||
- annotate_hbefore \
|
||||
cond_timedwait_invalid \
|
||||
free_is_write \
|
||||
hg01_all_ok \
|
||||
--- valgrind-3.7.0/helgrind/tests/Makefile.in.jj 2011-11-05 12:26:51.000000000 +0100
|
||||
+++ valgrind-3.7.0/helgrind/tests/Makefile.in 2012-01-27 15:02:40.285383038 +0100
|
||||
@@ -46,8 +46,7 @@ host_triplet = @host@
|
||||
DIST_COMMON = $(dist_noinst_SCRIPTS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/Makefile.all.am \
|
||||
$(top_srcdir)/Makefile.tool-tests.am
|
||||
-check_PROGRAMS = annotate_hbefore$(EXEEXT) \
|
||||
- cond_timedwait_invalid$(EXEEXT) free_is_write$(EXEEXT) \
|
||||
+check_PROGRAMS = cond_timedwait_invalid$(EXEEXT) free_is_write$(EXEEXT) \
|
||||
hg01_all_ok$(EXEEXT) hg02_deadlock$(EXEEXT) \
|
||||
hg03_inherit$(EXEEXT) hg04_race$(EXEEXT) hg05_race2$(EXEEXT) \
|
||||
hg06_readshared$(EXEEXT) locked_vs_unlocked1$(EXEEXT) \
|
||||
--- valgrind-3.7.0/none/tests/x86/bug125959-x86.c.jj 2011-10-26 23:24:38.000000000 +0200
|
||||
+++ valgrind-3.7.0/none/tests/x86/bug125959-x86.c 2012-01-27 15:00:11.648250429 +0100
|
||||
@@ -22,7 +22,8 @@ static int lookup ( int i )
|
||||
|
||||
int main(void)
|
||||
{
|
||||
- int i, j;
|
||||
+ int i;
|
||||
+ unsigned int j;
|
||||
for (i = 0; i < 256; i++)
|
||||
buf[i] = (unsigned char) i;
|
||||
|
||||
--- valgrind-3.7.0/gdbserver_tests/Makefile.am.jj 2011-10-26 23:24:26.000000000 +0200
|
||||
+++ valgrind-3.7.0/gdbserver_tests/Makefile.am 2012-01-27 14:56:43.369465872 +0100
|
||||
@@ -102,9 +102,7 @@ check_PROGRAMS = \
|
||||
clean_after_fork \
|
||||
fork_chain \
|
||||
passsigalrm \
|
||||
- sleepers \
|
||||
main_pic \
|
||||
- t \
|
||||
watchpoints
|
||||
|
||||
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
|
||||
--- valgrind-3.7.0/gdbserver_tests/Makefile.in.jj 2011-11-05 12:26:51.000000000 +0100
|
||||
+++ valgrind-3.7.0/gdbserver_tests/Makefile.in 2012-01-27 14:57:30.278191493 +0100
|
||||
@@ -47,8 +47,7 @@ DIST_COMMON = $(dist_noinst_SCRIPTS) $(s
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/Makefile.all.am \
|
||||
$(top_srcdir)/Makefile.tool-tests.am
|
||||
check_PROGRAMS = clean_after_fork$(EXEEXT) fork_chain$(EXEEXT) \
|
||||
- passsigalrm$(EXEEXT) sleepers$(EXEEXT) main_pic$(EXEEXT) \
|
||||
- t$(EXEEXT) watchpoints$(EXEEXT)
|
||||
+ passsigalrm$(EXEEXT) main_pic$(EXEEXT) watchpoints$(EXEEXT)
|
||||
subdir = gdbserver_tests
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
@ -1,24 +0,0 @@
|
||||
--- valgrind-3.7.0/coregrind/m_debuginfo/readdwarf3.c (revision 12337)
|
||||
+++ valgrind-3.7.0/coregrind/m_debuginfo/readdwarf3.c (revision 12338)
|
||||
@@ -2723,6 +2723,21 @@ static void parse_type_DIE ( /*MOD*/XArr
|
||||
goto bad_DIE;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Treat DW_TAG_unspecified_type as type void. An example of DW_TAG_unspecified_type:
|
||||
+ *
|
||||
+ * $ readelf --debug-dump /usr/lib/debug/usr/lib/libstdc++.so.6.0.16.debug
|
||||
+ * <1><10d4>: Abbrev Number: 53 (DW_TAG_unspecified_type)
|
||||
+ * <10d5> DW_AT_name : (indirect string, offset: 0xdb7): decltype(nullptr)
|
||||
+ */
|
||||
+ if (dtag == DW_TAG_unspecified_type) {
|
||||
+ VG_(memset)(&typeE, 0, sizeof(typeE));
|
||||
+ typeE.cuOff = D3_INVALID_CUOFF;
|
||||
+ typeE.tag = Te_TyQual;
|
||||
+ typeE.Te.TyQual.typeR = D3_FAKEVOID_CUOFF;
|
||||
+ goto acquire_Type;
|
||||
+ }
|
||||
+
|
||||
/* else ignore this DIE */
|
||||
return;
|
||||
/*NOTREACHED*/
|
@ -1,5 +1,5 @@
|
||||
--- valgrind-3.7.0/cachegrind/cg_sim.c.jj 2011-10-26 23:24:32.000000000 +0200
|
||||
+++ valgrind-3.7.0/cachegrind/cg_sim.c 2011-12-09 17:31:19.256023683 +0100
|
||||
--- valgrind-3.8.0/cachegrind/cg_sim.c.jj 2011-10-26 23:24:32.000000000 +0200
|
||||
+++ valgrind-3.8.0/cachegrind/cg_sim.c 2011-12-09 17:31:19.256023683 +0100
|
||||
@@ -42,27 +42,30 @@ typedef struct {
|
||||
Int size; /* bytes */
|
||||
Int assoc;
|
@ -1,6 +1,6 @@
|
||||
--- valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c.jj 2010-04-07 08:14:12.000000000 -0400
|
||||
+++ valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c 2010-04-12 07:24:12.838876000 -0400
|
||||
@@ -1955,8 +1955,9 @@ PRE(sys_capget)
|
||||
@@ -2212,8 +2212,9 @@ PRE(sys_capget)
|
||||
vki_cap_user_header_t, header, vki_cap_user_data_t, data);
|
||||
PRE_MEM_READ( "capget(header)", ARG1,
|
||||
sizeof(struct __vki_user_cap_header_struct) );
|
@ -1,6 +1,6 @@
|
||||
--- valgrind/include/pub_tool_basics.h.jj 2011-10-26 23:24:32.000000000 +0200
|
||||
+++ valgrind/include/pub_tool_basics.h 2011-12-09 17:42:50.828630546 +0100
|
||||
@@ -290,7 +290,7 @@ static inline Bool sr_EQ ( SysRes sr1, S
|
||||
@@ -297,7 +297,7 @@ static inline Bool sr_EQ ( SysRes sr1, S
|
||||
#define VG_BUGS_TO "www.valgrind.org"
|
||||
|
||||
/* Branch prediction hints. */
|
@ -1,6 +1,6 @@
|
||||
--- valgrind-3.7.0.old/configure.in 2012-03-05 15:16:23.000000000 -0500
|
||||
+++ valgrind-3.7.0/configure.in 2012-03-05 13:49:04.000000000 -0500
|
||||
@@ -175,7 +175,7 @@ case "${host_cpu}" in
|
||||
@@ -186,7 +186,7 @@ case "${host_cpu}" in
|
||||
ARCH_MAX="s390x"
|
||||
;;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
;;
|
||||
--- valgrind-3.7.0.old/configure 2012-03-05 15:16:23.000000000 -0500
|
||||
+++ valgrind-3.7.0/configure 2012-03-05 13:49:04.000000000 -0500
|
||||
@@ -5279,7 +5279,7 @@
|
||||
@@ -5335,7 +5335,7 @@
|
||||
ARCH_MAX="s390x"
|
||||
;;
|
||||
|
@ -1,7 +1,7 @@
|
||||
--- 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*
|
||||
obj:*/lib*/libpthread-2.*so*
|
||||
}
|
||||
{
|
||||
+ helgrind-glibc2X-102a
|
@ -15,9 +15,9 @@ main (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c.jj 2007-12-11 00:18:43.000000000 +0100
|
||||
+++ valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c 2008-03-03 11:35:15.000000000 +0100
|
||||
@@ -2455,10 +2455,15 @@ PRE(sys_openat)
|
||||
--- valgrind-3.8.0/coregrind/m_syswrap/syswrap-linux.c.jj 2007-12-11 00:18:43.000000000 +0100
|
||||
+++ valgrind-3.8.0/coregrind/m_syswrap/syswrap-linux.c 2008-03-03 11:35:15.000000000 +0100
|
||||
@@ -3308,10 +3308,15 @@ PRE(sys_openat)
|
||||
int, dfd, const char *, filename, int, flags);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- valgrind/include/vki/vki-amd64-linux.h.jj 2009-08-19 09:37:07.000000000 -0400
|
||||
+++ valgrind/include/vki/vki-amd64-linux.h 2010-01-20 04:41:52.662552000 -0500
|
||||
@@ -310,6 +310,9 @@ struct vki_stat {
|
||||
@@ -328,6 +328,9 @@ struct vki_stat {
|
||||
long st_blksize;
|
||||
long st_blocks; /* Number 512-byte blocks allocated. */
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
unsigned long st_mtime;
|
||||
--- valgrind/include/vki/vki-x86-linux.h.jj 2009-08-19 09:37:07.000000000 -0400
|
||||
+++ valgrind/include/vki/vki-x86-linux.h 2010-01-20 04:42:19.649995000 -0500
|
||||
@@ -348,6 +348,9 @@ struct vki_stat {
|
||||
@@ -366,6 +366,9 @@ struct vki_stat {
|
||||
unsigned long st_size;
|
||||
unsigned long st_blksize;
|
||||
unsigned long st_blocks;
|
||||
@ -24,7 +24,7 @@
|
||||
unsigned long st_mtime;
|
||||
--- valgrind/include/vki/vki-ppc32-linux.h.jj 2009-08-19 09:37:07.000000000 -0400
|
||||
+++ valgrind/include/vki/vki-ppc32-linux.h 2010-01-20 04:42:44.861651000 -0500
|
||||
@@ -392,6 +392,9 @@ struct vki_stat {
|
||||
@@ -410,6 +410,9 @@ struct vki_stat {
|
||||
long st_size;
|
||||
unsigned long st_blksize;
|
||||
unsigned long st_blocks;
|
||||
@ -36,7 +36,7 @@
|
||||
unsigned long st_mtime;
|
||||
--- valgrind/include/vki/vki-ppc64-linux.h.jj 2009-08-19 09:37:07.000000000 -0400
|
||||
+++ valgrind/include/vki/vki-ppc64-linux.h 2010-01-20 04:43:05.579922000 -0500
|
||||
@@ -428,6 +428,9 @@ struct vki_stat {
|
||||
@@ -446,6 +446,9 @@ struct vki_stat {
|
||||
long st_size;
|
||||
unsigned long st_blksize;
|
||||
unsigned long st_blocks;
|
48
valgrind-3.8.0-tests.patch
Normal file
48
valgrind-3.8.0-tests.patch
Normal file
@ -0,0 +1,48 @@
|
||||
Disable some hanging tests.
|
||||
|
||||
--- valgrind-3.8.0/helgrind/tests/Makefile.am.jj 2011-10-26 23:24:25.000000000 +0200
|
||||
+++ valgrind-3.8.0/helgrind/tests/Makefile.am 2012-01-27 15:01:58.955624195 +0100
|
||||
@@ -96,7 +96,6 @@ EXTRA_DIST = \
|
||||
# XXX: tc18_semabuse uses operations that are unsupported on Darwin. It
|
||||
# should be conditionally compiled like tc20_verifywrap is.
|
||||
check_PROGRAMS = \
|
||||
- annotate_hbefore \
|
||||
cond_timedwait_invalid \
|
||||
free_is_write \
|
||||
hg01_all_ok \
|
||||
--- valgrind-3.8.0/helgrind/tests/Makefile.in.jj 2011-11-05 12:26:51.000000000 +0100
|
||||
+++ valgrind-3.8.0/helgrind/tests/Makefile.in 2012-01-27 15:02:40.285383038 +0100
|
||||
@@ -54,8 +54,7 @@
|
||||
@VGCONF_HAVE_PLATFORM_SEC_TRUE@am__append_2 = -DVGA_SEC_@VGCONF_ARCH_SEC@=1 \
|
||||
@VGCONF_HAVE_PLATFORM_SEC_TRUE@ -DVGP_SEC_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1
|
||||
|
||||
-check_PROGRAMS = annotate_hbefore$(EXEEXT) \
|
||||
- cond_timedwait_invalid$(EXEEXT) free_is_write$(EXEEXT) \
|
||||
+check_PROGRAMS = cond_timedwait_invalid$(EXEEXT) free_is_write$(EXEEXT) \
|
||||
hg01_all_ok$(EXEEXT) hg02_deadlock$(EXEEXT) \
|
||||
hg03_inherit$(EXEEXT) hg04_race$(EXEEXT) hg05_race2$(EXEEXT) \
|
||||
hg06_readshared$(EXEEXT) locked_vs_unlocked1$(EXEEXT) \
|
||||
--- valgrind-3.8.0/gdbserver_tests/Makefile.am.jj 2011-10-26 23:24:26.000000000 +0200
|
||||
+++ valgrind-3.8.0/gdbserver_tests/Makefile.am 2012-01-27 14:56:43.369465872 +0100
|
||||
@@ -106,9 +106,7 @@ check_PROGRAMS = \
|
||||
clean_after_fork \
|
||||
fork_chain \
|
||||
passsigalrm \
|
||||
- sleepers \
|
||||
main_pic \
|
||||
- t \
|
||||
watchpoints
|
||||
|
||||
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
|
||||
--- valgrind-3.8.0/gdbserver_tests/Makefile.in.jj 2011-11-05 12:26:51.000000000 +0100
|
||||
+++ valgrind-3.8.0/gdbserver_tests/Makefile.in 2012-01-27 14:57:30.278191493 +0100
|
||||
@@ -55,8 +55,7 @@
|
||||
@VGCONF_HAVE_PLATFORM_SEC_TRUE@ -DVGP_SEC_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1
|
||||
|
||||
check_PROGRAMS = clean_after_fork$(EXEEXT) fork_chain$(EXEEXT) \
|
||||
- passsigalrm$(EXEEXT) sleepers$(EXEEXT) main_pic$(EXEEXT) \
|
||||
- t$(EXEEXT) watchpoints$(EXEEXT)
|
||||
+ passsigalrm$(EXEEXT) main_pic$(EXEEXT) watchpoints$(EXEEXT)
|
||||
subdir = gdbserver_tests
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
@ -1,35 +1,24 @@
|
||||
Summary: Tool for finding memory management bugs in programs
|
||||
Name: valgrind
|
||||
Version: 3.7.0
|
||||
Release: 7%{?dist}
|
||||
Version: 3.8.0
|
||||
Release: 0.1.TEST1.svn12858%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2
|
||||
URL: http://www.valgrind.org/
|
||||
Group: Development/Debuggers
|
||||
|
||||
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
|
||||
Patch1: valgrind-3.7.0-cachegrind-improvements.patch
|
||||
Patch2: valgrind-3.7.0-openat.patch
|
||||
Patch3: valgrind-3.7.0-helgrind-race-supp.patch
|
||||
Patch4: valgrind-3.7.0-stat_h.patch
|
||||
Patch5: valgrind-3.7.0-config_h.patch
|
||||
Patch6: valgrind-3.7.0-capget.patch
|
||||
Patch7: valgrind-3.7.0-glibc-2.15.patch
|
||||
Patch8: valgrind-3.7.0-pie.patch
|
||||
Patch9: valgrind-3.7.0-tests.patch
|
||||
Patch10: valgrind-3.7.0-f-sgetown-ex.patch
|
||||
Patch11: valgrind-3.7.0-scsi-ioctls.patch
|
||||
Patch12: valgrind-3.7.0-enable-armv5.patch
|
||||
Patch13: valgrind-3.7.0-ldso-supp.patch
|
||||
Patch14: valgrind-3.7.0-unspecified-type.patch
|
||||
Patch15: valgrind-3.7.0-rvalue-ref.patch
|
||||
Patch16: valgrind-3.7.0-debug-leak1.patch
|
||||
Patch17: valgrind-3.7.0-debug-leak2.patch
|
||||
Patch18: valgrind-3.7.0-addToXA.patch
|
||||
Patch19: valgrind-3.7.0-debug-types.patch
|
||||
Patch20: valgrind-3.7.0-dwz.patch
|
||||
Patch21: valgrind-3.7.0-glibc-2.16.patch
|
||||
Patch22: valgrind-3.7.0-ref_addr.patch
|
||||
#Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
|
||||
Source0: valgrind-%{version}-TEST1.tar.bz2
|
||||
Patch1: valgrind-3.8.0-cachegrind-improvements.patch
|
||||
Patch2: valgrind-3.8.0-openat.patch
|
||||
Patch3: valgrind-3.8.0-helgrind-race-supp.patch
|
||||
Patch4: valgrind-3.8.0-stat_h.patch
|
||||
Patch5: valgrind-3.8.0-config_h.patch
|
||||
Patch6: valgrind-3.8.0-capget.patch
|
||||
Patch7: valgrind-3.8.0-pie.patch
|
||||
Patch8: valgrind-3.8.0-tests.patch
|
||||
Patch9: valgrind-3.8.0-enable-armv5.patch
|
||||
Patch10: valgrind-3.8.0-ldso-supp.patch
|
||||
|
||||
Obsoletes: valgrind-callgrind
|
||||
%ifarch x86_64 ppc64
|
||||
@ -119,19 +108,6 @@ for details.
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
touch memcheck/tests/dw4.stdout.exp
|
||||
|
||||
%build
|
||||
CC=gcc
|
||||
@ -225,6 +201,11 @@ echo ===============END TESTING===============
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Aug 07 2012 Mark Wielaard <mjw@redhat.com> 3.8.0-0.1.TEST1.svn12858
|
||||
- Update to 3.8.0-TEST1
|
||||
- Clear CFLAGS CXXFLAGS LDFLAGS.
|
||||
- Fix \ line continuation in configure line.
|
||||
|
||||
* Fri Aug 03 2012 Mark Wielaard <mjw@redhat.com> 3.7.0-7
|
||||
- Fixup shadowing warnings valgrind-3.7.0-dwz.patch
|
||||
- Add valgrind-3.7.0-ref_addr.patch (#842659, KDE#298864)
|
||||
|
Loading…
Reference in New Issue
Block a user