aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog18
-rw-r--r--gdb/fork-child.c3
-rw-r--r--gdb/inf-child.c10
-rw-r--r--gdb/infrun.c19
-rw-r--r--gdb/target.c19
-rw-r--r--gdb/target.h8
6 files changed, 18 insertions, 59 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 38fac74..d0469c4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,23 @@
2008-03-15 Vladimir Prus <vladimir@codesourcery.com>
+ Remove ignoring leading exec events code.
+ * fork-child.c (startup_inferior): Do not set
+ inferior_ignoring_leading_exec_events.
+ * inf-child.c (inf_child_reported_exec_events_per_exec_call): Remove.
+ (inf_child_target): Do not set to_reported_exec_events_per_exec_call.
+ * infrun.c (inferior_ignoring_leading_exec_events): Remove.
+ (handle_inferior_event): Remove code for ignoring leading exec
+ events.
+ * target.c (update_current_target): Do not inherit, or default,
+ to_reported_exec_events_per_exec_call.
+ (debug_to_reported_exec_events_per_exec_call): Remove.
+ (setup_target_debug): Do not set to_reported_exec_events_per_exec_call.
+ * target.h (target_reported_exec_events_per_exec_call): Remove.
+ (struct target): Remove the to_reported_exec_events_per_exec_call
+ field.
+
+2008-03-15 Vladimir Prus <vladimir@codesourcery.com>
+
Implement -thread-info.
* gdbthread.h (print_thread_info): Declare.
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index c8e7683..7aff110 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -426,9 +426,6 @@ startup_inferior (int ntraps)
init_wait_for_inferior ();
- inferior_ignoring_leading_exec_events =
- target_reported_exec_events_per_exec_call () - 1;
-
while (1)
{
/* Make wait_for_inferior be quiet. */
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index ae11871..8da25f4 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -145,14 +145,6 @@ inf_child_remove_exec_catchpoint (int pid)
}
static int
-inf_child_reported_exec_events_per_exec_call (void)
-{
- /* This version of Unix doesn't support notification of exec
- events. */
- return 1;
-}
-
-static int
inf_child_can_run (void)
{
return 1;
@@ -195,8 +187,6 @@ inf_child_target (void)
t->to_follow_fork = inf_child_follow_fork;
t->to_insert_exec_catchpoint = inf_child_insert_exec_catchpoint;
t->to_remove_exec_catchpoint = inf_child_remove_exec_catchpoint;
- t->to_reported_exec_events_per_exec_call =
- inf_child_reported_exec_events_per_exec_call;
t->to_can_run = inf_child_can_run;
t->to_pid_to_exec_file = inf_child_pid_to_exec_file;
t->to_stratum = process_stratum;
diff --git a/gdb/infrun.c b/gdb/infrun.c
index c863736..6388d93 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -82,8 +82,6 @@ static int prepare_to_proceed (int);
void _initialize_infrun (void);
-int inferior_ignoring_leading_exec_events = 0;
-
/* When set, stop the 'step' command if we enter a function which has
no line number information. The normal behavior is that we step
over such function. */
@@ -1493,23 +1491,6 @@ handle_inferior_event (struct execution_control_state *ecs)
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_EXECD\n");
stop_signal = TARGET_SIGNAL_TRAP;
- /* NOTE drow/2002-12-05: This code should be pushed down into the
- target_wait function. Until then following vfork on HP/UX 10.20
- is probably broken by this. Of course, it's broken anyway. */
- /* Is this a target which reports multiple exec events per actual
- call to exec()? (HP-UX using ptrace does, for example.) If so,
- ignore all but the last one. Just resume the exec'r, and wait
- for the next exec event. */
- if (inferior_ignoring_leading_exec_events)
- {
- inferior_ignoring_leading_exec_events--;
- target_resume (ecs->ptid, 0, TARGET_SIGNAL_0);
- prepare_to_wait (ecs);
- return;
- }
- inferior_ignoring_leading_exec_events =
- target_reported_exec_events_per_exec_call () - 1;
-
pending_follow.execd_pathname =
savestring (ecs->ws.value.execd_pathname,
strlen (ecs->ws.value.execd_pathname));
diff --git a/gdb/target.c b/gdb/target.c
index 9d2f1fd..4168c05 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -439,7 +439,6 @@ update_current_target (void)
/* Do not inherit to_follow_fork. */
INHERIT (to_insert_exec_catchpoint, t);
INHERIT (to_remove_exec_catchpoint, t);
- INHERIT (to_reported_exec_events_per_exec_call, t);
INHERIT (to_has_exited, t);
INHERIT (to_mourn_inferior, t);
INHERIT (to_can_run, t);
@@ -599,9 +598,6 @@ update_current_target (void)
de_fault (to_remove_exec_catchpoint,
(int (*) (int))
tcomplain);
- de_fault (to_reported_exec_events_per_exec_call,
- (int (*) (void))
- return_one);
de_fault (to_has_exited,
(int (*) (int, int, int *))
return_zero);
@@ -2636,20 +2632,6 @@ debug_to_remove_exec_catchpoint (int pid)
}
static int
-debug_to_reported_exec_events_per_exec_call (void)
-{
- int reported_exec_events;
-
- reported_exec_events = debug_target.to_reported_exec_events_per_exec_call ();
-
- fprintf_unfiltered (gdb_stdlog,
- "target_reported_exec_events_per_exec_call () = %d\n",
- reported_exec_events);
-
- return reported_exec_events;
-}
-
-static int
debug_to_has_exited (int pid, int wait_status, int *exit_status)
{
int has_exited;
@@ -2786,7 +2768,6 @@ setup_target_debug (void)
current_target.to_remove_vfork_catchpoint = debug_to_remove_vfork_catchpoint;
current_target.to_insert_exec_catchpoint = debug_to_insert_exec_catchpoint;
current_target.to_remove_exec_catchpoint = debug_to_remove_exec_catchpoint;
- current_target.to_reported_exec_events_per_exec_call = debug_to_reported_exec_events_per_exec_call;
current_target.to_has_exited = debug_to_has_exited;
current_target.to_mourn_inferior = debug_to_mourn_inferior;
current_target.to_can_run = debug_to_can_run;
diff --git a/gdb/target.h b/gdb/target.h
index 9a34244..c3da3d5 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -388,7 +388,6 @@ struct target_ops
int (*to_follow_fork) (struct target_ops *, int);
void (*to_insert_exec_catchpoint) (int);
int (*to_remove_exec_catchpoint) (int);
- int (*to_reported_exec_events_per_exec_call) (void);
int (*to_has_exited) (int, int, int *);
void (*to_mourn_inferior) (void);
int (*to_can_run) (void);
@@ -841,13 +840,6 @@ int target_follow_fork (int follow_child);
#define target_remove_exec_catchpoint(pid) \
(*current_target.to_remove_exec_catchpoint) (pid)
-/* Returns the number of exec events that are reported when a process
- invokes a flavor of the exec() system call on this target, if exec
- events are being reported. */
-
-#define target_reported_exec_events_per_exec_call() \
- (*current_target.to_reported_exec_events_per_exec_call) ()
-
/* Returns TRUE if PID has exited. And, also sets EXIT_STATUS to the
exit code of PID, if any. */