Re: Visual GUI: Debug w/Skunkboard, GDB & Code::Blocks(M68k)
Posted: Sun Feb 22, 2015 6:02 pm
No I did not run it in administrator mode. I will do that this evening.
The Only R.E.A.L. 3DO Experience.
http://3do.cdinteractive.co.uk/
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.
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.
Looks nice.a31chris wrote:Even with the old JCP, we have success!!
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.
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)
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)
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)
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)
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.
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 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.
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?
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 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.
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.
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.
There is no need for the jcp, only jserve is used.a31chris wrote:Weird it must be the old jcp or something.
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.