rpms/valgrind/F-12 valgrind-3.5.0-dwarf4.patch, NONE, 1.1 valgrind-3.5.0-i686-nops.patch, NONE, 1.1 valgrind-3.5.0-syscalls3.patch, NONE, 1.1 valgrind.spec, 1.80, 1.81
Jakub Jelinek
jakub at fedoraproject.org
Wed Apr 7 12:19:12 UTC 2010
Author: jakub
Update of /cvs/pkgs/rpms/valgrind/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv3608
Modified Files:
valgrind.spec
Added Files:
valgrind-3.5.0-dwarf4.patch valgrind-3.5.0-i686-nops.patch
valgrind-3.5.0-syscalls3.patch
Log Message:
3.5.0-15
valgrind-3.5.0-dwarf4.patch:
d3basics.c | 15 +++++++
priv_d3basics.h | 20 +++++++++
readdwarf.c | 115 +++++++++++++++++++++++++++++++++++++++++++++-----------
readdwarf3.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++-----
4 files changed, 229 insertions(+), 32 deletions(-)
--- NEW FILE valgrind-3.5.0-dwarf4.patch ---
--- valgrind/coregrind/m_debuginfo/readdwarf.c.jj 2010-04-07 11:10:52.000000000 +0200
+++ valgrind/coregrind/m_debuginfo/readdwarf.c 2010-04-07 12:34:56.000000000 +0200
@@ -1,6 +1,6 @@
/*--------------------------------------------------------------------*/
-/*--- Read DWARF1/2/3 debug info. readdwarf.c ---*/
+/*--- Read DWARF1/2/3/4 debug info. readdwarf.c ---*/
/*--------------------------------------------------------------------*/
/*
@@ -139,6 +139,7 @@ typedef struct
UShort li_version;
ULong li_header_length;
UChar li_min_insn_length;
+ UChar li_max_ops_per_insn;
UChar li_default_is_stmt;
Int li_line_base;
UChar li_line_range;
@@ -182,7 +183,8 @@ enum dwarf_line_number_x_ops
{
DW_LNE_end_sequence = 1,
DW_LNE_set_address = 2,
- DW_LNE_define_file = 3
+ DW_LNE_define_file = 3,
+ DW_LNE_set_discriminator = 4
};
typedef struct
@@ -199,7 +201,8 @@ typedef struct
UInt column;
Int is_stmt;
Int basic_block;
- Int end_sequence;
+ UChar end_sequence;
+ UChar op_index;
} LineSMR;
@@ -302,6 +305,7 @@ void reset_state_machine ( Int is_stmt )
state_machine_regs.is_stmt = is_stmt;
state_machine_regs.basic_block = 0;
state_machine_regs.end_sequence = 0;
+ state_machine_regs.op_index = 0;
}
/* Look up a directory name, or return NULL if unknown. */
@@ -393,6 +397,7 @@ Word process_extended_line_op( struct _D
case DW_LNE_set_address:
adr = *((Addr *)data);
state_machine_regs.address = adr;
+ state_machine_regs.op_index = 0;
if (di->ddump_line)
VG_(printf)(" Extended opcode %d: set Address to 0x%lx\n",
(Int)op_code, (Addr)adr);
@@ -411,6 +416,11 @@ Word process_extended_line_op( struct _D
VG_(printf)(" DWARF2-line: set_address\n");
break;
+ case DW_LNE_set_discriminator:
+ read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ break;
+
default:
if (di->ddump_line)
VG_(printf)("process_extended_line_op:default\n");
@@ -513,9 +523,9 @@ void read_dwarf2_lineblock ( struct _Deb
VG_(printf)(" DWARF Version: %d\n",
(Int)info.li_version);
- if (info.li_version != 2 && info.li_version != 3) {
+ if (info.li_version != 2 && info.li_version != 3 && info.li_version != 4) {
ML_(symerr)(di, True,
- "Only DWARF version 2 and 3 line info "
+ "Only DWARF version 2, 3 and 4 line info "
"is currently supported.");
goto out;
}
@@ -533,6 +543,20 @@ void read_dwarf2_lineblock ( struct _Deb
VG_(printf)(" Minimum Instruction Length: %d\n",
(Int)info.li_min_insn_length);
+ if (info.li_version >= 4) {
+ info.li_max_ops_per_insn = * ((UChar *)external);
+ if (info.li_max_ops_per_insn == 0) {
+ ML_(symerr)(di, True,
+ "Invalid Maximum Ops Per Insn in line info.");
+ goto out;
+ }
+ external += 1;
+ if (di->ddump_line)
+ VG_(printf)(" Maximum Ops Per Insn: %d\n",
+ (Int)info.li_max_ops_per_insn);
+ } else
+ info.li_max_ops_per_insn = 1;
+
info.li_default_is_stmt = * ((UChar *)external);
external += 1;
if (di->ddump_line)
@@ -714,10 +738,18 @@ void read_dwarf2_lineblock ( struct _Deb
Int advAddr;
op_code -= info.li_opcode_base;
- adv = (op_code / info.li_line_range)
- * info.li_min_insn_length;
- advAddr = adv;
- state_machine_regs.address += adv;
+ adv = (op_code / info.li_line_range);
+ if (info.li_max_ops_per_insn == 1) {
+ adv *= info.li_min_insn_length;
+ advAddr = adv;
+ state_machine_regs.address += adv;
+ } else {
+ advAddr = ((state_machine_regs.op_index + adv)
+ / info.li_max_ops_per_insn) * info.li_min_insn_length;
+ state_machine_regs.address += advAddr;
+ state_machine_regs.op_index = (state_machine_regs.op_index + adv)
+ % info.li_max_ops_per_insn;
+ }
if (0) VG_(printf)("smr.a += %#x\n", adv );
adv = (op_code % info.li_line_range) + info.li_line_base;
@@ -800,10 +832,19 @@ void read_dwarf2_lineblock ( struct _Deb
break;
case DW_LNS_advance_pc:
- adv = info.li_min_insn_length
- * read_leb128 (data, & bytes_read, 0);
+ adv = read_leb128 (data, & bytes_read, 0);
data += bytes_read;
- state_machine_regs.address += adv;
+ if (info.li_max_ops_per_insn == 1) {
+ adv *= info.li_min_insn_length;
+ state_machine_regs.address += adv;
+ } else {
+ state_machine_regs.address
+ += ((state_machine_regs.op_index + adv)
+ / info.li_max_ops_per_insn) * info.li_min_insn_length;
+ state_machine_regs.op_index
+ = (state_machine_regs.op_index + adv)
+ % info.li_max_ops_per_insn;
+ }
if (0) VG_(printf)("smr.a += %#x\n", adv );
if (di->ddump_line)
VG_(printf)(" Advance PC by %d to 0x%lx\n",
@@ -851,9 +892,18 @@ void read_dwarf2_lineblock ( struct _Deb
break;
case DW_LNS_const_add_pc:
- adv = (((255 - info.li_opcode_base) / info.li_line_range)
- * info.li_min_insn_length);
- state_machine_regs.address += adv;
+ adv = ((255 - info.li_opcode_base) / info.li_line_range);
+ if (info.li_max_ops_per_insn == 1) {
+ adv *= info.li_min_insn_length;
+ state_machine_regs.address += adv;
+ } else {
+ state_machine_regs.address
+ += ((state_machine_regs.op_index + adv)
+ / info.li_max_ops_per_insn) * info.li_min_insn_length;
+ state_machine_regs.op_index
+ = (state_machine_regs.op_index + adv)
+ % info.li_max_ops_per_insn;
+ }
if (0) VG_(printf)("smr.a += %#x\n", adv );
if (di->ddump_line)
VG_(printf)(" Advance PC by constant %d to 0x%lx\n",
@@ -865,6 +915,7 @@ void read_dwarf2_lineblock ( struct _Deb
adv = *((UShort *)data);
data += 2;
state_machine_regs.address += adv;
+ state_machine_regs.op_index = 0;
if (0) VG_(printf)("smr.a += %#x\n", adv );
if (di->ddump_line)
VG_(printf)(" DWARF2-line: fixed_advance_pc\n");
@@ -979,7 +1030,7 @@ void read_unitinfo_dwarf2( /*OUT*/UnitIn
blklen = read_initial_length_field( p, &ui->dw64 );
p += ui->dw64 ? 12 : 4;
- /* version should be 2 */
+ /* version should be 2, 3 or 4 */
ver = *((UShort*)p);
p += 2;
@@ -1066,7 +1117,11 @@ void read_unitinfo_dwarf2( /*OUT*/UnitIn
case 0x08: /* FORM_string */ sval = (Char*)p;
p += VG_(strlen)((Char*)p) + 1; break;
case 0x0b: /* FORM_data1 */ cval = *p; p++; break;
-
+ case 0x17: /* FORM_sec_offset */if (ui->dw64) {
+ cval = *((ULong*)p); p += 8; break;
+ }
+ cval = *((UInt*)p); p += 4; break;
+
/* TODO : Following ones just skip data - implement if you need */
case 0x01: /* FORM_addr */ p += addr_size; break;
case 0x03: /* FORM_block2 */ p += *((UShort*)p) + 2; break;
@@ -1085,7 +1140,10 @@ void read_unitinfo_dwarf2( /*OUT*/UnitIn
case 0x13: /* FORM_ref4 */ p += 4; break;
case 0x14: /* FORM_ref8 */ p += 8; break;
case 0x15: /* FORM_ref_udata */ read_leb128U( &p ); break;
-
+ case 0x18: /* FORM_exprloc */ p += read_leb128U( &p ); break;
+ case 0x19: /* FORM_flag_present */break;
+ case 0x20: /* FORM_ref_sig8 */ p += 8; break;
+
default:
VG_(printf)( "### unhandled dwarf2 abbrev form code 0x%x\n", form );
break;
@@ -1163,9 +1221,9 @@ void ML_(read_debuginfo_dwarf3)
/* version should be 2 */
ver = *((UShort*)( block_img + blklen_len ));
- if ( ver != 2 && ver != 3 ) {
+ if ( ver != 2 && ver != 3 && ver != 4 ) {
ML_(symerr)( di, True,
- "Ignoring non-Dwarf2/3 block in .debug_info" );
+ "Ignoring non-Dwarf2/3/4 block in .debug_info" );
continue;
}
@@ -3705,8 +3763,8 @@ void ML_(read_callframe_info_dwarf3)
VG_(printf)("cie.version = %d\n", (Int)cie_version);
if (di->ddump_frames)
VG_(printf)(" Version: %d\n", (Int)cie_version);
- if (cie_version != 1 && cie_version != 3) {
- how = "unexpected CIE version (not 1 nor 3)";
+ if (cie_version != 1 && cie_version != 3 && cie_version != 4) {
+ how = "unexpected CIE version (not 1 nor 3 nor 4)";
goto bad;
}
@@ -3722,6 +3780,19 @@ void ML_(read_callframe_info_dwarf3)
cie_augmentation += 2;
}
+ if (cie_version >= 4) {
+ if (read_UChar(data) != sizeof(Addr)) {
+ how = "unexpected address size";
+ goto bad;
+ }
+ data += sizeof(UChar);
+ if (read_UChar(data) != 0) {
+ how = "unexpected non-zero segment size";
+ goto bad;
+ }
+ data += sizeof(UChar);
+ }
+
the_CIEs[this_CIE].code_a_f = read_leb128( data, &nbytes, 0);
data += nbytes;
if (di->trace_cfi)
--- valgrind/coregrind/m_debuginfo/readdwarf3.c.jj 2010-04-07 11:10:52.000000000 +0200
+++ valgrind/coregrind/m_debuginfo/readdwarf3.c 2010-04-07 12:48:07.000000000 +0200
@@ -1,6 +1,6 @@
/*--------------------------------------------------------------------*/
-/*--- Read DWARF3 ".debug_info" sections (DIE trees). ---*/
+/*--- Read DWARF3/4 ".debug_info" sections (DIE trees). ---*/
/*--- readdwarf3.c ---*/
/*--------------------------------------------------------------------*/
@@ -387,7 +387,7 @@ typedef
void (*barf)( HChar* ) __attribute__((noreturn));
/* Is this 64-bit DWARF ? */
Bool is_dw64;
- /* Which DWARF version ? (2 or 3) */
+ /* Which DWARF version ? (2, 3 or 4) */
UShort version;
/* Length of this Compilation Unit, as stated in the
.unit_length :: InitialLength field of the CU Header.
@@ -805,8 +805,8 @@ void parse_CU_Header ( /*OUT*/CUConst* c
/* version */
cc->version = get_UShort( c );
- if (cc->version != 2 && cc->version != 3)
- cc->barf( "parse_CU_Header: is neither DWARF2 nor DWARF3" );
+ if (cc->version != 2 && cc->version != 3 && cc->version != 4)
+ cc->barf( "parse_CU_Header: is neither DWARF2 nor DWARF3 nor DWARF4" );
TRACE_D3(" Version: %d\n", (Int)cc->version );
/* debug_abbrev_offset */
@@ -984,11 +984,21 @@ void get_Form_contents ( /*OUT*/ULong* c
*ctsSzB = 8;
TRACE_D3("%llu", *cts);
break;
+ case DW_FORM_sec_offset:
+ *cts = (ULong)get_Dwarfish_UWord( c, cc->is_dw64 );
+ *ctsSzB = cc->is_dw64 ? 8 : 4;
+ TRACE_D3("%llu", *cts);
+ break;
case DW_FORM_sdata:
*cts = (ULong)(Long)get_SLEB128(c);
*ctsSzB = 8;
TRACE_D3("%lld", (Long)*cts);
break;
+ case DW_FORM_udata:
+ *cts = (ULong)(Long)get_ULEB128(c);
+ *ctsSzB = 8;
+ TRACE_D3("%llu", (Long)*cts);
+ break;
case DW_FORM_addr:
/* note, this is a hack. DW_FORM_addr is defined as getting
a word the size of the target machine as defined by the
@@ -1055,6 +1065,22 @@ void get_Form_contents ( /*OUT*/ULong* c
*ctsMemSzB = 1 + (ULong)VG_(strlen)(str);
break;
}
+ case DW_FORM_ref1: {
+ UChar u8 = get_UChar(c);
+ UWord res = cc->cu_start_offset + (UWord)u8;
+ *cts = (ULong)res;
+ *ctsSzB = sizeof(UWord);
+ TRACE_D3("<%lx>", res);
+ break;
+ }
+ case DW_FORM_ref2: {
+ UShort u16 = get_UShort(c);
+ UWord res = cc->cu_start_offset + (UWord)u16;
+ *cts = (ULong)res;
+ *ctsSzB = sizeof(UWord);
+ TRACE_D3("<%lx>", res);
+ break;
+ }
case DW_FORM_ref4: {
UInt u32 = get_UInt(c);
UWord res = cc->cu_start_offset + (UWord)u32;
@@ -1063,6 +1089,22 @@ void get_Form_contents ( /*OUT*/ULong* c
TRACE_D3("<%lx>", res);
break;
}
+ case DW_FORM_ref8: {
+ ULong u64 = get_ULong(c);
+ UWord res = cc->cu_start_offset + (UWord)u64;
+ *cts = (ULong)res;
+ *ctsSzB = sizeof(UWord);
+ TRACE_D3("<%lx>", res);
+ break;
+ }
+ case DW_FORM_ref_udata: {
+ ULong u64 = get_ULEB128(c);
+ UWord res = cc->cu_start_offset + (UWord)u64;
+ *cts = (ULong)res;
+ *ctsSzB = sizeof(UWord);
+ TRACE_D3("<%lx>", res);
+ break;
+ }
case DW_FORM_flag: {
UChar u8 = get_UChar(c);
TRACE_D3("%u", (UInt)u8);
@@ -1070,6 +1112,11 @@ void get_Form_contents ( /*OUT*/ULong* c
*ctsSzB = 1;
break;
}
+ case DW_FORM_flag_present:
+ TRACE_D3("1");
+ *cts = 1;
+ *ctsSzB = 1;
+ break;
case DW_FORM_block1: {
ULong u64b;
ULong u64 = (ULong)get_UChar(c);
@@ -1096,6 +1143,50 @@ void get_Form_contents ( /*OUT*/ULong* c
*ctsMemSzB = (UWord)u64;
break;
}
+ case DW_FORM_block4: {
+ ULong u64b;
+ ULong u64 = (ULong)get_UInt(c);
+ UChar* block = get_address_of_Cursor(c);
+ TRACE_D3("%llu byte block: ", u64);
+ for (u64b = u64; u64b > 0; u64b--) {
+ UChar u8 = get_UChar(c);
+ TRACE_D3("%x ", (UInt)u8);
+ }
+ *cts = (ULong)(UWord)block;
+ *ctsMemSzB = (UWord)u64;
+ break;
+ }
+ case DW_FORM_exprloc:
+ case DW_FORM_block: {
+ ULong u64b;
+ ULong u64 = (ULong)get_ULEB128(c);
+ UChar* block = get_address_of_Cursor(c);
+ TRACE_D3("%llu byte block: ", u64);
+ for (u64b = u64; u64b > 0; u64b--) {
+ UChar u8 = get_UChar(c);
+ TRACE_D3("%x ", (UInt)u8);
+ }
+ *cts = (ULong)(UWord)block;
+ *ctsMemSzB = (UWord)u64;
+ break;
+ }
+ case DW_FORM_ref_sig8: {
+ ULong u64b;
+ UChar* block = get_address_of_Cursor(c);
+ TRACE_D3("8 byte signature: ");
+ for (u64b = 8; u64b > 0; u64b--) {
+ UChar u8 = get_UChar(c);
+ TRACE_D3("%x ", (UInt)u8);
+ }
+ *cts = (ULong)(UWord)block;
+ *ctsMemSzB = 8;
+ break;
+ }
+ case DW_FORM_indirect:
+ get_Form_contents (cts, ctsSzB, ctsMemSzB, cc, c, td3,
+ (DW_FORM)get_ULEB128(c));
+ return;
+
default:
VG_(printf)(
"get_Form_contents: unhandled %d (%s) at <%lx>\n",
@@ -1322,11 +1413,13 @@ void read_filename_table( /*MOD*/D3VarPa
get_Initial_Length( &is_dw64, &c,
"read_filename_table: invalid initial-length field" );
version = get_UShort( &c );
- if (version != 2 && version != 3)
- cc->barf("read_filename_table: Only DWARF version 2 and 3 line info "
+ if (version != 2 && version != 3 && version != 4)
+ cc->barf("read_filename_table: Only DWARF version 2, 3 and 4 line info "
"is currently supported.");
/*header_length = (ULong)*/ get_Dwarfish_UWord( &c, is_dw64 );
/*minimum_instruction_length = */ get_UChar( &c );
+ if (version >= 4)
+ /*maximum_operations_per_insn = */ get_UChar( &c );
/*default_is_stmt = */ get_UChar( &c );
/*line_base = (Char)*/ get_UChar( &c );
/*line_range = */ get_UChar( &c );
@@ -2025,7 +2118,7 @@ static void parse_type_DIE ( /*MOD*/XArr
case DW_LANG_C89: case DW_LANG_C:
case DW_LANG_C_plus_plus: case DW_LANG_ObjC:
case DW_LANG_ObjC_plus_plus: case DW_LANG_UPC:
- case DW_LANG_Upc:
+ case DW_LANG_Upc: case DW_LANG_C99:
parser->language = 'C'; break;
case DW_LANG_Fortran77: case DW_LANG_Fortran90:
case DW_LANG_Fortran95:
@@ -2033,8 +2126,8 @@ static void parse_type_DIE ( /*MOD*/XArr
case DW_LANG_Ada83: case DW_LANG_Cobol74:
case DW_LANG_Cobol85: case DW_LANG_Pascal83:
case DW_LANG_Modula2: case DW_LANG_Java:
- case DW_LANG_C99: case DW_LANG_Ada95:
- case DW_LANG_PLI: case DW_LANG_D:
+ case DW_LANG_Ada95: case DW_LANG_PLI:
+ case DW_LANG_D: case DW_LANG_Python:
case DW_LANG_Mips_Assembler:
parser->language = '?'; break;
default:
--- valgrind/coregrind/m_debuginfo/priv_d3basics.h.jj 2010-04-07 11:10:52.000000000 +0200
+++ valgrind/coregrind/m_debuginfo/priv_d3basics.h 2010-04-07 11:50:45.000000000 +0200
@@ -104,6 +104,10 @@ typedef enum
DW_TAG_imported_unit = 0x3d,
DW_TAG_condition = 0x3f,
DW_TAG_shared_type = 0x40,
+ /* DWARF 4. */
+ DW_TAG_type_unit = 0x41,
+ DW_TAG_rvalue_reference_type = 0x42,
+ DW_TAG_template_alias = 0x43,
/* SGI/MIPS Extensions. */
DW_TAG_MIPS_loop = 0x4081,
/* HP extensions. See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz . */
@@ -158,6 +162,8 @@ typedef enum dwarf_source_language
DW_LANG_ObjC_plus_plus = 0x0011,
DW_LANG_UPC = 0x0012,
DW_LANG_D = 0x0013,
+ /* DWARF 4. */
+ DW_LANG_Python = 0x0014,
/* MIPS. */
DW_LANG_Mips_Assembler = 0x8001,
/* UPC. */
@@ -188,7 +194,12 @@ typedef enum
DW_FORM_ref4 = 0x13,
DW_FORM_ref8 = 0x14,
DW_FORM_ref_udata = 0x15,
- DW_FORM_indirect = 0x16
+ DW_FORM_indirect = 0x16,
+ /* DWARF 4 values. */
+ DW_FORM_sec_offset = 0x17,
+ DW_FORM_exprloc = 0x18,
+ DW_FORM_flag_present = 0x19,
+ DW_FORM_ref_sig8 = 0x20
}
DW_FORM;
@@ -285,6 +296,13 @@ typedef enum
DW_AT_elemental = 0x66,
DW_AT_pure = 0x67,
DW_AT_recursive = 0x68,
+ /* DWARF 4 values. */
+ DW_AT_signature = 0x69,
+ DW_AT_main_subprogram = 0x6a,
+ DW_AT_data_bit_offset = 0x6b,
+ DW_AT_const_expr = 0x6c,
+ DW_AT_enum_class = 0x6d,
+ DW_AT_linkage_name = 0x6e,
/* SGI/MIPS extensions. */
DW_AT_MIPS_fde = 0x2001,
DW_AT_MIPS_loop_begin = 0x2002,
--- valgrind/coregrind/m_debuginfo/d3basics.c.jj 2010-04-07 11:10:52.000000000 +0200
+++ valgrind/coregrind/m_debuginfo/d3basics.c 2010-04-07 11:50:45.000000000 +0200
@@ -124,6 +124,10 @@ HChar* ML_(pp_DW_TAG) ( DW_TAG tag )
case DW_TAG_imported_unit: return "DW_TAG_imported_unit";
case DW_TAG_condition: return "DW_TAG_condition";
case DW_TAG_shared_type: return "DW_TAG_shared_type";
+ /* DWARF 4. */
+ case DW_TAG_type_unit: return "DW_TAG_type_unit";
+ case DW_TAG_rvalue_reference_type: return "DW_TAG_rvalue_reference_type";
+ case DW_TAG_template_alias: return "DW_TAG_template_alias";
/* SGI/MIPS Extensions. */
case DW_TAG_MIPS_loop: return "DW_TAG_MIPS_loop";
/* HP extensions. See:
@@ -172,6 +176,10 @@ HChar* ML_(pp_DW_FORM) ( DW_FORM form )
case DW_FORM_ref8: return "DW_FORM_ref8";
case DW_FORM_ref_udata: return "DW_FORM_ref_udata";
case DW_FORM_indirect: return "DW_FORM_indirect";
+ case DW_FORM_sec_offset:return "DW_FORM_sec_offset";
+ 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";
default: return "DW_FORM_???";
}
}
@@ -269,6 +277,13 @@ HChar* ML_(pp_DW_AT) ( DW_AT attr )
case DW_AT_elemental: return "DW_AT_elemental";
case DW_AT_pure: return "DW_AT_pure";
case DW_AT_recursive: return "DW_AT_recursive";
+ /* DWARF 4 values. */
+ case DW_AT_signature: return "DW_AT_signature";
+ case DW_AT_main_subprogram: return "DW_AT_main_subprogram";
+ case DW_AT_data_bit_offset: return "DW_AT_data_bit_offset";
+ case DW_AT_const_expr: return "DW_AT_const_expr";
+ case DW_AT_enum_class: return "DW_AT_enum_class";
+ case DW_AT_linkage_name: return "DW_AT_linkage_name";
/* SGI/MIPS extensions. */
/* case DW_AT_MIPS_fde: return "DW_AT_MIPS_fde"; */
/* DW_AT_MIPS_fde == DW_AT_HP_unmodifiable */
valgrind-3.5.0-i686-nops.patch:
guest_x86_toIR.c | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
--- NEW FILE valgrind-3.5.0-i686-nops.patch ---
--- valgrind/VEX/priv/guest_x86_toIR.c.jj 2010-04-07 01:25:15.000000000 +0200
+++ valgrind/VEX/priv/guest_x86_toIR.c 2010-04-07 09:13:57.000000000 +0200
@@ -7919,15 +7919,27 @@ DisResult disInstr_X86_WRK (
delta += 5;
goto decode_success;
}
- /* don't barf on recent binutils padding
- 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%eax,%eax,1) */
- if (code[0] == 0x66
- && code[1] == 0x2E && code[2] == 0x0F && code[3] == 0x1F
- && code[4] == 0x84 && code[5] == 0x00 && code[6] == 0x00
- && code[7] == 0x00 && code[8] == 0x00 && code[9] == 0x00 ) {
- DIP("nopw %%cs:0x0(%%eax,%%eax,1)\n");
- delta += 10;
- goto decode_success;
+ /* Don't barf on recent binutils padding
+ 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%eax,%eax,1)
+ 66 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%eax,%eax,1)
+ 66 66 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%eax,%eax,1)
+ 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%eax,%eax,1)
+ 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%eax,%eax,1) */
+ if (code[0] == 0x66) {
+ Int data16_cnt;
+ for (data16_cnt = 1; data16_cnt < 6; data16_cnt++)
+ if (code[data16_cnt] != 0x66)
+ break;
+
+ if (code[data16_cnt] == 0x2E && code[data16_cnt + 1] == 0x0F
+ && code[data16_cnt + 2] == 0x1F && code[data16_cnt + 3] == 0x84
+ && code[data16_cnt + 4] == 0x00 && code[data16_cnt + 5] == 0x00
+ && code[data16_cnt + 6] == 0x00 && code[data16_cnt + 7] == 0x00
+ && code[data16_cnt + 8] == 0x00 ) {
+ DIP("nopw %%cs:0x0(%%eax,%%eax,1)\n");
+ delta += 9 + data16_cnt;
+ goto decode_success;
+ }
}
}
valgrind-3.5.0-syscalls3.patch:
priv_syswrap-linux.h | 2 ++
syswrap-amd64-linux.c | 2 +-
syswrap-linux.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
syswrap-ppc32-linux.c | 2 +-
syswrap-ppc64-linux.c | 2 +-
syswrap-x86-linux.c | 4 ++--
6 files changed, 54 insertions(+), 5 deletions(-)
--- NEW FILE valgrind-3.5.0-syscalls3.patch ---
--- valgrind/coregrind/m_syswrap/syswrap-linux.c (revision 10964)
+++ valgrind/coregrind/m_syswrap/syswrap-linux.c (revision 11100)
@@ -2567,6 +2588,29 @@ POST(sys_perf_counter_open)
}
}
+PRE(sys_getcpu)
+{
+ PRINT("sys_getcpu ( %#lx, %#lx, %#lx )" , ARG1,ARG2,ARG3);
+ PRE_REG_READ3(int, "getcpu",
+ unsigned *, cpu, unsigned *, node, struct vki_getcpu_cache *, tcache);
+ if (ARG1 != 0)
+ PRE_MEM_WRITE( "getcpu(cpu)", ARG1, sizeof(unsigned) );
+ if (ARG2 != 0)
+ PRE_MEM_WRITE( "getcpu(node)", ARG2, sizeof(unsigned) );
+ if (ARG3 != 0)
+ PRE_MEM_WRITE( "getcpu(tcache)", ARG3, sizeof(struct vki_getcpu_cache) );
+}
+
+POST(sys_getcpu)
+{
+ if (ARG1 != 0)
+ POST_MEM_WRITE( ARG1, sizeof(unsigned) );
+ if (ARG2 != 0)
+ POST_MEM_WRITE( ARG2, sizeof(unsigned) );
+ if (ARG3 != 0)
+ POST_MEM_WRITE( ARG3, sizeof(struct vki_getcpu_cache) );
+}
+
/* ---------------------------------------------------------------------
utime wrapper
------------------------------------------------------------------ */
@@ -3453,6 +3497,30 @@ PRE(sys_delete_module)
}
/* ---------------------------------------------------------------------
+ splice wrappers
+ ------------------------------------------------------------------ */
+
+PRE(sys_splice)
+{
+ *flags |= SfMayBlock;
+ PRINT("sys_splice ( %ld, %#lx, %ld, %#lx, %ld, %ld )",
+ ARG1,ARG2,ARG3,ARG4,ARG5,ARG6);
+ PRE_REG_READ6(int32_t, "splice",
+ int, fd_in, vki_loff_t *, off_in,
+ int, fd_out, vki_loff_t *, off_out,
+ vki_size_t, len, unsigned int, flags);
+ if (!ML_(fd_allowed)(ARG1, "splice(fd_in)", tid, False) ||
+ !ML_(fd_allowed)(ARG3, "splice(fd_out)", tid, False)) {
+ SET_STATUS_Failure( VKI_EBADF );
+ } else {
+ if (ARG2 != 0)
+ PRE_MEM_READ( "splice(off_in)", ARG2, sizeof(vki_loff_t));
+ if (ARG4 != 0)
+ PRE_MEM_READ( "splice(off_out)", ARG4, sizeof(vki_loff_t));
+ }
+}
+
+/* ---------------------------------------------------------------------
oprofile-related wrappers
------------------------------------------------------------------ */
--- valgrind/coregrind/m_syswrap/priv_syswrap-linux.h (revision 10964)
+++ valgrind/coregrind/m_syswrap/priv_syswrap-linux.h (revision 11100)
@@ -166,6 +166,8 @@ DECL_TEMPLATE(linux, sys_utimensat);
DECL_TEMPLATE(linux, sys_preadv);
DECL_TEMPLATE(linux, sys_pwritev);
DECL_TEMPLATE(linux, sys_dup3);
+DECL_TEMPLATE(linux, sys_getcpu);
+DECL_TEMPLATE(linux, sys_splice);
DECL_TEMPLATE(linux, sys_add_key);
DECL_TEMPLATE(linux, sys_request_key);
--- valgrind/coregrind/m_syswrap/syswrap-amd64-linux.c (revision 10964)
+++ valgrind/coregrind/m_syswrap/syswrap-amd64-linux.c (revision 11100)
@@ -1371,7 +1382,7 @@ const SyscallTableEntry ML_(syscall_tabl
LINX_(__NR_set_robust_list, sys_set_robust_list), // 273
LINXY(__NR_get_robust_list, sys_get_robust_list), // 274
-// LINX_(__NR_splice, sys_ni_syscall), // 275
+ LINX_(__NR_splice, sys_splice), // 275
// LINX_(__NR_tee, sys_ni_syscall), // 276
LINX_(__NR_sync_file_range, sys_sync_file_range), // 277
// LINX_(__NR_vmsplice, sys_ni_syscall), // 278
--- valgrind/coregrind/m_syswrap/syswrap-x86-linux.c (revision 10964)
+++ valgrind/coregrind/m_syswrap/syswrap-x86-linux.c (revision 11100)
@@ -2240,13 +2251,13 @@ const SyscallTableEntry ML_(syscall_tabl
// LINX_(__NR_unshare, sys_unshare), // 310
LINX_(__NR_set_robust_list, sys_set_robust_list), // 311
LINXY(__NR_get_robust_list, sys_get_robust_list), // 312
-// LINX_(__NR_splice, sys_ni_syscall), // 313
+ LINX_(__NR_splice, sys_splice), // 313
LINX_(__NR_sync_file_range, sys_sync_file_range), // 314
// LINX_(__NR_tee, sys_ni_syscall), // 315
// LINX_(__NR_vmsplice, sys_ni_syscall), // 316
// LINX_(__NR_move_pages, sys_ni_syscall), // 317
-// LINX_(__NR_getcpu, sys_ni_syscall), // 318
+ LINXY(__NR_getcpu, sys_getcpu), // 318
LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 319
LINX_(__NR_utimensat, sys_utimensat), // 320
--- valgrind/coregrind/m_syswrap/syswrap-ppc32-linux.c (revision 10964)
+++ valgrind/coregrind/m_syswrap/syswrap-ppc32-linux.c (revision 11100)
@@ -1859,7 +1870,7 @@ const SyscallTableEntry ML_(syscall_tabl
LINX_(__NR_set_robust_list, sys_set_robust_list), // 299
LINXY(__NR_get_robust_list, sys_get_robust_list), // 300
// LINX_(__NR_move_pages, sys_ni_syscall), // 301
-// LINX_(__NR_getcpu, sys_ni_syscall), // 302
+ LINXY(__NR_getcpu, sys_getcpu), // 302
LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 303
LINX_(__NR_utimensat, sys_utimensat), // 304
LINXY(__NR_signalfd, sys_signalfd), // 305
--- valgrind/coregrind/m_syswrap/syswrap-ppc64-linux.c (revision 10964)
+++ valgrind/coregrind/m_syswrap/syswrap-ppc64-linux.c (revision 11100)
@@ -1500,7 +1511,7 @@ const SyscallTableEntry ML_(syscall_tabl
LINX_(__NR_set_robust_list, sys_set_robust_list), // 299
LINXY(__NR_get_robust_list, sys_get_robust_list), // 300
// LINX_(__NR_move_pages, sys_ni_syscall), // 301
-// LINX_(__NR_getcpu, sys_ni_syscall), // 302
+ LINXY(__NR_getcpu, sys_getcpu), // 302
LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 303
LINX_(__NR_utimensat, sys_utimensat), // 304
LINXY(__NR_signalfd, sys_signalfd), // 305
Index: valgrind.spec
===================================================================
RCS file: /cvs/pkgs/rpms/valgrind/F-12/valgrind.spec,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -p -r1.80 -r1.81
--- valgrind.spec 20 Jan 2010 09:46:21 -0000 1.80
+++ valgrind.spec 7 Apr 2010 12:19:12 -0000 1.81
@@ -1,7 +1,7 @@
Summary: Tool for finding memory management bugs in programs
Name: valgrind
Version: 3.5.0
-Release: 14%{?dist}
+Release: 15%{?dist}
Epoch: 1
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
Patch1: valgrind-3.5.0-cachegrind-improvements.patch
@@ -26,6 +26,9 @@ Patch19: valgrind-3.5.0-adjtimex.patch
Patch20: valgrind-3.5.0-DW_OP_mod.patch
Patch21: valgrind-3.5.0-pkgconfig.patch
Patch22: valgrind-3.5.0-stat_h.patch
+Patch23: valgrind-3.5.0-i686-nops.patch
+Patch24: valgrind-3.5.0-dwarf4.patch
+Patch25: valgrind-3.5.0-syscalls3.patch
License: GPLv2
URL: http://www.valgrind.org/
Group: Development/Debuggers
@@ -101,6 +104,9 @@ or valgrind plugins.
%patch20 -p1
%patch21 -p1
%patch22 -p1
+%patch23 -p1
+%patch24 -p1
+%patch25 -p1
%build
%ifarch x86_64 ppc64
@@ -186,6 +192,11 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/*
%changelog
+* Wed Apr 7 2010 Jakub Jelinek <jakub at redhat.com> 3.5.0-15
+- handle i686 nopw insns with more than one data16 prefix (#574889)
+- DWARF4 support
+- handle getcpu and splice syscalls
+
* Wed Jan 20 2010 Jakub Jelinek <jakub at redhat.com> 3.5.0-14
- fix build against latest glibc headers
More information about the scm-commits
mailing list