aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-02-03 09:21:25 -0500
committerSimon Marchi <simon.marchi@efficios.com>2023-02-03 11:06:26 -0500
commit57768366319b362bc54bd2175e09b210ce195688 (patch)
treeb46b6cc99eeb04aa076613740993a51f307552bf
parent6b0b81b9f2cb056bd82e9c01f4a5f631ae90938b (diff)
downloadgdb-57768366319b362bc54bd2175e09b210ce195688.zip
gdb-57768366319b362bc54bd2175e09b210ce195688.tar.gz
gdb-57768366319b362bc54bd2175e09b210ce195688.tar.bz2
gdb: remove copy_inferior_target_desc_info
This function is now trivial, we can just copy inferior::tdesc_info where needed. Change-Id: I25185e2cd4ba1ef24a822d9e0eebec6e611d54d6
-rw-r--r--gdb/inferior.c2
-rw-r--r--gdb/infrun.c4
-rw-r--r--gdb/target-descriptions.c11
-rw-r--r--gdb/target-descriptions.h7
4 files changed, 3 insertions, 21 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c
index dfe5236..6586344 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -962,7 +962,7 @@ clone_inferior_command (const char *args, int from_tty)
/* If the original inferior had a user specified target
description, make the clone use it too. */
if (target_desc_info_from_user_p (&inf->tdesc_info))
- copy_inferior_target_desc_info (inf, orginf);
+ inf->tdesc_info = orginf->tdesc_info;
clone_program_space (pspace, orginf->pspace);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index edfb5ab..87ab73c 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -478,7 +478,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
child_inf->attach_flag = parent_inf->attach_flag;
copy_terminal_info (child_inf, parent_inf);
child_inf->gdbarch = parent_inf->gdbarch;
- copy_inferior_target_desc_info (child_inf, parent_inf);
+ child_inf->tdesc_info = parent_inf->tdesc_info;
child_inf->symfile_flags = SYMFILE_NO_READ;
@@ -546,7 +546,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
child_inf->attach_flag = parent_inf->attach_flag;
copy_terminal_info (child_inf, parent_inf);
child_inf->gdbarch = parent_inf->gdbarch;
- copy_inferior_target_desc_info (child_inf, parent_inf);
+ child_inf->tdesc_info = parent_inf->tdesc_info;
if (has_vforked)
{
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 0561a80..6defd5b 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -459,17 +459,6 @@ target_desc_info_from_user_p (struct target_desc_info *info)
return info != nullptr && !info->filename.empty ();
}
-/* See target-descriptions.h. */
-
-void
-copy_inferior_target_desc_info (struct inferior *destinf, struct inferior *srcinf)
-{
- struct target_desc_info *src = &srcinf->tdesc_info;
- struct target_desc_info *dest = &destinf->tdesc_info;
-
- *dest = *src;
-}
-
/* The string manipulated by the "set tdesc filename ..." command. */
static std::string tdesc_filename_cmd_string;
diff --git a/gdb/target-descriptions.h b/gdb/target-descriptions.h
index c337c17..b835e14 100644
--- a/gdb/target-descriptions.h
+++ b/gdb/target-descriptions.h
@@ -48,13 +48,6 @@ void target_clear_description (void);
const struct target_desc *target_current_description (void);
-/* Copy inferior target description data. Used for example when
- handling (v)forks, where child's description is the same as the
- parent's, since the child really is a copy of the parent. */
-
-void copy_inferior_target_desc_info (struct inferior *destinf,
- struct inferior *srcinf);
-
/* Returns true if INFO indicates the target description had been
supplied by the user. */