English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 02 July 2024, 00:04   #161
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,553
Quote:
Originally Posted by hop View Post
it would be preferable not to discard known symbol data from HUNK_SYMBOL if possible. The config file symbols do not have an associated section, but HUNK_SYMBOLs do, would it be possible to parse and store this information to use in this situation?
Yes, of course you can. I even wrote the code today to do that - although I think it is not worth the effort, just for a symbol at the beginning of a section which doesn't show up when the previous section is empty. How often is that a problem?

In most cases executables have neither symbols nor empty sections. And then you still have the
SECSTRT_n
label.

At the end of the day I had to realise that I still cannot determine if a label should be generated for the empty section or the following section, because the offset is identical. Label-generation is triggered by offsets stored in the
ira->LabelAdr2[]
array. And its index (
p2labind
) will be incremented as long as the current offset matches.

Nothing is impossible, and I might have another look this week, but I fear the solution of this problem would need much bigger modifications.
phx is offline  
Old 02 July 2024, 11:28   #162
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,864
Dunno how often but as it has been generated by an old C compiler it could be seen elsewhere I guess.
kamelito is offline  
Old 02 July 2024, 11:41   #163
hop
Registered User
 
hop's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 267
Quote:
Originally Posted by phx View Post
Yes, of course you can. I even wrote the code today to do that - although I think it is not worth the effort, just for a symbol at the beginning of a section which doesn't show up when the previous section is empty. How often is that a problem?

In most cases executables have neither symbols nor empty sections. And then you still have the
SECSTRT_n
label.

At the end of the day I had to realise that I still cannot determine if a label should be generated for the empty section or the following section, because the offset is identical. Label-generation is triggered by offsets stored in the
ira->LabelAdr2[]
array. And its index (
p2labind
) will be incremented as long as the current offset matches.

Nothing is impossible, and I might have another look this week, but I fear the solution of this problem would need much bigger modifications.
Thank you very much for taking the time to look into this. I appreciate that it is not a high-priority issue, but in the interest of correctness I think it is worth doing, if it is not too much work. As @kamelito says, this may be a feature of a common toolchain, although shipping with debug symbols in place may be less common!

Would it be possible to add another array alongside
ira->LabelAdr2[]
of equal size called something like
ira->LabelHunkIndex[]
? The elements would default to -1 (unknown hunk) but when symbols are added from a
HUNK_SYMBOL
it could be set to a valid value. Then this could be read in
WriteSection

Last edited by hop; 02 July 2024 at 11:44. Reason: typo, correction
hop is offline  
Old 02 July 2024, 11:43   #164
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,864
There is many games and some apps that contains symbols.
kamelito is offline  
Old Yesterday, 22:37   #165
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,553
Quote:
Originally Posted by hop View Post
in the interest of correctness I think it is worth doing, if it is not too much work.
Indeed, it would require some work. I'm still not sure if it is worth it.

Also I cannot promise I will have a look at it soon, because I just arrived at my holiday site, where I will spend the next 14 days. Even if bad weather may leave me some time (which is likely), my development equipment here is not optimal.

Quote:
Would it be possible to add another array alongside
ira->LabelAdr2[]
of equal size called something like
ira->LabelHunkIndex[]
?
Yes, this might be possible, and I thought about it too. Although I don't like it very much. It is like "shooting sparrows with cannons", as we say in german.

Quote:
Originally Posted by kamelito View Post
There is many games and some apps that contains symbols.
Yes, and this works fine. But how often do you have such a symbol at the section's base address, following an empty section? There are probably more serious problems to tackle.
phx is offline  
Old Yesterday, 22:55   #166
hop
Registered User
 
hop's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 267
Have a great holiday.

Quote:
Originally Posted by phx View Post
Indeed, it would require some work. I'm still not sure if it is worth it.
I agree it's an edge case.

I'm starting to gravitate towards supporting structured data however...
hop is offline  
Old Yesterday, 23:04   #167
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,864
Quote:
Originally Posted by hop View Post
Have a great holiday.



I agree it's an edge case.

I'm starting to gravitate towards supporting structured data however...
@hop
Are you going to use the include to define structs used for OS functions calls?
kamelito 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
ira for Windows jotd Coders. General 63 12 December 2023 10:53
New tutorial on sprites Yragael Coders. Tutorials 8 04 September 2023 21:00
Debugging messages in serial (small tutorial, mainly for cross-dev) alkis Coders. Asm / Hardware 7 22 February 2016 14:16
68020 to 68000 code convertion using Ira and PhxAss gulliver Coders. Asm / Hardware 18 12 April 2014 01:09
Looking for IRA v1.07 or newer :-) voxel request.Apps 7 30 July 2008 01:39

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 07:21.

Top

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