Lines Matching refs:die_mem

121 	Dwarf_Die die_mem;
124 if (die_find_realfunc(cu_die, addr, &die_mem)
125 && die_entrypc(&die_mem, &faddr) == 0 &&
127 *fname = die_get_decl_file(&die_mem);
128 dwarf_decl_line(&die_mem, lineno);
144 static int __die_find_inline_cb(Dwarf_Die *die_mem, void *data);
159 Dwarf_Die die_mem;
164 for (sc_die = die_find_realfunc(cu_die, addr, &die_mem);
167 &die_mem)) {
253 * @die_mem: where to store a type DIE
256 * it to die_mem. Return NULL if fails to get a type DIE.
258 Dwarf_Die *die_get_type(Dwarf_Die *vr_die, Dwarf_Die *die_mem)
263 dwarf_formref_die(&attr, die_mem))
264 return die_mem;
270 Dwarf_Die *__die_get_real_type(Dwarf_Die *vr_die, Dwarf_Die *die_mem)
275 vr_die = die_get_type(vr_die, die_mem);
290 * @die_mem: where to store a type DIE
293 * it to die_mem. Return NULL if fails to get a type DIE.
297 Dwarf_Die *die_get_real_type(Dwarf_Die *vr_die, Dwarf_Die *die_mem)
300 vr_die = __die_get_real_type(vr_die, die_mem);
523 * @die_mem: a buffer for result DIE
527 * @die_mem and returns it. If @callback returns DIE_FIND_CB_CONTINUE,
535 void *data, Dwarf_Die *die_mem)
540 ret = dwarf_child(rt_die, die_mem);
545 ret = callback(die_mem, data);
547 return die_mem;
550 die_find_child(die_mem, callback, data, &child_die)) {
551 memcpy(die_mem, &child_die, sizeof(Dwarf_Die));
552 return die_mem;
555 dwarf_siblingof(die_mem, die_mem) == 0);
562 Dwarf_Die *die_mem;
573 memcpy(ad->die_mem, fn_die, sizeof(Dwarf_Die));
584 * @die_mem: a buffer for result DIE
587 * DIE to @die_mem and returns it if found. Returns NULL if failed.
590 Dwarf_Die *die_mem)
594 ad.die_mem = die_mem;
599 return die_mem;
613 memcpy(ad->die_mem, fn_die, sizeof(Dwarf_Die));
623 * @die_mem: a buffer for result DIE
626 * DIE to @die_mem and returns it if found. Returns NULL if failed.
629 Dwarf_Die *die_mem)
633 ad.die_mem = die_mem;
638 return die_mem;
642 static int __die_find_inline_cb(Dwarf_Die *die_mem, void *data)
646 if (dwarf_tag(die_mem) == DW_TAG_inlined_subroutine &&
647 dwarf_haspc(die_mem, *addr))
657 * @die_mem: a buffer for result DIE
660 * DIE to @die_mem and returns it if found. Returns NULL if failed.
665 Dwarf_Die *die_mem)
667 return die_find_child(sp_die, __die_find_inline_cb, &addr, die_mem);
674 * @die_mem: a buffer for result DIE
677 * DIE to @die_mem and returns it if found. Returns NULL if failed.
682 Dwarf_Die *die_mem)
692 memcpy(die_mem, sp_die, sizeof(Dwarf_Die));
697 return die_mem;
700 static int __die_find_func_rettype_cb(Dwarf_Die *die_mem, void *data)
704 if (dwarf_tag(die_mem) != DW_TAG_subprogram)
707 func_name = dwarf_diename(die_mem);
718 * @die_mem: a buffer for result DIE
721 * return type of the function to @die_mem and returns it if found.
728 Dwarf_Die *die_mem)
737 if (die_get_real_type(&tmp_die, die_mem) == NULL)
740 return die_mem;
799 Dwarf_Die die_mem;
810 die_find_child(&cu_die, __die_walk_instances_cb, &iwp, &die_mem);
865 Dwarf_Die die_mem;
878 die_find_child(sp_die, __die_walk_funclines_cb, &lw, &die_mem);
918 Dwarf_Die die_mem, *cu_die;
924 cu_die = dwarf_diecu(rt_die, &die_mem, NULL, NULL);
972 if (die_find_inlinefunc(rt_die, addr, &die_mem)) {
974 inf = die_get_call_file(&die_mem);
976 die_get_call_lineno(&die_mem) == lineno)
979 dwarf_decl_line(&die_mem, &inl);
981 decf != die_get_decl_file(&die_mem))
1023 static int __die_find_variable_cb(Dwarf_Die *die_mem, void *data)
1029 tag = dwarf_tag(die_mem);
1032 die_compare_name(die_mem, fvp->name) &&
1037 (dwarf_attr(die_mem, DW_AT_external, &attr) ||
1038 dwarf_attr(die_mem, DW_AT_location, &attr) ||
1039 dwarf_attr(die_mem, DW_AT_const_value, &attr)))
1041 if (dwarf_haspc(die_mem, fvp->addr))
1052 * @die_mem: a buffer for result DIE
1057 Dwarf_Addr addr, Dwarf_Die *die_mem)
1062 die_mem);
1065 static int __die_find_member_cb(Dwarf_Die *die_mem, void *data)
1069 if (dwarf_tag(die_mem) == DW_TAG_member) {
1070 if (die_compare_name(die_mem, name))
1072 else if (!dwarf_diename(die_mem)) { /* Unnamed structure */
1074 if (die_get_type(die_mem, &type_die) &&
1086 * @die_mem: a buffer for result DIE
1091 Dwarf_Die *die_mem)
1094 die_mem);
1390 static bool match_var_offset(Dwarf_Die *die_mem, struct find_var_data *data,
1405 if (die_get_real_type(die_mem, &type_die) == NULL)
1426 static int __die_find_var_reg_cb(Dwarf_Die *die_mem, void *arg)
1429 int tag = dwarf_tag(die_mem);
1439 if (dwarf_attr(die_mem, DW_AT_location, &attr) == NULL)
1452 match_var_offset(die_mem, data, data->offset, ops->number,
1461 match_var_offset(die_mem, data, data->offset, 0,
1468 match_var_offset(die_mem, data, data->offset, ops->number,
1475 match_var_offset(die_mem, data, data->offset, 0,
1482 match_var_offset(die_mem, data, data->offset, ops->number2,
1497 * @die_mem: a buffer to save the resulting DIE
1504 Dwarf_Die *die_mem)
1514 result = die_find_child(sc_die, __die_find_var_reg_cb, &data, die_mem);
1521 static int __die_find_var_addr_cb(Dwarf_Die *die_mem, void *arg)
1524 int tag = dwarf_tag(die_mem);
1534 if (dwarf_attr(die_mem, DW_AT_location, &attr) == NULL)
1542 match_var_offset(die_mem, data, data->addr, ops->number,
1553 * @die_mem: a buffer to save the resulting DIE
1560 Dwarf_Die *die_mem, int *offset)
1567 result = die_find_child(sc_die, __die_find_var_addr_cb, &data, die_mem);
1573 static int __die_collect_vars_cb(Dwarf_Die *die_mem, void *arg)
1577 int tag = dwarf_tag(die_mem);
1587 if (dwarf_attr(die_mem, DW_AT_location, &attr) == NULL)
1601 if (die_get_real_type(die_mem, &type_die) == NULL)
1631 Dwarf_Die die_mem;
1633 die_find_child(sc_die, __die_collect_vars_cb, (void *)var_types, &die_mem);
1636 static int __die_collect_global_vars_cb(Dwarf_Die *die_mem, void *arg)
1640 int tag = dwarf_tag(die_mem);
1650 if (dwarf_attr(die_mem, DW_AT_location, &attr) == NULL)
1663 if (die_get_real_type(die_mem, &type_die) == NULL)
1693 Dwarf_Die die_mem;
1695 die_find_child(cu_die, __die_collect_global_vars_cb, (void *)var_types, &die_mem);
1920 static int __die_find_scope_cb(Dwarf_Die *die_mem, void *arg)
1924 if (dwarf_haspc(die_mem, data->pc)) {
1931 memcpy(tmp + data->nr, die_mem, sizeof(*die_mem));
1955 Dwarf_Die die_mem;
1957 die_find_child(cu_die, __die_find_scope_cb, &data, &die_mem);
1963 static int __die_find_member_offset_cb(Dwarf_Die *die_mem, void *arg)
1968 int tag = dwarf_tag(die_mem);
1974 if (die_get_data_member_location(die_mem, &loc) < 0) {
1977 if (dwarf_attr_integrate(die_mem, DW_AT_data_bit_offset, &attr) &&
1987 if (die_get_real_type(die_mem, &type_die) == NULL) {
2005 * @die_mem: a buffer to save the resulting DIE
2013 Dwarf_Die *die_mem)
2030 *die_mem = *type_die;
2031 return die_mem;
2038 (void *)(long)offset, die_mem);
2055 *die_mem = mb_type;
2056 return die_mem;
2063 * @die_mem: a buffer to save the resulting DIE
2066 * and saves the resulting type in @die_mem. If the pointer points
2070 Dwarf_Die *die_mem)
2080 return die_get_member_type(&type_die, offset, die_mem);