From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sp+CGpTN5GCWTQAAWB0awg (envelope-from ) for ; Tue, 06 Jul 2021 17:39:32 -0400 Received: by simark.ca (Postfix, from userid 112) id 5DEEB1F1F4; Tue, 6 Jul 2021 17:39:32 -0400 (EDT) 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=ham 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 BE6461E54D for ; Tue, 6 Jul 2021 17:39:31 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 094EA3938C06 for ; Tue, 6 Jul 2021 21:39:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 094EA3938C06 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625607571; bh=z4dobHI3qqRq7BnqBHucD/cwfmEHUlXI77xyCpoV4EQ=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=kYSjoFVMXRgOuFihrHhrY5Z5mNRxtVwRRbPXmH2cUmi6HqlsIApWfBz2bm+Iq6XRs j9xwIufK6dyzxrh45/uO1+15Z6IAdXuxlk5pFr5CECdtawnF/6sZLBJ0Q2Z3IQWikV MUUtkrdngrFj2AClmbb1BHibxKcZLNQ9NmwVJ15c= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id B3C19389364B for ; Tue, 6 Jul 2021 21:39:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B3C19389364B Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 166Ld3Ur013261 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 6 Jul 2021 17:39:07 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 166Ld3Ur013261 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 0905A1E54D; Tue, 6 Jul 2021 17:38:52 -0400 (EDT) Subject: Re: [PATCH 02/11] gdb: introduce intrusive_list, make thread_info use it To: Pedro Alves , gdb-patches@sourceware.org References: <20210622165704.2404007-1-simon.marchi@polymtl.ca> <20210622165704.2404007-3-simon.marchi@polymtl.ca> <2466c5e0-36f4-ce47-f05f-022cda04bb04@palves.net> <614bf906-7bfd-9864-5122-f5fc8dea8d05@palves.net> Message-ID: <8826cbc4-51a3-3ae4-150f-a119b660a02f@polymtl.ca> Date: Tue, 6 Jul 2021 17:38:52 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <614bf906-7bfd-9864-5122-f5fc8dea8d05@palves.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 6 Jul 2021 21:39:03 +0000 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: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Cc: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-07-06 5:04 p.m., Pedro Alves wrote: > On 2021-07-06 9:45 p.m., Simon Marchi wrote: >> I tried this, it does work: >> >> $1 = intrusive list of struct thread_info = { >> [0] = 0x61700003b180, >> [1] = 0x61700003b500, >> [2] = 0x61700003b880, >> [3] = 0x61700003bc00 >> } >> >> However, I see this as going around / abusing our pretty-printing API. >> If one doesn't want to see the indices, it becomes impossible (AFAIK). >> If you want array-indexes, why not just set array-indexes on? > > I think you misunderstood me earlier -- I meant that I would probably switch on > "set array-indexes on" all the time, as I'd find it difficult to use the > pointer-only array without it, not that the printer would not respect > the setting. Ah, yes sorry. I understood it as if it was a bad thing that array indices were not printed by default, and that it should be fixed in the printer. So, nothing to see here :). Simon