S5U1C17001C ManUal
EPSOn
10-45
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
10 DEBUggEr
10
Debugger
10.6.4 Manipulating Memory, Variables, and registers
The debugger
gdb
can perform operations in memory and registers. 16-bit and 32-bit data are accessed and
displayed in little endian format. In simulator mode, however, a specific external memory area can be displayed in
big endian format (as set in a parameter file).
Manipulating memory areas
Following operations can be performed in memory areas. You can use such symbols as variable names to
specify addresses. Any operation described below can be processed in units of bytes, 16 bits, or 32 bits.
Memory dump (
x /b
,
x /h
,
x /w
commands)
Dumps memory contents for a specified amount of data from a specified address for display on the screen.
Example: Memory dump for 16-bit
×
16 from
_START_text
(gdb)
x /16h
_START_text
0xc00000 <_START_text>: 0x0004 0x00c0 0xc020 0x6c0f 0xa0f1 0xc000 0xc000 0x6c0f
0xc00010 <boot+12>: 0xc000 0xc000 0x1c04 0xdff8 0xdfff 0x1ef5 0x0200 0x6c04
Memory data can be displayed in the [Memory] window. For display in the [Memory] window and how to
operate in it, see Section 10.4.5, "[Memory] Window".
Entering data (
set {char}
,
set {short}
,
set {long}
commands)
Writes specified data to a specified address.
Data can also be entered or changed in the [Memory] window.
Example: Setting
int i
to 0x5555
(gdb)
set {short}
&i=0x5555
rewriting a specified area (
c17 fb
,
c17 fh
,
c17 fw
commands)
Rewrites all of a specified area with specified data.
Example: Writing 0x00000001 (32 bits)
×
4 to addresses 0x0 through 0xf
(gdb)
c17 fw
0x0 0xf 0x1
Start address = 0x0, End address = 0xc, Fill data = 0x1 .....done
Copying a specified area (
c17 mvb
,
c17 mvh
,
c17 mvw
commands)
Copies the content of a specified address to another area.
Example: Copying 8 bytes from addresses 0x0 through 0x7 to an 8-byte area beginning with address 0x8
(gdb)
c17 mvb
0x0 0x7 0x8
Start address = 0x0, End address = 0x7, Destination address = 0x8 .....done
Saving memory contents (
c17 df
command)
Outputs the contents in a specified range of memory to a file in binary, text, or Motorola S3 format.
Example: Saving the contents of addresses 0x80000 to 0x80103 as a Motorola S3 format file named
dump.mot
(gdb)
c17 df
0x80000 0x80103 3 dump.mot
Start address = 0x80000, End address = 0x8011f, File type = Motorola-S3
Processing 00080000-0008011F address.
Summary of Contents for S5U1C17001C
Page 6: ......
Page 17: ...1 General S5U1C17001C Manual 1 General ...
Page 18: ......
Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Page 22: ......
Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Page 30: ......
Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Page 104: ......
Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Page 122: ......
Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Page 366: ......
Page 385: ...7 Library S5U1C17001C Manual 7 library ...
Page 386: ......
Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Page 406: ......
Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Page 440: ......
Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Page 450: ......
Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Page 627: ......
Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...