This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] disable_breakpoints_in_shlibs cleanup
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 14 Aug 2007 15:11:56 +0400
- Subject: [commit] disable_breakpoints_in_shlibs cleanup
The disable_breakpoints_in_shlibs function now has a parameter,
called 'silent'. However, all callers pass '1' for that parameter.
Support for that parameter would complicated some future patches,
so the attached patch, approved off-list by Daniel Jacobowitz and
committed, garbage-collects the parameter.
- Volodya
? 1.diff
? 2.diff
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.8608
diff -u -p -r1.8608 ChangeLog
--- ChangeLog 14 Aug 2007 08:11:45 -0000 1.8608
+++ ChangeLog 14 Aug 2007 11:07:51 -0000
@@ -1,6 +1,16 @@
2007-08-14 Vladimir Prus <vladimir@codesourcery.com>
gdb/
+ * breakpoint.c (disable_breakpoints_in_shlibs): Remove
+ the 'silent' parameter and code to implement that.
+ * breakpoint.h (disable_breakpoints_in_shlibs): Adjust
+ prototype.
+ * win32-nat.c: Adjust.
+ * solib.c: Adjust.
+
+2007-08-14 Vladimir Prus <vladimir@codesourcery.com>
+
+ gdb/
* breakpoint.c (update_breakpoints_after_exec): Don't
set address to zero.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.259
diff -u -p -r1.259 breakpoint.c
--- breakpoint.c 14 Aug 2007 08:11:45 -0000 1.259
+++ breakpoint.c 14 Aug 2007 11:07:52 -0000
@@ -4448,7 +4448,7 @@ create_solib_event_breakpoint (CORE_ADDR
apply to enabled breakpoints, disabled ones can just stay disabled. */
void
-disable_breakpoints_in_shlibs (int silent)
+disable_breakpoints_in_shlibs (void)
{
struct breakpoint *b;
int disabled_shlib_breaks = 0;
@@ -4463,19 +4463,7 @@ disable_breakpoints_in_shlibs (int silen
&& solib_address (b->loc->address)
#endif
)
- {
b->enable_state = bp_shlib_disabled;
- if (!silent)
- {
- if (!disabled_shlib_breaks)
- {
- target_terminal_ours_for_output ();
- warning (_("Temporarily disabling shared library breakpoints:"));
- }
- disabled_shlib_breaks = 1;
- warning (_("breakpoint #%d "), b->number);
- }
- }
}
}
Index: breakpoint.h
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.h,v
retrieving revision 1.44
diff -u -p -r1.44 breakpoint.h
--- breakpoint.h 13 Jun 2007 17:38:43 -0000 1.44
+++ breakpoint.h 14 Aug 2007 11:07:52 -0000
@@ -791,7 +791,7 @@ extern void remove_solib_event_breakpoin
extern void remove_thread_event_breakpoints (void);
-extern void disable_breakpoints_in_shlibs (int silent);
+extern void disable_breakpoints_in_shlibs (void);
extern void re_enable_breakpoints_in_shlibs (void);
Index: solib.c
===================================================================
RCS file: /cvs/src/src/gdb/solib.c,v
retrieving revision 1.95
diff -u -p -r1.95 solib.c
--- solib.c 9 Aug 2007 18:37:08 -0000 1.95
+++ solib.c 14 Aug 2007 11:07:52 -0000
@@ -854,7 +854,7 @@ clear_solib (void)
So: disable breakpoints only if we're using ELF shared libs. */
if (exec_bfd != NULL
&& bfd_get_flavour (exec_bfd) != bfd_target_aout_flavour)
- disable_breakpoints_in_shlibs (1);
+ disable_breakpoints_in_shlibs ();
while (so_list_head)
{
Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.133
diff -u -p -r1.133 win32-nat.c
--- win32-nat.c 18 Jun 2007 17:45:26 -0000 1.133
+++ win32-nat.c 14 Aug 2007 11:07:52 -0000
@@ -1585,7 +1585,7 @@ do_initial_win32_stuff (DWORD pid)
current_event.dwProcessId = pid;
memset (¤t_event, 0, sizeof (current_event));
push_target (&win32_ops);
- disable_breakpoints_in_shlibs (1);
+ disable_breakpoints_in_shlibs ();
win32_clear_solib ();
clear_proceed_status ();
init_wait_for_inferior ();