PRB: CodeView Label/Function Search Fails for MASM 5.1 Labels

Last reviewed: July 17, 1997
Article ID: Q72323
3.00 3.11 3.14 4.0x 4.10 | 3.00 3.11 3.12 3.50 | 3.x 4.0x 4.10 4.25
MS-DOS                   | OS/2                | WINDOWS
kbtool kbcode kberrmsg kbprb

The information in this article applies to:

  • Microsoft CodeView for MS-DOS, versions 3.0, 3.11, 3.14, 4.0, 4.01, 4.05, and 4.1
  • Microsoft CodeView for OS/2, versions 3.0, 3.11, 3.12, and 3.5
  • Microsoft CodeView for Windows, versions 3.0, 3.05, 3.06, 3.07, 4.0, 4.01, and 4.1
  • Microsoft CodeView for Win32s, version 4.25

SYMPTOMS

An attempt to use the Label Search or Function Search command in CodeView versions 3.0 and later to find PROC labels in applications assembled with Microsoft Macro Assembler (MASM) versions 5.1 or 5.1a fails and CodeView generates the following message:

   Error - Unknown symbol

CAUSE

This behavior is expected and reflects the differences in CodeView symbolic information in MASM versions 5.1 and 6.0 and the different methods used to interpret this information in CodeView versions 2.x and 3.x. CodeView version 2.2 finds PROC labels that are declared PUBLIC in code assembled with MASM versions 5.1 and 5.1a. CodeView versions 3.x and 4.x successfully find PROC labels in code assembled with MASM versions 6.0x and 6.1.

MORE INFORMATION

The code example below demonstrates this situation. Assemble the code in MASM version 5.1 or 5.1a and load it into CodeView version 3.0 or later. An attempt to perform a Label Search or a Function Search for "func" fails and CodeView generates one of the messages listed above. However, CodeView 2.2 finds the label and displays the relevant code on the screen.

Sample Code

; Assembler options needed: /Zi ; LINK options needed: /CO

.MODEL small .STACK .DATA

msg     DB "Hello", 13, 10, "$"

PUBLIC  func            ; required by CodeView 2.2

.CODE start: mov ax, SEG msg
        mov ds, ax
        call func
        mov ah, 4Ch
        int 21h

func    PROC
        mov ah, 09h
        mov dx, OFFSET msg
dosint: int 21h
        ret
func    ENDP

END start


Additional reference words: 2.20 3.00 3.50 4.00 4.10
KBCategory: kbtool kbcode kberrmsg kbprb
KBSubcategory: CvwIss
Keywords : CvwIss kb16bitonly kbcode kberrmsg kbprb kbtool
Version : 3.00 3.11 3.14 4.0x 4.10 | 3.00
Platform : MS-DOS OS/2 WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.