From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id 411A53857836 for ; Sat, 14 Nov 2020 03:08:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 411A53857836 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-x534.google.com with SMTP id d18so226018edt.7 for ; Fri, 13 Nov 2020 19:08:29 -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=YvHUcmwth78EqNL4zql6pOogrAsil5vP+V25evGJ4qY=; b=kAdNlcG5UTzBd0XxsDVM2tX7glCiytub6P+hF0NnvcKapFvbSunG0RqUqKrKGKQoKX YmmIjvD7ACbNEtBtVck04LHII3R3brapwzkFoZYK7mvsjicVU/6Czernwtr3gNjYxPxl jRefYioT36LQPKk7chcK+rt3uskOTVHEJbh19vGivdUQwNy7s7ztLQMf3y3ZSkPNbdEf ZfClrtwEIRlFIr5lt6TRjKt2qSs52GUHeTXvOvGJfiuXiESMWEYuMRvi0f1bM42RlIWs scFFluyFHfyIAJVy1S72Fz7GwbtrlSJX3HZvDt1MVZshjlHCYvsppmb4K5oyYfGWgIfx EnSg== 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=YvHUcmwth78EqNL4zql6pOogrAsil5vP+V25evGJ4qY=; b=T0HHT4OyXU4mj48cy6tu8FPwkcGC45I9plBr3pLJ9HRODgvo2n1LiqsGdZEZ6GS2c/ 71JlEvIGSymgfjVhnqXbeduSO1VdRSJqEMQXDIVA+pik6LYamCa3BZ7WlwklRtoEpUk4 TjynuoOFAdtZ5mDhUkEWc0ipKuI9CrDdQrMSdpTuWLPfZDHEcBjPJGNnDR9nqoEetrGR fM5esMw31pUqcbDUd2Nxav4EP7ZQxg4AZZGqs25KIW77PgHzTmiYhvrm7GT50MyfCYS0 9x1SxGQstwhNsPqRxETNLOkbjC9K4vDEMVRqP/UHOLQHuy5RaP/PQyn6Wy83c4TZtAeZ 4q/w== X-Gm-Message-State: AOAM533m01hn/N4/MI24S1tqvNzTH/8wELjEcPOh2yY8BKQXwCTusMPy 7qbA2vdcXtrQK+vVfyyuYNGmY9JeXlYvqtFSVnEf6A== X-Google-Smtp-Source: ABdhPJwOQ2qFJGMcJGH6hzB4HgrlCY1+QwBQAvsQNjnyRGiGjFHqVyOONQQUR3tukPuft6mW0/jjG27uQ4dUn9cAr5o= X-Received: by 2002:aa7:d59a:: with SMTP id r26mr1623792edq.188.1605323308300; Fri, 13 Nov 2020 19:08:28 -0800 (PST) MIME-Version: 1.0 References: <20201113024303.A8362464046E@webmail.sinamail.sina.com.cn> In-Reply-To: From: Jim Wilson Date: Fri, 13 Nov 2020 19:08:17 -0800 Message-ID: Subject: Re: I compile gdbserver for RISCV on gdb10.1 version, and there is a error To: Simon Marchi Cc: hilihui@sina.com, gdb X-Spam-Status: No, score=-3.7 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@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Nov 2020 03:08:31 -0000 On Fri, Nov 13, 2020 at 5:13 AM Simon Marchi wrote: > On 2020-11-12 9:43 p.m., hilihui@sina.com wrote: > > ../../gdbserver/linux-riscv-low.cc:170:42: error: invalid application of > 'sizeof' to incomplete type '__riscv_mc_q_ext_state' sizeof (struct > __riscv_mc_q_ext_state), OPTIONAL_REGS, > ^It seems that "__riscv_mc_q_ext_state" is not defined. How to > resolve this question? Thanks! > > > > In glibc, this type is provided here: > > > https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/riscv/sys/ucontext.h;h=a4e49fe37a1397fa1babeb0dcefb77341f1e7ad1;hb=HEAD#l65 > > And it appears to have been there since the beginning of the RISC-V > support. > Since the beginning of upstream support, yes. But it was an academic project for years before it was upstreamed and some people are stuck with old stuff because they forked a while back and never upgraded. Or maybe haven't upgraded yet. The ETH Zurich pulp project for instance. > What libc is your system using? > He sent me private mail too. I suspect he is missing the linux kernel RISC-V specific ptrace support also. That came after the glibc support. Jim