summaryrefslogtreecommitdiffstats
path: root/libdw/libdwP.h
diff options
context:
space:
mode:
Diffstat (limited to 'libdw/libdwP.h')
-rw-r--r--libdw/libdwP.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdw/libdwP.h b/libdw/libdwP.h
index a2fb0c8a..82b47d09 100644
--- a/libdw/libdwP.h
+++ b/libdw/libdwP.h
@@ -293,6 +293,8 @@ struct Dwarf_CU
uint8_t offset_size;
uint16_t version;
+ size_t sec_idx; /* Normally .debug_info, could be .debug_type or "fake". */
+
/* Zero if this is a normal CU. Nonzero if it is a type unit. */
size_t type_offset;
uint64_t type_sig8;
@@ -716,7 +718,7 @@ __libdw_read_offset (Dwarf *dbg, Dwarf *dbg_ret,
static inline size_t
cu_sec_idx (struct Dwarf_CU *cu)
{
- return cu->type_offset == 0 ? IDX_debug_info : IDX_debug_types;
+ return cu->sec_idx;
}
static inline bool