Otto1980 Posted May 15, 2013 Share Posted May 15, 2013 Hi all, im trying to debug with skunkboard (jserve.exe and jcp) the jseve.exe looks good .. reseted skunboard, green screen, i open, and ... ---------------------- (waiting on localhost:4567) -> so far so good ---------------------- but the jcp -c stucks at: ---------------------- C:\>jcp -c jcp v02.03.01 built on Oct 14 2009 Skip 0 bytes, base addr is $4000, length is 0 bytes Finished in 0 millis, 0KB/second. Starting console... ---------------------- any ideas? did i started the tools in correct order? (remark: one time he "waited for 68k handshake" but after waiting long time i aborted) Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted May 16, 2013 Share Posted May 16, 2013 I use the skunk console for debug all the time.. I am not sure what jserve is? If I have code that uses the console features I launch it with: jcp -c <filename> usually for me this is: jcp -c main.cof It will upload the file, execute it and connect to the console (Ctrl-C) to quit HTH Quote Link to comment Share on other sites More sharing options...
Otto1980 Posted May 16, 2013 Author Share Posted May 16, 2013 (edited) still same problem just as example... i take the startup.s example ... also skunk.s and assemble & link it together i do nothing else than: _start:: move.l #HELLOWORLD,a0 jsr skunkCONSOLEWRITE HELLOWORLD: .dc.b 'Hello, world!',13,0 should be able to debug this with console??? but it didnt work... reseted skunk... i run jserve.exe on PC and it turns jaguarscreen black jserve.exe shows: -------------------------------------------------------------------- Installed EZ-HOST stub: 60 scan codes sent COFF File: Skip 168 bytes, base addr is 2000, sending 2971 bytes...Send a block Installed! Establishing contact with Jaguar stub...Connected! Waiting on localhost:4567... -------------------------------------------------------------------- as skunkbord is not reseted now i cant upload with jcp -c startup.cof (for example) i took a look at GDB video on youtube ( ) ... but isnt it possible to debug without GDB? any ideas?.. i think i didnt understand something essencially Edited May 16, 2013 by Otto1980 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted May 16, 2013 Share Posted May 16, 2013 Some questions :- - Did you initialise the stack? - Did you call skunkRESET before skunkCONSOLEWRITE? - Where is the infinite loop code after the Skunk console write? Without that you'll execute the ASCII text! - Why are you linking for code execution starting at 0x2000? Quote Link to comment Share on other sites More sharing options...
Otto1980 Posted May 16, 2013 Author Share Posted May 16, 2013 1. no.. just the standardstack from the startup.s (the example from atari with the licensed logo) 2. yes.. skunkRESET then skunkCONSOLEWRITE ----------------------------------- _start:: move.l #HELLOWORLD,a0 jsr skunkRESET jsr skunkCONSOLEWRITE HELLOWORLD: .dc.b 'Hello, world!',13,0 ----------------------------------- 3. there is no infinite loop... just wanted to connect to debug... just wanted to see a living sign from jag to pc 4. i did nothing... it is done automatic by starting jserve.exe (looks like it takes the JDB.COF inside the skunkboard-source-gdb folder) How did you guys debug?? cant you explain step by step, or upload a litte example.zip? would be helpfull Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted May 16, 2013 Share Posted May 16, 2013 Please post the whole source file that contains your code above. Then at least its possible to look at the whole execution path. At the moment we have to guess and thats not very productive. 1 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted May 16, 2013 Share Posted May 16, 2013 When I am at a machine with net access I will have a look at my debug lib and see if there are any bits in there that you missed. May be worth sticking a loop at the end as groovy suggested. I have no experience of jserve, I only use jcp. (Jcp -r will reset the jag btw) Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted May 16, 2013 Share Posted May 16, 2013 Had a thought that may help with debug that I use (sometimes the skunk console stuff can be flakey and cause weird issues) Before your move.l put Move.w #$0440,BG This should change your screens colour, so you can quickly check that execution got at least that far. If it does, move it to after the jsr, quick and dirty "got here" mechanism. (Don't forget to remove the previous move.w natch ) 2 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted May 16, 2013 Share Posted May 16, 2013 OK, got to my code now In my debug init routine after running the skunkRESET call, I call skunkNOP twice. Otherwise my code is the same. One thing I did discover is that if the message starts on an odd address this would cause the skunk code to fail. In your example this shouldn't be the case, but is worth bearing in mind for the future. HTH Quote Link to comment Share on other sites More sharing options...
Otto1980 Posted May 16, 2013 Author Share Posted May 16, 2013 okay.. you guys are the best.. i created the test again from scratch (using startup.s) the make file: #====================================================================# Macro & Assembler flags #==================================================================== STADDR = 4000 MACFLAGS = -fb -g ALNFLAGS = -v -v -e -g -l -rd -a $(STADDR) x x #==================================================================== # Default Rules #==================================================================== .SUFFIXES: .o .s .s.o: smac $(MACFLAGS) $* #.tga.rgb: # dorgb $*.rgb $< #==================================================================== # EXECUTABLES #==================================================================== OBJ = startup.o skunk.o startup.cof: $(OBJ) sln $(ALNFLAGS) -o startup.cof $(OBJ) startup.o: startup.s skunk.o: skunk.s the startup.s file: ;-----------------------------------------------------------------------------; Warning!!! Warning!!! Warning!!! Warning!!! Warning!!! Warning!!! Warning!!! ; Warning!!! Warning!!! Warning!!! Warning!!! Warning!!! Warning!!! Warning!!! ;----------------------------------------------------------------------------- ; Do not change any of the code in this file except where explicitly noted. ; Making other changes can cause your program's startup code to be incorrect. ;----------------------------------------------------------------------------- ;---------------------------------------------------------------------------- ; Jaguar Development System Source Code ; Copyright ©1995 Atari Corp. ; ALL RIGHTS RESERVED ; ; Module: startup.s - Hardware initialization/License screen display ; ; Revision History: ; 1/12/95 - SDS: Modified from MOU.COF sources. ; 2/28/95 - SDS: Optimized some code from MOU.COF. ; 3/14/95 - SDS: Old code preserved old value from INT1 and OR'ed the ; video interrupt enable bit. Trouble is that could cause ; pending interrupts to persist. Now it just stuffs the value. ; 4/17/95 - MF: Moved definitions relating to startup picture's size and ; filename to top of file, separate from everything else (so ; it's easier to swap in different pictures). ;---------------------------------------------------------------------------- ; Program Description: ; Jaguar Startup Code ; ; Steps are as follows: ; 1. Set GPU/DSP to Big-Endian mode ; 2. Set VI to $FFFF to disable video-refresh. ; 3. Initialize a stack pointer to high ram. ; 4. Initialize video registers. ; 5. Create an object list as follows: ; BRANCH Object (Branches to stop object if past display area) ; BRANCH Object (Branches to stop object if prior to display area) ; BITMAP Object (Jaguar License Acknowledgement - see below) ; STOP Object ; 6. Install interrupt handler, configure VI, enable video interrupts, ; lower 68k IPL to allow interrupts. ; 7. Use GPU routine to stuff OLP with pointer to object list. ; 8. Turn on video. ; 9. Jump to _start. ; ; Notes: ; All video variables are exposed for program use. 'ticks' is exposed to allow ; a flicker-free transition from license screen to next. gSetOLP and olp2set ; are exposed so they don't need to be included by exterior code again. ;----------------------------------------------------------------------------- .include "jaguar.inc" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Begin STARTUP PICTURE CONFIGURATION -- Edit this to change startup picture ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PPP .equ 4 ; Pixels per Phrase (1-bit) BMP_WIDTH .equ 128 ; Width in Pixels BMP_HEIGHT .equ 60 ; Height in Pixels ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Change this macro as necessary. Games published by Atari but created by a ; third-party should use "LICENSED TO" screen. Games published and ; created by a third-party company should use "LICENSED BY" screen. ; Comment out the line for the screen you don't need. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .macro license_logo .incbin "lt_box.rgb" ; "Licensed To Atari Corp." ; .incbin "/jaguar/startup/lb_box.rgb" ; "Licensed By Atari Corp." .endm ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; End of STARTUP PICTURE CONFIGURATION ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Globals .globl gSetOLP .globl olp2set .globl ticks .globl a_vdb .globl a_vde .globl a_hdb .globl a_hde .globl width .globl height ; Externals .extern skunkRESET .extern skunkRESET6MB .extern skunkNOP .extern skunkCONSOLEWRITE .extern skunkCONSOLECLOSE .extern skunkCONSOLEREAD .extern skunkFILEOPEN .extern skunkFILEWRITE .extern skunkFILEREAD .extern skunkFILECLOSE BMP_PHRASES .equ (BMP_WIDTH/PPP) ; Width in Phrases BMP_LINES .equ (BMP_HEIGHT*2) ; Height in Half Scanlines BITMAP_OFF .equ (2* ; Two Phrases LISTSIZE .equ 5 ; List length (in phrases) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Program Entry Point Follows... .text move.l #$70007,G_END ; big-endian mode move.l #$70007,D_END move.w #$FFFF,VI ; disable video interrupts move.l #INITSTACK,a7 ; Setup a stack jsr InitVideo ; Setup our video registers. jsr InitLister ; Initialize Object Display List jsr InitVBint ; Initialize our VBLANK routine ;;; Sneaky trick to cause display to popup at first VB move.l #$0,listbuf+BITMAP_OFF move.l #$C,listbuf+BITMAP_OFF+4 move.l d0,olp2set ; D0 is swapped OLP from InitLister move.l #gSetOLP,G_PC ; Set GPU PC move.l #RISCGO,G_CTRL ; Go! waitforset: move.l G_CTRL,d0 ; Wait for write. andi.l #$1,d0 bne waitforset move.w #$6C7,VMODE ; Configure Video jmp _start ; Jump to main code _start:: jsr skunkRESET jsr skunkNOP jsr skunkNOP move.l #HELLOWORLD,a0 jsr skunkCONSOLEWRITE HELLOWORLD: .dc.b 'Hello, world!',13,0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Procedure: gSetOLP ; Use the GPU to set the OLP and quit. ; ; Inputs: olp2set - Variable contains pre-swapped value to stuff OLP with. ; ; NOTE!!!: This code can run in DRAM only because it contains no JUMP's or ; JR's. It will generate a warning with current versions of MADMAC ; because it doesn't '.ORG'. ; .long .gpu gSetOLP: movei #olp2set,r0 ; Read value to write load (r0),r1 movei #OLP,r0 ; Store it store r1,(r0) moveq #0,r0 ; Stop GPU movei #G_CTRL,r1 store r0,(r1) nop ; Two "feet" on the brake pedal nop .68000 .bss .long olp2set: .ds.l 1 ; GPU Code Parameter .text ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Procedure: InitVBint ; Install our vertical blank handler and enable interrupts ; InitVBint: move.l d0,-(sp) move.l #UpdateList,LEVEL0 ; Install 68K LEVEL0 handler move.w a_vde,d0 ; Must be ODD ori.w #1,d0 move.w d0,VI move.w #C_VIDENA,INT1 ; Enable video interrupts move.w sr,d0 and.w #$F8FF,d0 ; Lower 68k IPL to allow move.w d0,sr ; interrupts move.l (sp)+,d0 rts ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Procedure: InitVideo (same as in vidinit.s) ; Build values for hdb, hde, vdb, and vde and store them. ; InitVideo: movem.l d0-d6,-(sp) move.w CONFIG,d0 ; Also is joystick register andi.w #VIDTYPE,d0 ; 0 = PAL, 1 = NTSC beq palvals move.w #NTSC_HMID,d2 move.w #NTSC_WIDTH,d0 move.w #NTSC_VMID,d6 move.w #NTSC_HEIGHT,d4 bra calc_vals palvals: move.w #PAL_HMID,d2 move.w #PAL_WIDTH,d0 move.w #PAL_VMID,d6 move.w #PAL_HEIGHT,d4 calc_vals: move.w d0,width move.w d4,height move.w d0,d1 asr #1,d1 ; Width/2 sub.w d1,d2 ; Mid - Width/2 add.w #4,d2 ; (Mid - Width/2)+4 sub.w #1,d1 ; Width/2 - 1 ori.w #$400,d1 ; (Width/2 - 1)|$400 move.w d1,a_hde move.w d1,HDE move.w d2,a_hdb move.w d2,HDB1 move.w d2,HDB2 move.w d6,d5 sub.w d4,d5 move.w d5,a_vdb add.w d4,d6 move.w d6,a_vde move.w a_vdb,VDB move.w #$FFFF,VDE move.l #0,BORD1 ; Black border move.w #0,BG ; Init line buffer to black movem.l (sp)+,d0-d6 rts ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; InitLister: Initialize Object List Processor List ; ; Returns: Pre-word-swapped address of current object list in d0.l ; ; Registers: d0.l/d1.l - Phrase being built ; d2.l/d3.l - Link address overlays ; d4.l - Work register ; a0.l - Roving object list pointer InitLister: movem.l d1-d4/a0,-(sp) ; Save registers lea listbuf,a0 move.l a0,d2 ; Copy add.l #(LISTSIZE-1)*8,d2 ; Address of STOP object move.l d2,d3 ; Copy for low half lsr.l #8,d2 ; Shift high half into place lsr.l #3,d2 swap d3 ; Place low half correctly clr.w d3 lsl.l #5,d3 ; Write first BRANCH object (branch if YPOS > a_vde ) clr.l d0 move.l #(BRANCHOBJ|O_BRLT),d1 ; $4000 = VC < YPOS or.l d2,d0 ; Do LINK overlay or.l d3,d1 move.w a_vde,d4 ; for YPOS lsl.w #3,d4 ; Make it bits 13-3 or.w d4,d1 move.l d0,(a0)+ move.l d1,(a0)+ ; Write second branch object (branch if YPOS < a_vdb) ; Note: LINK address is the same so preserve it andi.l #$FF000007,d1 ; Mask off CC and YPOS ori.l #O_BRGT,d1 ; $8000 = VC > YPOS move.w a_vdb,d4 ; for YPOS lsl.w #3,d4 ; Make it bits 13-3 or.w d4,d1 move.l d0,(a0)+ move.l d1,(a0)+ ; Write a standard BITMAP object move.l d2,d0 move.l d3,d1 ori.l #BMP_HEIGHT<<14,d1 ; Height of image move.w height,d4 ; Center bitmap vertically sub.w #BMP_HEIGHT,d4 add.w a_vdb,d4 andi.w #$FFFE,d4 ; Must be even lsl.w #3,d4 or.w d4,d1 ; Stuff YPOS in low phrase move.l #license,d4 lsl.l #8,d4 or.l d4,d0 move.l d0,(a0)+ move.l d1,(a0)+ movem.l d0-d1,bmpupdate ; Second Phrase of Bitmap move.l #BMP_PHRASES>>4,d0 ; Only part of top LONG is IWIDTH move.l #O_DEPTH16|O_NOGAP,d1 ; Bit Depth = 16-bit, Contiguous data move.w width,d4 ; Get width in clocks lsr.w #2,d4 ; /4 Pixel Divisor sub.w #BMP_WIDTH,d4 lsr.w #1,d4 or.w d4,d1 ori.l #(BMP_PHRASES<<18)|(BMP_PHRASES<<28),d1 ; DWIDTH|IWIDTH move.l d0,(a0)+ move.l d1,(a0)+ ; Write a STOP object at end of list clr.l (a0)+ move.l #(STOPOBJ|O_STOPINTS),(a0)+ ; Now return swapped list pointer in D0 move.l #listbuf,d0 swap d0 movem.l (sp)+,d1-d4/a0 rts ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Procedure: UpdateList ; Handle Video Interrupt and update object list fields ; destroyed by the object processor. UpdateList: move.l a0,-(sp) move.l #listbuf+BITMAP_OFF,a0 move.l bmpupdate,(a0) ; Phrase = d1.l/d0.l move.l bmpupdate+4,4(a0) add.l #1,ticks ; Increment ticks semaphore move.w #$101,INT1 ; Signal we're done move.w #$0,INT2 move.l (sp)+,a0 rte ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .data .phrase license: license_logo .bss .dphrase listbuf: .ds.l LISTSIZE*2 ; Object List bmpupdate: .ds.l 2 ; One Phrase of Bitmap for Refresh ticks: .ds.l 1 ; Incrementing # of ticks a_hdb: .ds.w 1 a_hde: .ds.w 1 a_vdb: .ds.w 1 a_vde: .ds.w 1 width: .ds.w 1 height: .ds.w 1 .end now it works and in my comandwindow "hello world" occurs i have to check whats the difference between the old stuff.. (i used cry mode, another pic and some small changes.. dont know) i will mess around a little later this evening.. but i realy would love to see a small tutorial of how communication and debuggin with skunkboard.. in all directions... would be helpfull.. you know i am not a oldscool atariscene asm coder... i am a .net,php,sql blabla coder ... newer generation and its hard to get into asm and also double that hard without enough examples... and 3times that hard without debuggine however... help me to understand a little and i will definitly code something nice for the jag Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted May 16, 2013 Share Posted May 16, 2013 You have pretty much one of the more useful aspects (as I have found) for using skunk to debug right there. I would suggest putting together your own little libry of useful skunk console debug tools. Then you can easily use them in multiple projects by just including the source file. (I *MAY* release mine if I spend some time tidying it up and making it a bit less of a mess ) I would suggest you play with the skunkWRITEFILE call too, VERY useful.. I have used it a fair amount when working on the SoundEngine. I would get the generated output and write it to a chunk of RAM and then dump that to a file on the PC.. This woudl then allow me to load it into a sample editor etc and see what was going on. The same would be true for say dumping all your variable memory.. or even reading it back into your jag (think point in time memory snapshots for your code!) Be careful though, the skunk console output isn't fast and you can easily drag your jag's performance down by repeatedly calling them within loops. Don't expect to get an output like the Alpine tools either, unless you write one, and even then it's going to be heavy on your console resources, but this doesn't stop the consle being massievly useful! Keep on trucking, happy to help out when I have a few minutes here and there, so far struggling to find time to work on my own things 2 Quote Link to comment Share on other sites More sharing options...
Otto1980 Posted March 21, 2014 Author Share Posted March 21, 2014 (edited) hi there,as i tested today the skunkboard console skunkWRITEFILE i noticed that it writes nothing into my dumpfile.txt and the console hangs :-(any idea? i am using windows (7)i did a very trivial test (nearly 1:1 as in the skunkboard PDF description)can someone test it with his dev env?would be helpfull so i can see if the problem is my PC http://www.hochrhein-it.de/tmp/jaguar/SkunkDebug.zip greetz to all jagcoders Edited March 21, 2014 by Otto1980 Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted March 21, 2014 Share Posted March 21, 2014 Source looks OK, few things, I'd suggest putting .EVEN before any text string you are passing to the skunklib, I found that if you pass it an odd address it can get upset, not looked into it, but I found that this seemed to work. Also are you running jcp in console mode? jcp -c <filename> If you just run standard jcp <filename> then the console won't attach and the skunk will sit there waiting for the buffers to empty and the 68K will sit waiting too. If you do start with just jcp, you can then run jcp -c without a filename to reconnect the console, but I would just combine the two commands HTH Quote Link to comment Share on other sites More sharing options...
ggn Posted March 22, 2014 Share Posted March 22, 2014 The size of the data you're transmitting might be the key - 4 years ago when I was messing around (with my debugging console -sh3- about 4000km away from me ) I noticed that it would hang with too large chunk sizes. In the end I settled down to the magic number of 32 which seems robust enough. For a 100% working example have a look at http://reboot.atari.org/new-reboot/skunkryptor.html HTH. Quote Link to comment Share on other sites More sharing options...
Otto1980 Posted March 22, 2014 Author Share Posted March 22, 2014 (edited) thanks.. tryed it with .EVEN.. also tryed 32 also tested on win8.1 ... still same problem no success.. can you guys try to run this code? same effect on your env? @Linko: of course jcp -c Edited March 22, 2014 by Otto1980 Quote Link to comment Share on other sites More sharing options...
JagChris Posted March 22, 2014 Share Posted March 22, 2014 (edited) Make sure all the files are updated. There was a bug in the JCP program or jserve that Tursi had to fix last summer when we were working through this. I can't remember which one had the bug. This may be the problem. Hi all,im trying to debug with skunkboard (jserve.exe and jcp)the jseve.exe looks good ..reseted skunboard, green screen, i open, and ...----------------------(waiting on localhost:4567) -> so far so good----------------------but the jcp -c stucks at:----------------------C:\>jcp -cjcp v02.03.01 built on Oct 14 2009Skip 0 bytes, base addr is $4000, length is 0 bytesFinished in 0 millis, 0KB/second.Starting console...----------------------any ideas?did i started the tools in correct order?(remark: one time he "waited for 68k handshake" but after waiting long time i aborted) Edited March 22, 2014 by JagChris Quote Link to comment Share on other sites More sharing options...
Otto1980 Posted March 22, 2014 Author Share Posted March 22, 2014 they are up to date.. downloaded freshly and replaced... would be good if someone can download the example.. and give it a short make and run so i would know is it my environment or is it the code Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 3, 2014 Share Posted April 3, 2014 I am back in Blighty but not had chance to fire up my Jag yet to check, when I get a few minutes I'll have a quick look over your code see if I can spot anything. Quote Link to comment Share on other sites More sharing options...
JagChris Posted April 3, 2014 Share Posted April 3, 2014 I don't think GDB is setup in this case to work with anything but C and ELF. You'll probably have to use whatever Linko set up for debugging straight assembly. Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 3, 2014 Share Posted April 3, 2014 Nope, gdb doesn't require C. At the point where he connects to the skunk with GDB he runs the command 'disassemble' which shows a disassembly of the machine code at the address (1st time it's all 0's as he has forgotten to load the code). Remember C is a compiled language, the Jag doesn't actually run C, it is converted into machine code by the compiler. So you could disassemble it back to 68K if you liked (I'd imagine it would look hideous). He is even using COFF files in the example. Never really looked at using jserve and gdb before, may give it a whirl some time, could have some uses. Debugging is just the name given to the process of finding and removing bugs from code, I quite often use things like changing the colour of the screen as a mechanism for debugging, and a very very useful tool it is too. Quote Link to comment Share on other sites More sharing options...
JagChris Posted April 3, 2014 Share Posted April 3, 2014 OK. I am just use to C needing to have debug symbols put into the code which is what ELF does and I think the a.out format has something like that as well. I did not imagine you had to use GDB only with C I was just not aware of a way to use GDB without debug symbols being put into the mix. Nope, gdb doesn't require C. At the point where he connects to the skunk with GDB he runs the command 'disassemble' which shows a disassembly of the machine code at the address (1st time it's all 0's as he has forgotten to load the code). Remember C is a compiled language, the Jag doesn't actually run C, it is converted into machine code by the compiler. So you could disassemble it back to 68K if you liked (I'd imagine it would look hideous). He is even using COFF files in the example. Never really looked at using jserve and gdb before, may give it a whirl some time, could have some uses. Debugging is just the name given to the process of finding and removing bugs from code, I quite often use things like changing the colour of the screen as a mechanism for debugging, and a very very useful tool it is too. Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 3, 2014 Share Posted April 3, 2014 (edited) Debug symbols can be put in pretty much anything. Each format will have it's own pro's and cons as they have evolved over time: http://en.wikipedia.org/wiki/Comparison_of_executable_file_formats Bit more detail on Symbol Tables: http://en.wikipedia.org/wiki/Symbol_table Edited April 3, 2014 by LinkoVitch Quote Link to comment Share on other sites More sharing options...
JagChris Posted April 3, 2014 Share Posted April 3, 2014 Yeah I am aware of that though I was not aware of any mechanism in place to do it on the Jaguar except for using GCC. I'll read this more closely. In what other ways is it implemented on the Jaguar if you have time to elaborate? Debug symbols can be put in pretty much anything. Each format will have it's own pro's and cons as they have evolved over time: http://en.wikipedia.org/wiki/Comparison_of_executable_file_formats Bit more detail on Symbol Tables: http://en.wikipedia.org/wiki/Symbol_table Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted April 3, 2014 Share Posted April 3, 2014 ALN/SLN/RLN will all leave symbols in the output if you ask them too. GCC produces the same sort of binary files as MADMAC/ALN. Not quite sure if I have understood what you have asked me to elaborate on Quote Link to comment Share on other sites More sharing options...
JagChris Posted April 3, 2014 Share Posted April 3, 2014 I was reading up on the debug symbol wiki. Some of them use a separate file to hold the debug info to save on space. That would be useful on the Jag where the debug info can make the file quite a bit bigger. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.