static void osf_solib_create_inferior_hook (void) { /* Nothing to do for statically bound executables. */ if (symfile_objfile == NULL || symfile_objfile->obfd == NULL || ((bfd_get_file_flags (symfile_objfile->obfd) & DYNAMIC) == 0)) return; /* Now run the target. It will eventually get a SIGTRAP, at which point all of the libraries will have been mapped in and we can go groveling around in the rld structures to find out what we need to know about them. */ clear_proceed_status (); stop_soon = STOP_QUIETLY; stop_signal = TARGET_SIGNAL_0; do { target_resume (minus_one_ptid, 0, stop_signal); wait_for_inferior (0); } while (stop_signal != TARGET_SIGNAL_TRAP); /* solib_add will call reinit_frame_cache. But we are stopped in the runtime loader and we do not have symbols for the runtime loader. So heuristic_proc_start will be called and will put out an annoying warning. Delaying the resetting of stop_soon until after symbol loading suppresses the warning. */ solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add); stop_soon = NO_STOP_QUIETLY; }
static void osf_solib_create_inferior_hook (int from_tty) { struct inferior *inf; struct thread_info *tp; inf = current_inferior (); /* If we are attaching to the inferior, the shared libraries have already been mapped, so nothing more to do. */ if (inf->attach_flag) return; /* Nothing to do for statically bound executables. */ if (symfile_objfile == NULL || symfile_objfile->obfd == NULL || ((bfd_get_file_flags (symfile_objfile->obfd) & DYNAMIC) == 0)) return; /* Now run the target. It will eventually get a SIGTRAP, at which point all of the libraries will have been mapped in and we can go groveling around in the rld structures to find out what we need to know about them. If debugging from a core file, we cannot resume the execution of the inferior. But this is actually not an issue, because shared libraries have already been mapped anyways, which means we have nothing more to do. */ if (!target_can_run (¤t_target)) return; tp = inferior_thread (); clear_proceed_status (); inf->stop_soon = STOP_QUIETLY; tp->stop_signal = TARGET_SIGNAL_0; do { target_resume (minus_one_ptid, 0, tp->stop_signal); wait_for_inferior (0); } while (tp->stop_signal != TARGET_SIGNAL_TRAP); /* solib_add will call reinit_frame_cache. But we are stopped in the runtime loader and we do not have symbols for the runtime loader. So heuristic_proc_start will be called and will put out an annoying warning. Delaying the resetting of stop_soon until after symbol loading suppresses the warning. */ solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add); inf->stop_soon = NO_STOP_QUIETLY; }