[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] gdmserver



I wrote:

> Stay tuned, I'll see what I can do.

OK, here's what to do

Delete uClinux-dist/user/gdbserver subdirectory

Extract attached gdbserver.tar.gz archive to create new gdbserver directory

Change to linux-2.4.x/arch/microblaze/kernel

Freshen entry.S with "cvs update entry.S"

Grab linux executable for tweaked version of mb-gdb from here:

http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux/Downloads/_files/mb-gdb-user

Save it in the same place as existing microblaze gnu tools ('which 
mb-gdb' will tell you where).  I will try to get these changes 
integrated into the standard toolchain for the next release.

$ chmod 755 mb-gdb-user

Back in uClinux-dist, make menuconfig -> user/vendor -> misc 
applications, select [x] gdbserver

In main menu -> debug builds -> [x] build debuggable applications

save, exit, make clean, make

Download to the target, bring up tcp/ip interface

on the microblaze, cd to location of your target app (say /bin)

$ gdbserver host:1234 myapp

(hostname doesn't matter, just port number 1234 or whatever you like)

On target, change to source directory of your app

$ mb-gdb-user myapp.gdb

target remote microblaze1:1234 (insert hostname or ip address of your 
microblaze target)

it should connect, you can now set breakpoints, inspect variables, all 
that sort of thing.

"help" on mb-gdb console will tell you what you need to know.

You should be able to use a serial connection as well - it's all 
standard stuff just check www.gnu.org doco for gdb and gdbserver.

I know for sure that it's still slightly broken.  Please make a note of 
any strange behaviour, and if possible try to create small, isolated 
test cases so I can track down any bugs quickly.

Have fun!

John

Attachment: gdbserver.tar.gz
Description: Binary data