Re: I compile gdbserver for RISCV on gdb10.1 version, and there is a error

Jim Wilson <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAFyWVaZ2Q+1oae0+VOKtDRA60qdjM8BToKXOLWjciKQtL8f+Hw@mail.gmail.com>
On Fri, Nov 13, 2020 at 5:13 AM Simon Marchi <[email protected]> wrote:

> On 2020-11-12 9:43 p.m., [email protected] 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.