summaryrefslogtreecommitdiffstats
path: root/libdw/dwarf_child.c
diff options
context:
space:
mode:
authorJosh Stone <[email protected]>2014-12-10 18:41:43 -0800
committerJosh Stone <[email protected]>2014-12-11 11:23:26 -0800
commit8d200b5b728b7ee6150796e4baa07b54e1ac8cd2 (patch)
tree0e6455ee690e42be25ecec1444a2d6fe0f27081f /libdw/dwarf_child.c
parent64e44dfc9420940d238e5fdad4fadce3c1f5f05e (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_child.c')
-rw-r--r--libdw/dwarf_child.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libdw/dwarf_child.c b/libdw/dwarf_child.c
index daf4c265..2a5d379d 100644
--- a/libdw/dwarf_child.c
+++ b/libdw/dwarf_child.c
@@ -147,13 +147,12 @@ dwarf_child (die, result)
/* RESULT can be the same as DIE. So preserve what we need. */
struct Dwarf_CU *cu = die->cu;
- Elf_Data *cu_sec = cu_data (cu);
/* It's kosher (just suboptimal) to have a null entry first thing (7.5.3).
So if this starts with ULEB128 of 0 (even with silly encoding of 0),
it is a kosher null entry and we do not really have any children. */
const unsigned char *code = addr;
- const unsigned char *endp = (cu_sec->d_buf + cu_sec->d_size);
+ const unsigned char *endp = cu->endp;
while (1)
{
if (unlikely (code >= endp)) /* Truncated section. */