LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-05-2017, 01:13 PM   #1
Vido
Member
 
Registered: Mar 2014
Posts: 38

Rep: Reputation: Disabled
cross compile gdbserver to mips give me an error


Hi, I'm trying to cross compile gdb for mips platform but Im getting an error, so after

Code:
:~/Downloads/gdb-7.12/gdb/gdbserver$ ./configure --host=mips-linux
I'm getting

Code:
SERVER -c -o linux-mips-low.o -MT linux-mips-low.o -MMD -MP -MF .deps/linux-mips-low.Tpo linux-mips-low.c
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:102: error: 'FPC_CSR' was not declared in this scope
linux-mips-low.c:102: error: 'FPC_EIR' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPR_BASE' was not declared in this scope
linux-mips-low.c:107: error: 'FPC_CSR' was not declared in this scope
linux-mips-low.c:107: error: 'FPC_EIR' was not declared in this scope
Makefile:263: recipe for target 'linux-mips-low.o' failed
make: *** [linux-mips-low.o] Error 1
How can I resolve this error ?
 
Old 03-14-2017, 04:22 PM   #2
eager
Member
 
Registered: Aug 2004
Location: Palo Alto, CA
Distribution: Fedora 8/9, Ubuntu
Posts: 44

Rep: Reputation: 18
Go up one directory and use grep -r to search for the missing define:

$ cd ..
$ grep -r FPR_BASE *
...
mips-linux-tdep.h:#define FPR_BASE 32

This header is not included in linux-mips-low.c. Search for this header file in your build directory. There may be an error including it in another header which is included.
 
1 members found this post helpful.
Old 03-14-2017, 04:55 PM   #3
Vido
Member
 
Registered: Mar 2014
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by eager View Post
Go up one directory and use grep -r to search for the missing define:

$ cd ..
$ grep -r FPR_BASE *
...
mips-linux-tdep.h:#define FPR_BASE 32

This header is not included in linux-mips-low.c. Search for this header file in your build directory. There may be an error including it in another header which is included.
So I searched for it and sure enought there it is so what now ? should I add (but what?) in linux-mips-low.c ? Here is mine search
Code:
$ grep -r FPR_BASE *
alpha-linux-nat.c:    return FPR_BASE + regno - gdbarch_fp0_regnum (gdbarch);
ChangeLog-2002:	(MIPS64_ELF_NGREG, MIPS64_ELF_NFPREG, MIPS64_FPR_BASE, MIPS64_PC)
ChangeLog-2006:	(elf_fpregset_t, FPR_BASE, PC, CAUSE, BADVADDR, MMHI, MMLO)
ChangeLog-2006:	(MIPS64_FPR_BASE, MIPS64_PC, MIPS64_CAUSE, MIPS64_BADVADDR)
gdbserver/linux-mips-low.c:  FPR_BASE,      FPR_BASE + 1,  FPR_BASE + 2,  FPR_BASE + 3,		\
gdbserver/linux-mips-low.c:  FPR_BASE + 4,  FPR_BASE + 5,  FPR_BASE + 6,  FPR_BASE + 7,		\
gdbserver/linux-mips-low.c:  FPR_BASE + 8,  FPR_BASE + 9,  FPR_BASE + 10, FPR_BASE + 11,		\
gdbserver/linux-mips-low.c:  FPR_BASE + 12, FPR_BASE + 13, FPR_BASE + 14, FPR_BASE + 15,		\
gdbserver/linux-mips-low.c:  FPR_BASE + 16, FPR_BASE + 17, FPR_BASE + 18, FPR_BASE + 19,		\
gdbserver/linux-mips-low.c:  FPR_BASE + 20, FPR_BASE + 21, FPR_BASE + 22, FPR_BASE + 23,		\
gdbserver/linux-mips-low.c:  FPR_BASE + 24, FPR_BASE + 25, FPR_BASE + 26, FPR_BASE + 27,		\
gdbserver/linux-mips-low.c:  FPR_BASE + 28, FPR_BASE + 29, FPR_BASE + 30, FPR_BASE + 31,		\
mips-linux-nat.c:    regaddr = FPR_BASE + (regno - mips_regnum (gdbarch)->fp0);
mips-linux-nat.c:    regaddr = MIPS64_FPR_BASE + (regno - gdbarch_fp0_regnum (gdbarch));
mips-linux-tdep.h:#define FPR_BASE	32
mips-linux-tdep.h:#define MIPS64_FPR_BASE
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross compile for MIPS 24K V4.12 botzko Linux - Hardware 0 07-09-2014 11:44 PM
MIPS cross compilation error sheelavantar Linux - Software 0 09-06-2011 02:56 AM
using gdbserver from x86 platform to mips based platform. Neuzen Programming 4 05-13-2008 07:06 AM
LXer: Remote cross-target debugging with GDB and GDBserver LXer Syndicated Linux News 0 11-28-2007 03:20 PM
How to cross-compile X window for mips! whutxuan Programming 4 09-26-2005 02:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration