Home | History | Annotate | Download | only in libdw

Lines Matching refs:dbg

28 get_offsets (Dwarf *dbg)
34 unsigned char *const startp = dbg->sectiondata[IDX_debug_pubnames]->d_buf;
36 unsigned char *endp = readp + dbg->sectiondata[IDX_debug_pubnames]->d_size;
59 Dwarf_Off len = read_4ubyte_unaligned_inc (dbg, readp);
62 len = read_8ubyte_unaligned_inc (dbg, readp);
69 if (mem[cnt].set_start >= dbg->sectiondata[IDX_debug_pubnames]->d_size)
75 uint16_t version = read_2ubyte_unaligned (dbg, readp);
84 mem[cnt].cu_offset = read_4ubyte_unaligned (dbg, readp + 2);
86 mem[cnt].cu_offset = read_8ubyte_unaligned (dbg, readp + 2);
89 assert (dbg->sectiondata[IDX_debug_info] != NULL);
90 assert (dbg->sectiondata[IDX_debug_info]->d_buf != NULL);
92 < dbg->sectiondata[IDX_debug_info]->d_size);
94 = ((unsigned char *) dbg->sectiondata[IDX_debug_info]->d_buf
113 dbg->pubnames_sets = (struct pubnames_s *) realloc (mem, cnt * entsize);
114 dbg->pubnames_nsets = cnt;
121 dwarf_getpubnames (dbg, callback, arg, offset)
122 Dwarf *dbg;
127 if (dbg == NULL)
131 if (unlikely (dbg->sectiondata[IDX_debug_pubnames] == NULL
132 || offset >= dbg->sectiondata[IDX_debug_pubnames]->d_size))
137 if (dbg->pubnames_nsets == 0 && get_offsets (dbg) != 0)
145 offset = dbg->pubnames_sets[0].set_start;
149 for (cnt = 0; cnt + 1 < dbg->pubnames_nsets; ++cnt)
150 if (offset >= dbg->pubnames_sets[cnt].set_start)
152 assert (offset < dbg->pubnames_sets[cnt + 1].set_start);
155 assert (cnt + 1 < dbg->pubnames_nsets);
159 = (unsigned char *) dbg->sectiondata[IDX_debug_pubnames]->d_buf;
165 gl.cu_offset = (dbg->pubnames_sets[cnt].cu_offset
166 + dbg->pubnames_sets[cnt].cu_header_size);
171 if (dbg->pubnames_sets[cnt].address_len == 4)
172 gl.die_offset = read_4ubyte_unaligned_inc (dbg, readp);
174 gl.die_offset = read_8ubyte_unaligned_inc (dbg, readp);
181 gl.die_offset += dbg->pubnames_sets[cnt].cu_offset;
187 if (callback (dbg, &gl, arg) != DWARF_CB_OK)
195 if (++cnt == dbg->pubnames_nsets)
199 startp = (unsigned char *) dbg->sectiondata[IDX_debug_pubnames]->d_buf;
200 readp = startp + dbg->pubnames_sets[cnt].set_start;