OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gdb/] [gdb-6.8/] [gdb-6.8.openrisc-2.1/] [sim/] [erc32/] [README.gdb] - Diff between revs 24 and 33

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 33
How to use SIS with GDB
How to use SIS with GDB
-----------------------
-----------------------
1. Building GDB with SIS
1. Building GDB with SIS
To build GDB with the SIS/ERC32 simulator, configure with option
To build GDB with the SIS/ERC32 simulator, configure with option
'--target sparc-erc32-aout' and build as usual.
'--target sparc-erc32-aout' and build as usual.
2. Attaching the simulator
2. Attaching the simulator
To attach GDB to the simulator, use:
To attach GDB to the simulator, use:
target sim [options] [files]
target sim [options] [files]
The following options are supported:
The following options are supported:
 -nfp           Disable FPU. FPops will cause an FPU disabled trap.
 -nfp           Disable FPU. FPops will cause an FPU disabled trap.
 -freq  Set the simulated "system clock" to  MHz.
 -freq  Set the simulated "system clock" to  MHz.
 -v             Verbose mode.
 -v             Verbose mode.
 -nogdb         Disable GDB breakpoint handling (see below)
 -nogdb         Disable GDB breakpoint handling (see below)
The listed [files] are expected to be in aout format and will be
The listed [files] are expected to be in aout format and will be
loaded in the simulator memory prior. This could be used to load
loaded in the simulator memory prior. This could be used to load
a boot block at address 0x0 if the application is linked to run
a boot block at address 0x0 if the application is linked to run
from RAM (0x2000000).
from RAM (0x2000000).
To start debugging a program type 'load ' and debug as
To start debugging a program type 'load ' and debug as
usual.
usual.
The native simulator commands can be reached using the GDB 'sim'
The native simulator commands can be reached using the GDB 'sim'
command:
command:
sim 
sim 
Direct simulator commands during a GDB session must be issued
Direct simulator commands during a GDB session must be issued
with care not to disturb GDB's operation ...
with care not to disturb GDB's operation ...
For info on supported ERC32 functionality, see README.sis.
For info on supported ERC32 functionality, see README.sis.
3. Loading aout files
3. Loading aout files
The GDB load command loads an aout file into the simulator
The GDB load command loads an aout file into the simulator
memory with the data section starting directly after the text
memory with the data section starting directly after the text
section regardless of wich start address was specified for the data
section regardless of wich start address was specified for the data
at link time! This means that your applications either has to include
at link time! This means that your applications either has to include
a routine that initialise the data segment at the proper address or
a routine that initialise the data segment at the proper address or
link with the data placed directly after the text section.
link with the data placed directly after the text section.
A copying routine is fairly simple, just copy all data between
A copying routine is fairly simple, just copy all data between
_etext and _data to a memory loaction starting at _environ. This
_etext and _data to a memory loaction starting at _environ. This
should be done at the same time as the bss is cleared (in srt0.s).
should be done at the same time as the bss is cleared (in srt0.s).
4. GDB breakpoint handling
4. GDB breakpoint handling
GDB inserts breakpoint in the form of the 'ta 1' instruction. The
GDB inserts breakpoint in the form of the 'ta 1' instruction. The
GDB-integrated simulator will therefore recognize the breakpoint
GDB-integrated simulator will therefore recognize the breakpoint
instruction and return control to GDB. If the application uses
instruction and return control to GDB. If the application uses
'ta 1', the breakpoint detection can be disabled with the -nogdb
'ta 1', the breakpoint detection can be disabled with the -nogdb
switch. In this case however, GDB breakpoints will not work.
switch. In this case however, GDB breakpoints will not work.
Report problems to Jiri Gaisler ESA/ESTEC (jgais@wd.estec.esa.nl)
Report problems to Jiri Gaisler ESA/ESTEC (jgais@wd.estec.esa.nl)
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.