From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kP8lO2npxF9aJwAAWB0awg (envelope-from ) for ; Mon, 30 Nov 2020 07:45:29 -0500 Received: by simark.ca (Postfix, from userid 112) id EF4091F0AB; Mon, 30 Nov 2020 07:45:29 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8D9E81E58E for ; Mon, 30 Nov 2020 07:45:29 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1C11F3836C52; Mon, 30 Nov 2020 12:45:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C11F3836C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1606740329; bh=WzuImzqPUHe47dtSp4YLjkdtPbzhljTQURMrMkrQU5c=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=NDt6Ap2I7VOuVanyecnSm5QorzHjHgJAwYwgcYqRaF9+HJfeY362O3CRbgM2B+SXZ EGWu/ITDJgYYt2Zi2bfDUQe5gr4058XsKlnUaINi3L2MrF5ud0vYFt5AeE37ximAZg /zd9+TySIYXHtBN30k8F+LkFs9IQtGogcYhZsOvo= Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by sourceware.org (Postfix) with ESMTPS id CA0863877015 for ; Mon, 30 Nov 2020 12:45:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CA0863877015 Received: by mail-qt1-x834.google.com with SMTP id d5so7978530qtn.0 for ; Mon, 30 Nov 2020 04:45:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WzuImzqPUHe47dtSp4YLjkdtPbzhljTQURMrMkrQU5c=; b=U6HoK+x6BWz/ZceuXtLnDcfwZ+Bw3dCaC0p/G6p/nTaewr3rvIFHm1w8zeaj2+n3s5 8DGNhqSf7LBQWk2iaenOpxcebsRNQQD0WFo/xqTLgFbem73zgJpxDw7MAcUGTMkbF5g2 VWwNwRX8YGYEMYA4YPo+rsLRWs3N1MXdt+wS3rz2+DegnjDM7MbGOqIY0HBwWcpE0qGn dVBIqaE6NC4IjHgR6Fou6ZtAnWGCq8NEf9lv8ns2lF4aKJ6QtDjstdtVGSHL71QokFXw XgROS/DEjjlOfPoUhwpGcShaPO+M7CHxY2xQKpDVo5d4Pfb4dLeDtbq6/BSU3hjUHgV8 xWRw== X-Gm-Message-State: AOAM5325V1BZzd14uv7XnKh4Z/+TXZ4r2aNKUHzgnx3J5Qha0diQ3GXC Bc5cSIfBeOhUahE3um9TJJHS8duXRZR+Op5lyq+ksA== X-Google-Smtp-Source: ABdhPJxRUGO8UuqdTuvrslRQJI7VzWNacycbk1zzlR+gjnpWNL1pZ5fbkE30V7jKmQZoUte/stHVumUzcjxVCM1SsCg= X-Received: by 2002:ac8:5056:: with SMTP id h22mr21469260qtm.349.1606740325929; Mon, 30 Nov 2020 04:45:25 -0800 (PST) MIME-Version: 1.0 References: <20201123042711.GA967337@adacore.com> <1606664757-144138-1-git-send-email-brobecker@adacore.com> In-Reply-To: <1606664757-144138-1-git-send-email-brobecker@adacore.com> Date: Mon, 30 Nov 2020 13:44:49 +0100 Message-ID: Subject: Re: RFA: wrap mpz_export into gdb_mpz::safe_export... To: Joel Brobecker Content-Type: text/plain; charset="UTF-8" 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: , From: Christian Biesinger via Gdb-patches Reply-To: Christian Biesinger Cc: Simon Marchi , gdb-patches Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Sun, Nov 29, 2020 at 4:46 PM Joel Brobecker wrote: > For the record, I didn't do the following, but I was thinking it would > be nice to poison mpz_export if we could. We can do that as a followup > patch, if we'd like, although I will likely need a bit of help doing so, > because I am not sure how to poison it for the entire GDB except the one > place where it's OK to use it. In the end, it sounds to me like Tom > wants to wrap GDB's usage of gmp into the gdb_mp[xxx] classes, and so, > once we have that, it seems unlikely that someone would unwittingly use > mpz_export directly. Maybe #define mpz_export DO_NOT_USE and #undef it in the one spot? Christian