Source Line Syntax

You can specify source file line numbers as all or part of an MASM expression. These numbers evaluate to the offset of the executable code that corresponds to this source line.

Note   You cannot use source line numbers as part of a C++ expression. For more information about when MASM and C++ expression syntax is used, see Evaluating Expressions.

You must enclose source file and line number expressions by grave accents ( ` ). The following example shows the full format for source file line numbers.


If you have multiple files that have identical file names, Filename should include the whole directory path and file name. This directory path should be the one that is used at compilation time. If you supply only the file name or only part of the path and if there are multiple matches, the debugger uses the first match that it finds.

If you omit Filename, the debugger uses the source file that corresponds to the current program counter.

LineNumber is read as a decimal number unless you precede it with 0x, regardless of the current default radix. If you omit LineNumber, the expression evaluates to the initial address of the executable that corresponds to the source file.

Source line expressions are not evaluated in CDB unless you issue a .lines (Toggle Source Line Support) command or you include the -lines command-line option when you start WinDbg..

For more information about source debugging, see Debugging in Source Mode.