Loads debug information from an image into the debugger and records the entry point address for future use by the run and start commands. Subsequent use of the file command discards existing information before loading the new debug information. The debug information is loaded when required by the debugger.
If you want to append debug information instead of replacing it, you can use the add-symbol-file command.
This command does not set the PC register.
Specifies the image. If no
filenameis specified then the debug information is discarded.
Specifies the offset that is added to all addresses within the image. If
offsetis not specified then the default for:
An image is zero.
A shared library is the load address of the library. If the application has not loaded the specified library then the request is pended until the library is loaded and the offset can be determined.
For relocatable objects, this specifies the address to which a section was relocated.
Specifies the name of the relocated section.
Specifies the address of the section. This can be either an address or an expression that evaluates to an address. You can also specify the address space.
Example 1-42 Examples
file "myFile.axf" # Load debug information on demand. file "images\myFile.axf" # Load debug information on demand. file # Discard debug information. file "myFile.axf" -s .text 0x1000 -s .data 0x2000 # Load debug information on demand with # section .text relocated to 0x1000 and # section .data relocated to 0x2000. file "vmlinux" N:0 # Load debug information for the non-secure address 0x00 file "vmlinux" EL2:0x4080000000 # Load debug information for the non-secure address space EL2:0x4080000000