diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-03-23 09:50:35 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-03-23 09:50:35 -0400 |
commit | 02980c5645e355833b989e9551befddd54e75640 (patch) | |
tree | 9cdcf5e5ceb0fece771f1cc5084dc7343556e9fc /gdb/gnu-nat.c | |
parent | fadf6add3028d477457c809f60f07643964d7fd2 (diff) | |
download | binutils-02980c5645e355833b989e9551befddd54e75640.zip binutils-02980c5645e355833b989e9551befddd54e75640.tar.gz binutils-02980c5645e355833b989e9551befddd54e75640.tar.bz2 |
gdb: remove push_target free functions
Same as the previous patch, but for the push_target functions.
The implementation of the move variant is moved to a new overload of
inferior::push_target.
gdb/ChangeLog:
* target.h (push_target): Remove, update callers to use
inferior::push_target.
* target.c (push_target): Remove.
* inferior.h (class inferior) <push_target>: New overload.
Change-Id: I5a95496666278b8f3965e5e8aecb76f54a97c185
Diffstat (limited to 'gdb/gnu-nat.c')
-rw-r--r-- | gdb/gnu-nat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 409d141..9ea4c40 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -2114,7 +2114,7 @@ gnu_nat_target::create_inferior (const char *exec_file, inf_debug (inf, "creating inferior"); if (!target_is_pushed (this)) - push_target (this); + current_inferior ()->push_target (this); pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me, NULL, NULL, NULL, NULL); @@ -2190,9 +2190,9 @@ gnu_nat_target::attach (const char *args, int from_tty) inf_attach (inf, pid); - push_target (this); - inferior = current_inferior (); + inferior->push_target (this); + inferior_appeared (inferior, pid); inferior->attach_flag = 1; |