When loading the symbols for an image you may see an error such as:
ERROR(CMD685-COR303):
! Failed to load symbols for "vmlinux"! Cannot determine current address space as target is running, specify an explicit load offset
ARM application processors typically support multiple virtual address spaces. The Secure and Normal (non-secure) view of virtual memory is available on processors that implement Trustzone (security extensions). The Hypervisor view of memory is available on processors that implement the virtualization extensions.
When specifying a virtual address you must specify which of these address spaces you wish to use. In the DS-5 debugger this is done using an address prefix.
For example, the virtual address 0x8000 can be targeted at any of the address spaces on a processor:
When DS-5 Debugger loads symbols (and where multiple address spaces exist) it needs to know which address space to associate the symbols with. This is because a given address (e.g. 0x8000) may exist in all three virtual address spaces, but be used/mapped differently be each.
If the target is stopped when the symbols are loaded, then the debugger automatically associates the symbols with the current address space of the processor (e.g. if stopped on Normal world code then it will use the Normal world address space). If the target is running when symbols are loaded then the debugger does not know which address space to associate symbols with and produces the error above.
Therefore one solution to the above error is to stop the target before loading symbols. Another solution is to explicitly tell the debugger which address space to associate symbols with. Commands that load symbols, such as file and add-symbol-file take an optional offset argument. The offset argument can contain an address space. The way to load symbols into a specific address space is to use an offset of zero with the correct address space indicated, for example:
file vmlinux N:0 The command above will load the symbols for the Linux kernel and associate it with the Normal world address space.