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.h | |
parent | cfeab26e4d42fb6f1bde429ab53a885a9d106a69 (diff) | |
download | fsf-binutils-gdb-d43bd54d543742c76fb20a0fe379817ccca4e5f2.zip fsf-binutils-gdb-d43bd54d543742c76fb20a0fe379817ccca4e5f2.tar.gz fsf-binutils-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.h')
-rw-r--r-- | gdb/inferior.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/inferior.h b/gdb/inferior.h index 45de3c2..caabc2e 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -740,4 +740,11 @@ extern struct inferior *add_inferior_with_spaces (void); /* Print the current selected inferior. */ extern void print_selected_inferior (struct ui_out *uiout); +/* 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. */ + +extern void switch_to_inferior_and_push_target + (inferior *new_inf, bool no_connection, inferior *org_inf); + #endif /* !defined (INFERIOR_H) */ |