Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Let's get coding!

Moderator: a31chris

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Sun Feb 22, 2015 6:02 pm

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

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Sun Feb 22, 2015 6:08 pm

a31chris wrote:No I did not run it in administrator mode. I will do that this evening.
I think you did this before and it was running : http://3do.cdinteractive.co.uk/viewtopi ... 601#p38787

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Sun Feb 22, 2015 6:35 pm

flynn wrote:
a31chris wrote:No I did not run it in administrator mode. I will do that this evening.
I think you did this before and it was running : http://3do.cdinteractive.co.uk/viewtopi ... 601#p38787
Whoops! Haha!
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

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Mon Feb 23, 2015 4:30 am

a31chris wrote:Even with the old JCP, we have success!!
Looks nice. :-)

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Mon Feb 23, 2015 6:48 am

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.

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

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Mon Feb 23, 2015 7:04 am

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:

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)
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.
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

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Mon Feb 23, 2015 7:16 am

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.

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)
At this point a purple border has appeared on my tv screen.
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

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Mon Feb 23, 2015 6:10 pm

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:

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)
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.
I do not know how Tursi did it may be pervious GDB version had their own way.
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.

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Mon Feb 23, 2015 6:15 pm

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.

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)
At this point a purple border has appeared on my tv screen.
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.
It worth to investigate for sure.
Questions: If you do not set any breakpoints, do the code change color appears?

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Mon Feb 23, 2015 6:42 pm

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

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Tue Feb 24, 2015 4:47 am

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

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Tue Feb 24, 2015 3:40 pm

a31chris wrote:No flash of color. Nothing. Goes straight to 'hello Jag users' without a breakpoint in command line gdb.
Good, could you do the same action but within Code::Blocks now?
No breakpoints, just launching the code.

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Tue Feb 24, 2015 5:35 pm

flynn wrote:
a31chris wrote:No flash of color. Nothing. Goes straight to 'hello Jag users' without a breakpoint in command line gdb.
Good, could you do the same action but within Code::Blocks now?
No breakpoints, just launching the code.
I have already done that a few times. It goes nowhere for some reason. Will do so again tonight.
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

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Tue Feb 24, 2015 6:07 pm

a31chris wrote:
flynn wrote:
a31chris wrote:No flash of color. Nothing. Goes straight to 'hello Jag users' without a breakpoint in command line gdb.
Good, could you do the same action but within Code::Blocks now?
No breakpoints, just launching the code.
I have already done that a few times. It goes nowhere for some reason. Will do so again tonight.
What do you mean by "nowhere"? What do you have on your screen? A Black screen?

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Tue Feb 24, 2015 10:49 pm

flynn wrote:What do you mean by "nowhere"? What do you have on your screen? A Black screen?
Yes the black screen produced when Jserve is connected. Nothing beyond that happens on the tv 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

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Tue Feb 24, 2015 11:02 pm

a31chris wrote:
flynn wrote:What do you mean by "nowhere"? What do you have on your screen? A Black screen?
Yes the black screen produced when Jserve is connected. Nothing beyond that happens on the tv screen.

Will run through this again in a couple hours.
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.

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.

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Tue Feb 24, 2015 11:12 pm

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

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Wed Feb 25, 2015 1:14 am

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.
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

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Wed Feb 25, 2015 1:45 am

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 do not have explanations at the moment, when I see your screenshots I see you are able to trace the code which is nice.
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.

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Wed Feb 25, 2015 3:32 am

flynn wrote:
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 do not have explanations at the moment, when I see your screenshots I see you are able to trace the code which is nice.
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.
ok let me run through this again first though make sure I'm not missing anything.
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

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Thu Feb 26, 2015 1:08 am

a31chris wrote:Breakpoint removed. Nothing. No screen flash no change to the black blank jserve waiting screen...
code_blocks shot.jpg
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.
hello2.zip
Thank you for the zip file, I'm going to look at it.

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Thu Feb 26, 2015 3:13 am

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.
HelloJaguarGDBDebugger.jpg
Debugger configuration
HelloJaguarGDBDebugger.jpg (160.59 KiB) Viewed 4989 times
HelloJaguarActiveDebuggers.jpg
Debugger selection
HelloJaguarActiveDebuggers.jpg (132.53 KiB) Viewed 4989 times
Then, I tried with and without breakpoints. Here an example with breakpoints.
HelloJaguarWithBrks_1.jpg
Result with Breakpoints.
HelloJaguarWithBrks_1.jpg (208.03 KiB) Viewed 4989 times

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Thu Feb 26, 2015 3:15 am

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.
HelloJaguarWithoutBrks_1.jpg
Example without breakpoints.
HelloJaguarWithoutBrks_1.jpg (197.33 KiB) Viewed 4989 times

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Thu Feb 26, 2015 4:14 am

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

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Thu Feb 26, 2015 4:16 am

If you'll look you'll see mine never says... continuing...
no continue.jpg
no continue.jpg (26.34 KiB) Viewed 4983 times
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

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Thu Feb 26, 2015 4:17 am

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

flynn
3DO ZERO USER
Posts: 49
Joined: Tue Dec 09, 2014 12:59 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by flynn » Thu Feb 26, 2015 4:25 am

a31chris wrote:Weird it must be the old jcp or something.
There is no need for the jcp, only jserve is used.
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.

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Thu Feb 26, 2015 4:35 am

flynn wrote:
a31chris wrote:Weird it must be the old jcp or something.
There is no need for the jcp, only jserve is used.
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.
Ok thanks Dillinger.
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

User avatar
a31chris
Jaguar MOD
Posts: 832
Joined: Mon Apr 01, 2013 7:09 am

Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)

Post by a31chris » Sat Dec 24, 2016 12:21 am

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

Post Reply