Lines Matching refs:ds
37 Dwarf_P_Section ds; in _dwarf_section_init() local
41 if ((ds = calloc(1, sizeof(struct _Dwarf_P_Section))) == NULL) { in _dwarf_section_init()
46 if ((ds->ds_name = strdup(name)) == NULL) { in _dwarf_section_init()
47 free(ds); in _dwarf_section_init()
53 ds->ds_cap = _SECTION_INIT_SIZE; in _dwarf_section_init()
54 if ((ds->ds_data = malloc((size_t) ds->ds_cap)) == NULL) { in _dwarf_section_init()
55 free(ds->ds_name); in _dwarf_section_init()
56 free(ds); in _dwarf_section_init()
60 STAILQ_INSERT_TAIL(&dbg->dbgp_seclist, ds, ds_next); in _dwarf_section_init()
64 *dsp = ds; in _dwarf_section_init()
72 Dwarf_P_Section ds, tds; in _dwarf_section_free() local
79 STAILQ_FOREACH_SAFE(ds, &dbg->dbgp_seclist, ds_next, tds) { in _dwarf_section_free()
80 if (ds == *dsp) { in _dwarf_section_free()
81 STAILQ_REMOVE(&dbg->dbgp_seclist, ds, _Dwarf_P_Section, in _dwarf_section_free()
87 ds = *dsp; in _dwarf_section_free()
88 if (ds->ds_name) in _dwarf_section_free()
89 free(ds->ds_name); in _dwarf_section_free()
90 if (ds->ds_data) in _dwarf_section_free()
91 free(ds->ds_data); in _dwarf_section_free()
92 free(ds); in _dwarf_section_free()
122 _dwarf_section_callback(Dwarf_P_Debug dbg, Dwarf_P_Section ds, in _dwarf_section_callback() argument
128 ndx = _dwarf_pro_callback(dbg, ds->ds_name, (int) ds->ds_size, in _dwarf_section_callback()
129 type, flags, link, info, &ds->ds_symndx, NULL); in _dwarf_section_callback()
135 ds->ds_ndx = ndx; in _dwarf_section_callback()
212 Dwarf_Section *ds; in _dwarf_find_section() local
218 ds = &dbg->dbg_section[i]; in _dwarf_find_section()
219 if (ds->ds_name != NULL && !strcmp(ds->ds_name, name)) in _dwarf_find_section()
220 return (ds); in _dwarf_find_section()
227 _dwarf_find_next_types_section(Dwarf_Debug dbg, Dwarf_Section *ds) in _dwarf_find_next_types_section() argument
232 if (ds == NULL) in _dwarf_find_next_types_section()
235 assert(ds->ds_name != NULL); in _dwarf_find_next_types_section()
238 ds++; in _dwarf_find_next_types_section()
239 if (ds->ds_name != NULL && in _dwarf_find_next_types_section()
240 !strcmp(ds->ds_name, ".debug_types")) in _dwarf_find_next_types_section()
241 return (ds); in _dwarf_find_next_types_section()
242 } while (ds->ds_name != NULL); in _dwarf_find_next_types_section()
250 Dwarf_P_Section ds; in _dwarf_pro_find_section() local
254 STAILQ_FOREACH(ds, &dbg->dbgp_seclist, ds_next) { in _dwarf_pro_find_section()
255 if (ds->ds_name != NULL && !strcmp(ds->ds_name ,name)) in _dwarf_pro_find_section()
256 return (ds); in _dwarf_pro_find_section()
265 Dwarf_P_Section ds, tds; in _dwarf_section_cleanup() local
269 STAILQ_FOREACH_SAFE(ds, &dbg->dbgp_seclist, ds_next, tds) { in _dwarf_section_cleanup()
270 STAILQ_REMOVE(&dbg->dbgp_seclist, ds, _Dwarf_P_Section, in _dwarf_section_cleanup()
272 if (ds->ds_name) in _dwarf_section_cleanup()
273 free(ds->ds_name); in _dwarf_section_cleanup()
274 if (ds->ds_data) in _dwarf_section_cleanup()
275 free(ds->ds_data); in _dwarf_section_cleanup()
276 free(ds); in _dwarf_section_cleanup()