• Home
  • Raw
  • Download

Lines Matching +full:on +full:- +full:die

2  * dwarf-aux.c : libdw auxiliary interfaces
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include "dwarf-aux.h"
29 * cu_find_realpath - Find the realpath of the target file
30 * @cu_die: A DIE(dwarf information entry) of CU(compilation Unit)
60 * cu_get_comp_dir - Get the path of compilation directory
61 * @cu_die: a CU DIE
64 * Since this depends on DW_AT_comp_dir, older gcc will not
76 * cu_find_lineinfo - Get a line number and file name for given address
77 * @cu_die: a CU DIE
99 return *lineno ?: -ENOENT; in cu_find_lineinfo()
105 * cu_walk_functions_at - Walk on function DIEs at given address
106 * @cu_die: A CU DIE
111 * Walk on function DIEs at given @addr in @cu_die. Passed DIEs
112 * should be subprogram or inlined-subroutines.
119 int ret = -ENOENT; in cu_walk_functions_at()
136 * die_get_linkage_name - Get the linkage name of the object
137 * @dw_die: A DIE of the object
152 * die_compare_name - Compare diename and tname
153 * @dw_die: a DIE
167 * die_match_name - Match diename/linkage name and glob
168 * @dw_die: a DIE
190 * die_get_call_lineno - Get callsite line number of inline-function instance
191 * @in_die: a DIE of an inlined function instance
193 * Get call-site line number of @in_die. This means from where the inline
202 return -ENOENT; in die_get_call_lineno()
209 * die_get_type - Get type DIE
210 * @vr_die: a DIE of a variable
211 * @die_mem: where to store a type DIE
213 * Get a DIE of the type of given variable (@vr_die), and store
214 * it to die_mem. Return NULL if fails to get a type DIE.
227 /* Get a type die, but skip qualifiers */
246 * die_get_real_type - Get a type die, but skip qualifiers and typedef
247 * @vr_die: a DIE of a variable
248 * @die_mem: where to store a type DIE
250 * Get a DIE of the type of given variable (@vr_die), and store
251 * it to die_mem. Return NULL if fails to get a type DIE.
272 return -ENOENT; in die_get_attr_udata()
285 return -ENOENT; in die_get_attr_sdata()
291 * die_is_signed_type - Check whether a type DIE is signed or not
292 * @tp_die: a DIE of a type
309 * die_is_func_def - Ensure that this DIE is a subprogram and definition
310 * @dw_die: a DIE
312 * Ensure that this DIE is a subprogram and NOT a declaration. This
324 * die_entrypc - Returns entry PC (the lowest address) of a DIE
325 * @dw_die: a DIE
328 * Since dwarf_entrypc() does not return entry PC if the DIE has only address
337 return -EINVAL; in die_entrypc()
342 return dwarf_ranges(dw_die, 0, &base, addr, &end) < 0 ? -ENOENT : 0; in die_entrypc()
346 * die_is_func_instance - Ensure that this DIE is an instance of a subprogram
347 * @dw_die: a DIE
349 * Ensure that this DIE is an instance (which has an entry address).
369 * die_get_data_member_location - Get the data-member offset
370 * @mb_die: a DIE of a member of a data structure
384 return -ENOENT; in die_get_data_member_location()
390 return -ENOENT; in die_get_data_member_location()
395 return -ENOTSUP; in die_get_data_member_location()
402 /* Get the call file index number in CU DIE */
410 return -ENOENT; in die_get_call_fileno()
413 /* Get the declared file index number in CU DIE */
421 return -ENOENT; in die_get_decl_fileno()
425 * die_get_call_file - Get callsite file name of inlined function instance
426 * @in_die: a DIE of an inlined function instance
428 * Get call-site file name of @in_die. This means from which file the inline
447 * die_find_child - Generic DIE search function in DIE tree
448 * @rt_die: a root DIE
451 * @die_mem: a buffer for result DIE
453 * Trace DIE tree from @rt_die and call @callback for each child DIE.
454 * If @callback returns DIE_FIND_CB_END, this stores the DIE into
459 * Returns NULL if @callback can't find any appropriate DIE.
500 addr == ad->addr) { in __die_search_func_tail_cb()
501 memcpy(ad->die_mem, fn_die, sizeof(Dwarf_Die)); in __die_search_func_tail_cb()
508 * die_find_tailfunc - Search for a non-inlined function with tail call at
510 * @cu_die: a CU DIE which including @addr
512 * @die_mem: a buffer for result DIE
514 * Search for a non-inlined function DIE with tail call at @addr. Stores the
515 * DIE to @die_mem and returns it if found. Returns NULL if failed.
530 /* die_find callback for non-inlined function search */
540 dwarf_haspc(fn_die, ad->addr)) { in __die_search_func_cb()
541 memcpy(ad->die_mem, fn_die, sizeof(Dwarf_Die)); in __die_search_func_cb()
548 * die_find_realfunc - Search a non-inlined function at given address
549 * @cu_die: a CU DIE which including @addr
551 * @die_mem: a buffer for result DIE
553 * Search a non-inlined function DIE which includes @addr. Stores the
554 * DIE to @die_mem and returns it if found. Returns NULL if failed.
582 * die_find_top_inlinefunc - Search the top inlined function at given address
583 * @sp_die: a subprogram DIE which including @addr
585 * @die_mem: a buffer for result DIE
587 * Search an inlined function DIE which includes @addr. Stores the
588 * DIE to @die_mem and returns it if found. Returns NULL if failed.
599 * die_find_inlinefunc - Search an inlined function at given address
600 * @sp_die: a subprogram DIE which including @addr
602 * @die_mem: a buffer for result DIE
604 * Search an inlined function DIE which includes @addr. Stores the
605 * DIE to @die_mem and returns it if found. Returns NULL if failed.
652 if (origin == NULL || origin->addr != iwp->addr) in __die_walk_instances_cb()
665 iwp->retval = iwp->callback(inst, iwp->data); in __die_walk_instances_cb()
667 return (iwp->retval) ? DIE_FIND_CB_END : DIE_FIND_CB_CONTINUE; in __die_walk_instances_cb()
671 * die_walk_instances - Walk on instances of given DIE
672 * @or_die: an abstract original DIE
673 * @callback: a callback function which is called with instance DIE
676 * Walk on the instances of give @in_die. @in_die must be an inlined function
678 * non-zero value, or -ENOENT if there is no instance.
686 .addr = or_die->addr, in die_walk_instances()
689 .retval = -ENOENT, in die_walk_instances()
693 return -ENOENT; in die_walk_instances()
719 lw->retval = lw->callback(fname, lineno, addr, lw->data); in __die_walk_funclines_cb()
720 if (lw->retval != 0) in __die_walk_funclines_cb()
723 if (!lw->recursive) in __die_walk_funclines_cb()
730 lw->retval = lw->callback(fname, lineno, addr, lw->data); in __die_walk_funclines_cb()
731 if (lw->retval != 0) in __die_walk_funclines_cb()
736 /* Continue to search nested inlined function call-sites */ in __die_walk_funclines_cb()
740 /* Walk on lines of blocks included in given DIE */
776 lw->retval = __die_walk_funclines(sp_die, true, lw->callback, lw->data); in __die_walk_culines_cb()
777 if (lw->retval != 0) in __die_walk_culines_cb()
784 * die_walk_lines - Walk on lines inside given DIE
785 * @rt_die: a root DIE (CU, subprogram or inlined_subroutine)
789 * Walk on all lines inside given @rt_die and call @callback on each line.
790 * If the @rt_die is a function, walk only on the lines inside the function,
791 * otherwise @rt_die must be a CU DIE.
793 * and inline call-site.
807 /* Get the CU die */ in die_walk_lines()
815 pr_debug2("Failed to get CU from given DIE.\n"); in die_walk_lines()
816 return -EINVAL; in die_walk_lines()
821 pr_debug2("Failed to get source lines on this CU.\n"); in die_walk_lines()
822 return -ENOENT; in die_walk_lines()
826 /* Walk on the lines on lines list */ in die_walk_lines()
836 /* Skip end-of-sequence */ in die_walk_lines()
839 /* Skip Non statement line-info */ in die_walk_lines()
842 /* Filter lines based on address */ in die_walk_lines()
853 /* Call-site check */ in die_walk_lines()
912 die_compare_name(die_mem, fvp->name) && in __die_find_variable_cb()
913 /* Does the DIE have location information or external instance? */ in __die_find_variable_cb()
917 if (dwarf_haspc(die_mem, fvp->addr)) in __die_find_variable_cb()
924 * die_find_variable_at - Find a given name variable at given address
925 * @sp_die: a function DIE
928 * @die_mem: a buffer for result DIE
930 * Find a variable DIE called @name at @addr in @sp_die.
959 * die_find_member - Find a given name member in a data structure
960 * @st_die: a data structure type DIE
962 * @die_mem: a buffer for result DIE
964 * Find a member DIE called @name in @st_die.
974 * die_get_typename - Get the name of given variable DIE
975 * @vr_die: a variable DIE
979 * and Return -ENOENT if failed to find type name.
990 return -ENOENT; in die_get_typename()
1000 return -ENOENT; in die_get_typename()
1015 * die_get_varname - Get the name and type of given variable DIE
1016 * @vr_die: a variable DIE
1036 * die_get_var_innermost_scope - Get innermost scope range of given variable DIE
1037 * @sp_die: a subprogram DIE
1038 * @vr_die: a variable DIE
1042 * "@<function_name+[NN-NN,NN-NN]>".
1063 return -ENOENT; in die_get_var_innermost_scope()
1067 /* (*SCOPES)[1] is the DIE for the scope containing that scope */ in die_get_var_innermost_scope()
1069 ret = -EINVAL; in die_get_var_innermost_scope()
1075 start -= entry; in die_get_var_innermost_scope()
1076 end -= entry; in die_get_var_innermost_scope()
1079 ret = strbuf_addf(buf, "@<%s+[%" PRIu64 "-%" PRIu64, in die_get_var_innermost_scope()
1083 ret = strbuf_addf(buf, ",%" PRIu64 "-%" PRIu64, in die_get_var_innermost_scope()
1099 * die_get_var_range - Get byte offset range of given variable DIE
1100 * @sp_die: a subprogram DIE
1101 * @vr_die: a variable DIE
1105 * "@<function_name+[NN-NN,NN-NN]>".
1126 return -ENOENT; in die_get_var_range()
1129 return -EINVAL; in die_get_var_range()
1140 start -= entry; in die_get_var_range()
1141 end -= entry; in die_get_var_range()
1143 ret = strbuf_addf(buf, "@<%s+[%" PRIu64 "-%" PRIu64, in die_get_var_range()
1147 ret = strbuf_addf(buf, ",%" PRIu64 "-%" PRIu64, in die_get_var_range()
1164 return -ENOTSUP; in die_get_var_range()
1169 * die_has_loclist - Check if DW_AT_location of @vr_die is a location list
1170 * @vr_die: a variable DIE
1186 * die_is_optimized_target - Check if target program is compiled with
1188 * @cu_die: a CU DIE
1213 * die_search_idx - Search index of given line address
1243 * die_get_postprologue_addr - Search next address after function prologue
1250 * Look for prologue-end marker. If there is no explicit marker, return
1282 /* clang supports prologue-end marker */ in die_get_postprologue_addr()
1304 dwarf_lineaddr(dwarf_onesrcline(lines, i - 1), in die_get_postprologue_addr()
1311 * die_skip_prologue - Use next address after prologue as probe location
1312 * @sp_die: a subprogram DIE
1313 * @cu_die: a CU DIE