From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49943 invoked by alias); 13 Dec 2019 22:14:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 49926 invoked by uid 89); 13 Dec 2019 22:14:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=talks, Guaranteed X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (205.139.110.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2019 22:14:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576275270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qU8x3HYVo0eryp/vzkR0NskvAqS4nkmMzxhkztXs6yU=; b=GBQJyqZ1LmTI8pDTAnk/x9buZrSlzXi2/E1/3THocFVe1PdPrp1oljrVzHXm1fcf/CDbQm ojdroUoW0CbxS6QI1Hk4x8LbyYzX4hlb9YWvecWBbeMX+JSg9BhtFfW6ND94U9hcuEo/F3 6oT9gzM5pSApKWV7iG/nlHbyb47wvAs= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-172-C_xg7KFFPhOgBIJKn9VwVg-1; Fri, 13 Dec 2019 17:14:28 -0500 Received: by mail-wm1-f72.google.com with SMTP id p2so53377wma.3 for ; Fri, 13 Dec 2019 14:14:28 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id o19sm10793601wmc.18.2019.12.13.14.14.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Dec 2019 14:14:26 -0800 (PST) Subject: Re: [PATCH 4/7] jit: make gdb_symtab::blocks a vector To: Simon Marchi , gdb-patches@sourceware.org References: <20191213060323.1799590-1-simon.marchi@polymtl.ca> <20191213060323.1799590-5-simon.marchi@polymtl.ca> From: Pedro Alves Message-ID: Date: Fri, 13 Dec 2019 22:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20191213060323.1799590-5-simon.marchi@polymtl.ca> X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-12/txt/msg00623.txt.bz2 On 12/13/19 6:03 AM, Simon Marchi wrote: > I don't think it's true that "next" points to the next node at the same > depth. It might happen to be true for some nodes, but it can't be true > in general, as this is a simple linked list containing all the created > blocks. Is this really true? I mean, the comment you're removing talks about a tree. I see that jit_block_open_impl starts by doing: block->next = symtab->blocks; but then the else branch writes to blocl->next again: /* Guaranteed to terminate, since compare_block (NULL, _) returns 1. */ if (compare_block (i->next, block)) { block->next = i->next; I don't pretend to understand this code, but it does sound like at least the intention was to have a tree of blocks, which is not a surprising data structure for blocks. Thanks, Pedro Alves