02 August 2021, 12:00 | #1 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Devpac Debug hunks
When you assemble with debug info enabled in Devpac, you get a free floating
HUNK_DEBUGlabeled HEADDBGV01, directly following the header, and debug hunks labeled HCLNfor each section. Is the Devpac debug format documented somewhere? The HCLNparts certainly tell you which source text line number belongs to which hunk offset? |
02 August 2021, 15:56 | #2 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,039
|
Some info here http://eab.abime.net/showthread.php?t=63895 that leads to wiki: http://amiga-dev.wikidot.com/file-format:hunk#toc23
|
03 August 2021, 12:01 | #3 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
The HEADDBGV01 part is still mysterious, but HCLN seems sufficiently reengineered. Thanks a lot!
I guess that Devpac's MonAm will read both, Devpac-HCLN and SAS/C-LINE DEBUG hunks. So there is no real need to support HCLN, but the compressed format saves quite some space. |
03 August 2021, 14:40 | #4 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
I sent a mail to the developer, don’t know if his address is still valid though.
|
03 August 2021, 16:54 | #5 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Great!
Maybe I can implement it as an alternative line-debug format in vasm, once I have all information. |
03 August 2021, 17:29 | #6 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
His answer.
« Wow, hi Kamel, yeah that is a serious memory test. If HEADDBGV01 is unique to Devpac, then I probably invented it, and it might be similar to debug formats on the Atari ST (which I have slightly better memory of). If it is not unique to Devpac, then it may have come from Lattice C - they created debug formats when they did their C compiler and I would have re-used their stuff, as HiSoft had the license to port it to the Atari. Sorry but that's about all I can recall from back then. » |
03 August 2021, 22:37 | #7 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Quote:
Otherwise, I'm also interested in Atari object file formats. Especially in the DRI object file format Devpac generates. I reengineered some reloc types, like 0x0000 (no relocation), 0x0001 (data reloc), 0x002 (text reloc), 0x0003 (bss reloc), 0x0004 (external references). But lots of details are missing to output real DRI objects. The format is nowhere documented, AFAIK. Would be great to preserve it. Quote:
|
||
06 August 2021, 08:54 | #8 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
More info, I asked Andy if he wanna join to answer directly here will see.
« I found the source code to a linker I wrote (I don’t even remember writing a linker after I left HiSoft, but clearly I did, even though I have no idea why), and it seems to emit Amiga debug info. I also found the source to my Atari debugger which read Atari debug info. I did find the source code to devpac, but it is in encrypted LZH and ARC files. Project for another day… » |
06 August 2021, 12:58 | #9 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Sounds great! Any information is much appreciated.
|
08 August 2021, 12:20 | #10 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
Andy sent me 3 C files I’ll upload them during the day in the zone.
update: files put in the zones for PHX I hope that it'll help improve Devpac support. Last edited by kamelito; 08 August 2021 at 23:39. |
09 August 2021, 14:08 | #11 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Wow! That's great. Seems to include a lot of information I need. I will work through it in the following weeks. Maybe I can add HCLN source level debugging to the Amiga output module and real DRI object files for the Atari output module now. Thanks!
Eventually I should also document the format on my home page, so the information is preserved for the future. |
09 August 2021, 15:49 | #12 |
Registered User
Join Date: Aug 2021
Location: Kirkland, WA, USA
Posts: 3
|
Hope my old code is useful. It was some of the earliest real C code I ever wrote, so forgive me.
|
09 August 2021, 17:23 | #13 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
Thanks Andy, it is much appreciated, it would be nice to have Devpac open sourced but it is in Hisoft hands.
|
09 August 2021, 21:25 | #14 |
Registered User
Join Date: Jun 2020
Location: Another World
Posts: 28
|
Thanks a lot for sharing this :-)
|
09 August 2021, 21:41 | #15 |
AmigaMan
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
|
|
10 August 2021, 20:44 | #16 | |
Registered User
Join Date: Sep 2019
Location: Leicester / England
Posts: 201
|
Quote:
+1 to this I've been doing some work resourcing it with a view to fixing some bugs with source that assembles fine in v2.x but flat out refuses in v3.x, yet assembles with other assemblers I've tried and even shows correctly in MonAm. It would be so much easier if the code was available. |
|
11 August 2021, 05:02 | #17 |
Registered User
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,544
|
|
12 August 2021, 13:05 | #18 |
Registered User
Join Date: Sep 2019
Location: Leicester / England
Posts: 201
|
I would, but everything now seems to be assembling fine on my Devpac 3 installation
On My A500 and then A1200, I originally had Devpac 2 and wrote a load of code, most never to be looked at again. When I upgraded my A500 to Kickstart 2.0.4, I upgraded to Devpac 3, specifically 3.04. Last year, I restored my Amiga installation in WinUAE from the Quarterback backups of my physical A1200 and started looking through my old code. There were a few different errors I had assembling Devpac 2 code in Devpac 3, but the most common one I can remember was code with "bset.b #<number_0_to_7>,<memory_address>" which failed to assemble with an error like "invalid size". I could fix it by altering my code to remove the .b as this is implied with the destination being a memory address anyway, but it assembled fine in vasm with the "-devpac" option enabled. Since doing the restore, I have rebuilt my installation from scratch using the original ADF images of my own disks and had been working on resourcing GenAm to fix this, but hadn't actually tried assembling these things again until I was in a position to fix things. Having just tried now, everything I tried assembled fine, I can only assume I had a rogue setting in my restored GenAm.opts file which resulted in the error message and the assembly failing. When I get a chance, I'll see if this fixes the other errors I was getting and I'll also restore my QB backup and compare the configurations to see what is different. Last edited by Exodous; 12 August 2021 at 13:06. Reason: Typo |
06 July 2023, 17:04 | #19 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
I got an email from Andy today it is Atari ST related but might interest some of you.
https://github.com/amp64/Atari_ST |
07 July 2023, 15:00 | #20 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,214
|
Just to add to this, thanks to this information, SegTracker now also allows reading and storing debug information such that my usual collection of debugging tools can pick up function names and line number information.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to use overlay hunks? | Mrs Beanbag | Coders. System | 21 | 22 January 2024 17:44 |
Hunks | BippyM | Coders. General | 42 | 27 May 2022 02:02 |
Devpac & Devpac 2 manuals? | RetrogamerRhys | Coders. Asm / Hardware | 3 | 03 February 2020 16:47 |
Devpac II or Devpac 3 assembler with manual. | RetrogamerRhys | MarketPlace | 2 | 01 February 2020 18:33 |
Amiga Exe Hunks | heavy | Coders. General | 4 | 16 August 2007 00:20 |
|
|