|
From: <sv...@va...> - 2005-03-30 15:06:08
|
Author: tom
Date: 2005-03-30 16:05:46 +0100 (Wed, 30 Mar 2005)
New Revision: 3481
Modified:
trunk/coregrind/vg_dwarf.c
trunk/coregrind/vg_symtab2.c
Log:
Get thew DWARF reading going on 64 bit machines.
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-03-30 08:22:38 UTC (rev 3480)
+++ trunk/coregrind/vg_dwarf.c 2005-03-30 15:05:46 UTC (rev 3481)
@@ -159,7 +159,7 @@
of sequence. */
static=20
int process_extended_line_op( SegInfo *si, Char*** fnames,=20
- UChar* data, Int is_stmt, Int pointer_size=
)
+ UChar* data, Int is_stmt)
{
UChar op_code;
Int bytes_read;
@@ -201,10 +201,6 @@
break;
=20
case DW_LNE_set_address:
- /* XXX: Pointer size could be 8 */
- // (and there may be other 32-bit assumptions within this file?
- // not sure... --njn)
- vg_assert(pointer_size =3D=3D 4);
adr =3D *((Addr *)data);
if (0) VG_(printf)("smr.a :=3D %p\n", adr );
state_machine_regs.address =3D adr;
@@ -214,11 +210,11 @@
++ state_machine_regs.last_file_entry;
name =3D data;
if (*fnames =3D=3D NULL)
- *fnames =3D VG_(arena_malloc)(VG_AR_SYMTAB, sizeof (UInt) * 2);
+ *fnames =3D VG_(arena_malloc)(VG_AR_SYMTAB, sizeof (Char *) * 2)=
;
else
*fnames =3D VG_(arena_realloc)(
VG_AR_SYMTAB, *fnames,
- sizeof(UInt) * (state_machine_regs.last_file_entry =
+ 1));
+ sizeof(Char *) * (state_machine_regs.last_file_entr=
y + 1));
(*fnames)[state_machine_regs.last_file_entry] =3D VG_(addStr) (si,=
name, -1);
data +=3D VG_(strlen) ((char *) data) + 1;
read_leb128 (data, & bytes_read, 0);
@@ -366,10 +362,10 @@
semantics, we need to malloc the first time. */
=20
if (fnames =3D=3D NULL)
- fnames =3D VG_(arena_malloc)(VG_AR_SYMTAB, sizeof (UInt) =
* 2);
+ fnames =3D VG_(arena_malloc)(VG_AR_SYMTAB, sizeof (Char *=
) * 2);
else
fnames =3D VG_(arena_realloc)(VG_AR_SYMTAB, fnames,
- sizeof(UInt)=20
+ sizeof(Char *)=20
* (state_machine_regs.last_file_entry + 1)=
);
data +=3D VG_(strlen) ((Char *) data) + 1;
fnames[state_machine_regs.last_file_entry] =3D VG_(addStr) =
(si,name, -1);
@@ -433,7 +429,7 @@
case DW_LNS_extended_op:
data +=3D process_extended_line_op (
si, &fnames, data,=20
- info.li_default_is_stmt, sizeof (Addr));
+ info.li_default_is_stmt);
break;
=20
case DW_LNS_copy:
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-03-30 08:22:38 UTC (rev 3480)
+++ trunk/coregrind/vg_symtab2.c 2005-03-30 15:05:46 UTC (rev 3481)
@@ -1531,7 +1531,7 @@
VG_(read_debuginfo_stabs) ( si, stab, stab_sz,=20
stabstr, stabstr_sz );
}
- if (debug_line && VGA_WORD_SIZE=3D=3D4/*hack*/) {
+ if (debug_line) {
has_debuginfo =3D True;
VG_(read_debuginfo_dwarf2) ( si, debug_line, debug_line_sz );
}
|