s/Linux/.../
[deliverable/binutils-gdb.git] / gdb / infrun.c
index 1b0eb7e3e066cbbd006a544d708cccd3c135882f..6ae8f7c468b837563642da3001c6f2fbc7658b56 100644 (file)
@@ -1,4 +1,5 @@
-/* Target-struct-independent code to start (run) and stop an inferior process.
+/* Target-struct-independent code to start (run) and stop an inferior
+   process.
 
    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
    1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
@@ -114,15 +115,6 @@ static ptid_t previous_inferior_ptid;
 
 static int may_follow_exec = MAY_FOLLOW_EXEC;
 
-/* GET_LONGJMP_TARGET returns the PC at which longjmp() will resume the
-   program.  It needs to examine the jmp_buf argument and extract the PC
-   from it.  The return value is non-zero on success, zero otherwise. */
-
-#ifndef GET_LONGJMP_TARGET
-#define GET_LONGJMP_TARGET(PC_ADDR) 0
-#endif
-
-
 /* Dynamic function trampolines are similar to solib trampolines in that they
    are between the caller and the callee.  The difference is that when you
    enter a dynamic trampoline, you can't determine the callee's address.  Some
@@ -151,12 +143,12 @@ static int may_follow_exec = MAY_FOLLOW_EXEC;
    The simple approach is to single-step until control leaves the
    dynamic linker.
 
-   However, on some systems (e.g., Red Hat Linux 5.2) the dynamic
-   linker calls functions in the shared C library, so you can't tell
-   from the PC alone whether the dynamic linker is still running.  In
-   this case, we use a step-resume breakpoint to get us past the
-   dynamic linker, as if we were using "next" to step over a function
-   call.
+   However, on some systems (e.g., Red Hat's 5.2 distribution) the
+   dynamic linker calls functions in the shared C library, so you
+   can't tell from the PC alone whether the dynamic linker is still
+   running.  In this case, we use a step-resume breakpoint to get us
+   past the dynamic linker, as if we were using "next" to step over a
+   function call.
 
    IN_SOLIB_DYNSYM_RESOLVE_CODE says whether we're in the dynamic
    linker code or not.  Normally, this means we single-step.  However,
@@ -2306,7 +2298,8 @@ handle_inferior_event (struct execution_control_state *ecs)
          disable_longjmp_breakpoint ();
          remove_breakpoints ();
          breakpoints_inserted = 0;
-         if (!GET_LONGJMP_TARGET (&jmp_buf_pc))
+         if (!GET_LONGJMP_TARGET_P ()
+             || !GET_LONGJMP_TARGET (&jmp_buf_pc))
            {
              keep_going (ecs);
              return;
@@ -4350,7 +4343,6 @@ A fork or vfork creates a new process.  follow-fork-mode can be:\n\
 For \"parent\" or \"child\", the unfollowed process will run free.\n\
 By default, the debugger will follow the parent process.",
                        &setlist);
-/*  c->function.sfunc = ; */
   add_show_from_set (c, &showlist);
 
   c = add_set_enum_cmd ("scheduler-locking", class_run,
@@ -4364,7 +4356,7 @@ step == scheduler locked during every single-step operation.\n\
        Other threads may run while stepping over a function call ('next').",
                        &setlist);
 
-  c->function.sfunc = set_schedlock_func;      /* traps on target vector */
+  set_cmd_sfunc (c, set_schedlock_func);       /* traps on target vector */
   add_show_from_set (c, &showlist);
 
   c = add_set_cmd ("step-mode", class_run,
This page took 0.031362 seconds and 4 git commands to generate.