From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4b3IMIu6gGAtSAAAWB0awg (envelope-from ) for ; Wed, 21 Apr 2021 19:51:39 -0400 Received: by simark.ca (Postfix, from userid 112) id B44CB1F104; Wed, 21 Apr 2021 19:51:39 -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.9 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,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 DF3E41E783 for ; Wed, 21 Apr 2021 19:51:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 59D3C3857809; Wed, 21 Apr 2021 23:51:38 +0000 (GMT) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id CB6653857C74 for ; Wed, 21 Apr 2021 23:51:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CB6653857C74 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jimw@sifive.com Received: by mail-ed1-x52d.google.com with SMTP id h8so11161291edb.2 for ; Wed, 21 Apr 2021 16:51:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=UdZu4RqgYZRYjPiGUxzXuevrteWe3K7Ce9AoTZmLMzU=; b=UklhzTD8PK6z61xcX4qp2aAlgRpBzjygwdvOFNDrN4lhCkziwvrB+Rr0SteIHGPFD3 ExRZusxHVvUDosMjEO2JJfAvcA9eE3mUYLrBHu7ERZKQJXenn4GwoB+oj7OVah5uBAYR JMWLBX+jUvtHLc6ToG17FJCZc+vpFhbdV9bPMXQ9f/74zIZ5linfXsrYvfdsjo+s1HF7 bmOJiB08C9C+hDk51tjjvcBgzXfhr9GMYrfd49YxmF0VAQ03EDp3bRQThczrYtP1TDcS lm2ryjBHwrbeU40jcDnPabzoKpNqnmqPQeNoehmjzWYgf8UEokG1MslvVQ0KmPNAUN8E Zo1Q== 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; bh=UdZu4RqgYZRYjPiGUxzXuevrteWe3K7Ce9AoTZmLMzU=; b=i7cvg07ze/Akg813SxY6T+DrjgF50i7cPpWOTJC/YmXIaT27Y6KRSTd/BNHtZlRkrY J3dlGLccB6s302wbk2ZNEO5bHkUg2T0cqTE1U0fNH4TCJlBwo4ghQlw654NwvB3WejqU adDqOh0BRRlyGLbf5fg3hsIOkNtQFkj0JaFzAkMiXxYcYAJJqUVsfL4TpY5tzeXEblcC 7vGf/1E8yX4LBa56wFFIAjm6Z1FJ8Tm/9uhlWI1pqjgSb7wxCBERFvPsHAOzom/XQb+2 i5T7d2fPMlm3jSGZfBel2V+FhcnSCy6WiO/QSUkPE3YFq4mdjZWZF92nRK+WS71yQjRr 45Jw== X-Gm-Message-State: AOAM530AbaFpuURIigwIyRnaiq89KEJhVwc2yfn+lFQjC6SAg80pb3Jt FlYlUZXE6yOA/V9kU20PSBdNRUUZXDsj3pVg8tTMHx6gYL0= X-Google-Smtp-Source: ABdhPJzHAe1yrK0aYP3SS5xl8CYpTZSOvMPtODx3P2ZCj/yEeFeXjCoDqen3AhCd6sRgRJE9RMwOVGNpwV2avJB5Fcs= X-Received: by 2002:a05:6402:416:: with SMTP id q22mr540900edv.204.1619049094904; Wed, 21 Apr 2021 16:51:34 -0700 (PDT) MIME-Version: 1.0 References: <20210417175831.16413-1-jimw@sifive.com> <20210417175831.16413-9-jimw@sifive.com> In-Reply-To: From: Jim Wilson Date: Wed, 21 Apr 2021 16:51:24 -0700 Message-ID: Subject: Re: [PATCH 08/24] RISC-V sim: Add brk syscall. To: Jim Wilson , gdb-patches@sourceware.org, Kuan-Lin Chen Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Sun, Apr 18, 2021 at 10:24 PM Mike Frysinger wrote: > On 17 Apr 2021 10:58, Jim Wilson wrote: > > Add endbrk field to cpu struct. Set it to highest section end address. > > Use it for the brk syscall support. > > ... > > + /* Set endbrk to highest section end address. */ > > + phdr = elf_tdata (abfd)->phdr; > > + phnum = elf_elfheader (abfd)->e_phnum; > > the commit message & comments say "sections", but the code isn't operating > on > sections, it's operating on program headers which define "segments". i > know > it sounds like i'm being pedantic, but i've seen a lot of ELF parsers that > get > confused and use/mix terminology, and it gets hard to untangle the > intentions > with the actual code. especially when digging through bug reports. > I fixed the commit message. The comment gets rewritten in part 20. I will fix it there. Jim