flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Error Messages :idea:

Author
Thread Post new topic Reply to topic
AsmER



Joined: 25 Mar 2006
Posts: 64
Location: England
AsmER 04 Nov 2007, 00:41
Hello,

I have been wondering if on error fasm could show the name of the symbol that has actually caused the problem (i.e. in display edit box). I know it may be not very nessecary, as nobody was complaining till now Wink but last time I had error on line like this:
Code:
stdcall MY_PROC, arg1_addr, [arg2_val]    

where:
>MY_PROC was not defined in module from which it was called (lets call that module: ext_module)
>I had 'win32a.inc' in ext_module
when include directive for ext_module was at the beginning of my program (no sections were used) program compiled successfully, but after there was need to have the code of ext_module at the end of the program i was gettin error.
And to be honest with you, I must say that it took me some time to realise that it isnt that fasm doesnt recognize MY_PROC, arg1 or arg2 but its that after moving the include 'ext_module' i have also moved include 'win32a.inc' at the same time (which I missed)- so fasm didn't know the stdcall macro yet.

I think that such feature could help programmers new in fasm/assembly language - to correct their errors, especially when they are in lines where there is more than one posible reason of the error.

Id like to hear some opinions about it, so we can see if thats a good idea or rather not, thx

_________________
;\\ http://theasmer.spaces.live.com \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Post 04 Nov 2007, 00:41
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 04 Nov 2007, 13:14
well, FASMW version does show the problematic instruction, but command line versions doesn't. I agree this sucks...
Post 04 Nov 2007, 13:14
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 04 Nov 2007, 14:54
I think that fasm should be more specific at which thing it considers as undefined.

Tell me how much time takes you to fix the attached code.

BTW, I use FASMW and even with it this code took me a lot of time to figure out what was wrong.

[edit]Well, actually looking at it again looks very simple to know what is the problem but for some reason it was very hard for me at that time Razz[/edit]


Description:
Download
Filename: r0pc010107.zip
Filesize: 2.4 KB
Downloaded: 364 Time(s)

Post 04 Nov 2007, 14:54
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 04 Nov 2007, 15:17
Loco: only problem I had was missing definition of MAX_PATH
Post 04 Nov 2007, 15:17
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 04 Nov 2007, 15:38
Nop, the problem is that it was defined twice. I remember now why it was hard to figure out Very Happy

So, the good adition could be some warning, instead of just saying "undefined symbol", say "symbol out of reach" when it is defined but it can't be forward referenced.

The fix in this particular code is just erasing MAX_PATH at this code fragment
Code:
include 'r0pc.inc'

; ------------------------------------------------------------------------------

MAX_PATH = 260; <- Kill this    


And will compile just fine because fasm package already defines that constant somewhere in the include files.
Post 04 Nov 2007, 15:38
View user's profile Send private message Reply with quote
AsmER



Joined: 25 Mar 2006
Posts: 64
Location: England
AsmER 04 Nov 2007, 15:45
hehe so it looks like its not only me who would like more specific informations on error lines.
Lets see if Tomasz will give it to us (but still, id rather like to see debug symbols support first there lol) anyways i still really appreciate all the work Tomasz put into fasm :]

..::FASM RuLeS::.. Cool

_________________
;\\ http://theasmer.spaces.live.com \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Post 04 Nov 2007, 15:45
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 04 Nov 2007, 16:01
Quote:
So, the good adition could be some warning, instead of just saying "undefined symbol", say "symbol out of reach" when it is defined but it can't be forward referenced.

this is good idea. i think this could be easily patched in FASM. I will try to add it to my patched FASM version
Post 04 Nov 2007, 16:01
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
AsmER



Joined: 25 Mar 2006
Posts: 64
Location: England
AsmER 05 Dec 2007, 12:08
Wow, that didn't take you long, Tomasz. Thanks a lot Exclamation

_________________
;\\ http://theasmer.spaces.live.com \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Post 05 Dec 2007, 12:08
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.