From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta034.useast.a.cloudfilter.net (omta034.useast.a.cloudfilter.net [44.202.169.33]) by sourceware.org (Postfix) with ESMTPS id CFCAC3858D20 for ; Fri, 20 Oct 2023 17:21:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CFCAC3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CFCAC3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697822487; cv=none; b=gjx8khkB0b1Z5ss5GyE9vrUx1x67iCNtU+mNQTXvLOxE2wTBGAd/4oqXGPox6ez7HcovaFcWVOMSsiNsRvPFrk6PmoC8uBLv+JKBem0+gyUVXX41jV88HvJkLTwAMA8T1Szd2xY5gxmftQu8vEWSSjqbu7f9byXjlCR40VXk/9g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697822487; c=relaxed/simple; bh=Je5CZnkmtHbuEo12tiUlFWujPCTBPWwtr6JE7fx3Qbc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LGcdCVtXDK3eaNE0v7BC9ejCe8XtSX1WPfmi0rBpHbLfy3ozv7CCX6mlFlC0adpgf6IXH0/qs2lrw/kJ6Sp+dyFEc3DwSZwgdqyFq1Fd2aALwW74ykhBzA6Y/vdFyBMwy0ggdPbrJu015BJKL7+0iknvKplMj5M2T4s3EbnuRVw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6009a.ext.cloudfilter.net ([10.0.30.184]) by cmsmtp with ESMTPS id tcvrqwcvtjtZ3ttBcqLntm; Fri, 20 Oct 2023 17:21:24 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id ttBcqGwagOk5SttBcqjutI; Fri, 20 Oct 2023 17:21:24 +0000 X-Authority-Analysis: v=2.4 cv=E+DeGIRl c=1 sm=1 tr=0 ts=6532b714 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=bhdUkHdE2iEA:10 a=Qbun_eYptAEA:10 a=20KFwNOVAAAA:8 a=CCpqsmhAAAAA:8 a=pBtgt1aDddv06prNa90A:9 a=ul9cdbp4aOFLsgKbc677:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1u6EeOvjSW6xrPVertSeAQfGuSMnOCr3h8iaM/4G3PI=; b=ehFZ2Y7I5YN6WObgKpOKbkOV1Y sLeOAHircGqq/zGMnw7AJCDtIh5ccXPM62XyavCfHapIsGvmtkbKwhDMNJtBM5S9fpqjTdUErJXc7 NqtX4JxH82jpAozm45W3MOOlP; Received: from 97-122-77-73.hlrn.qwest.net ([97.122.77.73]:59850 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1qttBb-000waD-2V; Fri, 20 Oct 2023 11:21:23 -0600 From: Tom Tromey To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb/python: Add new gdb.Value.bytes attribute References: <9cefc82f3c5d6619bca1f04a783e48ea5639a841.1697641024.git.aburgess@redhat.com> X-Attribution: Tom Date: Fri, 20 Oct 2023 11:21:23 -0600 In-Reply-To: <9cefc82f3c5d6619bca1f04a783e48ea5639a841.1697641024.git.aburgess@redhat.com> (Andrew Burgess's message of "Wed, 18 Oct 2023 15:57:15 +0100") Message-ID: <87sf65p5v0.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.77.73 X-Source-L: No X-Exim-ID: 1qttBb-000waD-2V X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-77-73.hlrn.qwest.net (murgatroyd) [97.122.77.73]:59850 X-Source-Auth: tom+tromey.com X-Email-Count: 5 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKV1j4dWoXCwGEEULldl6NOWyyUmM6R4gwcbyDcRikcMriJsrIHtgzD0lR0LoNG8fllkcbCMFO33gGabImXDtu9lgwqbc6WMOxuitJ/nkSq6TIoRkSUt MD+mbfHSZYjP8+nbBNE4ITpuE3fjnDPaQwvytSndQIHHqEhxFTjb0jc7qw8Qq6Z5CPnXF4qO4OervcCCvAh+raJpLpr7sIyqsr0= X-Spam-Status: No, score=-3017.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Andrew" == Andrew Burgess writes: Andrew> Add a gdb.Value.bytes attribute. This attribute contains the bytes of Andrew> the value (assuming the complete bytes of the value are available). Thanks for doing this. I think we've wanted this for a long time. Also, it's half of https://sourceware.org/bugzilla/show_bug.cgi?id=13267 Andrew> + value_obj->content_bytes Andrew> + = PyBytes_FromStringAndSize ((const char *) contents.data (), Andrew> + contents.size ()); Andrew> + Py_XINCREF (value_obj->content_bytes); Andrew> + return value_obj->content_bytes; I think Value.assign should clear the cache. Tom