diff options
author | Pierre Muller <muller@sourceware.org> | 2008-10-02 14:20:07 +0000 |
---|---|---|
committer | Pierre Muller <muller@sourceware.org> | 2008-10-02 14:20:07 +0000 |
commit | 9f9d052e600ed9436f9fd558d62a189c8cc3d43e (patch) | |
tree | d8040277d36124c2d7638afb6a941f2bf5774139 | |
parent | e1e87d1e172ce154bafd12cff5caaacc86d4c353 (diff) | |
download | gdb-9f9d052e600ed9436f9fd558d62a189c8cc3d43e.zip gdb-9f9d052e600ed9436f9fd558d62a189c8cc3d43e.tar.gz gdb-9f9d052e600ed9436f9fd558d62a189c8cc3d43e.tar.bz2 |
* win32-nat.c (do_initial_win32_stuff): Set inferior_ptid.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/win32-nat.c | 6 | ||||
-rw-r--r-- | gdb/windows-nat.c | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 39c8c10..bb0d830 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2008-10-02 Pierre Muller <muller@ics.u-strasbg.fr> + Pedro Alves <pedro@codesourcery.com> + + * win32-nat.c (do_initial_win32_stuff): Set inferior_ptid. + + 2008-10-01 Tom Tromey <tromey@redhat.com> * symtab.c (search_symbols): Update. diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index 03b2f52..cd4d533 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -1550,6 +1550,12 @@ do_initial_win32_stuff (DWORD pid, int attaching) inf = add_inferior (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 win32_wait. */ + inferior_ptid = pid_to_ptid (pid); + terminal_init_inferior_with_pgrp (pid); target_terminal_inferior (); diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 03b2f52..cd4d533 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -1550,6 +1550,12 @@ do_initial_win32_stuff (DWORD pid, int attaching) inf = add_inferior (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 win32_wait. */ + inferior_ptid = pid_to_ptid (pid); + terminal_init_inferior_with_pgrp (pid); target_terminal_inferior (); |