/* LINTLIBRARY */
/* PROTOLIB1 */

/*
 * Copyright (c) 1999 by Sun Microsystems, Inc. 
 * All rights reserved. 
 */ 

#pragma ident	"@(#)llib-llddbg	1.16	99/09/14 SMI"

#include <sys/types.h>
#include <gelf.h>
#include "debug.h"

int Dbg_setup(const char *);

void Dbg_args_files(int, char *);
void Dbg_args_flags(int, int);
void Dbg_audit_interface(const char *, const char *);
void Dbg_audit_interface64(const char *, const char *);
void Dbg_audit_lib(const char *);
void Dbg_audit_lib64(const char *);
void Dbg_audit_object(const char *, const char *);
void Dbg_audit_object64(const char *, const char *);
void Dbg_audit_symval(const char *, const char *, const char *, Addr, Addr);
void Dbg_audit_symval64(const char *, const char *, const char *, Addr, Addr);
void Dbg_audit_version(const char *, ulong_t);
void Dbg_audit_version64(const char *, ulong_t);
void Dbg_bind_global(const char *, caddr_t, caddr_t, uint_t,
	const char *, caddr_t, caddr_t, const char *);
void Dbg_bind_profile(uint_t, uint_t);
void Dbg_bind_weak(const char *, caddr_t, caddr_t, const char *);
void Dbg_ent_print(Half, List *, Boolean);
void Dbg_file_analyze(const char *, int);
void Dbg_file_analyze64(const char *, int);
void Dbg_file_aout(const char *, unsigned long,	unsigned long, unsigned long);
void Dbg_file_aout64(const char *, unsigned long, unsigned long, unsigned long);
void Dbg_file_archive(const char *, int);
void Dbg_file_archive64(const char *, int);
void Dbg_file_bind_entry(Rt_map *, Rt_map *);
void Dbg_file_bind_entry64(Rt_map *, Rt_map *);
void Dbg_file_bind_needed(Rt_map *);
void Dbg_file_bind_needed64(Rt_map *);
void Dbg_file_bind_title(int);
void Dbg_file_bind_title64(int);
void Dbg_file_config_dis(const char *, int);
void Dbg_file_config_dis64(const char *, int);
void Dbg_file_config_obj(const char *, const char *, const char *);
void Dbg_file_config_obj64(const char *, const char *, const char *);
void Dbg_file_delete(const char *);
void Dbg_file_delete64(const char *);
void Dbg_file_dlclose(const char *, int);
void Dbg_file_dlclose64(const char *, int);
void Dbg_file_dldump(const char *, const char *, int);
void Dbg_file_dldump64(const char *, const char *, int);
void Dbg_file_dlopen(const char *, const char *, int);
void Dbg_file_dlopen64(const char *, const char *, int);
void Dbg_file_elf(const char *, unsigned long, unsigned long,
	unsigned long, unsigned long, unsigned long, unsigned int,
	Lmid_t);
void Dbg_file_elf64(const char *, unsigned long, unsigned long,
	unsigned long, unsigned long, unsigned long, unsigned int,
	Lmid_t);
void Dbg_file_filter(const char *, const char *);
void Dbg_file_filter64(const char *, const char *);
void Dbg_file_fixname(const char *, const char *);
void Dbg_file_fixname64(const char *, const char *);
void Dbg_file_generic(Ifl_desc *);
void Dbg_file_generic64(Ifl_desc *);
void Dbg_file_lazyload(const char *, const char *, const char *);
void Dbg_file_lazyload64(const char *, const char *, const char *);
void Dbg_file_ldso(const char *, unsigned long,	unsigned long,
	unsigned long, unsigned long);
void Dbg_file_ldso64(const char *, unsigned long, unsigned long,
	unsigned long, unsigned long);
