From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id A74lM4rF5GBQTAAAWB0awg (envelope-from ) for ; Tue, 06 Jul 2021 17:05:14 -0400 Received: by simark.ca (Postfix, from userid 112) id C22031F1F4; Tue, 6 Jul 2021 17:05:14 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 0EDFD1E54D for ; Tue, 6 Jul 2021 17:05:14 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B9D41384B801 for ; Tue, 6 Jul 2021 21:05:13 +0000 (GMT) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by sourceware.org (Postfix) with ESMTPS id 523223861035 for ; Tue, 6 Jul 2021 21:05:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 523223861035 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f42.google.com with SMTP id q17so553163wrv.2 for ; Tue, 06 Jul 2021 14:05:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0GTzJ8TnVZIQa9MBjxkJx3Qa9jnBjQ+NnfQ7IkrCH5w=; b=RV524QqGUTGtCypY/rxp0HmZDl9FOoEkYgKcSQKkJD3IZIAVKmng7sMjnSCDIQyzbI XRVHO/I9D26BdAxdefQsuVmaYRg328py1oLxb80jzEcOJmLz05Il083nSKnlw0WlRYpi zS8SFnIj1zCUnn8kShQcc0OdKdF5wo3a+WNnpwi84zdfAdmF3a1nyRlMC44VS2VySL8F Km9B03+7P2cB5rEg4wAfCvutip/IQbUaD8lZ6Cn/HNpdzD8cBcYiQOCVCOh1bF+wbuaJ SBdfayVsMVODsoxusj333xUDkqutO3szyv/tep1JzUdDMOhj78lXkVPt3tMg0/3GRAtI ikMg== X-Gm-Message-State: AOAM532ycmUeOwxjOyqFkIEnry84LJBVCidAvluWIJA/4kvARCVecVKf dDxuCxWfAyNmsjxw7pqa+rRytep2fdAraw== X-Google-Smtp-Source: ABdhPJzpt9CCCcd/cDSacAxXpl+oFa9i9EVYHG6rtFoatOL/UrbA0zOoMQQtVesnDQp9U16DpfGipg== X-Received: by 2002:a5d:6da6:: with SMTP id u6mr24042572wrs.38.1625605501140; Tue, 06 Jul 2021 14:05:01 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:46bc:d03b:7b3a:2227? ([2001:8a0:f932:6a00:46bc:d03b:7b3a:2227]) by smtp.gmail.com with ESMTPSA id 2sm16531030wmn.44.2021.07.06.14.04.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jul 2021 14:05:00 -0700 (PDT) Subject: Re: [PATCH 02/11] gdb: introduce intrusive_list, make thread_info use it From: Pedro Alves To: Simon Marchi , 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> Message-ID: <614bf906-7bfd-9864-5122-f5fc8dea8d05@palves.net> Date: Tue, 6 Jul 2021 22:04:59 +0100 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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , Cc: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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.