aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-01-24 19:12:32 +0000
committerPedro Alves <palves@redhat.com>2012-01-24 19:12:32 +0000
commita9b3a50fbaa6ade527760b3183885e2eb24d339b (patch)
tree880d440a4d02c1925e222c714db2983b4b90de3a /gdb
parent53fe17833448d3f85e4a186522486c3ecbbae357 (diff)
downloadfsf-binutils-gdb-a9b3a50fbaa6ade527760b3183885e2eb24d339b.zip
fsf-binutils-gdb-a9b3a50fbaa6ade527760b3183885e2eb24d339b.tar.gz
fsf-binutils-gdb-a9b3a50fbaa6ade527760b3183885e2eb24d339b.tar.bz2
2012-01-24 Pedro Alves <palves@redhat.com>
* breakpoint.c (bpstat_stop_status): Moving clearing print_it outside `bs->stop' block. (bpstat_what): Rework bp_shlib_event handling. (internal_bkpt_check_status): If the breakpoint is a bp_shlib_event, then set bs->stop and bs->print if stop_on_solib_events is set.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/breakpoint.c37
2 files changed, 29 insertions, 17 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cc0fd4a..7cd2ce2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2012-01-24 Pedro Alves <palves@redhat.com>
+
+ * breakpoint.c (bpstat_stop_status): Moving clearing print_it
+ outside `bs->stop' block.
+ (bpstat_what): Rework bp_shlib_event handling.
+ (internal_bkpt_check_status): If the breakpoint is a
+ bp_shlib_event, then set bs->stop and bs->print if
+ stop_on_solib_events is set.
+
2012-01-24 Gary Benson <gbenson@redhat.com>
Delete #if 0'd out code.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 573a49c..2d1dad1 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4258,10 +4258,12 @@ bpstat_stop_status (struct address_space *aspace,
bs->print = 0;
}
- /* Print nothing for this entry if we don't stop or don't print. */
- if (bs->stop == 0 || bs->print == 0)
- bs->print_it = print_it_noop;
}
+
+ /* Print nothing for this entry if we don't stop or don't
+ print. */
+ if (!bs->stop || !bs->print)
+ bs->print_it = print_it_noop;
}
/* If we aren't stopping, the value of some hardware watchpoint may
@@ -4342,6 +4344,9 @@ bpstat_what (bpstat bs_head)
else
bptype = bs->breakpoint_at->type;
+ if (bptype == bp_shlib_event)
+ shlib_event = 1;
+
switch (bptype)
{
case bp_none:
@@ -4350,6 +4355,7 @@ bpstat_what (bpstat bs_head)
case bp_hardware_breakpoint:
case bp_until:
case bp_finish:
+ case bp_shlib_event:
if (bs->stop)
{
if (bs->print)
@@ -4427,18 +4433,6 @@ bpstat_what (bpstat bs_head)
This requires no further action. */
}
break;
- case bp_shlib_event:
- shlib_event = 1;
-
- /* If requested, stop when the dynamic linker notifies GDB
- of events. This allows the user to get control and place
- breakpoints in initializer routines for dynamically
- loaded objects (among other things). */
- if (stop_on_solib_events)
- this_action = BPSTAT_WHAT_STOP_NOISY;
- else
- this_action = BPSTAT_WHAT_SINGLE;
- break;
case bp_jit_event:
jit_event = 1;
this_action = BPSTAT_WHAT_SINGLE;
@@ -11145,8 +11139,17 @@ internal_bkpt_re_set (struct breakpoint *b)
static void
internal_bkpt_check_status (bpstat bs)
{
- /* We do not stop for these. */
- bs->stop = 0;
+ if (bs->breakpoint_at->type == bp_shlib_event)
+ {
+ /* If requested, stop when the dynamic linker notifies GDB of
+ events. This allows the user to get control and place
+ breakpoints in initializer routines for dynamically loaded
+ objects (among other things). */
+ bs->stop = stop_on_solib_events;
+ bs->print = stop_on_solib_events;
+ }
+ else
+ bs->stop = 0;
}
static enum print_stop_action