aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/infrun.c1
-rw-r--r--gdb/target.h7
3 files changed, 12 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index de66783..f0ae77e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2021-05-13 Simon Marchi <simon.marchi@efficios.com>
+
+ * infrun.c (follow_exec): Call target_follow_fork when
+ follow-exec-mode is same.
+ * target.h (target_follow_fork): Improve doc.
+
2021-05-13 Simon Marchi <simon.marchi@polymtl.ca>
* cli/cli-decode.h (struct cmd_list_element) <pre_show_hook>:
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 90bab8d..3e386aa 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1198,6 +1198,7 @@ follow_exec (ptid_t ptid, const char *exec_file_target)
around (its description is later cleared/refetched on
restart). */
target_clear_description ();
+ target_follow_exec (inf, exec_file_target);
}
gdb_assert (current_program_space == inf->pspace);
diff --git a/gdb/target.h b/gdb/target.h
index 48bf734..b80cf88 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -1714,8 +1714,11 @@ extern int target_remove_vfork_catchpoint (int pid);
void target_follow_fork (bool follow_child, bool detach_fork);
-/* Handle the target-specific bookkeeping required when the inferior
- makes an exec call. INF is the exec'd inferior. */
+/* Handle the target-specific bookkeeping required when the inferior makes an
+ exec call. The current inferior is the inferior that has executed the exec
+ call. INF is the inferior in which execution continues post-exec. It is the
+ same inferior as the current one if "follow-exec-mode" is "same" but is a new
+ one if "follow-exec-mode" is "new". */
void target_follow_exec (struct inferior *inf, const char *execd_pathname);