gdb/
authorPedro Alves <palves@redhat.com>
Wed, 7 Jan 2009 21:42:50 +0000 (21:42 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 7 Jan 2009 21:42:50 +0000 (21:42 +0000)
2009-01-07  Pedro Alves  <pedro@codesourcery.com>

Delete ONE_PROCESS_WRITETEXT leftovers.

* breakpoint.c (insert_bp_location): Delete process_warning
argument.  Adjust.
(insert_breakpoint_locations): Adjust.
(reattach_breakpoints): Adjust.
* infrun.c (normal_stop): Drop "It might be running in another
process" notice.

gdb/doc/
2009-01-07  Pedro Alves  <pedro@codesourcery.com>

* gdb.texinfo (Error in Breakpoints): Delete mention of "The same
program may be running in another process" errors.
* gdbint.texinfo (Native Conditionals): Delete
ONE_PROCESS_WRITETEXT description.

gdb/ChangeLog
gdb/breakpoint.c
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/doc/gdbint.texinfo
gdb/infrun.c

index e84188e7fcfea4f7f1d5edb78c71715d139ba534..87b831abfbbd6a6a251855fe4aa3d79d5af43c29 100644 (file)
@@ -1,3 +1,14 @@
+2009-01-07  Pedro Alves  <pedro@codesourcery.com>
+
+       Delete ONE_PROCESS_WRITETEXT leftovers.
+
+       * breakpoint.c (insert_bp_location): Delete process_warning
+       argument.  Adjust.
+       (insert_breakpoint_locations): Adjust.
+       (reattach_breakpoints): Adjust.
+       * infrun.c (normal_stop): Drop "It might be running in another
+       process" notice.
+
 2009-01-07  Stan Shebs  <stan@codesourcery.com>
 
        * config/pa/linux.mh (XDEPFILES): Remove.
index 2e25490f8b1713a6b390a86f0813af61258757c1..18d80106193e1e27aaa76ee342b821e78e66cdb4 100644 (file)
@@ -1029,14 +1029,14 @@ should_be_inserted (struct bp_location *bpt)
 
 /* Insert a low-level "breakpoint" of some type.  BPT is the breakpoint.
    Any error messages are printed to TMP_ERROR_STREAM; and DISABLED_BREAKS,
-   PROCESS_WARNING, and HW_BREAKPOINT_ERROR are used to report problems.
+   and HW_BREAKPOINT_ERROR are used to report problems.
 
    NOTE drow/2003-09-09: This routine could be broken down to an object-style
    method for each breakpoint or catchpoint type.  */
 static int
 insert_bp_location (struct bp_location *bpt,
                    struct ui_file *tmp_error_stream,
-                   int *disabled_breaks, int *process_warning,
+                   int *disabled_breaks,
                    int *hw_breakpoint_error)
 {
   int val = 0;
@@ -1179,9 +1179,6 @@ Note: automatically using hardware breakpoints for read-only addresses.\n"));
            }
          else
            {
-#ifdef ONE_PROCESS_WRITETEXT
-             *process_warning = 1;
-#endif
              if (bpt->loc_type == bp_loc_hardware_breakpoint)
                {
                  *hw_breakpoint_error = 1;
@@ -1279,7 +1276,6 @@ insert_breakpoint_locations (void)
   int val = 0;
   int disabled_breaks = 0;
   int hw_breakpoint_error = 0;
-  int process_warning = 0;
 
   struct ui_file *tmp_error_stream = mem_fileopen ();
   make_cleanup_ui_file_delete (tmp_error_stream);
@@ -1300,7 +1296,7 @@ insert_breakpoint_locations (void)
        continue;
 
       val = insert_bp_location (b, tmp_error_stream,
-                                   &disabled_breaks, &process_warning,
+                                   &disabled_breaks,
                                    &hw_breakpoint_error);
       if (val)
        error = val;
@@ -1352,11 +1348,6 @@ insert_breakpoint_locations (void)
                              "Could not insert hardware breakpoints:\n\
 You may have requested too many hardware breakpoints/watchpoints.\n");
        }
-#ifdef ONE_PROCESS_WRITETEXT
-      if (process_warning)
-       fprintf_unfiltered (tmp_error_stream,
-                           "The same program may be running in another process.");
-#endif
       target_terminal_ours_for_output ();
       error_stream (tmp_error_stream);
     }
