file

Specifies the source-code file; enables correlation of generated assembly code and source code.

  .file "filename"

  
Parameter

filename

Name of source-code file, in double quotes.

Remarks

Must precede other debugging directives in the assembly file. If you write your own DWARF code, you must use the .function and .line directives as well as this .file directive.

Example

DWARF Code Example shows how to use the .file directive for your own DWARF code.

Listing 1. DWARF Code Example
        .file   "MyFile.c"
        .text

        .globl  _MyFunction

        .function "MyFunction",_MyFunction, _MyFunctionEnd -_MyFunction

_MyFunction:

        .line 1

        lwz r3, 0(r3)

        .line 2

        blr

_MyFunctionEnd: