Message ID | 20230303211207.1053037-1-tromey@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 CCEA43857C43 for <patchwork@sourceware.org>; Fri, 3 Mar 2023 21:12:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCEA43857C43 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677877966; bh=UVpJ/vwNju5vU4Pmaw2eZnjGw9wfo0KsoFdPxmYGM+0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=w3l7h7I3XCJFEesMxrZ7XbUrA2q2n/IEXnlX7pvHwSwHWUbODHP/pSf43NsRi3fUs RWNC0RSxBApWDZ7ApeKcuyZFPS8WzHazMGPj9cw0f0JuTDRe+c179W3p4W3AdJy/JQ sB56Rgg9lB6Prv4WROl08nvSfQ/ZIzNtwYVLZOhg= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by sourceware.org (Postfix) with ESMTPS id EC8BA3858D28 for <gdb-patches@sourceware.org>; Fri, 3 Mar 2023 21:12:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC8BA3858D28 Received: by mail-io1-xd30.google.com with SMTP id g6so1513589iov.13 for <gdb-patches@sourceware.org>; Fri, 03 Mar 2023 13:12:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677877938; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UVpJ/vwNju5vU4Pmaw2eZnjGw9wfo0KsoFdPxmYGM+0=; b=OSaE+sBmqgmzpXdKVtsd5Z4bbsOUnSclP6l6GIOlXN19rqi2fq78D3z/pANLv5iNRD MtmsEW7PKlEPYacBunw3y3k2SL49qzjNyYXZLmhi3IgllK/83++Qz2q5KrwnBTbMU70e n4eY37UTD7DWaNeg94nXV+kE0ym2pLN7iSnfonyiyXeVdmJv1AahyahEXUvK9hmHFt4M +/ROkSwf1jlz2pWq2uOyZZLew3+gUCwSQFFC9zUA9ky8ipI9g/z4ATrpiCvxs2o4kH35 17iYF1zYBH+sDrSNcU0rgYHZRDNCNdxdamY+kDtLRsiA541O0M/jGrzWKHcH+mqzspU2 HbGA== X-Gm-Message-State: AO0yUKUwshKB3Vd53zMohhutlZbXpFnYBeGPtOYka992rWzKGJMHQApq UiYFVEd75h9VrLTleGXBcvXMQo4IKioMTFITtaA= X-Google-Smtp-Source: AK7set8YL178Zj1yykXqpI7kEYhuSp2QY59UxXRnffBelRwDhuFMBgkNATHfFhWRDDkjwTQ1Hq7l6A== X-Received: by 2002:a5e:c103:0:b0:74c:b91e:1c17 with SMTP id v3-20020a5ec103000000b0074cb91e1c17mr1856524iol.13.1677877938741; Fri, 03 Mar 2023 13:12:18 -0800 (PST) Received: from localhost.localdomain (75-166-130-93.hlrn.qwest.net. [75.166.130.93]) by smtp.gmail.com with ESMTPSA id g8-20020a925208000000b00313b281ecd2sm867988ilb.70.2023.03.03.13.12.18 for <gdb-patches@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Mar 2023 13:12:18 -0800 (PST) To: gdb-patches@sourceware.org Subject: [PATCH 0/8] Arithmetic for 128-bit types Date: Fri, 3 Mar 2023 14:11:59 -0700 Message-Id: <20230303211207.1053037-1-tromey@adacore.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.6 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.29 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 |
Arithmetic for 128-bit types
|
|
Message
Tom Tromey
March 3, 2023, 9:11 p.m. UTC
This series adss basic arithmetic for 128-bit integer types to gdb. This is done using GMP, which gdb already requires. While this involves extra allocation, my view is that this hardly matters in most expression contexts. However, if it does turn out to matter, we can try to switch to GCC's wide-integer code. While this series, or something like it, is necessary for supporting 128-bit types, it is not sufficient. In particular, none of the lexers or parsers are touched, and integers that are part of types (e.g., range bounds) are not handled. This series is based on my earlier series to clean up the GMP classes. Regression tested on x86-64 Fedora 36. Tom
Comments
> Date: Fri, 3 Mar 2023 14:11:59 -0700 > X-Spam-Status: No, score=-5.6 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 > From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> > > This series adss basic arithmetic for 128-bit integer types to gdb. Can you tell where and in what situations will this be useful? Also, don't we need to announce this, at least in NEWS? Thanks.
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes: >> Date: Fri, 3 Mar 2023 14:11:59 -0700 >> X-Spam-Status: No, score=-5.6 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 >> From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> >> >> This series adss basic arithmetic for 128-bit integer types to gdb. Eli> Can you tell where and in what situations will this be useful? Right now, if the inferior uses 128-bit integer types, then 'print' works but no other operations work. So for example, you cannot "print x + 1". 128-bit types are somewhat more common now. Several of the languages gdb supports have them (at least C, C++, Rust, and Ada). Eli> Also, don't we need to announce this, at least in NEWS? I added this: * GDB now has some support for integer types larger than 64 bits. Tom
>>>>> "Tom" == Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> This series adss basic arithmetic for 128-bit integer types to gdb.
Tom> This is done using GMP, which gdb already requires. While this
Tom> involves extra allocation, my view is that this hardly matters in most
Tom> expression contexts. However, if it does turn out to matter, we can
Tom> try to switch to GCC's wide-integer code.
Tom> While this series, or something like it, is necessary for supporting
Tom> 128-bit types, it is not sufficient. In particular, none of the
Tom> lexers or parsers are touched, and integers that are part of types
Tom> (e.g., range bounds) are not handled.
Tom> This series is based on my earlier series to clean up the GMP classes.
Tom> Regression tested on x86-64 Fedora 36.
I've rebased this and re-run the regression tests.
I'm going to check it in now.
Tom