From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id 105DF384B807; Thu, 6 Oct 2022 09:37:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 105DF384B807 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665049072; bh=56eFpO/mYmVjytJd1k7svs/pXUE9+MpRoDS+oMal7eg=; h=From:To:Subject:Date:From; b=xpOwe4ezz8FwRBM5/ldAOfeiXd8t3G6VKFdro8tguWexlKxC0cdNKC5+rELPpnQ+A Mn88brK+3gmZGkgxwTpvpeh1W42QCEMMKaJ8j/TtGA8I1dvNOwatLi6z5Bb3NtmLep zb3C3RsuzM7uxbslJD4s33Z4U85tNRWfCOVy3S2E= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: add missing nullptr checks in bpstat_check_breakpoint_conditions X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: d8a77e4c8043c645c3c7a07a042c112053715e95 X-Git-Newrev: 80e0c6dc91f52fad32c3ff3cf20da889d77013ac Message-Id: <20221006093752.105DF384B807@sourceware.org> Date: Thu, 6 Oct 2022 09:37:52 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D80e0c6dc91f5= 2fad32c3ff3cf20da889d77013ac commit 80e0c6dc91f52fad32c3ff3cf20da889d77013ac Author: Andrew Burgess Date: Thu Oct 6 09:35:18 2022 +0100 gdb: add missing nullptr checks in bpstat_check_breakpoint_conditions =20 Add a couple of missing nullptr checks in the function bpstat_check_breakpoint_conditions. =20 No user visible change after this commit. Diff: --- 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, threa= d_info *thread) else cond =3D bl->cond.get (); =20 - if (cond && b->disposition !=3D disp_del_at_next_stop) + if (cond !=3D nullptr && b->disposition !=3D disp_del_at_next_stop) { int within_current_scope =3D 1; struct watchpoint * w; @@ -5430,7 +5430,7 @@ bpstat_check_breakpoint_conditions (bpstat *bs, threa= d_info *thread) value_free_to_mark (mark); } =20 - if (cond && !condition_result) + if (cond !=3D nullptr && !condition_result) { infrun_debug_printf ("condition_result =3D false, not stopping"); bs->stop =3D 0;