void Dbg_file_needed(const char *, const char *);
void Dbg_file_needed64(const char *, const char *);
void Dbg_file_nl(void);
void Dbg_file_nl64(void);
void Dbg_file_output(Ofl_desc *);
void Dbg_file_output64(Ofl_desc *);
void Dbg_file_preload(const char *);
void Dbg_file_preload64(const char *);
void Dbg_file_prot(const char *, int);
void Dbg_file_prot64(const char *, int);
void Dbg_file_rejected(const char *, int, uint_t);
void Dbg_file_reuse(const char *, const char *);
void Dbg_file_reuse64(const char *, const char *);
void Dbg_file_skip(const char *, const char *);
void Dbg_file_skip64(const char *, const char *);
void Dbg_file_unused(const char *);
void Dbg_file_unused64(const char *);
void Dbg_got_display(Gottable *, Ofl_desc *);
void Dbg_got_display64(Gottable *, Ofl_desc *);
void Dbg_libs_audit(const char *, const char *);
void Dbg_libs_ignore(const char *);
void Dbg_libs_init(List *, List *);
void Dbg_libs_l(const char *, const char *);
void Dbg_libs_path(const char *);
void Dbg_libs_req(const char *, const char *, const char *);
void Dbg_libs_update(List *, List *);
void Dbg_libs_yp(const char *);
void Dbg_libs_ylu(const char *, const char *, int);
void Dbg_libs_find(const char *);
void Dbg_libs_found(const char *);
void Dbg_libs_dpath(const char *);
void Dbg_libs_rpath(const char *, const char *);
void Dbg_map_atsign(Boolean);
void Dbg_map_atsign64(Boolean);
void Dbg_map_dash(const char *, Sdf_desc *);
void Dbg_map_dash64(const char *, Sdf_desc *);
void Dbg_map_ent(Boolean, Ent_desc *, Ofl_desc *);
void Dbg_map_ent64(Boolean, Ent_desc *, Ofl_desc *);
void Dbg_map_equal(Boolean);
void Dbg_map_equal64(Boolean);
void Dbg_map_parse(const char *);
void Dbg_map_parse64(const char *);
void Dbg_map_pipe(Sg_desc *, const char *, const Word);
void Dbg_map_pipe64(Sg_desc *, const char *, const Word);
void Dbg_map_seg(Half, int, Sg_desc *);
void Dbg_map_seg64(Half, int, Sg_desc *);
void Dbg_map_size_new(const char *);
void Dbg_map_size_new64(const char *);
void Dbg_map_size_old(Ehdr *, Sym_desc *);
void Dbg_map_size_old64(Ehdr *, Sym_desc *);
void Dbg_map_sort_fini(Sg_desc *);
void Dbg_map_sort_fini64(Sg_desc *);
void Dbg_map_sort_orig(Sg_desc *);
void Dbg_map_sort_orig64(Sg_desc *);
void Dbg_map_symbol(Ehdr *, Sym_desc *);
void Dbg_map_symbol64(Ehdr *, Sym_desc *);
void Dbg_map_version(const char *, const char *, int);
void Dbg_map_version64(const char *, const char *, int);
void Dbg_move_actsctadj(Sym_desc *);
void Dbg_move_actsctadj64(Sym_desc *);
void Dbg_move_adjexpandreloc(ulong_t, const char *);
void Dbg_move_adjmovereloc(ulong_t, ulong_t, const char *);
void Dbg_move_expanding(unsigned const char *);
void Dbg_move_input1(const char *);
void Dbg_move_movedata(const char *);
void Dbg_move_mventry(int, Move *, Sym_desc *);
void Dbg_move_mventry64(int, Move *, Sym_desc *);
void Dbg_move_mventry2(Move *);
void Dbg_move_mventry264(Move *);
void Dbg_move_outmove(unsigned const char *);
void Dbg_move_outsctadj(Sym_desc *);
void Dbg_move_outsctadj64(Sym_desc *);
void Dbg_move_parexpn(const char *);
void Dbg_move_psyminfo(Ofl_desc *);
void Dbg_move_psyminfo64(Ofl_desc *);
void Dbg_move_sections(const char *, ulong_t);
void Dbg_move_sunwbss(void);
void Dbg_move_title(int);
void Dbg_pltpad_bindto64(const char *, const char *, Addr);
void Dbg_pltpad_boundto64(const char *, Addr, const char *, const char *);
void Dbg_reloc_apply(unsigned long long, unsigned long long);
void Dbg_reloc_ars_entry(Half, Rel_desc *);
void Dbg_reloc_ars_entry64(Half, Rel_desc *);
void Dbg_reloc_disable_lazy(Half, const char *,	const char *, Word);
void Dbg_reloc_doact(Half, Word, Xword, Xword, const char *, Os_desc *);
void Dbg_reloc_doact64(Half, Word, Xword, Xword, const char *, Os_desc *);
void Dbg_reloc_doactiverel(void);
void Dbg_reloc_dooutrel(Rel_desc *);
void Dbg_reloc_dooutrel64(Rel_desc *);
void Dbg_reloc_end(const char *);
void Dbg_reloc_in(Half, Word, void *, const char *, const char *);
void Dbg_reloc_in64(Half, Word, void *, const char *, const char *);
void Dbg_reloc_ors_entry(Half, Rel_desc *);
void Dbg_reloc_ors_entry64(Half, Rel_desc *);
void Dbg_reloc_out(Half, Word, void *, const char *, const char *);
void Dbg_reloc_out64(Half, Word, void *, const char *, const char *);
void Dbg_reloc_proc(Os_desc *, Is_desc *, Is_desc *);
void Dbg_reloc_proc64(Os_desc *, Is_desc *, Is_desc *);
void Dbg_reloc_run(const char *, uint_t);
void Dbg_reloc_reg_apply(unsigned long long, unsigned long long);
void Dbg_reloc_reg_apply64(unsigned long long, unsigned long long);
void Dbg_sec_added(Os_desc *, Sg_desc *);
void Dbg_sec_added64(Os_desc *, Sg_desc *);
void Dbg_sec_created(Os_desc *, Sg_desc *);
void Dbg_sec_created64(Os_desc *, Sg_desc *);
void Dbg_sec_in(Is_desc *);
void Dbg_sec_in64(Is_desc *);
void Dbg_sec_order_list(Ofl_desc *, int);
void Dbg_sec_order_list64(Ofl_desc *, int);
void Dbg_sec_order_error(Ifl_desc *, Word, int);
void Dbg_sec_order_error64(Ifl_desc *, Word, int);
void Dbg_seg_entry(Half, int, Sg_desc *);
void Dbg_seg_entry64(Half, int, Sg_desc *);
void Dbg_seg_list(Half, List *);
void Dbg_seg_list64(Half, List *);
void Dbg_seg_os(Ofl_desc *, Os_desc *, int);
void Dbg_seg_os64(Ofl_desc *, Os_desc *, int);
void Dbg_seg_title(void);
void Dbg_seg_title64(void);
void Dbg_syms_ar_checking(Xword, Elf_Arsym *, const char *);
void Dbg_syms_ar_checking64(Xword, Elf_Arsym *, const char *);
void Dbg_syms_ar_entry(Xword, Elf_Arsym *);
void Dbg_syms_ar_entry64(Xword, Elf_Arsym *);
void Dbg_syms_ar_resolve(Xword, Elf_Arsym *, const char *, int);
void Dbg_syms_ar_resolve64(Xword, Elf_Arsym *, const char *, int);
void Dbg_syms_ar_title(const char *, int);
void Dbg_syms_ar_title64(const char *, int);
void Dbg_syms_created(const char *);
void Dbg_syms_created64(const char *);
void Dbg_syms_entered(Ehdr *, Sym *, Sym_desc *);
void Dbg_syms_entered64(Ehdr *, Sym *, Sym_desc *);
void Dbg_syms_entry(Xword, Sym_desc *);
void Dbg_syms_entry64(Xword, Sym_desc *);
void Dbg_syms_global(Xword, const char *);
void Dbg_syms_global64(Xword, const char *);
void Dbg_syms_new(Ehdr *, Sym *, Sym_desc *);
void Dbg_syms_new64(Ehdr *, Sym *, Sym_desc *);
void Dbg_syms_nl(void);
void Dbg_syms_nl64(void);
void Dbg_syms_old(Ehdr *, Sym_desc *);
void Dbg_syms_old64(Ehdr *, Sym_desc *);
void Dbg_syms_process(Ifl_desc *);
void Dbg_syms_process64(Ifl_desc *);
void Dbg_syms_reduce(Ehdr *, Sym_desc *);
void Dbg_syms_reduce64(Ehdr *, Sym_desc *);
void Dbg_syms_reloc(Ehdr *, Sym_desc *, Boolean);
void Dbg_syms_reloc64(Ehdr *, Sym_desc *, Boolean);
void Dbg_syms_resolved(Ehdr *, Sym_desc *);
void Dbg_syms_resolved64(Ehdr *, Sym_desc *);
void Dbg_syms_resolving1(Xword, const char *, int, int);
void Dbg_syms_resolving164(Xword, const char *, int, int);
void Dbg_syms_resolving2(Ehdr *, Sym *, Sym *, Sym_desc *, Ifl_desc *);
void Dbg_syms_resolving264(Ehdr *, Sym *, Sym *, Sym_desc *, Ifl_desc *);
void Dbg_syms_sec_entry(int, Sg_desc *, Os_desc *);
void Dbg_syms_sec_entry64(int, Sg_desc *, Os_desc *);
void Dbg_syms_sec_title(void);
void Dbg_syms_sec_title64(void);
void Dbg_syms_spec_title(void);
void Dbg_syms_spec_title64(void);
void Dbg_syms_up_title(Ehdr *);
void Dbg_syms_up_title64(Ehdr *);
void Dbg_syms_updated(Ehdr *, Sym_desc *, const char *);
void Dbg_syms_updated64(Ehdr *, Sym_desc *, const char *);
void Dbg_syms_dlsym(const char *, const char *, int next);
void Dbg_syms_dlsym64(const char *, const char *, int next);
void Dbg_syms_lookup_aout(const char *);
void Dbg_syms_lookup_aout64(const char *);
void Dbg_syms_lookup(const char *, const char *, const char *);
void Dbg_syms_lookup64(const char *, const char *, const char *);
void Dbg_syminfo_entry(int, Syminfo *, Sym *, const char *, Dyn *);
void Dbg_syminfo_entry64(int, Syminfo *, Sym *, const char *, Dyn *);
void Dbg_syminfo_title(void);
void Dbg_syminfo_title64(void);
void Dbg_support_action(const char *, const char *, int, const char *);
void Dbg_support_load(const char *, const char *);
void Dbg_support_req(const char *, int);
void Dbg_util_call_fini(const char *);
void Dbg_util_call_init(const char *);
void Dbg_util_call_main(const char *);
void Dbg_util_nl(void);
void Dbg_util_str(const char *);
void Dbg_ver_avail_entry(Ver_index *, const char *);
void Dbg_ver_avail_entry64(Ver_index *, const char *);
void Dbg_ver_avail_title(const char *);
void Dbg_ver_def_title(const char *);
void Dbg_ver_desc_entry(Ver_desc *);
void Dbg_ver_desc_entry64(Ver_desc *);
void Dbg_ver_need_title(const char *);
void Dbg_ver_need_entry(Half, const char *, const char *);
void Dbg_ver_symbol(const char *);

