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/libdw_findcu.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/libdw_findcu.c')
| -rw-r--r-- | libdw/libdw_findcu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c index c0bff2af..3c9633e2 100644 --- a/libdw/libdw_findcu.c +++ b/libdw/libdw_findcu.c @@ -1,5 +1,5 @@ /* Find CU for given offset. - 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. @@ -113,6 +113,10 @@ __libdw_intern_next_unit (dbg, debug_types) if (debug_types) Dwarf_Sig8_Hash_insert (&dbg->sig8_hash, type_sig8, newp); + void *buf = cu_data (newp)->d_buf; + newp->startp = buf + newp->start; + newp->endp = buf + newp->end; + /* Add the new entry to the search tree. */ if (tsearch (newp, tree, findcu_cb) == NULL) { |
