aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2009-01-09 10:36:00 +0000
committerJoel Brobecker <brobecker@gnat.com>2009-01-09 10:36:00 +0000
commit0795be10ed9f53d6eefd925ec226a325d54ff126 (patch)
tree24fd8e4ad97eb4d2b989b5e8b6a215eac7c75f13 /gdb
parent1be7fe8dbac0ae12d7f50df82640460d1f1579b7 (diff)
downloadgdb-0795be10ed9f53d6eefd925ec226a325d54ff126.zip
gdb-0795be10ed9f53d6eefd925ec226a325d54ff126.tar.gz
gdb-0795be10ed9f53d6eefd925ec226a325d54ff126.tar.bz2
* win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
and use it when pushing the target. (win32_attach, win32_create_inferior): Update call to do_initial_win32_stuff. (win32_detach, win32_mourn_inferior): Use our ops parameter instead of the global win32_ops to unpush the target.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/win32-nat.c12
-rw-r--r--gdb/windows-nat.c12
3 files changed, 21 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8656425..25167de 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2009-01-07 Joel Brobecker <brobecker@adacore.com>
+
+ * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
+ and use it when pushing the target.
+ (win32_attach, win32_create_inferior): Update call to
+ do_initial_win32_stuff.
+ (win32_detach, win32_mourn_inferior): Use our ops parameter
+ instead of the global win32_ops to unpush the target.
+
2009-01-09 Joel Brobecker <brobecker@adacore.com>
* ser-mingw.c (ser_windows_open): Use proper type when casting
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 06294bf..ed37cb4 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -1521,7 +1521,7 @@ win32_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
}
static void
-do_initial_win32_stuff (DWORD pid, int attaching)
+do_initial_win32_stuff (struct target_ops *ops, DWORD pid, int attaching)
{
extern int stop_after_trap;
int i;
@@ -1541,7 +1541,7 @@ do_initial_win32_stuff (DWORD pid, int attaching)
#endif
current_event.dwProcessId = pid;
memset (&current_event, 0, sizeof (current_event));
- push_target (&win32_ops);
+ push_target (ops);
disable_breakpoints_in_shlibs ();
win32_clear_solib ();
clear_proceed_status ();
@@ -1735,7 +1735,7 @@ win32_attach (struct target_ops *ops, char *args, int from_tty)
gdb_flush (gdb_stdout);
}
- do_initial_win32_stuff (pid, 1);
+ do_initial_win32_stuff (ops, pid, 1);
target_terminal_ours ();
}
@@ -1770,7 +1770,7 @@ win32_detach (struct target_ops *ops, char *args, int from_tty)
inferior_ptid = null_ptid;
detach_inferior (current_event.dwProcessId);
- unpush_target (&win32_ops);
+ unpush_target (ops);
}
static char *
@@ -1945,7 +1945,7 @@ win32_create_inferior (struct target_ops *ops, char *exec_file,
else
saw_create = 0;
- do_initial_win32_stuff (pi.dwProcessId, 0);
+ do_initial_win32_stuff (ops, pi.dwProcessId, 0);
/* win32_continue (DBG_CONTINUE, -1); */
}
@@ -1960,7 +1960,7 @@ win32_mourn_inferior (struct target_ops *ops)
CHECK (CloseHandle (current_process_handle));
open_process_used = 0;
}
- unpush_target (&win32_ops);
+ unpush_target (ops);
generic_mourn_inferior ();
}
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 06294bf..ed37cb4 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1521,7 +1521,7 @@ win32_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
}
static void
-do_initial_win32_stuff (DWORD pid, int attaching)
+do_initial_win32_stuff (struct target_ops *ops, DWORD pid, int attaching)
{
extern int stop_after_trap;
int i;
@@ -1541,7 +1541,7 @@ do_initial_win32_stuff (DWORD pid, int attaching)
#endif
current_event.dwProcessId = pid;
memset (&current_event, 0, sizeof (current_event));
- push_target (&win32_ops);
+ push_target (ops);
disable_breakpoints_in_shlibs ();
win32_clear_solib ();
clear_proceed_status ();
@@ -1735,7 +1735,7 @@ win32_attach (struct target_ops *ops, char *args, int from_tty)
gdb_flush (gdb_stdout);
}
- do_initial_win32_stuff (pid, 1);
+ do_initial_win32_stuff (ops, pid, 1);
target_terminal_ours ();
}
@@ -1770,7 +1770,7 @@ win32_detach (struct target_ops *ops, char *args, int from_tty)
inferior_ptid = null_ptid;
detach_inferior (current_event.dwProcessId);
- unpush_target (&win32_ops);
+ unpush_target (ops);
}
static char *
@@ -1945,7 +1945,7 @@ win32_create_inferior (struct target_ops *ops, char *exec_file,
else
saw_create = 0;
- do_initial_win32_stuff (pi.dwProcessId, 0);
+ do_initial_win32_stuff (ops, pi.dwProcessId, 0);
/* win32_continue (DBG_CONTINUE, -1); */
}
@@ -1960,7 +1960,7 @@ win32_mourn_inferior (struct target_ops *ops)
CHECK (CloseHandle (current_process_handle));
open_process_used = 0;
}
- unpush_target (&win32_ops);
+ unpush_target (ops);
generic_mourn_inferior ();
}