|
From: <sv...@va...> - 2005-05-01 15:14:08
|
Author: tom
Date: 2005-05-01 16:14:01 +0100 (Sun, 01 May 2005)
New Revision: 3584
Modified:
trunk/coregrind/vg_dwarf.c
trunk/coregrind/vg_symtab2.c
trunk/coregrind/vg_symtab2.h
Log:
Get DWARF CFI handling going on amd64 systems. This also required getting
handling of augmentation strings right.
Modified: trunk/coregrind/vg_dwarf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_dwarf.c 2005-05-01 08:55:38 UTC (rev 3583)
+++ trunk/coregrind/vg_dwarf.c 2005-05-01 15:14:01 UTC (rev 3584)
@@ -909,6 +909,15 @@
=20
8 is the return address (EIP) */
=20
+#if defined(__x86__)
+#define FP_COL 5
+#define SP_COL 4
+#define RA_COL 8
+#elif defined(__amd64__)
+#define FP_COL 6
+#define SP_COL 7
+#define RA_COL 16
+#endif
=20
/* the number of regs we are prepared to unwind */
#define N_CFI_REGS 20
@@ -944,7 +953,28 @@
DW_CFA_hi_user =3D 0x3f
};
=20
+#define DW_EH_PE_absptr 0x00
+#define DW_EH_PE_omit 0xff
=20
+#define DW_EH_PE_uleb128 0x01
+#define DW_EH_PE_udata2 0x02
+#define DW_EH_PE_udata4 0x03
+#define DW_EH_PE_udata8 0x04
+#define DW_EH_PE_sleb128 0x09
+#define DW_EH_PE_sdata2 0x0A
+#define DW_EH_PE_sdata4 0x0B
+#define DW_EH_PE_sdata8 0x0C
+#define DW_EH_PE_signed 0x08
+
+#define DW_EH_PE_pcrel 0x10
+#define DW_EH_PE_textrel 0x20
+#define DW_EH_PE_datarel 0x30
+#define DW_EH_PE_funcrel 0x40
+#define DW_EH_PE_aligned 0x50
+
+#define DW_EH_PE_indirect 0x80
+
+
typedef
struct {
enum { RR_Undef, RR_Same, RR_CFAoff, RR_Reg, RR_Arch } tag;
@@ -1018,18 +1048,18 @@
This is taken to be just after ctx's loc advances; hence the
summary is up to but not including the current loc.
*/
-static Bool summarise_context_x86 ( /*OUT*/CfiSI* si,
- Addr loc_start,
- UnwindContext* ctx )
+static Bool summarise_context( /*OUT*/CfiSI* si,
+ Addr loc_start,
+ UnwindContext* ctx )
{
initCfiSI(si);
=20
/* How to generate the CFA */
- if (ctx->cfa_reg =3D=3D 4 /* ESP */) {
+ if (ctx->cfa_reg =3D=3D SP_COL) {
si->cfa_sprel =3D True;
si->cfa_off =3D ctx->cfa_offset;
} else
- if (ctx->cfa_reg =3D=3D 5 /* EBP */) {
+ if (ctx->cfa_reg =3D=3D FP_COL) {
si->cfa_sprel =3D False;
si->cfa_off =3D ctx->cfa_offset;
} else {
@@ -1044,8 +1074,8 @@
default: goto failed; /* otherwise give up */ =
\
}
=20
- SUMMARISE_HOW(si->ra_how, si->ra_off, ctx->reg[8 /* Return address */=
] );
- SUMMARISE_HOW(si->fp_how, si->fp_off, ctx->reg[5 /* EBP */] );
+ SUMMARISE_HOW(si->ra_how, si->ra_off, ctx->reg[RA_COL] );
+ SUMMARISE_HOW(si->fp_how, si->fp_off, ctx->reg[FP_COL] );
=20
# undef SUMMARISE_HOW
=20
@@ -1055,7 +1085,7 @@
si->sp_off =3D 0;
=20
/* also, gcc says "Undef" for %ebp when it is unchanged. So .. */
- if (ctx->reg[5 /* EBP */].tag =3D=3D RR_Undef)
+ if (ctx->reg[FP_COL].tag =3D=3D RR_Undef)
si->fp_how =3D CFIR_SAME;
=20
/* knock out some obviously stupid cases */
@@ -1073,30 +1103,30 @@
return True;
=20
failed:
- VG_(printf)("summarise_context_x86(loc_start =3D %p)"
+ VG_(printf)("summarise_context(loc_start =3D %p)"
": cannot summarise:\n ", loc_start);
ppUnwindContext(ctx);
return False;
}
=20
-static void ppUnwindContext_x86_summary ( UnwindContext* ctx )
+static void ppUnwindContext_summary ( UnwindContext* ctx )
{
VG_(printf)("0x%llx-1: ", (ULong)ctx->loc);
=20
- if (ctx->cfa_reg =3D=3D 4 /* ESP */) {
- VG_(printf)("SP/CFA=3D%d+%%esp ", ctx->cfa_offset);
+ if (ctx->cfa_reg =3D=3D SP_COL) {
+ VG_(printf)("SP/CFA=3D%d+SP ", ctx->cfa_offset);
} else
- if (ctx->cfa_reg =3D=3D 5 /* EBP */) {
- VG_(printf)("SP/CFA=3D%d+%%ebp ", ctx->cfa_offset);
+ if (ctx->cfa_reg =3D=3D FP_COL) {
+ VG_(printf)("SP/CFA=3D%d+FP ", ctx->cfa_offset);
} else {
VG_(printf)("SP/CFA=3Dunknown ", ctx->cfa_offset);
}
=20
VG_(printf)("RA=3D");
- ppRegRule( &ctx->reg[8 /* Return address */] );
+ ppRegRule( &ctx->reg[RA_COL] );
=20
VG_(printf)("FP=3D");
- ppRegRule( &ctx->reg[5 /* EBP */] );
+ ppRegRule( &ctx->reg[FP_COL] );
VG_(printf)("\n");
}
=20
@@ -1108,6 +1138,41 @@
}
=20
=20
+static Short read_Short ( UChar* data )
+{
+ vg_assert(host_is_little_endian());
+ Short r =3D 0;
+ r =3D data[0]=20
+ | ( ((UInt)data[1]) << 8 );
+ return r;
+}
+
+static Int read_Int ( UChar* data )
+{
+ vg_assert(host_is_little_endian());
+ Int r =3D 0;
+ r =3D data[0]=20
+ | ( ((UInt)data[1]) << 8 )=20
+ | ( ((UInt)data[2]) << 16 )=20
+ | ( ((UInt)data[3]) << 24 );
+ return r;
+}
+
+static Long read_Long ( UChar* data )
+{
+ vg_assert(host_is_little_endian());
+ Long r =3D 0;
+ r =3D data[0]=20
+ | ( ((ULong)data[1]) << 8 )=20
+ | ( ((ULong)data[2]) << 16 )=20
+ | ( ((ULong)data[3]) << 24 )
+ | ( ((ULong)data[4]) << 32 )=20
+ | ( ((ULong)data[5]) << 40 )=20
+ | ( ((ULong)data[6]) << 48 )=20
+ | ( ((ULong)data[7]) << 56 );
+ return r;
+}
+
static UShort read_UShort ( UChar* data )
{
vg_assert(host_is_little_endian());
@@ -1128,10 +1193,27 @@
return r;
}
=20
+static ULong read_ULong ( UChar* data )
+{
+ vg_assert(host_is_little_endian());
+ ULong r =3D 0;
+ r =3D data[0]=20
+ | ( ((ULong)data[1]) << 8 )=20
+ | ( ((ULong)data[2]) << 16 )=20
+ | ( ((ULong)data[3]) << 24 )
+ | ( ((ULong)data[4]) << 32 )=20
+ | ( ((ULong)data[5]) << 40 )=20
+ | ( ((ULong)data[6]) << 48 )=20
+ | ( ((ULong)data[7]) << 56 );
+ return r;
+}
+
static Addr read_Addr ( UChar* data )
{
if (sizeof(Addr) =3D=3D 4)
return read_UInt(data);
+ else if (sizeof(Addr) =3D=3D 8)
+ return read_ULong(data);
vg_assert(0);
}
=20
@@ -1140,7 +1222,97 @@
return data[0];
}
=20
+static UChar default_address_encoding ()
+{
+ switch (sizeof(Addr)) {
+ case 4: return DW_EH_PE_udata4;
+ case 8: return DW_EH_PE_udata8;
+ default: vg_assert(0);
+ }
+}
=20
+static UInt size_of_encoded_address ( UChar encoding )
+{
+ if (encoding =3D=3D DW_EH_PE_omit)
+ return 0;
+
+ switch (encoding & 0x07) {
+ case DW_EH_PE_absptr: return sizeof(Addr);
+ case DW_EH_PE_udata2: return sizeof(UShort);
+ case DW_EH_PE_udata4: return sizeof(UInt);
+ case DW_EH_PE_udata8: return sizeof(ULong);
+ default: vg_assert(0);
+ }
+}
+
+static Addr read_encoded_address ( UChar* data, UChar encoding, Int *nby=
tes,
+ UChar* ehframe, Addr ehframe_addr )
+{
+ Addr base;
+ Int offset;
+
+ vg_assert((encoding & DW_EH_PE_indirect) =3D=3D 0);
+
+ *nbytes =3D 0;
+
+ switch (encoding & 0x70) {
+ case DW_EH_PE_absptr:
+ base =3D 0;
+ break;
+ case DW_EH_PE_pcrel:
+ base =3D ehframe_addr + ( data - ehframe );
+ break;
+ case DW_EH_PE_datarel:
+ vg_assert(0);
+ base =3D /* data base address */ 0;
+ break;
+ case DW_EH_PE_textrel:
+ vg_assert(0);
+ base =3D /* text base address */ 0;
+ break;
+ case DW_EH_PE_funcrel:
+ base =3D 0;
+ break;
+ case DW_EH_PE_aligned:
+ base =3D 0;
+ offset =3D data - ehframe;
+ if ((offset % sizeof(Addr)) !=3D 0) {
+ *nbytes =3D sizeof(Addr) - (offset % sizeof(Addr));
+ data +=3D *nbytes;
+ }
+ break;
+ default:
+ vg_assert(0);
+ }
+
+ if ((encoding & 0x0f) =3D=3D 0x00)
+ encoding |=3D default_address_encoding();
+
+ switch (encoding & 0x0f) {
+ case DW_EH_PE_udata2:
+ *nbytes +=3D sizeof(UShort);
+ return base + read_UShort(data);
+ case DW_EH_PE_udata4:
+ *nbytes +=3D sizeof(UInt);
+ return base + read_UInt(data);
+ case DW_EH_PE_udata8:
+ *nbytes +=3D sizeof(ULong);
+ return base + read_ULong(data);
+ case DW_EH_PE_sdata2:
+ *nbytes +=3D sizeof(Short);
+ return base + read_Short(data);
+ case DW_EH_PE_sdata4:
+ *nbytes +=3D sizeof(Int);
+ return base + read_Int(data);
+ case DW_EH_PE_sdata8:
+ *nbytes +=3D sizeof(Long);
+ return base + read_Long(data);
+ default:
+ vg_assert(0);
+ }
+}
+
+
/* Run a CFI instruction, and also return its length.
Returns 0 if the instruction could not be executed.=20
*/
@@ -1183,11 +1355,21 @@
switch (lo6) {
case DW_CFA_nop:=20
break;
+ case DW_CFA_set_loc:
+ ctx->loc =3D read_Addr(&instr[i]) - ctx->initloc; i+=3D sizeof(=
Addr);
+ break;
case DW_CFA_advance_loc1:
- vg_assert(0);
delta =3D (UInt)read_UChar(&instr[i]); i+=3D sizeof(UChar);
- VG_(printf)("DW_CFA_advance_loc1(%d)\n", delta);=20
+ ctx->loc +=3D delta;
break;
+ case DW_CFA_advance_loc2:
+ delta =3D (UInt)read_UShort(&instr[i]); i+=3D sizeof(UShort);
+ ctx->loc +=3D delta;
+ break;
+ case DW_CFA_advance_loc4:
+ delta =3D (UInt)read_UInt(&instr[i]); i+=3D sizeof(UInt);
+ ctx->loc +=3D delta;
+ break;
=20
case DW_CFA_def_cfa:
reg =3D read_leb128( &instr[i], &nleb, 0 );
@@ -1222,8 +1404,8 @@
break;
}
default:=20
- vg_assert(0);
- VG_(printf)("0:%d\n", (Int)lo6);=20
+ VG_(printf)("Unhandled CFI instruction 0:%d\n", (Int)lo6);=20
+ i =3D 0;
break;
}
=20
@@ -1236,11 +1418,17 @@
{
UInt delta;
Int off, reg, nleb;
+ Addr loc;
Int i =3D 0;
UChar hi2 =3D (instr[i] >> 6) & 3;
UChar lo6 =3D instr[i] & 0x3F;
i++;
=20
+ if (0) VG_(printf)("raw:%x/%x:%x:%x:%x:%x:%x:%x:%x:%x\n",
+ hi2, lo6,
+ instr[i+0], instr[i+1], instr[i+2], instr[i+3],
+ instr[i+4], instr[i+5], instr[i+6], instr[i+7] );
+ =20
if (hi2 =3D=3D DW_CFA_advance_loc) {
VG_(printf)("DW_CFA_advance_loc(%d)\n", (Int)lo6);
return i;
@@ -1266,11 +1454,26 @@
VG_(printf)("DW_CFA_nop\n");=20
break;
=20
+ case DW_CFA_set_loc:
+ loc =3D read_Addr(&instr[i]); i+=3D sizeof(Addr);
+ VG_(printf)("DW_CFA_set_loc(%p)\n", loc);=20
+ break;
+
case DW_CFA_advance_loc1:
delta =3D (UInt)read_UChar(&instr[i]); i+=3D sizeof(UChar);
VG_(printf)("DW_CFA_advance_loc1(%d)\n", delta);=20
break;
=20
+ case DW_CFA_advance_loc2:
+ delta =3D (UInt)read_UShort(&instr[i]); i+=3D sizeof(UShort);
+ VG_(printf)("DW_CFA_advance_loc2(%d)\n", delta);=20
+ break;
+
+ case DW_CFA_advance_loc4:
+ delta =3D (UInt)read_UInt(&instr[i]); i+=3D sizeof(UInt);
+ VG_(printf)("DW_CFA_advance_loc4(%d)\n", delta);=20
+ break;
+
case DW_CFA_def_cfa:
reg =3D read_leb128( &instr[i], &nleb, 0 );
i +=3D nleb;
@@ -1328,7 +1531,7 @@
Int j, i =3D 0;
Addr loc_prev;
if (0) ppUnwindContext(ctx);
- if (0) ppUnwindContext_x86_summary(ctx);
+ if (0) ppUnwindContext_summary(ctx);
while (True) {
loc_prev =3D ctx->loc;
if (i >=3D ilen) break;
@@ -1339,7 +1542,7 @@
i +=3D j;
if (0) ppUnwindContext(ctx);
if (loc_prev !=3D ctx->loc && si) {
- summarise_context_x86 ( &cfisi, loc_prev, ctx );
+ summarise_context ( &cfisi, loc_prev, ctx );
VG_(addCfiSI)(si, &cfisi);
}
}
@@ -1347,7 +1550,7 @@
loc_prev =3D ctx->loc;
ctx->loc =3D fde_arange;
if (si) {
- summarise_context_x86 ( &cfisi, loc_prev, ctx );
+ summarise_context ( &cfisi, loc_prev, ctx );
VG_(addCfiSI)(si, &cfisi);
}
}
@@ -1356,7 +1559,7 @@
=20
=20
void VG_(read_callframe_info_dwarf2)=20
- ( /*OUT*/SegInfo* si, UChar* ehframe, Int ehframe_sz )
+ ( /*OUT*/SegInfo* si, UChar* ehframe, Int ehframe_sz, Addr ehfra=
me_addr )
{
UnwindContext ctx;
Int nbytes;
@@ -1374,6 +1577,8 @@
=20
UChar* cie_instrs =3D NULL;
Int cie_ilen =3D 0;
+ Bool saw_z_augmentation =3D False;
+ UChar address_encoding =3D default_address_encoding();
=20
/* Loop over CIEs/FDEs */
=20
@@ -1425,9 +1630,9 @@
data +=3D 1 + VG_(strlen)(cie_augmentation);
if (0) VG_(printf)("cie.augment =3D \"%s\"\n", cie_augmenta=
tion);
=20
- if (0 !=3D VG_(strcmp)(cie_augmentation, "")) {
- how =3D "non-NULL cie.augmentation";
- goto bad;
+ if (cie_augmentation[0] =3D=3D 'e' && cie_augmentation[1] =3D=3D=
'h') {
+ data +=3D sizeof(Addr);
+ cie_augmentation +=3D 2;
}
=20
cie_codeaf =3D read_leb128( data, &nbytes, 0);
@@ -1441,9 +1646,47 @@
UChar cie_rareg =3D read_UChar(data); data +=3D sizeof(UChar);
if (0) VG_(printf)("cie.ra_reg =3D %d\n", (Int)cie_rareg);
=20
+ saw_z_augmentation =3D *cie_augmentation =3D=3D 'z';
+ if (saw_z_augmentation) {
+ UInt length =3D read_leb128( data, &nbytes, 0);
+ data +=3D nbytes;
+ cie_instrs =3D data + length;
+ cie_augmentation++;
+ } else {
+ cie_instrs =3D NULL;
+ }
+
+ while (*cie_augmentation) {
+ switch (*cie_augmentation) {
+ case 'L':
+ data++;
+ cie_augmentation++;
+ break;
+ case 'R':
+ address_encoding =3D read_UChar(data); data +=3D sizeo=
f(UChar);
+ cie_augmentation++;
+ break;
+ case 'P':
+ data +=3D size_of_encoded_address(address_encoding);
+ cie_augmentation++;
+ break;
+ default:
+ if (cie_instrs =3D=3D NULL) {
+ how =3D "unhandled cie.augmentation";
+ goto bad;
+ }
+ data =3D cie_instrs;
+ goto done_augmentation;
+ }
+ }
+
+ done_augmentation:
+
+ if (0) VG_(printf)("cie.encoding =3D 0x%x\n", address_encodi=
ng);
+
cie_instrs =3D data;
cie_ilen =3D ciefde_start + ciefde_len + sizeof(UInt) - data;
- if (0) VG_(printf)("cie.instrs =3D %p\n", (Int)cie_instrs)=
;
+ if (0) VG_(printf)("cie.instrs =3D %p\n", cie_instrs);
if (0) VG_(printf)("cie.ilen =3D %d\n", (Int)cie_ilen);
=20
if (cie_ilen < 0 || cie_ilen > ehframe_sz) {
@@ -1470,15 +1713,24 @@
goto bad;
}
=20
- Addr fde_initloc =3D read_Addr(data); data +=3D sizeof(Addr);
+ Addr fde_initloc =3D read_encoded_address(data, address_encodin=
g,
+ &nbytes, ehframe, ehfra=
me_addr);
+ data +=3D nbytes;
if (0) VG_(printf)("fde.initloc =3D %p\n", (void*)fde_initl=
oc);
=20
- UWord fde_arange =3D read_Addr(data); data +=3D sizeof(Addr);
+ UWord fde_arange =3D read_encoded_address(data, address_encodin=
g & 0xf,
+ &nbytes, ehframe, ehfra=
me_addr);
+ data +=3D nbytes;
if (0) VG_(printf)("fde.arangec =3D %p\n", (void*)fde_arang=
e);
=20
+ if (saw_z_augmentation) {
+ data +=3D read_leb128( data, &nbytes, 0);
+ data +=3D nbytes;
+ }
+
UChar* fde_instrs =3D data;
Int fde_ilen =3D ciefde_start + ciefde_len + sizeof(UInt) =
- data;
- if (0) VG_(printf)("fde.instrs =3D %p\n", (Int)fde_instrs)=
;
+ if (0) VG_(printf)("fde.instrs =3D %p\n", fde_instrs);
if (0) VG_(printf)("fde.ilen =3D %d\n", (Int)fde_ilen);
=20
if (fde_ilen < 0 || fde_ilen > ehframe_sz) {
Modified: trunk/coregrind/vg_symtab2.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_symtab2.c 2005-05-01 08:55:38 UTC (rev 3583)
+++ trunk/coregrind/vg_symtab2.c 2005-05-01 15:14:01 UTC (rev 3584)
@@ -1505,11 +1505,15 @@
UInt dwarf1l_sz =3D 0;
UInt ehframe_sz =3D 0;
=20
+ /* Section virtual addresses */
+ Addr dummy_addr =3D 0;
+ Addr ehframe_addr =3D 0;
+
Bool has_debuginfo =3D False;
=20
/* Find all interesting sections */
for (i =3D 0; i < ehdr->e_shnum; i++) {
-# define FIND(sec_name, sec_data, sec_size, in_exec, type) \
+# define FIND(sec_name, sec_data, sec_size, sec_addr, in_exec, ty=
pe) \
if (0 =3D=3D VG_(strcmp)(sec_name, sh_strtab + shdr[i].sh_name)=
) { \
if (0 !=3D sec_data) \
VG_(core_panic)("repeated section!\n"); \
@@ -1518,6 +1522,7 @@
else \
sec_data =3D (type)(oimage + shdr[i].sh_offset); \
sec_size =3D shdr[i].sh_size; \
+ sec_addr =3D si->offset + shdr[i].sh_addr; \
TRACE_SYMTAB( "%18s: %p .. %p\n", \
sec_name, sec_data, sec_data + sec_size - 1); =
\
if ( shdr[i].sh_offset + sec_size > n_oimage ) { \
@@ -1528,22 +1533,22 @@
=20
/* Nb: must find where .got and .plt sections will be in the
* executable image, not in the object image transiently loaded=
. */
- FIND(".dynsym", o_dynsym, o_dynsym_sz, 0, ElfX=
X_Sym*)
- else FIND(".dynstr", o_dynstr, o_dynstr_sz, 0, UCha=
r*)
- else FIND(".symtab", o_symtab, o_symtab_sz, 0, ElfX=
X_Sym*)
- else FIND(".strtab", o_strtab, o_strtab_sz, 0, UCha=
r*)
+ FIND(".dynsym", o_dynsym, o_dynsym_sz, dummy_a=
ddr, 0, ElfXX_Sym*)
+ else FIND(".dynstr", o_dynstr, o_dynstr_sz, dummy_a=
ddr, 0, UChar*)
+ else FIND(".symtab", o_symtab, o_symtab_sz, dummy_a=
ddr, 0, ElfXX_Sym*)
+ else FIND(".strtab", o_strtab, o_strtab_sz, dummy_a=
ddr, 0, UChar*)
=20
- else FIND(".gnu_debuglink", debuglink, debuglink_sz, 0, Char=
*)
+ else FIND(".gnu_debuglink", debuglink, debuglink_sz, dummy_a=
ddr, 0, Char*)
=20
- else FIND(".stab", stab, stab_sz, 0, UCha=
r*)
- else FIND(".stabstr", stabstr, stabstr_sz, 0, UCha=
r*)
- else FIND(".debug_line", debug_line, debug_line_sz, 0, UCha=
r*)
- else FIND(".debug", dwarf1d, dwarf1d_sz, 0, UCha=
r*)
- else FIND(".line", dwarf1l, dwarf1l_sz, 0, UCha=
r*)
- else FIND(".eh_frame", ehframe, ehframe_sz, 0, UCha=
r*)
+ else FIND(".stab", stab, stab_sz, dummy_a=
ddr, 0, UChar*)
+ else FIND(".stabstr", stabstr, stabstr_sz, dummy_a=
ddr, 0, UChar*)
+ else FIND(".debug_line", debug_line, debug_line_sz, dummy_a=
ddr, 0, UChar*)
+ else FIND(".debug", dwarf1d, dwarf1d_sz, dummy_a=
ddr, 0, UChar*)
+ else FIND(".line", dwarf1l, dwarf1l_sz, dummy_a=
ddr, 0, UChar*)
+ else FIND(".eh_frame", ehframe, ehframe_sz, ehframe=
_addr, 0, UChar*)
=20
- else FIND(".got", si->got_start, si->got_size, 1, Addr=
)
- else FIND(".plt", si->plt_start, si->plt_size, 1, Addr=
)
+ else FIND(".got", si->got_start, si->got_size, dummy_a=
ddr, 1, Addr)
+ else FIND(".plt", si->plt_start, si->plt_size, dummy_a=
ddr, 1, Addr)
=20
# undef FIND
=20
@@ -1615,7 +1620,7 @@
=20
/* Read .eh_frame (call-frame-info) if any */
if (ehframe && ehframe_sz > 4) {
- VG_(read_callframe_info_dwarf2) ( si, ehframe, ehframe_sz );
+ VG_(read_callframe_info_dwarf2) ( si, ehframe, ehframe_sz, ehfr=
ame_addr );
}
=20
/* Read the stabs and/or dwarf2 debug information, if any. */
Modified: trunk/coregrind/vg_symtab2.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_symtab2.h 2005-05-01 08:55:38 UTC (rev 3583)
+++ trunk/coregrind/vg_symtab2.h 2005-05-01 15:14:01 UTC (rev 3584)
@@ -255,7 +255,7 @@
CFI reader
-------------------- */
void VG_(read_callframe_info_dwarf2)=20
- ( /*OUT*/SegInfo* si, UChar* ehframe, Int ehframe_sz );
+ ( /*OUT*/SegInfo* si, UChar* ehframe, Int ehframe_sz, Addr ehframe_a=
ddr );
=20
=20
#endif /* _VG_SYMTYPE_H */
|