diff options
| author | Josh Stone <[email protected]> | 2014-12-10 18:41:43 -0800 |
|---|---|---|
| committer | Josh Stone <[email protected]> | 2014-12-11 11:23:26 -0800 |
| commit | 8d200b5b728b7ee6150796e4baa07b54e1ac8cd2 (patch) | |
| tree | 0e6455ee690e42be25ecec1444a2d6fe0f27081f /libdw/dwarf_dieoffset.c | |
| parent | 64e44dfc9420940d238e5fdad4fadce3c1f5f05e (diff) | |
libdw: save startp/endp boundaries in Dwarf_CU
Rather than looking up section data every time, we can simply save the
range of each CU as pointers in Dwarf_CU.
Signed-off-by: Josh Stone <[email protected]>
Diffstat (limited to 'libdw/dwarf_dieoffset.c')
| -rw-r--r-- | libdw/dwarf_dieoffset.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libdw/dwarf_dieoffset.c b/libdw/dwarf_dieoffset.c index c92123ce..965b2c8d 100644 --- a/libdw/dwarf_dieoffset.c +++ b/libdw/dwarf_dieoffset.c @@ -1,5 +1,5 @@ /* Return offset of DIE. - Copyright (C) 2003-2010 Red Hat, Inc. + Copyright (C) 2003-2010, 2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 2003. @@ -41,6 +41,6 @@ dwarf_dieoffset (die) { return (die == NULL ? ~0ul - : (Dwarf_Off) (die->addr - cu_data (die->cu)->d_buf)); + : (Dwarf_Off) (die->addr - die->cu->startp + die->cu->start)); } INTDEF(dwarf_dieoffset) |
