From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by sourceware.org (Postfix) with ESMTPS id 759F53857C4E for ; Wed, 2 Dec 2020 23:24:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 759F53857C4E 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-qk1-x741.google.com with SMTP id d9so466940qke.8 for ; Wed, 02 Dec 2020 15:24:52 -0800 (PST) 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 :cc; bh=VEI2QLrqWT6IvCoDXEheLx6dpzigO9ybXL8wnQvRrAU=; b=C5L++ahzxOiHIuEDSaQtFUYm9KW+KRQJ56XFED40ar+9PKyiNc/R9uV+mSTiG9/AZo iqfpRmClKZVhcEAKppyvoTBHMwtpXEpHXDK/YowYEhVMkw7IrbeX3SsHa8hv4AGNrHvn H8NMJcvabbxHparoJjjmmxHfbC/574K1jEOvWRVG2q/+zrneAlJuhu0esaQ7r5urpcTL vNxNEQyHRn47IWXPm6hdGDtSUvQUcbxqiKRjLKy3YErzbqlhFtUhcpiLKHoCwvVEcFrU GwLe10BqLKvYZCAyE2XLuo9Lt+wWpmQ2SPO/KUmcZt8BKlQGVMwvxrS5p03nonl4o37D G0jg== 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:cc; bh=VEI2QLrqWT6IvCoDXEheLx6dpzigO9ybXL8wnQvRrAU=; b=ZmYUxUcA+GCPZH2E9J77ZqmD/iIpb+aej7GjfrerCU8XtYHPdaeFHncU2vPt9R0DxW MQs5AazU5QR+jeyUIO3s3ZcxemLCsLp8MpPNIvib8jnReU5i2o6UxKSobMSyIehNU6oC 1v56SeNKy6VYrmnEhh/E/hiBDwJTnf/jqk/mv5UkGFWf8WzrwGMjlUNMFqMUFYoSDDiG q02Muhd3/QDJUKvizdhrtrpuwsyIrgTfnJJBBGqpppw21wD9TPf85wazQa88JCTGh3Pi 6iIT/VCLGyP0L545X3GqNq/8bxCAb5LB8A+ZkK90tqxRqx8Ur/8E5eZ9JuzYxSYFbd1h IlFw== X-Gm-Message-State: AOAM533rjOq85mVqAqbAxE/O0K0uokaSmHoYmzrTcpi3DxrVcbkPiG5d jXIctL4/SCbCrvTONbfWLES6cFDCyJh6H5aixyTDhg== X-Google-Smtp-Source: ABdhPJzbxLwqZwZHEEsqLTXJQBBNCgnrJ3UYVj1Xj0uEuB1qw0+niGrt++B+lI9XimHQY3oA5hKHHNB3J5gXBHGZZrw= X-Received: by 2002:a05:620a:15db:: with SMTP id o27mr189642qkm.21.1606951492061; Wed, 02 Dec 2020 15:24:52 -0800 (PST) MIME-Version: 1.0 References: <1738a5518a1dc57b34e4a8b13fa9b5e46f2a8d88.1606930261.git.andrew.burgess@embecosm.com> In-Reply-To: <1738a5518a1dc57b34e4a8b13fa9b5e46f2a8d88.1606930261.git.andrew.burgess@embecosm.com> From: Jim Wilson Date: Wed, 2 Dec 2020 15:24:41 -0800 Message-ID: Subject: Re: [PATCH 4/8] bfd/riscv: prepare to handle bare metal core dump creation To: Andrew Burgess Cc: Binutils , gdb-patches@sourceware.org, Nelson Chu , John Baldwin X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 02 Dec 2020 23:24:53 -0000 On Wed, Dec 2, 2020 at 9:39 AM Andrew Burgess wrote: > +/* Write PRSTATUS note into core file. This will be called before the > + generic code in elf.c. By checking the compiler defines we only > perform > + any action here if the generic code would otherwise not be able to help > + us. The intention is that bare metal core dumps (where the > prstatus32_t > + might not be available) will use this code, while non bare metal tools > + will use the generic elf code. */ > The reference to prstatus32_t is a little confusing, as that appears to be an x64_64 specific type. I think that should be prstatus_t. The function handles both PRSTATUS and PRPSINFO but the comment only mentions PRSTATUS. Maybe it should mention both? Otherwise this looks OK to me, with a minor comment clarification. Jim