Lines Matching refs:dbg
44 get_offsets (Dwarf *dbg) in get_offsets() argument
50 unsigned char *const startp = dbg->sectiondata[IDX_debug_pubnames]->d_buf; in get_offsets()
52 unsigned char *endp = readp + dbg->sectiondata[IDX_debug_pubnames]->d_size; in get_offsets()
75 Dwarf_Off len = read_4ubyte_unaligned_inc (dbg, readp); in get_offsets()
78 len = read_8ubyte_unaligned_inc (dbg, readp); in get_offsets()
91 size_t max_size = dbg->sectiondata[IDX_debug_pubnames]->d_size; in get_offsets()
99 uint16_t version = read_2ubyte_unaligned (dbg, readp); in get_offsets()
107 if (__libdw_read_offset (dbg, dbg, IDX_debug_pubnames, in get_offsets()
115 = ((unsigned char *) dbg->sectiondata[IDX_debug_info]->d_buf in get_offsets()
134 dbg->pubnames_sets = (struct pubnames_s *) realloc (mem, cnt * entsize); in get_offsets()
135 dbg->pubnames_nsets = cnt; in get_offsets()
142 dwarf_getpubnames (dbg, callback, arg, offset) in dwarf_getpubnames() argument
143 Dwarf *dbg; in dwarf_getpubnames()
148 if (dbg == NULL)
158 if (unlikely (dbg->sectiondata[IDX_debug_pubnames] == NULL
160 >= dbg->sectiondata[IDX_debug_pubnames]->d_size)))
165 if (dbg->pubnames_nsets == 0 && unlikely (get_offsets (dbg) != 0))
173 offset = dbg->pubnames_sets[0].set_start;
177 for (cnt = 0; cnt + 1 < dbg->pubnames_nsets; ++cnt)
178 if ((Dwarf_Off) offset >= dbg->pubnames_sets[cnt].set_start)
181 < dbg->pubnames_sets[cnt + 1].set_start);
184 assert (cnt + 1 < dbg->pubnames_nsets);
188 = (unsigned char *) dbg->sectiondata[IDX_debug_pubnames]->d_buf;
190 = startp + dbg->sectiondata[IDX_debug_pubnames]->d_size;
196 gl.cu_offset = (dbg->pubnames_sets[cnt].cu_offset
197 + dbg->pubnames_sets[cnt].cu_header_size);
202 if (readp + dbg->pubnames_sets[cnt].address_len > endp)
204 if (dbg->pubnames_sets[cnt].address_len == 4)
205 gl.die_offset = read_4ubyte_unaligned_inc (dbg, readp);
207 gl.die_offset = read_8ubyte_unaligned_inc (dbg, readp);
214 gl.die_offset += dbg->pubnames_sets[cnt].cu_offset;
227 if (callback (dbg, &gl, arg) != DWARF_CB_OK)
235 if (++cnt == dbg->pubnames_nsets)
239 startp = (unsigned char *) dbg->sectiondata[IDX_debug_pubnames]->d_buf;
240 readp = startp + dbg->pubnames_sets[cnt].set_start;