+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.
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. */
return 0;
}
-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)
{
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;
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. */
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));
/* 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);
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);
return retval;
}
-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)
{
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;
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);
#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. */