target sim | Builtin CPU simulator. GDB includes simulators for | |
| most architectures. In general,the following commands | |
| work: |
|
| target sim |
|
| load |
|
| run |
|
| However, you cannot assume that a specific memory | |
| map, device drivers, or even basic I/O is available, | |
| although some simulators do provide these. | |
| Some configurations may include these targets as well: | |
| target nrom dev | NetROM ROM emulator. This |
|
| target only supports |
|
| downloading. |
Different targets are available on different configurations of GDB; your configuration may have more or fewer targets.
Many remote targets require you to download the executable code once you have successfully established a connection.
load filename Depending on what remote debugging facilities are configured into GDB, the load command may be available. Where it exists, it is meant to make filename (an executable) available for debugging on the remote systemby downloading, or dynamic linking, for example. load also records the filename symbol table in GDB, like the
If your GDB does not have a load command, attempting to execute it gets the error message "You can't do that when your target is ...".
The file is loaded at whatever address is specified in the executable. For some object file formats, you can specify the load address when you link the program; for other formats, like a.out, the object file format specifies a fixed address. load does not repeat if you press RET again after using it.
load does not repeat if you press RET again after using it.
13.3 Choosing target byte order
Some types of processors, such as the MIPS, PowerPC, and Hitachi SH, offer the ability to run either
13.3 Choosing target byte order 135