@@ -1405,7 +1396,7 @@ reattach_breakpoints (int pid)
   int val;
   struct cleanup *old_chain = save_inferior_ptid ();
   struct ui_file *tmp_error_stream = mem_fileopen ();
-  int dummy1 = 0, dummy2 = 0, dummy3 = 0;
+  int dummy1 = 0, dummy2 = 0;
 
   make_cleanup_ui_file_delete (tmp_error_stream);
 
@@ -1416,7 +1407,7 @@ reattach_breakpoints (int pid)
       {
        b->inserted = 0;
        val = insert_bp_location (b, tmp_error_stream,
-                                 &dummy1, &dummy2, &dummy3);
+                                 &dummy1, &dummy2);
        if (val != 0)
          {
            do_cleanups (old_chain);
index 7283ad41b8eb344a78a256825f76149c58919b6d..d17ad23b9630ef2cb3c5eeba146fd68a7ab56e18 100644 (file)
@@ -1,3 +1,10 @@
+2009-01-07  Pedro Alves  <pedro@codesourcery.com>
+
+       * gdb.texinfo (Error in Breakpoints): Delete mention of "The same
+       program may be running in another process" errors.
+       * gdbint.texinfo (Native Conditionals): Delete
+       ONE_PROCESS_WRITETEXT description.
+
 2009-01-07  Joel Brobecker  <brobecker@adacore.com>
 
        * gdbint.texinfo (Start of New Year Procedure): Add the "coding"
index f6b7a1cb20d46371be5f01869476b094457306a9..d85721ac32dfb953d5169e0201ebcd871dd8a0ae 100644 (file)
@@ -4035,40 +4035,9 @@ end
 @c  @ifclear BARETARGET
 @node Error in Breakpoints
 @subsection ``Cannot insert breakpoints''
-@c
-@c  FIXME!! 14/6/95  Is there a real example of this?  Let's use it.
-@c
-Under some operating systems, breakpoints cannot be used in a program if
-any other process is running that program.  In this situation,
-attempting to run or continue a program with a breakpoint causes
-@value{GDBN} to print an error message:
-
-@smallexample
-Cannot insert breakpoints.
-The same program may be running in another process.
-@end smallexample
-
-When this happens, you have three ways to proceed:
-
-@enumerate
-@item
-Remove or disable the breakpoints, then continue.
-
-@item
-Suspend @value{GDBN}, and copy the file containing your program to a new
-name.  Resume @value{GDBN} and use the @code{exec-file} command to specify
-that @value{GDBN} should run your program under that name.
-Then start your program again.
-
-@item
-Relink your program so that the text segment is nonsharable, using the
-linker option @samp{-N}.  The operating system limitation may not apply
-to nonsharable executables.
-@end enumerate
-@c  @end ifclear
 
-A similar message can be printed if you request too many active
-hardware-assisted breakpoints and watchpoints:
+If you request too many active hardware-assisted breakpoints and
+watchpoints, you will see this error message:
 
 @c FIXME: the precise wording of this message may change; the relevant
 @c source change is not committed yet (Sep 3, 1999).
index adc8ca836fee83d959fef256f36256180289e92d..6a9ea6c1ee3d3bc23f6ee7d7cda3e5c7e1cef4b3 100644 (file)
@@ -4525,11 +4525,6 @@ undefined) in @file{nm-@var{system}.h}.
 An x86-based machine can define this to use the generic x86 watchpoint
 support; see @ref{Algorithms, I386_USE_GENERIC_WATCHPOINTS}.
 
-@item ONE_PROCESS_WRITETEXT
-@findex ONE_PROCESS_WRITETEXT
-Define this to be able to, when a breakpoint insertion fails, warn the
-user that another process may be running with the same executable.
-
 @item PROC_NAME_FMT
 @findex PROC_NAME_FMT
 Defines the format for the name of a @file{/proc} device.  Should be
index 77aa40d10e3dcf93360e9580ca96fb78d99a2a7c..8dcc1bfaea55016270983fd9970715da14d640cd 100644 (file)
@@ -4207,7 +4207,6 @@ normal_stop (void)
          target_terminal_ours_for_output ();
          printf_filtered (_("\
 Cannot remove breakpoints because program is no longer writable.\n\
-It might be running in another process.\n\
 Further execution is probably impossible.\n"));
        }
     }