MSM9112006: Incorrect CV Info for Local Structure in MASM 6.0

ID Number: Q79208

6.00 6.00a | 6.00 6.00a

MS-DOS | OS/2

buglist6.00 buglist6.00a

Summary:

PROBLEM ID: MSM9112006

SYMPTOMS

When a program that contains a local structure but no global

structures of the same type is assembled with the Microsoft Macro

Assembler (MASM) versions 6.0 and 6.0a, and that variable is

watched with the Microsoft CodeView (CV) debugger, CodeView will

report that the variable has no type.

CAUSE

The CodeView information generated by MASM 6.0 for that local

structure is not correct.

RESOLUTION

Declare a dummy global structure of the same type.

STATUS

Microsoft has confirmed this to be a problem in MASM 6.0 and 6.0a.

We are researching this problem and will post new information here

as it becomes available.

More Information:

The following sample demonstrates the problem. Bring the .EXE into

CodeView and begin stepping through. After stepping into procedure

"func", the local window has:

<no type> result

To work around the problem, uncomment the global variable "global" and

reassemble. After stepping into procedure "func", the local window

has:

+struct sample result

Sample Code

-----------

; Assemble options needed: /Zi

.model small,c

sample struc

x1 dw 1

x2 dw 2

sample ends

.stack

.data

;global sample <>

.code

func proc near

local result:sample

mov result.x1, 0

mov result.x2, 0

ret

func endp

start:

.startup

call func

.exit

end

Additional reference words: 6.00 6.00a