[PATCH 02/36] Boolify print_solib_event

Tom Tromey tom@tromey.com
Tue Jan 18 19:39:33 GMT 2022


Change print_solib_event to accept a bool parameter and update the
callers.
---
 gdb/break-catch-load.c | 4 ++--
 gdb/breakpoint.c       | 4 ++--
 gdb/breakpoint.h       | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/break-catch-load.c b/gdb/break-catch-load.c
index 352b56404b3..34340c260e6 100644
--- a/gdb/break-catch-load.c
+++ b/gdb/break-catch-load.c
@@ -32,7 +32,7 @@
 /* See breakpoint.h.  */
 
 void
-print_solib_event (int is_catchpoint)
+print_solib_event (bool is_catchpoint)
 {
   bool any_deleted = !current_program_space->deleted_solibs.empty ();
   bool any_added = !current_program_space->added_solibs.empty ();
@@ -185,7 +185,7 @@ print_it_catch_solib (bpstat *bs)
   uiout->text ("\n");
   if (uiout->is_mi_like_p ())
     uiout->field_string ("disp", bpdisp_text (b->disposition));
-  print_solib_event (1);
+  print_solib_event (true);
   return PRINT_SRC_AND_LOC;
 }
 
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 964e557f984..da9997f18d6 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4669,7 +4669,7 @@ bpstat_print (bpstat *bs, int kind)
      OS-level shared library event, do the same thing.  */
   if (kind == TARGET_WAITKIND_LOADED)
     {
-      print_solib_event (0);
+      print_solib_event (false);
       return PRINT_NOTHING;
     }
 
@@ -11921,7 +11921,7 @@ internal_bkpt_print_it (bpstat *bs)
       /* Did we stop because the user set the stop_on_solib_events
 	 variable?  (If so, we report this as a generic, "Stopped due
 	 to shlib event" message.) */
-      print_solib_event (0);
+      print_solib_event (false);
       break;
 
     case bp_thread_event:
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 0db3d986bbe..01a6e0b7994 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -1788,6 +1788,6 @@ extern void catch_exception_event (enum exception_event_kind ex_event,
    IS_CATCHPOINT is true if the event is due to a "catch load"
    catchpoint, false otherwise.  */
 
-extern void print_solib_event (int is_catchpoint);
+extern void print_solib_event (bool is_catchpoint);
 
 #endif /* !defined (BREAKPOINT_H) */
-- 
2.31.1



More information about the Gdb-patches mailing list