LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-05-2008, 12:12 AM   #1
Neuzen
Member
 
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:192.168.1.11:172 /Progs/MyFile -f

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

Thanks a lot for the help,
Neuzen
 
Old 05-07-2008, 04:22 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

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

Last edited by Mara; 05-07-2008 at 04:31 PM.
 
Old 05-11-2008, 02:01 AM   #3
Neuzen
Member
 
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,
Neuzen
 
Old 05-13-2008, 04:27 AM   #4
shishir
Member
 
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 : http://buildroot.uclibc.org/

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, 08:06 AM   #5
Neuzen
Member
 
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 ^_^
Neuzen
 
  


Reply

Tags
gdb


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


All times are GMT -5. The time now is 07:44 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration