Message ID | 20230915-watchpoint-casts-v1-0-a4ff35c9644e@adacore.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7062D385773C for <patchwork@sourceware.org>; Fri, 15 Sep 2023 18:36:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7062D385773C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694802990; bh=oaDuTM+PlfdjXHcYSZbDsqBHbpOW/3+OWlk9JjOTDug=; h=Subject:Date:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=O18rpYmpoAt1sOGb1y6ZfQ1mdPWmb9n7C3+R6cNywciHChGifZKyUysVF7/cew25d 8bNgkNxaF8uS+ZVlc+hEnwSIkG2tzIXfbfdk4fH6aREZ14Oj7j9R8xwoodxDt+gjfP k1auReLm3FHXzQV3F4TsS+RKp+zQ/oyZQnsOjIPo= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id 902DD3858C54 for <gdb-patches@sourceware.org>; Fri, 15 Sep 2023 18:36:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 902DD3858C54 Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-34deefc2016so7913725ab.2 for <gdb-patches@sourceware.org>; Fri, 15 Sep 2023 11:36:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694802963; x=1695407763; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oaDuTM+PlfdjXHcYSZbDsqBHbpOW/3+OWlk9JjOTDug=; b=OH4toUT1XUx2N1KfnOzmdNQS5I5dMBhMfvODB79fGNbW5o6UNPpyhcATqTqVkofWEB RppNLQKBj15fAFerLwYHaN9tIgxK5gsGcA3n9XT2zgu9bE4PYbstIHU6V60aSFxdCyH9 RDxQU680zOqtnPu/FBkobX1apNTjMVsH/N14A21OrGcZiEMbban4wudFPEhDyeWGfOcS izc+SJ+T9MdMrlpigGeKzxaWUhQJHEALYiHkGhN49uhbqYV1Hj/WVLtTQ6E/dHD4bt1C RaCEgiseNOrKQs5PdwwV7aYcryuceqRy5QhZBwVl1ChnFw9f/S/TznYSrZ4chLC8GEaB YBIg== X-Gm-Message-State: AOJu0YwVHMlyAUHgJ1YRBPZqo3WB8ueoNDIj9futKNQffuuV1wxocKjK SPdSi3c7bkWB6hI1AlIw71OPMKUST4eyYRW1fLT+1g== X-Google-Smtp-Source: AGHT+IEkwRRRmyNy4NHrwwVsPbUzw70Vyqf+F02sMfYon+/pDdLnX3CJlhKnq/o1bnhgs9n3qFXcLQ== X-Received: by 2002:a05:6e02:156d:b0:346:6d97:ffd1 with SMTP id k13-20020a056e02156d00b003466d97ffd1mr3598043ilu.18.1694802962906; Fri, 15 Sep 2023 11:36:02 -0700 (PDT) Received: from localhost.localdomain (71-211-130-31.hlrn.qwest.net. [71.211.130.31]) by smtp.gmail.com with ESMTPSA id w25-20020a02cf99000000b0042b0a6d899fsm1235997jar.60.2023.09.15.11.36.01 for <gdb-patches@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 11:36:02 -0700 (PDT) Subject: [PATCH 0/4] Use checked_static_cast for breakpoint casts Date: Fri, 15 Sep 2023 12:36:00 -0600 Message-Id: <20230915-watchpoint-casts-v1-0-a4ff35c9644e@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIABCkBGUC/x3MMQ7CMAxA0atUnonUNEQIroIYHNcQD6SVHQFS1 btjGN/w/wbGKmxwGTZQfonJ0hzxMABVbA8OMrthGqc0nmMOb+xU10VaD4TWLczHRDnjqcTE4Nm qfJfPf3m9uQsah6LYqP5GT49YYd+/EVLO5XsAAAA= To: gdb-patches@sourceware.org X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Tom Tromey <tromey@adacore.com> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Use checked_static_cast for breakpoint casts
|
|
Message
Tom Tromey
Sept. 15, 2023, 6:36 p.m. UTC
While reviewing a patch, I noticed some unchecked casts to watchpoint. This series replaces all the unchecked breakpoint casts I could find with checked casts. Regression tested on x86-64 Fedora 36. --- Tom Tromey (4): Use gdb::checked_static_cast for watchpoints Use gdb::checked_static_cast for tracepoints Use gdb::checked_static_cast for code_breakpoint Use gdb::checked_static_cast for catchpoints gdb/ada-lang.c | 3 +- gdb/break-catch-sig.c | 8 +- gdb/break-catch-syscall.c | 4 +- gdb/breakpoint.c | 337 +++++++++++++++++++++++---------------------- gdb/elfread.c | 2 +- gdb/guile/scm-breakpoint.c | 2 +- gdb/mi/mi-cmd-break.c | 10 +- gdb/python/py-breakpoint.c | 2 +- gdb/remote.c | 11 +- gdb/target-debug.h | 2 + gdb/target-delegates.c | 16 +-- gdb/target.c | 2 +- gdb/target.h | 4 +- gdb/tracefile-tfile.c | 4 +- gdb/tracepoint.c | 28 ++-- gdb/tracepoint.h | 4 +- 16 files changed, 232 insertions(+), 207 deletions(-) --- base-commit: 0e0edacca5f34621f85e93a22ee31c6810b5941c change-id: 20230915-watchpoint-casts-d43c55a7b13e Best regards,
Comments
On 2023-09-15 14:36, Tom Tromey via Gdb-patches wrote: > While reviewing a patch, I noticed some unchecked casts to watchpoint. > This series replaces all the unchecked breakpoint casts I could find > with checked casts. > > Regression tested on x86-64 Fedora 36. I sent a minor comment on patch 1. Getting rid of the struct keyword when possible might allow avoid line wrapping in a bunch of places. But otherwise: Approved-By: Simon Marchi <simon.marchi@efficios.com> Simon