- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
- set_solib_ops (gdbarch, &solib_target_so_ops);
-
- /* Every process, although has its own address space, sees the same
- list of shared libraries. */
- set_gdbarch_has_global_solist (gdbarch, 1);
-
- /* There's no (standard definition of) entry point or a guaranteed
- text location we could find with a symbol where to place the call
- dummy, so we put it on the stack. */
- set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
- set_gdbarch_push_dummy_code (gdbarch, i386_dicos_push_dummy_code);
-
- /* DICOS rewinds itself. Need to override the i386 default which is
- to decrement the PC. */
- set_gdbarch_decr_pc_after_break (gdbarch, 0);
-}
-
-/* Look in the elf symbol table of ABFD for a symbol named WANTED.
- Return true if found. */
-static int
-i386_dicos_bfd_has_symbol_p (bfd *abfd, const char *wanted)
-{
- long storage_needed;
- int ret = 0;
- asymbol **symbol_table = NULL;
-
- storage_needed = bfd_get_symtab_upper_bound (abfd);
- if (storage_needed < 0)
- {
- warning (_("Can't read elf symbols from %s: %s"), bfd_get_filename (abfd),
- bfd_errmsg (bfd_get_error ()));
- return 0;
- }
-
- if (storage_needed > 0)
- {
- long i, symcount;
-
- symbol_table = xmalloc (storage_needed);
- symcount = bfd_canonicalize_symtab (abfd, symbol_table);
-
- if (symcount < 0)
- warning (_("Can't read elf symbols from %s: %s"),
- bfd_get_filename (abfd),
- bfd_errmsg (bfd_get_error ()));
- else
- {
- for (i = 0; i < symcount; i++)
- {
- asymbol *sym = symbol_table[i];
- if (sym->name != NULL
- && wanted[0] == sym->name[0]
- && strcmp (wanted + 1, sym->name + 1) == 0)
- {
- ret = 1;
- break;
- }
- }
- }
- }
-
- xfree (symbol_table);
- return ret;