summaryrefslogtreecommitdiffstats
path: root/libdw/dwarf_cuoffset.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdw/dwarf_cuoffset.c')
-rw-r--r--libdw/dwarf_cuoffset.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libdw/dwarf_cuoffset.c b/libdw/dwarf_cuoffset.c
index 10238b43..47653200 100644
--- a/libdw/dwarf_cuoffset.c
+++ b/libdw/dwarf_cuoffset.c
@@ -1,5 +1,5 @@
/* Return offset of DIE in CU.
- Copyright (C) 2003 Red Hat, Inc.
+ Copyright (C) 2003-2010 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <[email protected]>, 2003.
@@ -62,7 +62,5 @@ dwarf_cuoffset (die)
{
return (die == NULL
? (Dwarf_Off) -1l
- : (die->addr
- - die->cu->dbg->sectiondata[IDX_debug_info]->d_buf
- - die->cu->start));
+ : (die->addr - cu_data (die->cu)->d_buf - die->cu->start));
}