summaryrefslogtreecommitdiff
path: root/libdw/dwarf_siblingof.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2010-06-15 23:10:35 -0700
committerRoland McGrath <roland@redhat.com>2010-06-16 12:11:03 -0700
commit3e0f7d1d1b817040cef82f41879f471ab59b663e (patch)
tree42999dc59b7bab5c0524f15a7f928cb2905f49d5 /libdw/dwarf_siblingof.c
parent3e4b5bbeca8987527c11a1ea048459a7ebd4ab5e (diff)
downloadelfutils-3e0f7d1d1b817040cef82f41879f471ab59b663e.tar.gz
Handle reading .debug_types section.
Diffstat (limited to 'libdw/dwarf_siblingof.c')
-rw-r--r--libdw/dwarf_siblingof.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libdw/dwarf_siblingof.c b/libdw/dwarf_siblingof.c
index 0d427175..f8e54c18 100644
--- a/libdw/dwarf_siblingof.c
+++ b/libdw/dwarf_siblingof.c
@@ -1,5 +1,5 @@
/* Return sibling of given DIE.
- Copyright (C) 2003, 2004, 2005, 2007, 2008 Red Hat, Inc.
+ Copyright (C) 2003-2010 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -84,8 +84,7 @@ dwarf_siblingof (die, result)
unsigned char *addr = this_die.addr;
/* End of the buffer. */
unsigned char *endp
- = ((unsigned char *) sibattr.cu->dbg->sectiondata[IDX_debug_info]->d_buf
- + sibattr.cu->end);
+ = ((unsigned char *) cu_data (sibattr.cu)->d_buf + sibattr.cu->end);
/* Search for the beginning of the next die on this level. We
must not return the dies for children of the given die. */
@@ -103,8 +102,7 @@ dwarf_siblingof (die, result)
return -1;
/* Compute the next address. */
- addr = ((unsigned char *)
- sibattr.cu->dbg->sectiondata[IDX_debug_info]->d_buf
+ addr = ((unsigned char *) cu_data (sibattr.cu)->d_buf
+ sibattr.cu->start + offset);
}
else if (unlikely (addr == NULL)