OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [erc32/] [README.gdb] - Blame information for rev 247

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
How to use SIS with GDB
2
-----------------------
3
 
4
1. Building GDB with SIS
5
 
6
To build GDB with the SIS/ERC32 simulator, configure with option
7
'--target sparc-erc32-aout' and build as usual.
8
 
9
2. Attaching the simulator
10
 
11
To attach GDB to the simulator, use:
12
 
13
target sim [options] [files]
14
 
15
The following options are supported:
16
 
17
 -nfp           Disable FPU. FPops will cause an FPU disabled trap.
18
 
19
 -freq  Set the simulated "system clock" to  MHz.
20
 
21
 -v             Verbose mode.
22
 
23
 -nogdb         Disable GDB breakpoint handling (see below)
24
 
25
The listed [files] are expected to be in aout format and will be
26
loaded in the simulator memory prior. This could be used to load
27
a boot block at address 0x0 if the application is linked to run
28
from RAM (0x2000000).
29
 
30
To start debugging a program type 'load ' and debug as
31
usual.
32
 
33
The native simulator commands can be reached using the GDB 'sim'
34
command:
35
 
36
sim 
37
 
38
Direct simulator commands during a GDB session must be issued
39
with care not to disturb GDB's operation ...
40
 
41
For info on supported ERC32 functionality, see README.sis.
42
 
43
 
44
3. Loading aout files
45
 
46
The GDB load command loads an aout file into the simulator
47
memory with the data section starting directly after the text
48
section regardless of wich start address was specified for the data
49
at link time! This means that your applications either has to include
50
a routine that initialise the data segment at the proper address or
51
link with the data placed directly after the text section.
52
 
53
A copying routine is fairly simple, just copy all data between
54
_etext and _data to a memory loaction starting at _environ. This
55
should be done at the same time as the bss is cleared (in srt0.s).
56
 
57
 
58
4. GDB breakpoint handling
59
 
60
GDB inserts breakpoint in the form of the 'ta 1' instruction. The
61
GDB-integrated simulator will therefore recognize the breakpoint
62
instruction and return control to GDB. If the application uses
63
'ta 1', the breakpoint detection can be disabled with the -nogdb
64
switch. In this case however, GDB breakpoints will not work.
65
 
66
 
67
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.