Manipulating Memory, Variables, And Registers - Epson S5U1C17001C Manual

Cmos 16-bit single chip microcomputer, c compiler package for s1c17 family
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

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>:
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.
S5U1C17001C ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
0xc000 0xc000 0x1c04 0xdff8 0xdfff 0x1ef5 0x0200 0x6c04
EPSOn
10 DEBUggEr
10
Debugger
10-45

Advertisement

Table of Contents
loading

Table of Contents