diff options
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index e9b58ce..a785ae3 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -25,6 +25,7 @@ #include "inferior.h" #include "infrun.h" #include "gdbsupport/environ.h" +#include "gdbsupport/common-inferior.h" #include "value.h" #include "cli/cli-cmds.h" #include "cli/cli-style.h" @@ -224,14 +225,11 @@ strip_bg_char (const char *args, int *bg_char_p) return make_unique_xstrdup (args); } -/* Common actions to take after creating any sort of inferior, by any - means (running, attaching, connecting, et cetera). The target - should be stopped. */ +/* See inferior.h. */ void -post_create_inferior (int from_tty) +post_create_inferior (int from_tty, bool set_pspace_solib_ops) { - /* Be sure we own the terminal in case write operations are performed. */ target_terminal::ours_for_output (); @@ -261,6 +259,11 @@ post_create_inferior (int from_tty) throw; } + if (set_pspace_solib_ops) + current_program_space->set_solib_ops + (gdbarch_make_solib_ops (current_inferior ()->arch (), + current_program_space)); + if (current_program_space->exec_bfd ()) { const unsigned solib_add_generation @@ -482,7 +485,7 @@ run_command_1 (const char *args, int from_tty, enum run_how run_how) /* Pass zero for FROM_TTY, because at this point the "run" command has done its thing; now we are setting up the running program. */ - post_create_inferior (0); + post_create_inferior (0, true); /* Queue a pending event so that the program stops immediately. */ if (run_how == RUN_STOP_AT_FIRST_INSN) @@ -988,7 +991,7 @@ prepare_one_step (thread_info *tp, struct step_command_fsm *sm) if (inline_skipped_frames (tp) > 0) { const symbol *sym = inline_skipped_symbol (tp); - if (sym->aclass () == LOC_BLOCK) + if (sym->loc_class () == LOC_BLOCK) { const block *block = sym->value_block (); if (block->end () < tp->control.step_range_end) @@ -2506,7 +2509,7 @@ setup_inferior (int from_tty) /* Take any necessary post-attaching actions for this platform. */ target_post_attach (inferior_ptid.pid ()); - post_create_inferior (from_tty); + post_create_inferior (from_tty, true); } /* What to do after the first program stops after attaching. */ @@ -3080,9 +3083,7 @@ use \"set args\" without arguments.\n\ \n\ To start the inferior without using a shell, use \"set startup-with-shell off\"." -void _initialize_infcmd (); -void -_initialize_infcmd () +INIT_GDB_FILE (infcmd) { static struct cmd_list_element *info_proc_cmdlist; struct cmd_list_element *c = nullptr; |