Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Moderator: a31chris
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
No I did not run it in administrator mode. I will do that this evening.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
I think you did this before and it was running : http://3do.cdinteractive.co.uk/viewtopi ... 601#p38787a31chris wrote:No I did not run it in administrator mode. I will do that this evening.
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Whoops! Haha!flynn wrote:I think you did this before and it was running : http://3do.cdinteractive.co.uk/viewtopi ... 601#p38787a31chris wrote:No I did not run it in administrator mode. I will do that this evening.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Looks nice.a31chris wrote:Even with the old JCP, we have success!!

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
A problem.
Using the command line GDB I can get the entire program to run and display 'Hello Jag Users!' with the continue command.
I cannot do that with code::blocks. It for some reason never displays 'Hello Jag Users'.
I don't know why.
Using the command line GDB I can get the entire program to run and display 'Hello Jag Users!' with the continue command.
I cannot do that with code::blocks. It for some reason never displays 'Hello Jag Users'.
I don't know why.
Code: Select all
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-mingw32 --target=m68k-elf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
jagelf: No such file or directory.
(gdb) dir
Reinitialize source path to empty? (y or n) n
Source directories searched: $cdir;$cwd
(gdb) jagelf.bin
Undefined command: "jagelf". Try "help".
(gdb) m68k-elf-gdb jagelf.bin
Undefined command: "m68k-elf-gdb". Try "help".
(gdb) target remote:4567
Remote debugging using :4567
0x00004000 in ?? ()
(gdb) load jagelf.bin
Loading section .text, size 0x408 lma 0x4000
Loading section .data, size 0x419 lma 0x4410
Start address 0x4000, load size 2081
Transfer rate: 3 KB/sec, 148 bytes/write.
(gdb) c
Continuing.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Another question, in the video Tursi, before he uploads anything he does a 'disas' and gets an assembly dump filled with zeroes. This is at around 10:20 in the 'using gdb with skunkboard' video:
http://youtu.be/BFKp00xROcU?t=10m20s
This is what happens when I try to recreate it:
I think we discussed it before that I can now disassemble stuff I am just curious to why I can't do it like Tursi did in the video.
http://youtu.be/BFKp00xROcU?t=10m20s
This is what happens when I try to recreate it:
Code: Select all
c:\stuff\m68k-elf\hello2>m68k-elf-gdb jagelf.bin
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copyin
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-mingw32 --target=m68k-elf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from c:\stuff\m68k-elf\hello2\jagelf.bin...done.
(gdb) target remote:4567
Remote debugging using :4567
0x00004000 in ?? ()
(gdb) disas
No function contains program counter for selected frame.
(gdb)
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
When I put a breakpoint at main and step through on gdb command line it stops at main and a purple border pops up on my tv. I don't get that far with code::blocks. Or that never happens on my tv screen.
At this point a purple border has appeared on my tv screen.
Code: Select all
No function contains program counter for selected frame.
(gdb) load
Loading section .text, size 0x408 lma 0x4000
Loading section .data, size 0x419 lma 0x4410
Start address 0x4000, load size 2081
Transfer rate: 3 KB/sec, 148 bytes/write.
(gdb) disas
No function contains program counter for selected frame.
(gdb) load jagelf.bin
Loading section .text, size 0x408 lma 0x4000
Loading section .data, size 0x419 lma 0x4410
Start address 0x4000, load size 2081
Transfer rate: 3 KB/sec, 148 bytes/write.
(gdb) disas
No function contains program counter for selected frame.
(gdb) break ___main
Breakpoint 1 at 0x43a8: file jag.c, line 51.
(gdb) c
Continuing.
Breakpoint 1, ___main () at jag.c:51
51 jagscreen = (unsigned char *)&_vidmem;
(gdb)
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
I do not know how Tursi did it may be pervious GDB version had their own way.a31chris wrote:Another question, in the video Tursi, before he uploads anything he does a 'disas' and gets an assembly dump filled with zeroes. This is at around 10:20 in the 'using gdb with skunkboard' video:
http://youtu.be/BFKp00xROcU?t=10m20s
This is what happens when I try to recreate it:
I think we discussed it before that I can now disassemble stuff I am just curious to why I can't do it like Tursi did in the video.Code: Select all
c:\stuff\m68k-elf\hello2>m68k-elf-gdb jagelf.bin GNU gdb (GDB) 7.5.1 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copyin and "show warranty" for details. This GDB was configured as "--host=i686-pc-mingw32 --target=m68k-elf". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from c:\stuff\m68k-elf\hello2\jagelf.bin...done. (gdb) target remote:4567 Remote debugging using :4567 0x00004000 in ?? () (gdb) disas No function contains program counter for selected frame. (gdb)
in your case, to do a disas, you must have the proper registers setup. By using the 'C' continue command.
You can also open the disassemble window to see the code instead to type the disas command.
In theory, you can set a breakpoint at your crt0 entry point, if you want to disasm the entry point of your code.
Last edited by flynn on Tue Feb 24, 2015 1:15 am, edited 1 time in total.
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
The change of color can only be done by either your own code, such as in the crt0 init stuff by example, or by the COF file used by jserve.a31chris wrote:When I put a breakpoint at main and step through on gdb command line it stops at main and a purple border pops up on my tv. I don't get that far with code::blocks. Or that never happens on my tv screen.
At this point a purple border has appeared on my tv screen.Code: Select all
No function contains program counter for selected frame. (gdb) load Loading section .text, size 0x408 lma 0x4000 Loading section .data, size 0x419 lma 0x4410 Start address 0x4000, load size 2081 Transfer rate: 3 KB/sec, 148 bytes/write. (gdb) disas No function contains program counter for selected frame. (gdb) load jagelf.bin Loading section .text, size 0x408 lma 0x4000 Loading section .data, size 0x419 lma 0x4410 Start address 0x4000, load size 2081 Transfer rate: 3 KB/sec, 148 bytes/write. (gdb) disas No function contains program counter for selected frame. (gdb) break ___main Breakpoint 1 at 0x43a8: file jag.c, line 51. (gdb) c Continuing. Breakpoint 1, ___main () at jag.c:51 51 jagscreen = (unsigned char *)&_vidmem; (gdb)
It worth to investigate for sure.
Questions: If you do not set any breakpoints, do the code change color appears?
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
I don't notice one a quick flash of color change. It just goes straight to white text on a black screen 'Hello Jag Users'. I will investigate later when I get off work.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
No flash of color. Nothing. Goes straight to 'hello Jag users' without a breakpoint in command line gdb.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Good, could you do the same action but within Code::Blocks now?a31chris wrote:No flash of color. Nothing. Goes straight to 'hello Jag users' without a breakpoint in command line gdb.
No breakpoints, just launching the code.
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
I have already done that a few times. It goes nowhere for some reason. Will do so again tonight.flynn wrote:Good, could you do the same action but within Code::Blocks now?a31chris wrote:No flash of color. Nothing. Goes straight to 'hello Jag users' without a breakpoint in command line gdb.
No breakpoints, just launching the code.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
What do you mean by "nowhere"? What do you have on your screen? A Black screen?a31chris wrote:I have already done that a few times. It goes nowhere for some reason. Will do so again tonight.flynn wrote:Good, could you do the same action but within Code::Blocks now?a31chris wrote:No flash of color. Nothing. Goes straight to 'hello Jag users' without a breakpoint in command line gdb.
No breakpoints, just launching the code.
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Yes the black screen produced when Jserve is connected. Nothing beyond that happens on the tv screen.flynn wrote:What do you mean by "nowhere"? What do you have on your screen? A Black screen?
Will run through this again in a couple hours.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Hum, ok. First time you use the 'c' continue command, it initializes stuff with GDB. Then to launch the code, you have to do a second 'c' continue.a31chris wrote:Yes the black screen produced when Jserve is connected. Nothing beyond that happens on the tv screen.flynn wrote:What do you mean by "nowhere"? What do you have on your screen? A Black screen?
Will run through this again in a couple hours.
I had a look at the jdb.cof source code, and I've found the switch of colors. It affects the background and the border colors. Turn 'black' when in run mode and should turn 'blue' when in trace mode.
Yes, I have written blue and not Purple/Pink color (the color we have actually). This is weird and I will investigate this. This coff file was generated with mac and aln in 2012 by Tursi (I guess), I will redo this coff with Smac / Vlink to see if there are any differences.
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
ok thanks Flynn. 

