#92157 - simonjhall - Tue Jul 11, 2006 9:54 pm
It's that magical time of year again, folks. Yup, it's Debugger Day.
Come get it whilst it's hot.
http://myweb.tiscali.co.uk/simonhall/debugger_060711_2138.zip
and make sure you read the readme, even though it's pretty long
for the lazy, it's here too:
http://myweb.tiscali.co.uk/simonhall/README.txt
I know I'm asking for trouble by releasing just before going to bed, but hey - enjoy!
Oh and in the readme when I'm talking about the directory debugger_local, I mean binary/debugger_local.
------
Could we keep this thread for fixing problems with this release and the other thread for feature requests/technical chat please?
EDIT: the walkthrough line which says to place a breakpoint on line 133 at glFlush should be line 132...
#92212 - zazery - Wed Jul 12, 2006 2:44 am
Wow this looks awesome, I'll have to try it when I get the chance.
Edit: Opps sorry about the post, didn't read that you wanted to leave it to tehnical discussion only. If a mod reads this, please delete this post, thanks.
Last edited by zazery on Wed Jul 12, 2006 7:10 am; edited 2 times in total
#92230 - wintermute - Wed Jul 12, 2006 6:05 am
It's the other thread that's for technical chat etc.
All I have to say is Wow! Very well done that man, here's a nice pic
Debugging with Insight :D
Couple of minor quibbles
- port numbers below 1024 are reserved, linux users will need to run the java code as root
- absolute paths in makefiles are bad mkay :) I've WinterMuteified your source a bit - I'll mail you it later.
and this is so being assimilated into devkitPro.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#92248 - simonjhall - Wed Jul 12, 2006 9:21 am
wintermute wrote: |
All I have to say is Wow! Very well done that man, here's a nice pic |
Thanks man :-) I'm glad the first comments aren't "why do I just get the message wireless init...."!
And is that the version that I gave you at the weekend you're using there? Cos that one has a bug where I forget to restore the CPSR...
For those people who have a beef with the port numbers, I'll change them in the next release. Sorry, I didn't know you need root to open ports with low numbers.
If you can't wait, the files you'll wanna adjust are Debugger.java (line 40 ish), gdb_opts, and debugger_connect_tcp() in network_trans.c. You'll have to rebuild the java though and libdsdebugger.a...
Quote: |
and this is so being assimilated into devkitPro |
Score! I keep meaning to get back to you about that CVS access...
#92252 - LiraNuna - Wed Jul 12, 2006 9:40 am
Amazing work! Now i'm waiting for an emulator that will support it!
(Emulators such as dualis can show VRAM, OAM and more which ease development process)
Yet again, AWESOME!
_________________
Private property.
Violators will be shot, survivors will be shot again.
#92272 - simonjhall - Wed Jul 12, 2006 1:29 pm
LiraNuna wrote: |
Amazing work! Now i'm waiting for an emulator that will support it!
(Emulators such as dualis can show VRAM, OAM and more which ease development process)
Yet again, AWESOME! |
Ta man :-)
And don't the emulators already support debugging? If wouldn't be too hard for emulators to attach to GDB if they wanted - the protocol isn't too hard, it's just that loads of bits are undocumented!
And when I eventually get round to coding a GUI for the Java stub I was planning on having some DS-specific stuff to easily allow you to dump stuff lile video RAM. Assuming it's not too hard to read back the display that is...
In the next release I'm trying to decide between THUMB support or proper CTRL-C handling - the GUI's gonna hafta wait.
#92296 - StoneCypher - Wed Jul 12, 2006 5:48 pm
It's things like this that make me happy I ran the bounty. Pity that the drama crowd is trying to drive me away and keep new stuff like this from happening, isn't it?
At least the bot they're running pretending to be me might be able to run a new one for you.
Mute: your screenshot is 404.
_________________
Quidquid Latine dictum sit, altum Sonatur
[Images not permitted - Click here to view it]
#92376 - simonjhall - Thu Jul 13, 2006 7:40 am
Yo, so has anyone actually had any real problems with this thing yet? Any problems with the docs? I can't believe I got it right first time :-)
A side note: agentq says he couldn't get Eclipse to work with it. Could anyone else? And if so, what did they have to do that was different from the instructions?
#92531 - 0xtob - Thu Jul 13, 2006 8:10 pm
Brilliant work! This will save many people a lot of time!
I had no greater problems setting it up. Just modified the paths in the Makefiles, recompiled the ds-stub, because I still have DKP r18 and I could happily test the demo. And it works with ddd too :-)
Keep it up!
#92588 - DynamicStability - Fri Jul 14, 2006 12:34 am
I didn't have much luck with it, I'll wait until its part of devkitpro.
Good job though!
#92967 - Goosey - Sun Jul 16, 2006 2:52 am
Has anyone been able to test this with WEP?
Can't wait to get a chance to try this out!
#92994 - simonjhall - Sun Jul 16, 2006 10:29 am
Goosey wrote: |
Has anyone been able to test this with WEP?
Can't wait to get a chance to try this out! |
I've been told that it works just fine, though I haven't bothered to verify this myself. Have a go!
And DynamicStability - could you tell me (either here or in a PM or whatever) what didn't work for you, so I could improve it in another version?
#93091 - DynamicStability - Sun Jul 16, 2006 11:05 pm
It wasn't anything specifically wrong with your instructions. Just a number of setbacks that made me quit for the time being. Mainly, freshly compiled insight causes my X session to exit each time i click Preferences->Global, the fact that the linux code sourcery kit didn't include an insight binary for linux, then the fact that your make file needed full customizations for it to work for me....at least I think so. The other toolkit couldn't find nds.h and stuff like that, then it said that my wifi libs were the wrong eabi...
So, i'd prefer if only devkitpro was needed, not a secondary toolkit...
#93097 - masscat - Mon Jul 17, 2006 12:02 am
DynamicStability wrote: |
then it said that my wifi libs were the wrong eabi... |
The binary wifi library was not made with the latest devkitarm release. All you have to do is get the wifilib source and type make and all should be good. You will need to do this for any project that you use the library for.
#93154 - simonjhall - Mon Jul 17, 2006 7:40 am
Right, cool - thanks for testing it too! Gotta sort out the makefile so people don't have to modify it themselves - wintermute, didn't you say you made a bunch of changes to it? I'll put whatever changes in the next ver.
And insight - yeah, it used to crash loads for me too. There's no insight in the codesourcery distro just a command line version of gdb, arm-none-abi-gdb. This is the gdb I use day to day to write this thing...
I was thinking of including source for the wifi lib in the next version so that it builds it when you build the debugger - does anyone think this'll be a good idea?
#93543 - dovoto - Wed Jul 19, 2006 8:23 pm
It just occured to me that I have an xport with a decent ds <-> pc connection...how difficult would it be to replace the wifi stub with one that communicates over this port?
_________________
www.drunkencoders.com
#93549 - simonjhall - Wed Jul 19, 2006 9:03 pm
dovoto wrote: |
It just occured to me that I have an xport with a decent ds <-> pc connection...how difficult would it be to replace the wifi stub with one that communicates over this port? |
I often speak without really thinking, but I'd say it'd probably be easy :-)
You'd have to replace the bit of code which inits the wireless and the function which sends a data and the function which polls for a packet, ds-side. You'd then have to change the Java to get the two talking tog. But again, that's all you'd have to change. The rest would be the same.
Send me some hardware and I might do it for you! Dunno how to use a serial port (or whatever it uses) in Java though.
#93557 - dovoto - Wed Jul 19, 2006 9:53 pm
java..hmm no idea how to talk to parallel port in java but probably a way. I will check the charmedlabs site and see if they have done any work with it. Thanks for your interest
_________________
www.drunkencoders.com
#93561 - masscat - Wed Jul 19, 2006 10:13 pm
dovoto wrote: |
java..hmm no idea how to talk to parallel port in java but probably a way. I will check the charmedlabs site and see if they have done any work with it. Thanks for your interest |
There is a Java extension for using serial and parallel ports.
I do not know what is like to use but it provides InputStream and OutputStream objects for talking across the ports so should be a simply job to replace the socket with a port in the debugger stub.
#94063 - NEiM0D - Sat Jul 22, 2006 8:26 pm
You would be easier off to modify xpcomm, to do what the java stub does.
#94976 - TheChuckster - Thu Jul 27, 2006 4:09 am
I'm not having too much luck with the debugger. The continue command and CTRL+C work, but I can't set breakpoints, backtrace, or examine memory. When I do, the Java program outputs multiple:
Code: |
READ RETRY TIMER RETRYING READ from 0xXXXXXXXX, length 256
READ RETRY TIMER memory read request from 0xXXXXXXXX |
I have the user_debugger_update() function in an infinite loop where I want to be able to check things out. My program stops at a certain point, so before that is where I put the infinite loop. Having a single user_debugger_update() call in the main loop just isn't enough because the program iterates through the main loop only once before crashing.
When I start my program on my DS, I get the following messages:
Code: |
res 0
message size 296 bytes
breakpoint function at 0203a1b8
0 0x200d783 0xb003ca0
interrupt mask 00040040
interrupt mask 00000040
it's not valid
bp at: 0x02039af4 |
I think it may have to do with the way I'm setting up my IRQs:
Code: |
irqInit(); // Enable our quintessential vblank interrupt
irqSet(IRQ_VBLANK, NULL);
irqEnable(IRQ_VBLANK);
TIMER0_DATA=0; // Set up the timer
TIMER1_DATA=0;
TIMER0_CR=TIMER_DIV_1024;
TIMER1_CR=TIMER_CASCADE;
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
//start up the wireless, connect to the AP
set_verbosity(VERBOSE_INFO | VERBOSE_ERROR | VERBOSE_TRACE);
wireless_init(1);
wireless_connect(); |
I need both timers in order for my program to keep track of tick counts. Is there anything special I need to do because I am setting up my IRQs manually? I tried calling wireless_init(0), but the Java program crashed.
All in all, your debugger seems to be very useful, but I really would like to have the breakpoints, backtracing, and memory examination to work with my application.
#95008 - simonjhall - Thu Jul 27, 2006 9:22 am
Hmm, that's really weird.
Ok, I'll try and address each thing in turn.
The first block where you've got the read retry timers going at it normally means that either a) the DS, Java and GDB have deadlocked somehow or b) that the DS has crashed as you've done something funny.
As I've not been able to deadlock it for over a month, I reckon it's crashed!
The second block that you've got looks like what appears when you call user_debugger_update() for the very first time. If this appears *before* you call the function then something's definately broken! The "it's not valid" message just means that you've hit the fake breakpoint. This message will only appear on the very first call to that function - there's no message on subsequent calls (even if you stop).
The third block looks fine. Could I just confirm that you're *not* trying to stop it inside an interrupt handler? Cos the version y'all have doesn't support that! I've written support for it, but I want to release it all together with THUMB/ARM7/proper CTRL-C.
If you're not placing a breakpoint inside an interrupt handler then something's definately wrong. Could you sent me the massive log the Java app makes? And if your code is dead short, could you send me that too?
#95053 - TheChuckster - Thu Jul 27, 2006 4:53 pm
Where is the log file normally stored? The source is rather large because I'm trying to port Prboom to DS. If you want what I've done so far, email me at TheChuckster@gmail.com
#95069 - simonjhall - Thu Jul 27, 2006 6:16 pm
Ah if the source's big then not to worry. The debugger doesn't currently save the log anywhere, it just writes it straight to stdout. You can capture it however by calling java Debugger > log.txt.
If I mail you could I get the ARM9 ELF and NDS off you?
#95071 - DynamicStability - Thu Jul 27, 2006 6:30 pm
The next version sounds like the sweet spot! Any time frame? Thanks.
_________________
Framebuffer is dead.
DynaStab.DrunkenCoders.com
#95100 - simonjhall - Thu Jul 27, 2006 9:16 pm
DynamicStability wrote: |
The next version sounds like the sweet spot! Any time frame? Thanks. |
Ooh, dunno. The ability to debug interrupt handlers has been written, and I'm writing the THUMB stuff right now. Haven't decided how to properly handle the ctrl-c thing yet. And ARM7...hmm.
Give it a few months as I'll wanna test it all to death before releasing! I spent long enough testing it with one processor mode on one processor with one instruction set, so properly testing/fixing/etc for user/sys/irq modes on both processors, each with two instruction sets could take some time!
#95144 - DynamicStability - Fri Jul 28, 2006 12:51 am
Oh, well I'd encourage interim releases then please.
_________________
Framebuffer is dead.
DynaStab.DrunkenCoders.com
#151879 - PypeBros - Thu Mar 06, 2008 10:19 am
I know it's one year old, but the download links seems broken to me ... any mirror ? has it been integrated in dkp r21 ?
_________________
SEDS: Sprite Edition on DS :: modplayer
#151880 - simonjhall - Thu Mar 06, 2008 10:44 am
Me and wintermute have discussed integrating it a few times. It's definately on my to-do list to fix the bugs that were in the last version and add in ARM7 debugging.
I've got the basics of ARM7 working, and the PC-side of things should automatically handle a second processor - I've just got to write the communications between the two CPUs. Oh and add in thumb support for the '7...
_________________
Big thanks to everyone who donated for Quake2