Fix tic6x-uclinux GDBserver build failure
authorYao Qi <yao.qi@linaro.org>
Thu, 16 Nov 2017 10:05:27 +0000 (10:05 +0000)
committerYao Qi <yao.qi@linaro.org>
Thu, 16 Nov 2017 10:05:27 +0000 (10:05 +0000)
commit3491a34c4f7de10dbd19c719052642d8471c45a6
tree12679c9430f573ed27c5b3469c2f0a87258d130d
parentbe7f7611881bae0fb9e26c892ecd61387d32542d
Fix tic6x-uclinux GDBserver build failure

I can't find a c6x-uclinux c++ compiler, so I use my host g++ to build
tic6x-uclinux GDBserver, and find the following build failures.  They are
not target specific, so I believe they are real errors.  This patch fixes
them.

../binutils-gdb/gdb/gdbserver/linux-tic6x-low.c:313:34: error: invalid
conversion from 'void*' to 'tic6x_register*' [-fpermissive]
   union tic6x_register *regset = buf;
                                  ^
../binutils-gdb/gdb/gdbserver/linux-tic6x-low.c: In function 'void tic6x_store_gregset(regcache*, const void*)':
../binutils-gdb/gdb/gdbserver/linux-tic6x-low.c:324:40: error: invalid
conversion from 'const void*' to 'const tic6x_register*' [-fpermissive]
   const union tic6x_register *regset = buf;
                                        ^

../binutils-gdb/gdb/gdbserver/linux-tic6x-low.c: At global scope:
../binutils-gdb/gdb/gdbserver/linux-tic6x-low.c:359:28: error: redefinition of 'usrregs_info tic6x_usrregs_info'
 static struct usrregs_info tic6x_usrregs_info =
                            ^
../binutils-gdb/gdb/gdbserver/linux-tic6x-low.c:186:28: note: 'usrregs_info tic6x_usrregs_info' previously declared here
 static struct usrregs_info tic6x_usrregs_info;
                            ^

gdb/gdbserver:

2017-11-16  Yao Qi  <yao.qi@linaro.org>

* linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
(tic6x_store_gregset): Likewise.
(tic6x_usrregs_info): Move it up.
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-tic6x-low.c