Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-04-2008, 11:12 PM   #1
Registered: Jun 2007
Distribution: Slackware, Gentoo, Debian
Posts: 36

Rep: Reputation: 16
using gdbserver from x86 platform to mips based platform.

Hi Everyone,

I'm having a "little problem".
I'm trying to connect with gdbserver from my computer ( x86 based arch ) to my embedded (Linux based Slackware) MIPS arch using the gdbserver in I keep on getting "Reply contains invalid hex digit 59" message.
I've searched the net for answer and found that one more person had the same problem he got replied to change the architecture from the gdb client with the "set atch" command.
I tried to do that ( meaning writing in gdb "set arch mips32" or just mips) but got replied with Undefined item: "mips32" message.

my questions are:
1. How can I force gdb (on my local computer) to change the target arch.
2. Is there a way to force gdbserver to make the gdb (from my computer) to change arch automatically?

By the way,
I forgot to mention that in order to start connecting to the server I'm using TCP over Ethernet.
meaning, on the mips based board I'm typing:
gdbserver tcp: /Progs/MyFile -f

and on my local machine I'm typing in gdb:
target remote tcp:

Thanks a lot for the help,
Old 05-07-2008, 03:22 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 180Reputation: 180
First run
show architecture
help target
to see which architecures your gdb supports. Maybe it simply doesn't support MIPS?

Last edited by Mara; 05-07-2008 at 03:31 PM.
Old 05-11-2008, 01:01 AM   #3
Registered: Jun 2007
Distribution: Slackware, Gentoo, Debian
Posts: 36

Original Poster
Rep: Reputation: 16
Support for MIPS

Hi Mara and Everyone

Thank you for your reply,
It seems like I don't have support for MIPS arch. in my client gdb (meaning in my computer).
Is there a way just to add support for MIPS arch. to my current gdb?

Here is my output:

GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-slackware-linux".
(gdb) show architecture
The target architecture is set automatically (currently i386)

Thanks for the help,
Old 05-13-2008, 03:27 AM   #4
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
why dont you just download the buildroot and compile it for mips. you will get (mips-linux-)gdb once you are done compiling it, then you can easily use it with gdbserver on mips.

you can get buildroot at :

it is quite simple to configure it, has make menuconfig facility that you can use to tune the features you want, in your case, it looks like you are doing it mainly for gdb, so it should not even take that long.
Old 05-13-2008, 07:06 AM   #5
Registered: Jun 2007
Distribution: Slackware, Gentoo, Debian
Posts: 36

Original Poster
Rep: Reputation: 16
Compiling MIPS to my gdb.

Hi Shishir,
I will use your advice and compile gdb for MIPS according your link.
Thank you for the help & explanation ^_^



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
pthread on mips platform binutils Programming 3 02-27-2007 08:44 AM
which x86 platform is mostly supported by solaris rohit_67066 Solaris / OpenSolaris 14 02-10-2007 10:44 AM
LXer: Platform Expands Platform Open Cluster Stack With First AMD-Based ... LXer Syndicated Linux News 0 11-13-2006 06:54 PM
how to run programmes made for windows platform in linux platform... compugeek2006 Linux - Software 1 06-26-2006 09:34 PM
Resource Conflict on Solaris 9 x86 platform cow-woo Solaris / OpenSolaris 3 10-30-2003 12:23 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:01 PM.

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