What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Odd thing is code::blocks is obviously working for you all the way through to display output.
Mine is just displaying simple text. I wonder why it's behaving this way with code::blocks on mine.
Mine is just displaying simple text. I wonder why it's behaving this way with code::blocks on mine.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
I do not have explanations at the moment, when I see your screenshots I see you are able to trace the code which is nice.a31chris wrote:Odd thing is code::blocks is obviously working for you all the way through to display output.
Mine is just displaying simple text. I wonder why it's behaving this way with code::blocks on mine.
I have notice your debug windows are on the left, mine are movable (I use 2 screens but it doesn't matter).
If the GDB command line works fine with your code, there are may be an issue with Code::Blocks which I didn't encountered yet.
Could you drop your source code example? At least, I can try with your stuff.
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
ok let me run through this again first though make sure I'm not missing anything.flynn wrote:I do not have explanations at the moment, when I see your screenshots I see you are able to trace the code which is nice.a31chris wrote:Odd thing is code::blocks is obviously working for you all the way through to display output.
Mine is just displaying simple text. I wonder why it's behaving this way with code::blocks on mine.
I have notice your debug windows are on the left, mine are movable (I use 2 screens but it doesn't matter).
If the GDB command line works fine with your code, there are may be an issue with Code::Blocks which I didn't encountered yet.
Could you drop your source code example? At least, I can try with your stuff.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Thank you for the zip file, I'm going to look at it.a31chris wrote:Breakpoint removed. Nothing. No screen flash no change to the black blank jserve waiting screen...Everything was started in admin mode 'run as...' Jserve and Code::Blocks.
Here is the entire 'hello jag users' elf directory I used with elf debug executable.
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
I have tried several times with your example and make it works everytime.
I had to do the Debugger configuration but I guess you did the same. Then, I tried with and without breakpoints. Here an example with breakpoints.
I had to do the Debugger configuration but I guess you did the same. Then, I tried with and without breakpoints. Here an example with breakpoints.
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
It worked everytime, so I do not know why it is not working at your side.
I have used my jserve 1.1a but it should not matter.
I have used my jserve 1.1a but it should not matter.
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Mine never says 'debug: continuing' if you look at mine.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
If you'll look you'll see mine never says... continuing...
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Weird it must be the old jcp or something.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
There is no need for the jcp, only jserve is used.a31chris wrote:Weird it must be the old jcp or something.
Do you select the correct GDB debugger when selecting the Active Debugger?
Otherwise, I do not see solutions at time of writing, you can try the jserve 1.1a just in case of.
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Ok thanks Dillinger.flynn wrote:There is no need for the jcp, only jserve is used.a31chris wrote:Weird it must be the old jcp or something.
Do you select the correct GDB debugger when selecting the Active Debugger?
Otherwise, I do not see solutions at time of writing, you can try the jserve 1.1a just in case of.
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman
Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Code blocks compiler fix: https://youtu.be/9RGpguL8e4w
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman