From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 999FF384BC09 for ; Thu, 6 Oct 2022 09:37:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 999FF384BC09 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-381-2QQq54htP9itSAfy5Wn6zw-1; Thu, 06 Oct 2022 05:37:30 -0400 X-MC-Unique: 2QQq54htP9itSAfy5Wn6zw-1 Received: by mail-wr1-f69.google.com with SMTP id j8-20020adfa548000000b0022e2bf8f48fso311162wrb.23 for ; Thu, 06 Oct 2022 02:37:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jnvy9p8VeU52G4I4BPhyzJG8Qj9wloS/YwXec/3Tmc4=; b=dfsO22ozEwP65JMQH33mWLpfVb9AmX4oqosUiTBMGX2TZN4sLJuiSfW1Pmq5Pb+fGf 6AaAY4qFo9p2IEIRSpJLeFUQG8UXOzzzac3OCtOwQAwessDHhGZMDIfB0KaQYeJuAcfh o7UnzWy35o1RNQ0RDhcdwseqoudwSZX3fbuBQgqXR9FL7Zzk/ogi35yYm4ite5W41Ngw F9ecmi2HkrCfNv5L9w6hfW3rTVHce81HdiwtkqAdorHZ448amOap2zvAbC8rsw5M4dH6 0f2Dej+/UvgzNTHADTgUmLjATbWu49LHG8bF2IskGnhTdejec3eWgdT+kuMpLk1942nF BoQg== X-Gm-Message-State: ACrzQf0IQV2OkeVA8u+4R7yzejgXDFDyaDMBYfl67G6ENXRe5aFn5qWk BxOU134Z2GzMUtCbdKARgMp8jbwEIpe/3wkhJgp/rxy4mg3UJpIOZzPvOYpLPyEeAUECf6J9D60 zkVNPPokWsP/lq/QkZ7u9BPBCT1uSLoh/0zKIAADNM5eMayu/4hz+qX86Zrl66R9CE5z0laa4Yw == X-Received: by 2002:a5d:6d8e:0:b0:22e:60ae:8875 with SMTP id l14-20020a5d6d8e000000b0022e60ae8875mr2520392wrs.676.1665049049066; Thu, 06 Oct 2022 02:37:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4pUP+Vb97i89nFgOWk3w/61Vim/4fkyPyIutZt5aWoOPGBHeZH3nhdX3BB8xL2Pvl05Q371g== X-Received: by 2002:a5d:6d8e:0:b0:22e:60ae:8875 with SMTP id l14-20020a5d6d8e000000b0022e60ae8875mr2520378wrs.676.1665049048879; Thu, 06 Oct 2022 02:37:28 -0700 (PDT) Received: from localhost (52.72.115.87.dyn.plus.net. [87.115.72.52]) by smtp.gmail.com with ESMTPSA id h11-20020adfe98b000000b0022c906ffedasm17341253wrm.70.2022.10.06.02.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 02:37:28 -0700 (PDT) From: Andrew Burgess 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 Message-Id: <80e0c6dc91f52fad32c3ff3cf20da889d77013ac.1665048999.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: <87edvlfii0.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2022 09:37:43 -0000 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