64 bit assembler > ASMC Development

Bad file names in errors messages.

(1/2) > >>

HSE:
Hi Nidud!

Not a very critical issue, but sometimes is a little boring.

Its very difficult to make that JWasm derivatives report correct filenames when a error is detected?

(Of course you don't know that this error exist  :biggrin: )

EDIT: Apparently happen when error is inside a macro, and the line number is correct.

nidud:
There are a more than hundred files dedicated to test error output in the regression test, however none of them test included files. Not sure what you actually mean but lets assume the following:

--- Code: ---; test.asm - extern macro error
;
include macro.inc

    .386
    .model flat
    .code

    mov edx,line_error(5)

    end

--- End code ---

macro.inc:

--- Code: ---
line_error macro line

    mov ax,line
    mov eax,ax  ; test.asm(9) : error A2022: instruction operands must be the same size : 4 - 2
    exitm<eax>
    endm

    xor eax,eax ; macro.inc(9) : error A2034: must be in segment block

--- End code ---

test.err:

--- Code: ---C:\Asmc\source\asmc\macro.inc(9) : error A2034: must be in segment block
 C:\Asmc\source\asmc\macro.inc(9): Included by
  C:\Asmc\source\asmc\test.asm(3): Main line code
C:\Asmc\source\asmc\test.asm(9) : error A2022: instruction operands must be the same size : 4 - 2
 line_error(3)[macro.inc]: Macro called from
  C:\Asmc\source\asmc\test.asm(9): Main line code

--- End code ---

So the macro will produce an error where it's expanded but in addition also the macro-line and filename where the macro is declared. The same logic as in Masm:

--- Code: ---C:\Asmc\source\asmc\macro.inc(9) : error A2085: instruction or register not accepted in current CPU mode
C:\Asmc\source\asmc\test.asm(8) : error A2022: instruction operands must be the same size
 line_error(3): Macro Called From
  C:\Asmc\source\asmc\test.asm(8): Main Line Code

--- End code ---

HSE:
Making a mistake in file BMPStatic.inc:

--- Code: ---LOWORD MACRO bigword ;; Retrieves the low word from double word argument
mov eax,bigword2
and eax,0FFFFh ;; Set to low word
ENDM

--- End code ---


--- Code: ---MathArtH.asm(201) : error A2006: undefined symbol : bigword2

--- End code ---

201 is the line in BMPStatic.inc where the macro is used.

ML miss the line:

--- Code: ---.\Controls\BMPStatic.inc(202) : error A2006: undefined symbol : bigword2
 LOWORD(2): Macro Called From
  .\Controls\BMPStatic.inc(202): Include File

--- End code ---

Because RadAsm read the line of the first error, send me to that file  ::)

nidud:
Well, that's definitely a bug. I managed to recreate it by moving the model definition to the include file.

--- Code: ---include macro.inc

    end

--- End code ---


--- Code: ---    .386
    .model flat
    .code


line_error macro line

    mov ax,line1
    exitm<eax>
    endm

    mov edx,line_error(5)

--- End code ---


--- Code: ---C:\Asmc\source\asmc\test.asm(12) : error A2006: undefined symbol : line1

--- End code ---

HSE:
Something in that way.

Extracting from Model.inc options and  pasting in MatArtH.asm nothing change, but if I declare a code segment:

--- Code: ---option casemap:none                                     ;Case sensitive
option dotname                                          ;Enable dot names
.686p                                                   ;Use 686 protected mode
.mmx                                                    ;Enable MMX instructions
.xmm                                                    ;Enable SSE instruc. (MASM 6.15 or higher)
.model flat, stdcall                                    ;Memory model = flat, use StdCall as default
.code
nop

%include @Environ(OA32_PATH)\\Code\\Macros\\Model.inc
--- End code ---
Now:

--- Code: ---\masm32\ObjAsm32\\Code\\Macros\\Model.inc(200) : error A2006: undefined symbol : bigword2

--- End code ---

EDIT: now say 200 because I erase a line :biggrin:

Navigation

[0] Message Index

[#] Next page

Go to full version