disable_breakpoints_in_shlibs now takes a new parameter -- silent; callers
authorDavid Taylor <taylor@redhat.com>
Tue, 19 Jan 1999 16:20:39 +0000 (16:20 +0000)
committerDavid Taylor <taylor@redhat.com>
Tue, 19 Jan 1999 16:20:39 +0000 (16:20 +0000)
updated.  new callers -- clear_solib (irix5-nat.c, osfsolib.c, solib.c).
PR 16495 / PR 18213.

gdb/ChangeLog
gdb/breakpoint.c
gdb/breakpoint.h
gdb/irix5-nat.c
gdb/osfsolib.c
gdb/solib.c
gdb/somsolib.c

index b6b9ab95590465ead4a4f87fbf5e46583e0bc735..222d327153c8c9649be5a5494cd6a87d2dd5253d 100644 (file)
@@ -1,5 +1,15 @@
 Tue Jan 19 10:27:23 1999  David Taylor  <taylor@texas.cygnus.com>
 
+       * breakpoint.c (disable_breakpoints_in_shlibs): new parameter,
+       silent, controls whether to print message about removal of shared
+       library breakpoints.
+       * breakpoint.h (disable_breakpoints_in_shlibs): decl updated.
+       * irix5-nat.c (clear_solib): call disable_breakpoints_in_shlibs.
+       * osfsolib.c (clear_solib): ditto.
+       * solib.c (clear_solib): ditto.
+       * somsolib.c (som_solib_restart): update call to
+       disable_breakpoints_in_shlibs.
+
        * target.h (child_post_attach): only declare if CHILD_POST_ATTACH
        is define.
 
index bcee5f939e526c35ae25fd3e3d6708ec05143213..8ca291660f4fa7d3c88e84fc72e07c6b475cfc03 100644 (file)
@@ -3122,7 +3122,8 @@ create_solib_event_breakpoint (address)
 }
 
 void
-disable_breakpoints_in_shlibs ()
+disable_breakpoints_in_shlibs (silent)
+     int silent;
 {
   struct breakpoint *  b;
   int  disabled_shlib_breaks = 0;
@@ -3139,17 +3140,20 @@ disable_breakpoints_in_shlibs ()
           PC_SOLIB (b->address))
         {
           b->enable = shlib_disabled;
-          if (!disabled_shlib_breaks)
-            {
-              target_terminal_ours_for_output ();
-              printf_filtered ("Temporarily disabling shared library breakpoints:\n");
-            }
-          disabled_shlib_breaks = 1;
-          printf_filtered ("%d ", b->number);
+         if (!silent)
+           {
+             if (!disabled_shlib_breaks)
+               {
+                 target_terminal_ours_for_output ();
+                 printf_filtered ("Temporarily disabling shared library breakpoints:\n");
+               }
+             disabled_shlib_breaks = 1;
+             printf_filtered ("%d ", b->number);
+           }
         }
 #endif
     }
-  if (disabled_shlib_breaks)
+  if (disabled_shlib_breaks && !silent)
     printf_filtered ("\n");
 }
 
index 0b6fff5e70deb23136e650bf5e2a91dffbc57e79..787ac551158fa82130df2ba292797767fde39cf2 100644 (file)
@@ -577,7 +577,7 @@ extern void create_solib_event_breakpoint PARAMS ((CORE_ADDR));
 
 extern void remove_solib_event_breakpoints PARAMS ((void));
 
-extern void disable_breakpoints_in_shlibs PARAMS ((void));
+extern void disable_breakpoints_in_shlibs PARAMS ((int silent));
 
 extern void re_enable_breakpoints_in_shlibs PARAMS ((void));
 
index 9a2379d3062c32056e371a5837289cddcb5b5f8a..fc558e6447959a14f5cb52fbe8dd40b02a7de898 100644 (file)
@@ -1083,6 +1083,8 @@ clear_solib()
   struct so_list *next;
   char *bfd_filename;
   
+  disable_breakpoints_in_shlibs (1);
+
   while (so_list_head)
     {
       if (so_list_head -> sections)
index 0bed5225e7974e5b926c56f3f0722874be4eac8c..1d8be2cbe5d9e5acd661a19cb2e3b28c120135b6 100644 (file)
@@ -835,6 +835,8 @@ clear_solib()
   struct so_list *next;
   char *bfd_filename;
   
+  disable_breakpoints_in_shlibs (1);
+
   while (so_list_head)
     {
       if (so_list_head -> sections)
@@ -851,7 +853,7 @@ clear_solib()
       else
        /* This happens for the executable on SVR4.  */
        bfd_filename = NULL;
-      
+
       next = so_list_head -> next;
       if (bfd_filename)
        free ((PTR)bfd_filename);
index 3709469d90fd12051cebaae9a186ff7f7d4b88ce..c8a8ce7ec109b9b4df21d0e1103718099d75a2cd 100644 (file)
@@ -1311,6 +1311,8 @@ clear_solib()
   struct so_list *next;
   char *bfd_filename;
   
+  disable_breakpoints_in_shlibs (1);
+
   while (so_list_head)
     {
       if (so_list_head -> sections)
@@ -1327,7 +1329,7 @@ clear_solib()
       else
        /* This happens for the executable on SVR4.  */
        bfd_filename = NULL;
-      
+
       next = so_list_head -> next;
       if (bfd_filename)
        free ((PTR)bfd_filename);
index 904ddf17cfc233e4a2cf99eb16208991f8429d46..828eea3e01d4a41595f6c2481cd85dd360d70cfb 100644 (file)
@@ -1556,7 +1556,7 @@ som_solib_restart ()
   /* Before the shlib info vanishes, use it to disable any breakpoints
      that may still be active in those shlibs.
      */
-  disable_breakpoints_in_shlibs ();
+  disable_breakpoints_in_shlibs (0);
 
   /* Discard all the shlib descriptors.
      */