diff options
author | Umair Sair <umair_sair@hotmail.com> | 2022-02-24 22:25:51 +0500 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-03-07 19:38:53 +0000 |
commit | d43bd54d543742c76fb20a0fe379817ccca4e5f2 (patch) | |
tree | bd9343ee5c85ac675fb3ab8c6f85ab2bf9653e36 /gdb/inferior.c | |
parent | cfeab26e4d42fb6f1bde429ab53a885a9d106a69 (diff) | |
download | gdb-d43bd54d543742c76fb20a0fe379817ccca4e5f2.zip gdb-d43bd54d543742c76fb20a0fe379817ccca4e5f2.tar.gz gdb-d43bd54d543742c76fb20a0fe379817ccca4e5f2.tar.bz2 |
gdb/mi: fix regression in mi -add-inferior command
Prior to the multi-target support commit:
commit 5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2
Date: Fri Jan 10 20:06:08 2020 +0000
Multi-target support
When a new inferior was added using the MI -add-inferior command, the
new inferior would be using the same target as all the other
inferiors. This makes sense, GDB only supported a single target stack
at a time.
After the above commit, each inferior has its own target stack.
To maintain backward compatibility, for the CLI add-inferior command,
when a new inferior is added the above commit has the new inferior
inherit a copy of the target stack from the current inferior.
Unfortunately, this same backward compatibility is missing for the MI.
This commit fixes this oversight.
Now, when the -add-inferior MI command is used, the new inferior will
inherit a copy of the target stack from the current inferior.
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r-- | gdb/inferior.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c index 965ae65..48d5c8b 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -759,11 +759,9 @@ add_inferior_with_spaces (void) return inf; } -/* Switch to inferior NEW_INF, a new inferior, and unless - NO_CONNECTION is true, push the process_stratum_target of ORG_INF - to NEW_INF. */ +/* See inferior.h. */ -static void +void switch_to_inferior_and_push_target (inferior *new_inf, bool no_connection, inferior *org_inf) { |