English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 24 June 2023, 06:38   #1
Haplo
Registered User
 
Join Date: Sep 2019
Location: Sydney
Age: 47
Posts: 60
Questions about vasm and ‘-linedebug’

Hi all,

I have a few questions about the ‘-linedebug’ command line option of vasm.

(compiling with "vasmm68k_mot.exe -m68000 -kick1hunks -Fhunkexe")

1. The documentation says "Automatically generate an SAS/C-compatible LINE DEBUG hunk for the input source. Overrides any line debugging directives from the source text". However, I have not been able to find any documentation on these "line debugging directives" that can be placed in the source file instead. For example, is it possible to enable line debugging for a certain source file only?

2. My test application is about 140KB. When I add 30k of level data, it becomes 410KB which is a 270K increase. I have confirmed that this blow-out is due to "-line-debug", without it the size increases by only 30K as expected. The level data is about 1200 lines of "dc.b", each line containing 24 bytes of data. Is it expected that line debugging information is getting generated for each of these "dc.b" lines?

3. In general, if an application is 300k but line debugging information blows out its size to 600k, will loading it in a vanilla A500 cause any problems? I assume the loader will throw all this debugging information away and not allocate any memory for it...

Thanks!
Haplo is offline  
Old 24 June 2023, 20:25   #2
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,510
-linedebug

Quote:
Originally Posted by Haplo View Post
1. The documentation says "Automatically generate an SAS/C-compatible LINE DEBUG hunk for the input source. Overrides any line debugging directives from the source text". However, I have not been able to find any documentation on these "line debugging directives" that can be placed in the source file instead.
Indeed, they are not documented, because they are only useful for assembler output generated by a High Level Language (usually C) compiler. There is
dsource
to define the absolute path to the HLL source text file. And
debug
to define the original HLL source text line the following code belongs to. These directives are the same as in the PhxAss assembler, which was used with vbcc before vasm.

Quote:
For example, is it possible to enable line debugging for a certain source file only?
Sure. Either assemble that certain source file with or without
-linedebug
.

But if you refering to source texts included into the main source, or the possibility to disable generation of line-debug information for certain parts of the source, then the answer is currently no.

The line-debug information enabled by
-linedebug
is generated by the hunk-format output module, which can no longer determine what has been code or data. Although it doesn't generate them for
BSS
sections.

Maybe another directive, to control that line-debug generation for certain parts of the source could be added, when really needed.

Quote:
Originally Posted by Haplo View Post
2. My test application is about 140KB. When I add 30k of level data, it becomes 410KB which is a 270K increase. I have confirmed that this blow-out is due to "-line-debug", without it the size increases by only 30K as expected. The level data is about 1200 lines of "dc.b", each line containing 24 bytes of data. Is it expected that line debugging information is getting generated for each of these "dc.b" lines?
Yes. See above.

Quote:
Originally Posted by Haplo View Post
3. In general, if an application is 300k but line debugging information blows out its size to 600k, will loading it in a vanilla A500 cause any problems? I assume the loader will throw all this debugging information away and not allocate any memory for it...
Exactly.
LoadSeg()
just skips anything in a
HUNK_DEBUG
hunk. A debugger would need to process the executable's hunk structure again.
phx is offline  
Old 25 June 2023, 01:44   #3
Haplo
Registered User
 
Join Date: Sep 2019
Location: Sydney
Age: 47
Posts: 60
Thanks for the detailed answer! Makes sense.
Haplo is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about XREF vs XDEF (vasm 1.8 vs vasm 1.9) roondar Coders. Asm / Hardware 8 01 May 2023 20:59
Symbols with vasm and ORG instruction with linedebug prb28 Coders. Asm / Hardware 10 12 February 2022 11:15
Apollo 1240 - Questions about questions StompinSteve Hardware mods 19 19 July 2021 02:05
Couple of vasm questions Auscoder Coders. Asm / Hardware 6 28 April 2020 23:17
vasm question marduk_kurios Coders. Asm / Hardware 7 14 February 2014 20:06

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:04.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09824 seconds with 15 queries