60 asymbol **symbol_table = NULL;
61 const char *symname =
"Dicos_loadModuleInfo";
70 section = bfd_get_section_by_name (abfd,
"header");
74 if (bfd_section_size (abfd, section) != header_size)
80 storage_needed = bfd_get_symtab_upper_bound (abfd);
81 if (storage_needed < 0)
83 warning (
_(
"Can't read elf symbols from %s: %s"),
84 bfd_get_filename (abfd),
85 bfd_errmsg (bfd_get_error ()));
89 if (storage_needed > 0)
93 symbol_table =
xmalloc (storage_needed);
94 symcount = bfd_canonicalize_symtab (abfd, symbol_table);
97 warning (
_(
"Can't read elf symbols from %s: %s"),
98 bfd_get_filename (abfd),
99 bfd_errmsg (bfd_get_error ()));
102 for (i = 0; i < symcount; i++)
104 asymbol *sym = symbol_table[i];
105 if (sym->name != NULL
106 && symname[0] == sym->name[0]
107 && strcmp (symname + 1, sym->name + 1) == 0)
116 xfree (symbol_table);
void set_solib_ops(struct gdbarch *gdbarch, const struct target_so_ops *new_ops)
void warning(const char *fmt,...)
void set_gdbarch_has_global_solist(struct gdbarch *gdbarch, int has_global_solist)
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
struct target_so_ops solib_target_so_ops
void dicos_init_abi(struct gdbarch *gdbarch)
void set_gdbarch_decr_pc_after_break(struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break)
void set_gdbarch_has_global_breakpoints(struct gdbarch *gdbarch, int has_global_breakpoints)
int dicos_load_module_p(bfd *abfd, int header_size)