diff options
author | Pedro Alves <palves@redhat.com> | 2020-04-13 20:02:27 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2020-06-03 20:31:17 +0100 |
commit | 2e88948dbb5e993d6cae4c48be554d2fc9dcf7c8 (patch) | |
tree | 71bf61fb0513db2138d92ee8fee3882f1b8270ee | |
parent | 31a30c8ab22f46c5fd511dc5b65e4bb1dce3ab90 (diff) | |
download | binutils-gdb-2e88948dbb5e993d6cae4c48be554d2fc9dcf7c8.tar.gz |
Don't write to inferior_ptid in windows-nat.c, part I
The inferior_ptid hack in do_initial_win32_stuff, added back in 2008:
https://sourceware.org/ml/gdb-patches/2008-10/msg00012.html
with:
commit 9f9d052e600ed9436f9fd558d62a189c8cc3d43e
Author: Pierre Muller <muller@sourceware.org>
AuthorDate: Thu Oct 2 14:20:07 2008 +0000
* win32-nat.c (do_initial_win32_stuff): Set inferior_ptid.
is no longer needed. Back then, current_inferior looked like this:
struct inferior*
current_inferior (void)
{
struct inferior *inf = find_inferior_pid (ptid_get_pid (inferior_ptid));
gdb_assert (inf);
return inf;
}
Nowadays, current_inferior() just returns the global current_inferior_
pointer, which didn't exist back then.
gdb/ChangeLog:
yyyy-mm-dd Pedro Alves <palves@redhat.com>
* windows-nat.c (do_initial_windows_stuff): No longer set inferior_ptid.
-rw-r--r-- | gdb/windows-nat.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 3452f6c827f..4d232bc28ff 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -2021,12 +2021,6 @@ do_initial_windows_stuff (struct target_ops *ops, DWORD pid, int attaching) inferior_appeared (inf, pid); inf->attach_flag = attaching; - /* Make the new process the current inferior, so terminal handling - can rely on it. When attaching, we don't know about any thread - id here, but that's OK --- nothing should be referencing the - current thread until we report an event out of windows_wait. */ - inferior_ptid = ptid_t (pid); - target_terminal::init (); target_terminal::inferior (); |