Subject: Re: usermode gdb / remote gdb

From: "Maciej W. Rozycki" <[email-masked]>
Date: Wed, 2 May 2001 16:12:13 +0200 (MET DST)

On Thu, 26 Apr 2001, Ralf Baechle wrote:

> > Hmm, I added linux-mips target for gdbserver in gdb 4.17.  And I thought Ralf
> > sent the patch back to FSF (as I had to fill out some copyright forms). 
> > Perhaps it is lost somewhere?
> 
> As most of the 4.17 work was done by David Miller it's not upto me to
> contribute the patches back.

 I have ported 4.17 changes to 5.0.  They are available at my FTP site.  I
have submitted changes I wrote myself to the gdb team.  I have submitting
other changes on my to-do list -- it requires checking the changes against
the current CVS version and contacting all interested parties.  As I lack
time at the moment I cannot promise I'll do it in the foreseeable future.
If anyone wants to do it -- feel free. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email-masked], PGP key available        +

---

From: Wayne Gowcher <[email-masked]>
Date: Mon, 7 May 2001 13:40:06 -0700 (PDT)

Jun,

Having seen your recent posting regarding gdb, I am
wondering if you could help me. I downloaded gdb from
your web site, and tried compiling gdb-4.17 for a
mipsel target.

I got gdb to compile OK, but I couldn't get gdbserver
to compile. My problems seem similar to the problems
Michael Shmulevich had.

I couldn't find any documentation on what order to
apply patches, or which patches to apply, so I patched
with the following in the following order :

gdb-4.17-mips.patch
gdb-4.17-mips-gdbserver.patch
gdb-4.17-xref.patch

I configured gdb with :
./configure -target=mips-linux-elf

It configured OK and then built OK.

Then I configured gdbserver with :

../../configure --target=mipsel-linux-elf 

And then tried compiling.This compiled so far and then
gave numerous undefined references to functions such
as create_inferior,mywait, myresume etc which are
defined in low-linux.c.

So following the previous thread on gdbserver from
Micheal Shmulevich, I decided to try :

../../configure --host=mipsel-linux
--target=mipsel-linux-elf This gave the following
output :
gdbserver/configure.in:host is
mipsel-unknown-linux-gnu,target is
gdbserver/configure.in:host_cpu is mipsel, target cpu
is mipsel
Linked "xm.h" to "./../config/mips/xm-linux.h".
Linked "tm.h" to "./../config/mips-tm-embedl.h".
Linked "nm.h" to "./../config/nm-empty.h".
Created "Makefile"
/usr/local/src/gdb-5.0/gdb-4.17/gdb/gdbserver using
"../config/mips/mipsel-linux.mh" and
"../config/mips/embedl.mt"

I then build with : make CC=mipsel-linux-gcc.

The first file it tries to compile is low-linux.c and
immediately errors with :
low-linux.c:In function 'fetch_register':
low-linux.c:248: 'PT_READ_U' undeclared (first use in
function)

Looking at the source I believe PT_READ_U is undefined
because the link from nm.h to nm-linux.h is not made,
Michael made the same observation.

>From what I have written can you tell me where I am
going wrong ?

Any help would be greatly appreciated

Michael: If you have any tips on how to get gdbserver
working they will be warmly welcome.

TIA

Wayne

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/