This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
[rfc] Print solib events in mi-mode
- From: "Kris Warkentin" <kewarken at qnx dot com>
- To: "Gdb at Sources dot Redhat dot Com" <gdb at sources dot redhat dot com>
- Date: Tue, 8 Jul 2003 16:36:21 -0400
- Subject: [rfc] Print solib events in mi-mode
What do you think of something like this? When stop-on-solib-events is set,
this will print the reason as being a shared-lib-event.
Our Eclipse team wants to be able to set breakpoints in shared libraries
that aren't loaded yet. If they get notification of shlib-events, then they
can re-examine the list of loaded libraries and set any breakpoints that
have been enabled in the project's libs.
cheers,
Kris
$ cvs diff -u breakpoint.c
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.125
diff -u -r1.125 breakpoint.c
--- breakpoint.c 2 Jul 2003 16:24:00 -0000 1.125
+++ breakpoint.c 8 Jul 2003 20:32:50 -0000
@@ -2039,8 +2039,10 @@
/* 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.) */
- printf_filtered ("Stopped due to shared library event\n");
- return PRINT_NOTHING;
+ ui_out_text (uiout, "\nShared library event ");
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "reason", "shared-lib-event");
+ return PRINT_SRC_ONLY;
break;
case bp_thread_event: