19 #ifndef __LIBDWDEBUG_H__
20 #define __LIBDWDEBUG_H__
26 #include <sys/types.h>
29 #include <elfutils/libdw.h>
30 #include <elfutils/libdwfl.h>
31 #include <elfutils/libebl.h>
43 #if ELFUTILS_NO_VERSION_H
44 #define _INT_ELFUTILS_VERSION ELFUTILS_BIN_VERSION
46 #include "elfutils/version.h"
47 #define _INT_ELFUTILS_VERSION _ELFUTILS_VERSION
50 #define DWDEBUG_DEF_DELIM "."
181 #define LOAD_TYPE_BITS 2
182 #define SYMBOL_TYPE_BITS 3
183 #define SYMBOL_SOURCE_BITS 2
184 #define DATATYPE_CODE_BITS 4
185 #define SRCLINE_BITS 20
343 const char *DFPATH[],
char *buf,
int buflen);
352 char **name,
char **version);
354 int types,
int globals,
int symtabs,
int elfsymtab,
429 GHashTable *eqcache,GHashTable *updated_datatype_refs);
480 ADDR *start,
ADDR *end,
int *is_noncontiguous,
487 ADDR *start,
ADDR *end,
int *is_noncontiguous,
597 char *name,
const char *delim,
598 struct rfilter *srcfile_filter,
606 const char *name,
const char *delim);
613 const char *name,
const char *delim);
647 struct rfilter *srcfile_filter);
674 char *filename,
int line);
676 char *filename,
ADDR addr);
678 ADDR addr,
char **filename,
int *line);
680 char *filename,
int line,
692 const char *name,
const char *delim);
697 const char *name,
const char *delim);
int symbol_is_bitsize(struct symbol *symbol)
int symbol_has_unspecified_parameters(struct symbol *symbol)
struct symbol * symbol_find_parent(struct symbol *symbol)
char * SYMBOL_TYPE(int n)
int symbol_is_external(struct symbol *symbol)
int debugfile_lookup_line_addr(struct debugfile *debugfile, char *filename, ADDR addr)
int symbol_is_definition(struct symbol *symbol)
int symbol_is_inlined(struct symbol *symbol)
int symbol_type_flags_match(struct symbol *symbol, symbol_type_flag_t flags)
GHashTable * decldefnsused
struct debugfile * debugfile_from_binfile(struct binfile *binfile, struct array_list *debugfile_load_opts_list)
int symbol_has_addr(struct symbol *symbol)
uint32_t symbol_get_bitoffset(struct symbol *symbol)
struct symbol * symbol_get_datatype(struct symbol *symbol)
int debugfile_filename_info(char *filename, char **realfilename, char **name, char **version)
GHashTable * shared_types
uint32_t symbol_get_bytesize(struct symbol *symbol)
OFFSET lsymbol_offsetof(struct lsymbol *lsymbol, const char *name, const char *delim)
GHashTable * srcaddrlines
int symbol_is_decldefined(struct symbol *symbol)
int symbol_is_prototyped(struct symbol *symbol)
struct debugfile_load_opts * opts
struct debugfile_load_opts * debugfile_load_opts_parse(char *optstr)
int debugfile_type_flags_t
int lsymbol_resolve_bounds(struct lsymbol *lsymbol, ADDR base_addr, struct location_ctxt *lctxt, ADDR *start, ADDR *end, int *is_noncontiguous, ADDR *alt_start, ADDR *alt_end)
struct lsymbol * lsymbol_create_from_symbol(struct symbol *symbol)
char * lsymbol_get_name(struct lsymbol *lsymbol)
GSList * debugfile_match_syms(struct debugfile *debugfile, struct rfilter *symbol_filter, symbol_type_flag_t flags, struct rfilter *srcfile_filter)
int symbol_is_declinline(struct symbol *symbol)
debugfile_load_flags_t flags
int symbol_is_member(struct symbol *symbol)
void lsymbol_dump(struct lsymbol *lsymbol, struct dump_info *ud)
int symbol_type_equal(struct symbol *t1, struct symbol *t2, GHashTable *eqcache, GHashTable *updated_datatype_refs)
GSList * symbol_get_members(struct symbol *symbol, symbol_type_flag_t flags)
int debugfile_load_opts_checklist(struct array_list *opts_list, char *name, struct debugfile_load_opts **match_saveptr)
int symbol_resolve_bounds(struct symbol *symbol, struct location_ctxt *lctxt, ADDR *start, ADDR *end, int *is_noncontiguous, ADDR *o_alt_start, ADDR *o_alt_end)
loctype_t symbol_resolve_location(struct symbol *symbol, struct location_ctxt *lctxt, struct location *o_loc)
OFFSET symbol_offsetof(struct symbol *symbol, const char *name, const char *delim)
unsigned int dbg_strtablen
struct lsymbol * debugfile_lookup_addr(struct debugfile *debugfile, ADDR addr)
void symbol_type_dump(struct symbol *symbol, struct dump_info *ud)
void location_free(struct location *location)
struct debugfile_ops * ops
struct symbol * symbol_get_one_member(struct symbol *symbol, char *member)
struct debugfile * debugfile_from_instance(struct binfile_instance *bfinst, struct array_list *debugfile_load_opts_list)
struct lsymbol * lsymbol_create_noninline(struct lsymbol *lsymbol)
symbol_type_t symbol_get_type(struct symbol *symbol)
struct symbol * symbol_get_inline_origin(struct symbol *symbol)
struct dt_argp_state opts
char * symbol_get_compdirname(struct symbol *symbol)
void debugfile_load_opts_free(struct debugfile_load_opts *opts)
struct symbol * symbol_get_member(struct symbol *symbol, char *memberlist, const char *delim)
struct lsymbol * debugfile_lookup_sym(struct debugfile *debugfile, char *name, const char *delim, struct rfilter *srcfile_filter, symbol_type_flag_t flags)
struct symbol * lsymbol_get_symbol(struct lsymbol *lsymbol)
char * debugfile_get_name(struct debugfile *debugfile)
struct lsymbol * debugfile_lookup_sym_line(struct debugfile *debugfile, char *filename, int line, SMOFFSET *offset, ADDR *addr)
struct debugfile * debugfile_from_file(char *filename, char *root_prefix, struct array_list *debugfile_load_opts_list)
symbol_source_t symbol_get_source(struct symbol *symbol)
struct symbol * symbol_find_root(struct symbol *symbol)
struct symbol * symbol_type_skip_qualifiers(struct symbol *type)
REFCNT symbol_release(struct symbol *symbol)
struct lsymbol * lsymbol_clone(struct lsymbol *lsymbol, struct symbol *newchild)
void symbol_dump(struct symbol *symbol, struct dump_info *ud)
int symbol_is_declaration(struct symbol *symbol)
int symbol_get_srcline(struct symbol *symbol)
struct location * location_create(void)
struct rfilter * debugfile_filter
GHashTable * srcfiles_multiuse
int symbol_is_inlineinstance(struct symbol *symbol)
uint32_t symbol_get_bitctbytes(struct symbol *symbol)
struct lsymbol * symbol_lookup_sym(struct symbol *symbol, const char *name, const char *delim)
char * SYMBOL_SOURCE(int n)
void dwdebug_evict_all(void)
unsigned int symbol_type_full_bytesize(struct symbol *type)
struct binfile * binfile_pointing
struct symbol * symbol_type_skip_ptrs(struct symbol *type)
struct array_list * debugfile_get_loaded_debugfiles()
loctype_t lsymbol_resolve_location(struct lsymbol *lsymbol, ADDR base_addr, struct location_ctxt *lctxt, struct location *o_loc)
struct symbol * lsymbol_get_noninline_parent_symbol(struct lsymbol *lsymbol)
struct symbol * symbol_get_sym(struct symbol *symbol, const char *name, symbol_type_flag_t flags)
struct scope * scope_lookup_addr(struct scope *scope, ADDR pc)
struct rfilter * srcfile_filter
struct array_list * debugfile_lookup_addrs_line(struct debugfile *debugfile, char *filename, int line)
struct rfilter * symbol_filter
void symbol_hold(struct symbol *symbol)
struct lsymbol * lsymbol_create_from_member(struct lsymbol *parent, struct symbol *member)
char * symbol_get_srcfile(struct symbol *symbol)
struct symbol * symbol_get_datatype_real(struct symbol *symbol)
char * symbol_get_name(struct symbol *symbol)
int symbol_contains_addr(struct symbol *symbol, ADDR obj_addr)
int symbol_type_is_char(struct symbol *type)
debugfile_type_flags_t flags
void symbol_var_dump(struct symbol *symbol, struct dump_info *ud)
uint32_t symbol_get_bitsize(struct symbol *symbol)
int symbol_visible_at_ip(struct symbol *symbol, ADDR ip)
int symbol_is_bytesize(struct symbol *symbol)
char * symbol_get_name_inline(struct symbol *symbol)
struct array_list * chain
void dwdebug_evict(struct debugfile *debugfile)
int symbol_is_enumerator(struct symbol *symbol)
int symbol_is_synthetic(struct symbol *symbol)
struct lsymbol * lsymbol_lookup_sym(struct lsymbol *lsymbol, const char *name, const char *delim)
unsigned int symbol_type_array_bytesize(struct symbol *type)
int symbol_is_parameter(struct symbol *symbol)
char * debugfile_search_path(char *filename, char *root_prefix, char *debug_postfix, const char *DFPATH[], char *buf, int buflen)
ADDR symbol_get_addr(struct symbol *symbol)
void symbol_function_dump(struct symbol *symbol, struct dump_info *ud)
REFCNT lsymbol_release(struct lsymbol *lsymbol)
char * debugfile_get_version(struct debugfile *debugfile)
GSList * symbol_get_ordered_members(struct symbol *symbol, symbol_type_flag_t flags)
int debugfile_lookup_filename_line_addr(struct debugfile *debugfile, ADDR addr, char **filename, int *line)
void debugfile_dump(struct debugfile *debugfile, struct dump_info *ud, int types, int globals, int symtabs, int elfsymtab, int doranges)
struct symbol * symbol_create(symbol_type_t symtype, symbol_source_t source, char *name, int name_copy, SMOFFSET offset, load_type_t loadtype, struct scope *scope)