From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PUSHED 3/3] gdb: add missing nullptr checks in bpstat_check_breakpoint_conditions
Date: Thu, 6 Oct 2022 10:37:22 +0100 [thread overview]
Message-ID: <80e0c6dc91f52fad32c3ff3cf20da889d77013ac.1665048999.git.aburgess@redhat.com> (raw)
In-Reply-To: <cover.1665048999.git.aburgess@redhat.com>
Add a couple of missing nullptr checks in the function
bpstat_check_breakpoint_conditions.
No user visible change after this commit.
---
gdb/breakpoint.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 29a02945234..a3a154c19a9 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -5358,7 +5358,7 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread)
else
cond = bl->cond.get ();
- if (cond && b->disposition != disp_del_at_next_stop)
+ if (cond != nullptr && b->disposition != disp_del_at_next_stop)
{
int within_current_scope = 1;
struct watchpoint * w;
@@ -5430,7 +5430,7 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread)
value_free_to_mark (mark);
}
- if (cond && !condition_result)
+ if (cond != nullptr && !condition_result)
{
infrun_debug_printf ("condition_result = false, not stopping");
bs->stop = 0;
--
2.25.4
next prev parent reply other threads:[~2022-10-06 9:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 9:34 [PATCH 0/2] Some additional debug output Andrew Burgess
2022-10-05 9:34 ` [PATCH 1/2] gdb: add some additional debug in mark_async_event_handler Andrew Burgess
2022-10-05 9:34 ` [PATCH 2/2] gdb: more infrun debug from breakpoint.c Andrew Burgess
2022-10-05 12:27 ` Simon Marchi
2022-10-06 8:45 ` Andrew Burgess
2022-10-06 9:37 ` [PUSHED 0/3] Some additional debug output Andrew Burgess
2022-10-06 9:37 ` [PUSHED 1/3] gdb: add some additional debug in mark_async_event_handler Andrew Burgess
2022-10-06 9:37 ` [PUSHED 2/3] gdb: more infrun debug from breakpoint.c Andrew Burgess
2022-10-06 9:37 ` Andrew Burgess [this message]
2022-10-06 11:06 ` [PATCH 2/2] " Andrew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80e0c6dc91f52fad32c3ff3cf20da889d77013ac.1665048999.git.aburgess@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).