/*
 * Gelf related functions, used by elfdump
 */
void Gelf_dyn_print(GElf_Dyn *, int ndx, const char *, Half);
void Gelf_dyn_title(void);
void Gelf_elf_data(const char *, GElf_Addr, Elf_Data *, const char *);
void Gelf_elf_data_title(void);
void Gelf_elf_header(GElf_Ehdr *);
void Gelf_got_title(GElf_Ehdr *, GElf_Word);
void Gelf_got_entry(GElf_Ehdr *, int, GElf_Addr, GElf_Xword,
	GElf_Word, void *, const char *);
void Gelf_note_entry(GElf_Word *);
void Gelf_phdr_entry(Half, GElf_Phdr *);
void Gelf_reloc_entry(const char *, GElf_Half, GElf_Word,
	GElf_Rela *, const char *, const char *);
void Gelf_shdr_entry(Half, GElf_Shdr *);
void Gelf_sym_table_entry(const char *, GElf_Ehdr *, GElf_Sym *,
	GElf_Word, const char *, const char *);
void Gelf_sym_table_title(GElf_Ehdr *, const char *, const char *);
void Gelf_syminfo_entry(int, GElf_Syminfo *, const char *, const char *);
void Gelf_syminfo_entry_title(const char *);
void Gelf_ver_def_print(GElf_Verdef *, GElf_Xword, const char *);
void Gelf_ver_need_print(GElf_Verneed *, GElf_Xword, const char *);
