diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/infrun.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a6738bd..4887e57 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2018-11-22 Pedro Alves <palves@redhat.com> + * infrun.c (follow_exec) <set follow-exec new>: Add thread and + switch to it before calling into try_open_exec_file. + +2018-11-22 Pedro Alves <palves@redhat.com> + * cli/cli-interp.c (cli_on_user_selected_context_changed): Use inferior_thread instead of find_thread_ptid, and only when inferior_ptid is not null_ptid. diff --git a/gdb/infrun.c b/gdb/infrun.c index 3e9acb4..81f45be 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1202,6 +1202,7 @@ follow_exec (ptid_t ptid, char *exec_file_target) set_current_inferior (inf); set_current_program_space (inf->pspace); + add_thread (ptid); } else { @@ -1231,11 +1232,6 @@ follow_exec (ptid_t ptid, char *exec_file_target) registers. */ target_find_description (); - /* The add_thread call ends up reading registers, so do it after updating the - target description. */ - if (follow_exec_mode_string == follow_exec_mode_new) - add_thread (ptid); - solib_create_inferior_hook (0); jit_inferior_created_hook (); |