aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauerman@br.ibm.com>2011-03-04 20:00:34 +0000
committerThiago Jung Bauermann <bauerman@br.ibm.com>2011-03-04 20:00:34 +0000
commit1a6a67de742adc3d1400df7567962fd9e98594c5 (patch)
tree654313b35e51d396db24b07588443e6e65a9d11d
parent488919c487a8372cbb3de5909332c4f2b5e19c7e (diff)
downloadgdb-1a6a67de742adc3d1400df7567962fd9e98594c5.zip
gdb-1a6a67de742adc3d1400df7567962fd9e98594c5.tar.gz
gdb-1a6a67de742adc3d1400df7567962fd9e98594c5.tar.bz2
* breakpointc (print_it_typical): Move NULL check from here...
(print_bp_stop_message): ... to here.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/breakpoint.c13
2 files changed, 11 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 48c9446..7634ec4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-04 Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * breakpointc (print_it_typical): Move NULL check from here...
+ (print_bp_stop_message): ... to here.
+
2011-03-04 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* breakpoint.c (enable_command): Use break instead of continue,
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 6f087b3..5bcab87 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3309,11 +3309,6 @@ print_it_typical (bpstat bs)
int bp_temp = 0;
enum print_stop_action result;
- /* bs->breakpoint_at can be NULL if it was a momentary breakpoint
- which has since been deleted. */
- if (bs->breakpoint_at == NULL)
- return PRINT_UNKNOWN;
-
gdb_assert (bs->bp_location_at != NULL);
bl = bs->bp_location_at;
@@ -3519,10 +3514,14 @@ print_bp_stop_message (bpstat bs)
{
struct breakpoint *b = bs->breakpoint_at;
+ /* bs->breakpoint_at can be NULL if it was a momentary breakpoint
+ which has since been deleted. */
+ if (b == NULL)
+ return PRINT_UNKNOWN;
+
/* Normal case. Call the breakpoint's print_it method, or
print_it_typical. */
- /* FIXME: how breakpoint can ever be NULL here? */
- if (b != NULL && b->ops != NULL && b->ops->print_it != NULL)
+ if (b->ops != NULL && b->ops->print_it != NULL)
return b->ops->print_it (b);
else
return print_it_typical (bs);