gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Debugging with DevKitARM, Insight and VBA...

#65280 - lorbar - Sun Jan 01, 2006 9:31 pm

hi all!


i'v tried the search function and read the instructions on debugging on both, the vba-site and the dka-site. unfortunately it doesn't work yet. :( i'm using gnu/linux. maybe it doesn't work on linux at all?

i don't know what version of dka i'm using, but it was the most recent one when i installed it (november, 15.)

i've tried vba 1.7 and vba 1.7.2 with no luck.

in the faq on the dka-site it says i should be using the arm-elf-insight binary. but since the insight-win32-version available through the dka-site is useless to me, i installed the regular insight version 6.1.


insight displays my code, connects to the vba with no problem and downloads the elf file to it. but then everything just kinda hangs. the vba-screen remains black and insight remains completely disabled. here's what vba outputs to the console:

Code:
VisualBoyAdvance-SDL version 1.7
Linux version
Seaching for file VisualBoyAdvance.cfg
Searching current dir: /home/lorenz/visboyadv
Reading configuration file.
Listening for a connection at port 5555
Got a connection from 127.0.0.1 58199
Color depth: 32
Unknown packet vCont?#49



any help appreciated.

#65293 - wintermute - Sun Jan 01, 2006 10:41 pm

You'll need to build Insight from CVS HEAD, I haven't checked the most recent release of gdb ( 6.4) which may work but certainly anything up to and including 6.3 won't work.

#65305 - lorbar - Sun Jan 01, 2006 11:37 pm

this may sound stupid, but i have no previous experience with gdb/insight + vba at all... do i have to pass a special architecture to the configure script in order to make insight work with vba? what would it be?

#65306 - wintermute - Sun Jan 01, 2006 11:46 pm

I usually build in a folder separate to the source, this is recommended for GCC and something I do whenever possible.

<path/to/insight/source/configure --prefix=/usr/local/devkitPro/insight --target=arm-elf --disable-nls --enable-gdbtk

I'm not actually sure if the last option is still required

make && make install

#65354 - lorbar - Mon Jan 02, 2006 11:07 am

<ignore>
thanks for the advice! one last question before i try this: do i have to use "make install"? can't i just run the binaries after "make" and see if it works?
</ignore>


EDIT: ok, i tried it w/o "make install" and now i can step through my programs. however using STEP (s) gives some funny results. the highlighting for the current code-line jumps back and forth, instead of just walking through my code in a linear fashion. maybe this is due to compiler optimiziations? what would be the easiest way to disable optimizations in DKA? can i do it by editing my makefile or maybe changing the _rules files?

thanks again for your time and help! using the most recent version of insight and your help on the configure script made it work (allmost there). :)

#65525 - lorbar - Tue Jan 03, 2006 8:34 pm

now i feel really stupid. :( i used one of the examples Makefile as a template for my own program, but i was to dumb to see the CFLAGS line in it. (however grep was able to find it very quick...)

ok, turning off O3 makes debugging a very nice and linear thing to do! finally it works as expected.

so what finally worked for me was:

- a pretty recent DevkitARM
- the latest version of insight (configured like posted above by wintermute)
- VisualBoyAdvance 1.7.0


thanks.