172
GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

GDB 6.8 for the OpenRISC 1000 Architecture

Generated by Doxygen 1.5.6

Wed Nov 12 17:19:29 2008

Page 2: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008
Page 3: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

Contents

1 GNU Debugger Version 6.8 for the OpenRISC 1000 Architecture 1

1.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.3 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.4 Copying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Todo List 3

3 Data Structure Index 5

3.1 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4 File Index 7

4.1 File List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 Data Structure Documentation 9

5.1 gdbarch_tdep Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1.2.1 num_matchpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1.2.2 num_gpr_regs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1.2.3 bytes_per_word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1.2.4 bytes_per_address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.2 jtr_chain_message Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5.2.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5.2.1.1 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5.2.1.2 length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5.2.1.3 chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5.3 jtr_chain_response Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.3.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.3.1.1 status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Page 4: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

ii CONTENTS

5.4 jtr_failure_response Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.4.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.4.1.1 status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.5 jtr_read_block_message Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.5.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.5.1.1 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.5.1.2 length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.5.1.3 address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.5.1.4 num_regs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.6 jtr_read_block_response Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.6.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.6.1.1 status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.6.1.2 num_regs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.7 jtr_read_message Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.7.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.7.1.1 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.7.1.2 length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.7.1.3 address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.8 jtr_read_response Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.8.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.8.1.1 status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.8.1.2 data_h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.8.1.3 data_l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.9 jtr_write_block_message Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.9.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.9.1.1 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.9.1.2 length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.9.1.3 address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.9.1.4 num_regs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.9.1.5 data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.10 jtr_write_block_response Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.10.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.10.1.1 status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.11 jtr_write_message Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.11.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.11.1.1 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 5: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

CONTENTS iii

5.11.1.2 length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.11.1.3 address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.11.1.4 data_h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.11.1.5 data_l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.12 jtr_write_response Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.12.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.12.1.1 status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.13 temp_insn_struct Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.13.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.13.1.1 insn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.13.1.2 insn_mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.13.1.3 in_pass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

6 File Documentation 23

6.1 gdb/or1k-jtag.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

6.1.1 Define Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

6.1.1.1 JP1_CRC_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

6.1.1.2 JP1_NUM_RETRIES . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6.1.1.3 JP1_RETRY_WAIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6.1.1.4 JP1_TCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6.1.1.5 JP1_TDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6.1.1.6 JP1_TDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6.1.1.7 JP1_TMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6.1.1.8 JP1_TRST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6.1.1.9 JP1_WAIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6.1.1.10 OR1K_JTAG_FAST_WAIT . . . . . . . . . . . . . . . . . . . . . . . . 26

6.1.1.11 OR1K_JTAG_SLOW_WAIT . . . . . . . . . . . . . . . . . . . . . . . 27

6.1.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6.1.2.1 jp1_ll_crc_calc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6.1.2.2 jp1_ll_prepare_control . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6.1.2.3 jp1_ll_prepare_data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6.1.2.4 jp1_ll_read_jp1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

6.1.2.5 jp1_ll_read_stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

6.1.2.6 jp1_ll_reset_jp1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

6.1.2.7 jp1_ll_write_jp1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

6.1.2.8 jp1_ll_write_stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6.1.2.9 jp1_read_jtag_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 6: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

iv CONTENTS

6.1.2.10 jp1_read_jtag_reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

6.1.2.11 jp1_select_chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

6.1.2.12 jp1_write_jtag_block . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6.1.2.13 jp1_write_jtag_reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6.1.2.14 jtr_ll_check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6.1.2.15 jtr_ll_close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6.1.2.16 jtr_ll_connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6.1.2.17 jtr_ll_read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.1.2.18 jtr_ll_response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.1.2.19 jtr_ll_write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

6.1.2.20 jtr_read_jtag_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

6.1.2.21 jtr_read_jtag_reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

6.1.2.22 jtr_select_chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

6.1.2.23 jtr_write_jtag_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

6.1.2.24 jtr_write_jtag_reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

6.1.2.25 or1k_jtag_close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

6.1.2.26 or1k_jtag_err_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

6.1.2.27 or1k_jtag_init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

6.1.2.28 or1k_jtag_read_jtag_block . . . . . . . . . . . . . . . . . . . . . . . . 39

6.1.2.29 or1k_jtag_read_jtag_reg . . . . . . . . . . . . . . . . . . . . . . . . . . 40

6.1.2.30 or1k_jtag_read_mem . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

6.1.2.31 or1k_jtag_read_spr . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

6.1.2.32 or1k_jtag_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

6.1.2.33 or1k_jtag_select_chain . . . . . . . . . . . . . . . . . . . . . . . . . . 43

6.1.2.34 or1k_jtag_stall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

6.1.2.35 or1k_jtag_unstall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

6.1.2.36 or1k_jtag_wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

6.1.2.37 or1k_jtag_write_jtag_block . . . . . . . . . . . . . . . . . . . . . . . . 47

6.1.2.38 or1k_jtag_write_jtag_reg . . . . . . . . . . . . . . . . . . . . . . . . . 48

6.1.2.39 or1k_jtag_write_mem . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

6.1.2.40 or1k_jtag_write_spr . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

6.1.3 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.1.3.1 device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.1.3.2 fd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.1.3.3 jp1_chain_addr_size . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.1.3.4 jp1_chain_data_size . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 7: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

CONTENTS v

6.1.3.5 jp1_chain_has_crc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.1.3.6 jp1_chain_has_rw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.1.3.7 jp1_chain_is_valid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.1.3.8 jp1_crc_r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.1.3.9 jp1_crc_w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

6.1.3.10 location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

6.1.3.11 lp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

6.1.3.12 or1k_dbg_if_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

6.1.3.13 or1k_jtag_connection . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

6.1.3.14 or1k_jtag_current_chain . . . . . . . . . . . . . . . . . . . . . . . . . . 51

6.1.3.15 or1k_select_dr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

6.2 gdb/or1k-jtag.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

6.2.1 Define Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

6.2.1.1 OR1K_JI_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

6.2.1.2 OR1K_JTAG_RISCOP . . . . . . . . . . . . . . . . . . . . . . . . . . 54

6.2.1.3 OR1K_JTAG_RISCOP_RESET . . . . . . . . . . . . . . . . . . . . . 54

6.2.1.4 OR1K_JTAG_RISCOP_STALL . . . . . . . . . . . . . . . . . . . . . 54

6.2.1.5 OR1K_MAX_JTAG_WRITE . . . . . . . . . . . . . . . . . . . . . . . 54

6.2.1.6 OR1K_SC_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

6.2.2 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . 54

6.2.2.1 or1k_dbg_if_version_enum . . . . . . . . . . . . . . . . . . . . . . . . 54

6.2.2.2 or1k_jtag_chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

6.2.2.3 or1k_jtag_errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

6.2.2.4 or1k_jtag_instr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

6.2.2.5 or1k_jtag_proxy_protocol_commands . . . . . . . . . . . . . . . . . . 55

6.2.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.2.3.1 or1k_jtag_close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.2.3.2 or1k_jtag_init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.2.3.3 or1k_jtag_read_mem . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.2.3.4 or1k_jtag_read_spr . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.2.3.5 or1k_jtag_stall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.2.3.6 or1k_jtag_unstall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.2.3.7 or1k_jtag_wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.2.3.8 or1k_jtag_write_mem . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.2.3.9 or1k_jtag_write_spr . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.2.4 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 8: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

vi CONTENTS

6.2.4.1 or1k_dbg_if_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.3 gdb/or1k-tdep.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

6.3.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

6.3.1.1 _initialize_or1k_tdep . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

6.3.1.2 info_matchpoints_command . . . . . . . . . . . . . . . . . . . . . . . 61

6.3.1.3 info_spr_command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

6.3.1.4 or1k_breakpoint_from_pc . . . . . . . . . . . . . . . . . . . . . . . . . 61

6.3.1.5 or1k_dump_tdep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

6.3.1.6 or1k_fetch_instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

6.3.1.7 or1k_frame_align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

6.3.1.8 or1k_frame_base_address . . . . . . . . . . . . . . . . . . . . . . . . . 62

6.3.1.9 or1k_frame_fp_loc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

6.3.1.10 or1k_frame_prev_register . . . . . . . . . . . . . . . . . . . . . . . . . 63

6.3.1.11 or1k_frame_size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

6.3.1.12 or1k_frame_size_check . . . . . . . . . . . . . . . . . . . . . . . . . . 64

6.3.1.13 or1k_frame_sniffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

6.3.1.14 or1k_frame_this_id . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

6.3.1.15 or1k_frame_unwind_cache . . . . . . . . . . . . . . . . . . . . . . . . 66

6.3.1.16 or1k_gdbarch_init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

6.3.1.17 or1k_get_saved_reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

6.3.1.18 or1k_groupnum_from_name . . . . . . . . . . . . . . . . . . . . . . . 69

6.3.1.19 or1k_info_spr_command . . . . . . . . . . . . . . . . . . . . . . . . . 69

6.3.1.20 or1k_link_address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

6.3.1.21 or1k_parse_spr_params . . . . . . . . . . . . . . . . . . . . . . . . . . 71

6.3.1.22 or1k_pseudo_register_read . . . . . . . . . . . . . . . . . . . . . . . . 71

6.3.1.23 or1k_pseudo_register_write . . . . . . . . . . . . . . . . . . . . . . . . 72

6.3.1.24 or1k_push_dummy_call . . . . . . . . . . . . . . . . . . . . . . . . . . 72

6.3.1.25 or1k_read_spr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

6.3.1.26 or1k_register_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

6.3.1.27 or1k_register_reggroup_p . . . . . . . . . . . . . . . . . . . . . . . . . 73

6.3.1.28 or1k_register_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

6.3.1.29 or1k_registers_info . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

6.3.1.30 or1k_regnum_from_name . . . . . . . . . . . . . . . . . . . . . . . . . 75

6.3.1.31 or1k_return_value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

6.3.1.32 or1k_single_step_through_delay . . . . . . . . . . . . . . . . . . . . . 76

6.3.1.33 or1k_skip_prologue . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 9: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

CONTENTS vii

6.3.1.34 or1k_spr_command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

6.3.1.35 or1k_spr_group_name . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

6.3.1.36 or1k_spr_register_name . . . . . . . . . . . . . . . . . . . . . . . . . . 78

6.3.1.37 or1k_store_instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

6.3.1.38 or1k_tokenize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

6.3.1.39 or1k_unwind_dummy_id . . . . . . . . . . . . . . . . . . . . . . . . . 79

6.3.1.40 or1k_unwind_pc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

6.3.1.41 or1k_unwind_sp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

6.3.1.42 or1k_write_spr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

6.4 gdb/or1k-tdep.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

6.4.1 Define Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

6.4.1.1 OR1K_A_REG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

6.4.1.2 OR1K_ALIGN_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . 88

6.4.1.3 OR1K_B_REG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

6.4.1.4 OR1K_BRK_INSTR . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

6.4.1.5 OR1K_BRK_INSTR_STRUCT . . . . . . . . . . . . . . . . . . . . . . 88

6.4.1.6 OR1K_BUSERR_VECTOR . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.7 OR1K_CPUCFGR_SPRNUM . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.8 OR1K_D_REG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.9 OR1K_DCFGR_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.10 OR1K_DCR0_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.11 OR1K_DCR_CC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.12 OR1K_DCR_CC_OFF . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.13 OR1K_DCR_CT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.14 OR1K_DCR_CT_OFF . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.15 OR1K_DCR_DP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.16 OR1K_DCR_SC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.17 OR1K_DCWR0_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.18 OR1K_DCWR1_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.19 OR1K_DMR1_BT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.20 OR1K_DMR1_CW . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.21 OR1K_DMR1_CW_AND . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.22 OR1K_DMR1_CW_OR . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.23 OR1K_DMR1_CW_SZ . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.24 OR1K_DMR1_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.25 OR1K_DMR1_ST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 10: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

viii CONTENTS

6.4.1.26 OR1K_DMR2_AWTC_MASK . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.27 OR1K_DMR2_AWTC_OFF . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.28 OR1K_DMR2_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.29 OR1K_DMR2_WBS_MASK . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.30 OR1K_DMR2_WBS_OFF . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.31 OR1K_DMR2_WCE0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.32 OR1K_DMR2_WCE1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.33 OR1K_DMR2_WGB_MASK . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.34 OR1K_DMR2_WGB_OFF . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.35 OR1K_DPF_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.36 OR1K_DRR_AE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.37 OR1K_DRR_BUSEE . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.38 OR1K_DRR_DME . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.39 OR1K_DRR_DPFE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.40 OR1K_DRR_FPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.41 OR1K_DRR_IIE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.42 OR1K_DRR_IME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.43 OR1K_DRR_INTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.44 OR1K_DRR_IPFE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.45 OR1K_DRR_RE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.46 OR1K_DRR_RSTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.47 OR1K_DRR_SCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.48 OR1K_DRR_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.49 OR1K_DRR_TE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.50 OR1K_DRR_TTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.51 OR1K_DSR_AE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.52 OR1K_DSR_BUSEE . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.53 OR1K_DSR_DME . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.54 OR1K_DSR_DPFE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.55 OR1K_DSR_FPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.56 OR1K_DSR_IIE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.57 OR1K_DSR_IME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.58 OR1K_DSR_INTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.59 OR1K_DSR_IPFE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.60 OR1K_DSR_RE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.61 OR1K_DSR_RSTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 11: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

CONTENTS ix

6.4.1.62 OR1K_DSR_SCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.63 OR1K_DSR_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.64 OR1K_DSR_TE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.65 OR1K_DSR_TTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.66 OR1K_DTLB_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.67 OR1K_DVR0_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.68 OR1K_EPCR_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.69 OR1K_EXT_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.70 OR1K_FIRST_ARG_REGNUM . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.71 OR1K_FP_REGNUM . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.72 OR1K_FP_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.73 OR1K_FRAME_RED_ZONE_SIZE . . . . . . . . . . . . . . . . . . . 90

6.4.1.74 OR1K_ILL_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.75 OR1K_IMM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.76 OR1K_IMM2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

6.4.1.77 OR1K_INSTLEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

6.4.1.78 OR1K_IPF_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

6.4.1.79 OR1K_ITLB_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . . 91

6.4.1.80 OR1K_LAST_ARG_REGNUM . . . . . . . . . . . . . . . . . . . . . 91

6.4.1.81 OR1K_LR_REGNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 91

6.4.1.82 OR1K_MAX_GPR_REGS . . . . . . . . . . . . . . . . . . . . . . . . 91

6.4.1.83 OR1K_MAX_HW_WATCHES . . . . . . . . . . . . . . . . . . . . . . 91

6.4.1.84 OR1K_MAX_MATCHPOINTS . . . . . . . . . . . . . . . . . . . . . 91

6.4.1.85 OR1K_NOP_EXIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

6.4.1.86 OR1K_NPC_REGNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.87 OR1K_NPC_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.88 OR1K_NUM_PSEUDO_REGS . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.89 OR1K_NUM_REGS . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.90 OR1K_NUM_SPGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.91 OR1K_NUM_TAP_RECORDS . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.92 OR1K_OFFSET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.93 OR1K_OP_ADD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.94 OR1K_OP_ADDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.95 OR1K_OP_ADDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.96 OR1K_OP_AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.97 OR1K_OP_ANDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 12: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

x CONTENTS

6.4.1.98 OR1K_OP_BF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.99 OR1K_OP_BNF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.100 OR1K_OP_J . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.101 OR1K_OP_JAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.102 OR1K_OP_JALR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.103 OR1K_OP_JR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.104 OR1K_OP_LBS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.105 OR1K_OP_LBZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.106 OR1K_OP_LHS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.107 OR1K_OP_LHZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.108 OR1K_OP_LWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.109 OR1K_OP_LWZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.110 OR1K_OP_MFSPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.111 OR1K_OP_MOVHI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.112 OR1K_OP_MTSPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.113 OR1K_OP_MUL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.114 OR1K_OP_MULI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.115 OR1K_OP_MULU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.116 OR1K_OP_NOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.117 OR1K_OP_OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.118 OR1K_OP_ORI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.119 OR1K_OP_RFE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.120 OR1K_OP_RORI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.121 OR1K_OP_SB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.122 OR1K_OP_SFEQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.123 OR1K_OP_SFGES . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.124 OR1K_OP_SFGEU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.125 OR1K_OP_SFGTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.126 OR1K_OP_SFGTU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.127 OR1K_OP_SFLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.128 OR1K_OP_SFLEU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.129 OR1K_OP_SFLTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.130 OR1K_OP_SFLTU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.131 OR1K_OP_SFNE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.132 OR1K_OP_SLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.133 OR1K_OP_SLLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 13: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

CONTENTS xi

6.4.1.134 OR1K_OP_SRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.135 OR1K_OP_SRAI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.136 OR1K_OP_SRL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.137 OR1K_OP_SRLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.138 OR1K_OP_SUB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.139 OR1K_OP_SW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.140 OR1K_OP_SYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.141 OR1K_OP_TRAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.142 OR1K_OP_XOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.143 OR1K_OP_XORI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.144 OR1K_OPCODE1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.145 OR1K_OPCODE2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6.4.1.146 OR1K_OPCODE3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

6.4.1.147 OR1K_OPCODE4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

6.4.1.148 OR1K_OPCODE5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.149 OR1K_OPCODE6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.150 OR1K_OPCODE7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.151 OR1K_PPC_REGNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.152 OR1K_PPC_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.153 OR1K_RANGE_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.154 OR1K_RESET_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.155 OR1K_RV_REGNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.156 OR1K_SEXT16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.157 OR1K_SEXT26 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.158 OR1K_SHIFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.159 OR1K_SP_REGNUM . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.160 OR1K_SPG_DC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.161 OR1K_SPG_DC_DCBFR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.162 OR1K_SPG_DC_DCBIR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.163 OR1K_SPG_DC_DCBLR . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.164 OR1K_SPG_DC_DCBPR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.165 OR1K_SPG_DC_DCBWR . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.166 OR1K_SPG_DC_DCCR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.167 OR1K_SPG_DC_LAST . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.168 OR1K_SPG_DEBUG . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.169 OR1K_SPG_DEBUG_DCR . . . . . . . . . . . . . . . . . . . . . . . 96

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 14: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

xii CONTENTS

6.4.1.170 OR1K_SPG_DEBUG_DCR_END . . . . . . . . . . . . . . . . . . . . 96

6.4.1.171 OR1K_SPG_DEBUG_DCWR0 . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.172 OR1K_SPG_DEBUG_DCWR1 . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.173 OR1K_SPG_DEBUG_DMR1 . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.174 OR1K_SPG_DEBUG_DMR2 . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.175 OR1K_SPG_DEBUG_DRR . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.176 OR1K_SPG_DEBUG_DSR . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.177 OR1K_SPG_DEBUG_DVR . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.178 OR1K_SPG_DEBUG_DVR_END . . . . . . . . . . . . . . . . . . . . 96

6.4.1.179 OR1K_SPG_DEBUG_LAST . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.180 OR1K_SPG_DMMU . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.181 OR1K_SPG_DMMU_DATBMR . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.182 OR1K_SPG_DMMU_DATBMR_END . . . . . . . . . . . . . . . . . . 96

6.4.1.183 OR1K_SPG_DMMU_DATBTR . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.184 OR1K_SPG_DMMU_DATBTR_END . . . . . . . . . . . . . . . . . . 96

6.4.1.185 OR1K_SPG_DMMU_DMMUCR . . . . . . . . . . . . . . . . . . . . 96

6.4.1.186 OR1K_SPG_DMMU_DMMUPR . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.187 OR1K_SPG_DMMU_DTLBEIR . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.188 OR1K_SPG_DMMU_DTLBW0MR . . . . . . . . . . . . . . . . . . . 96

6.4.1.189 OR1K_SPG_DMMU_DTLBW0MR_END . . . . . . . . . . . . . . . . 96

6.4.1.190 OR1K_SPG_DMMU_DTLBW0TR . . . . . . . . . . . . . . . . . . . 96

6.4.1.191 OR1K_SPG_DMMU_DTLBW0TR_END . . . . . . . . . . . . . . . . 96

6.4.1.192 OR1K_SPG_DMMU_DTLBW1MR . . . . . . . . . . . . . . . . . . . 96

6.4.1.193 OR1K_SPG_DMMU_DTLBW1MR_END . . . . . . . . . . . . . . . . 96

6.4.1.194 OR1K_SPG_DMMU_DTLBW1TR . . . . . . . . . . . . . . . . . . . 96

6.4.1.195 OR1K_SPG_DMMU_DTLBW1TR_END . . . . . . . . . . . . . . . . 96

6.4.1.196 OR1K_SPG_DMMU_DTLBW2MR . . . . . . . . . . . . . . . . . . . 96

6.4.1.197 OR1K_SPG_DMMU_DTLBW2MR_END . . . . . . . . . . . . . . . . 96

6.4.1.198 OR1K_SPG_DMMU_DTLBW2TR . . . . . . . . . . . . . . . . . . . 96

6.4.1.199 OR1K_SPG_DMMU_DTLBW2TR_END . . . . . . . . . . . . . . . . 96

6.4.1.200 OR1K_SPG_DMMU_DTLBW3MR . . . . . . . . . . . . . . . . . . . 96

6.4.1.201 OR1K_SPG_DMMU_DTLBW3MR_END . . . . . . . . . . . . . . . . 96

6.4.1.202 OR1K_SPG_DMMU_DTLBW3TR . . . . . . . . . . . . . . . . . . . 96

6.4.1.203 OR1K_SPG_DMMU_DTLBW3TR_END . . . . . . . . . . . . . . . . 96

6.4.1.204 OR1K_SPG_DMMU_LAST . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.205 OR1K_SPG_FPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 15: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

CONTENTS xiii

6.4.1.206 OR1K_SPG_FPU_LAST . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.207 OR1K_SPG_IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.208 OR1K_SPG_IC_ICBIR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.209 OR1K_SPG_IC_ICBLR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.210 OR1K_SPG_IC_ICBPR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.211 OR1K_SPG_IC_ICCR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.212 OR1K_SPG_IC_LAST . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.213 OR1K_SPG_IMMU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.214 OR1K_SPG_IMMU_IATBMR . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.215 OR1K_SPG_IMMU_IATBMR_END . . . . . . . . . . . . . . . . . . . 96

6.4.1.216 OR1K_SPG_IMMU_IATBTR . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.217 OR1K_SPG_IMMU_IATBTR_END . . . . . . . . . . . . . . . . . . . 96

6.4.1.218 OR1K_SPG_IMMU_IMMUCR . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.219 OR1K_SPG_IMMU_IMMUPR . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.220 OR1K_SPG_IMMU_ITLBEIR . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.221 OR1K_SPG_IMMU_ITLBW0MR . . . . . . . . . . . . . . . . . . . . 96

6.4.1.222 OR1K_SPG_IMMU_ITLBW0MR_END . . . . . . . . . . . . . . . . . 96

6.4.1.223 OR1K_SPG_IMMU_ITLBW0TR . . . . . . . . . . . . . . . . . . . . 96

6.4.1.224 OR1K_SPG_IMMU_ITLBW0TR_END . . . . . . . . . . . . . . . . . 96

6.4.1.225 OR1K_SPG_IMMU_ITLBW1MR . . . . . . . . . . . . . . . . . . . . 96

6.4.1.226 OR1K_SPG_IMMU_ITLBW1MR_END . . . . . . . . . . . . . . . . . 96

6.4.1.227 OR1K_SPG_IMMU_ITLBW1TR . . . . . . . . . . . . . . . . . . . . 96

6.4.1.228 OR1K_SPG_IMMU_ITLBW1TR_END . . . . . . . . . . . . . . . . . 96

6.4.1.229 OR1K_SPG_IMMU_ITLBW2MR . . . . . . . . . . . . . . . . . . . . 96

6.4.1.230 OR1K_SPG_IMMU_ITLBW2MR_END . . . . . . . . . . . . . . . . . 96

6.4.1.231 OR1K_SPG_IMMU_ITLBW2TR . . . . . . . . . . . . . . . . . . . . 96

6.4.1.232 OR1K_SPG_IMMU_ITLBW2TR_END . . . . . . . . . . . . . . . . . 96

6.4.1.233 OR1K_SPG_IMMU_ITLBW3MR . . . . . . . . . . . . . . . . . . . . 96

6.4.1.234 OR1K_SPG_IMMU_ITLBW3MR_END . . . . . . . . . . . . . . . . . 96

6.4.1.235 OR1K_SPG_IMMU_ITLBW3TR . . . . . . . . . . . . . . . . . . . . 96

6.4.1.236 OR1K_SPG_IMMU_ITLBW3TR_END . . . . . . . . . . . . . . . . . 96

6.4.1.237 OR1K_SPG_IMMU_LAST . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.238 OR1K_SPG_MAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.239 OR1K_SPG_MAC_LAST . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.240 OR1K_SPG_MAC_MACHI . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.241 OR1K_SPG_MAC_MACLO . . . . . . . . . . . . . . . . . . . . . . . 96

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 16: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

xiv CONTENTS

6.4.1.242 OR1K_SPG_PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.243 OR1K_SPG_PC_LAST . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.244 OR1K_SPG_PC_PCCR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.245 OR1K_SPG_PC_PCCR_END . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.246 OR1K_SPG_PC_PCMR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.247 OR1K_SPG_PC_PCMR_END . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.248 OR1K_SPG_PIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.249 OR1K_SPG_PIC_LAST . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.250 OR1K_SPG_PIC_PICMR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.251 OR1K_SPG_PIC_PICSR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.252 OR1K_SPG_PM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.253 OR1K_SPG_PM_LAST . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.254 OR1K_SPG_PM_PMR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.255 OR1K_SPG_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.256 OR1K_SPG_SIZE_BITS . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.257 OR1K_SPG_SYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.258 OR1K_SPG_SYS_CPUCFGR . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.259 OR1K_SPG_SYS_DCCFGR . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.260 OR1K_SPG_SYS_DCFGR . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.261 OR1K_SPG_SYS_DMMUCFGR . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.262 OR1K_SPG_SYS_EEAR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.263 OR1K_SPG_SYS_EEAR_END . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.264 OR1K_SPG_SYS_EPCR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.265 OR1K_SPG_SYS_EPCR_END . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.266 OR1K_SPG_SYS_ESR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.267 OR1K_SPG_SYS_ESR_END . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.268 OR1K_SPG_SYS_FPCSR . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.269 OR1K_SPG_SYS_GPR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.270 OR1K_SPG_SYS_GPR_END . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.271 OR1K_SPG_SYS_ICCFGR . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.272 OR1K_SPG_SYS_IMMUCFGR . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.273 OR1K_SPG_SYS_LAST . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.274 OR1K_SPG_SYS_NPC . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.275 OR1K_SPG_SYS_PCCFGR . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.276 OR1K_SPG_SYS_PPC . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.277 OR1K_SPG_SYS_SR . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 17: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

CONTENTS xv

6.4.1.278 OR1K_SPG_SYS_UPR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.279 OR1K_SPG_SYS_VR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.280 OR1K_SPG_TT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.281 OR1K_SPG_TT_LAST . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.282 OR1K_SPG_TT_TTCR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.283 OR1K_SPG_TT_TTMR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.284 OR1K_SPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.285 OR1K_SPR_CPUCFGR_CGF . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.286 OR1K_SPR_CPUCFGR_NSGF . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.287 OR1K_SPR_CPUCFGR_OB32S . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.288 OR1K_SPR_CPUCFGR_OB64S . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.289 OR1K_SPR_CPUCFGR_OF32S . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.290 OR1K_SPR_CPUCFGR_OF64S . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.291 OR1K_SPR_CPUCFGR_OV64S . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.292 OR1K_SPR_DCFGR_NDP . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.293 OR1K_SPR_DCFGR_WPCI . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.294 OR1K_SPR_UPR_DCP . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.295 OR1K_SPR_UPR_DMP . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.296 OR1K_SPR_UPR_DUP . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.297 OR1K_SPR_UPR_ICP . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.298 OR1K_SPR_UPR_IMP . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.299 OR1K_SPR_UPR_MP . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.300 OR1K_SPR_UPR_PCUP . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.301 OR1K_SPR_UPR_PICP . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.302 OR1K_SPR_UPR_PMP . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.303 OR1K_SPR_UPR_TTP . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.304 OR1K_SPR_UPR_UP . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.305 OR1K_SR_REGNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.306 OR1K_SR_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.307 OR1K_STACK_ALIGN . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.308 OR1K_SYS_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.309 OR1K_TOTAL_NUM_REGS . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.310 OR1K_TRAP_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.311 OR1K_TT_VECTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.312 OR1K_UPR_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.1.313 OR1K_VR_SPRNUM . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 18: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

xvi CONTENTS

6.4.1.314 OR1K_ZERO_REGNUM . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.2.1 print_insn_big_or32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

6.4.2.2 print_insn_little_or32 . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

6.5 gdb/remote-or1k.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

6.5.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

6.5.1.1 _initialize_remote_or1k . . . . . . . . . . . . . . . . . . . . . . . . . . 100

6.5.1.2 or1k_can_use_hw_matchpoint . . . . . . . . . . . . . . . . . . . . . . 101

6.5.1.3 or1k_clear_breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

6.5.1.4 or1k_close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

6.5.1.5 or1k_commit_debug_registers . . . . . . . . . . . . . . . . . . . . . . 102

6.5.1.6 or1k_create_inferior . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

6.5.1.7 or1k_detach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

6.5.1.8 or1k_fetch_registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

6.5.1.9 or1k_files_info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

6.5.1.10 or1k_first_free_matchpoint . . . . . . . . . . . . . . . . . . . . . . . . 104

6.5.1.11 or1k_gdb_to_dcr_type . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

6.5.1.12 or1k_insert_breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . 105

6.5.1.13 or1k_insert_hw_breakpoint . . . . . . . . . . . . . . . . . . . . . . . . 105

6.5.1.14 or1k_insert_watchpoint . . . . . . . . . . . . . . . . . . . . . . . . . . 106

6.5.1.15 or1k_interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

6.5.1.16 or1k_interrupt_query . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

6.5.1.17 or1k_interrupt_twice . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

6.5.1.18 or1k_kill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

6.5.1.19 or1k_matchpoint_equal . . . . . . . . . . . . . . . . . . . . . . . . . . 108

6.5.1.20 or1k_mourn_inferior . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

6.5.1.21 or1k_open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

6.5.1.22 or1k_prepare_to_store . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

6.5.1.23 or1k_rcmd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

6.5.1.24 or1k_read_spr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

6.5.1.25 or1k_region_ok_for_hw_watchpoint . . . . . . . . . . . . . . . . . . . 110

6.5.1.26 or1k_regnum_to_sprnum . . . . . . . . . . . . . . . . . . . . . . . . . 110

6.5.1.27 or1k_remove_breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . 111

6.5.1.28 or1k_remove_hw_breakpoint . . . . . . . . . . . . . . . . . . . . . . . 111

6.5.1.29 or1k_remove_watchpoint . . . . . . . . . . . . . . . . . . . . . . . . . 111

6.5.1.30 or1k_resume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 19: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

CONTENTS xvii

6.5.1.31 or1k_set_breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

6.5.1.32 or1k_start_remote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

6.5.1.33 or1k_stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

6.5.1.34 or1k_stopped_by_watchpoint . . . . . . . . . . . . . . . . . . . . . . . 114

6.5.1.35 or1k_stopped_data_address . . . . . . . . . . . . . . . . . . . . . . . . 114

6.5.1.36 or1k_stopped_watchpoint_info . . . . . . . . . . . . . . . . . . . . . . 115

6.5.1.37 or1k_store_registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

6.5.1.38 or1k_wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

6.5.1.39 or1k_watchpoint_gc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

6.5.1.40 or1k_write_spr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

6.5.1.41 or1k_xfer_partial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

6.5.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.1 cc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.2 ct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.3 dcr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.4 dmr1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.5 dmr2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.6 dp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.7 drr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.8 dsr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.9 dvr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.10 or1k_dbgcache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.11 or1k_is_single_stepping . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.12 or1k_old_intr_handler . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.13 or1k_target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.5.2.14 sc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

6.6 mainpage File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

6.6.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

6.7 opcodes/or32-dis.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

6.7.1 Define Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

6.7.1.1 EXTEND29 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

6.7.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

6.7.2.1 CORE_ADDR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

6.7.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

6.7.3.1 build_address_symbolic . . . . . . . . . . . . . . . . . . . . . . . . . . 122

6.7.3.2 find_bytes_big . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 20: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

xviii CONTENTS

6.7.3.3 find_bytes_little . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

6.7.3.4 or32_extract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

6.7.3.5 or32_opcode_match . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

6.7.3.6 or32_print_immediate . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

6.7.3.7 or32_print_register . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

6.7.3.8 print_insn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

6.7.3.9 print_insn_big_or32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

6.7.3.10 print_insn_little_or32 . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

6.8 opcodes/or32-opc.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

6.8.1 Define Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.1.1 EF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.1.2 EFI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.1.3 EFN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.1.4 LEAF_FLAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.1.5 MAX_AUTOMATA_SIZE . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.1.6 MAX_LEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.1.7 MAX_OP_TABLE_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.1.8 MIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.2.1 build_automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.2.2 cover_insn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.2.3 debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

6.8.2.4 destruct_automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

6.8.2.5 disassemble_insn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

6.8.2.6 extend_imm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

6.8.2.7 insn_decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

6.8.2.8 insn_extract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.8.2.9 insn_index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.8.2.10 insn_len . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.8.2.11 insn_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.8.2.12 l_none . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.8.2.13 letter_range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.8.2.14 letter_signed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.8.2.15 num_ones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.8.2.16 or32_extract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.8.2.17 or32_print_immediate . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 21: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

CONTENTS xix

6.8.2.18 or32_print_register . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.8.2.19 parse_params . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.1 automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.2 curpass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.3 disassembled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.4 disassembled_str . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.5 nuncovered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.6 op_data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.7 op_start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.8 or32_letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.9 or32_num_opcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.10 or32_opcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

6.8.3.11 ti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 22: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008
Page 23: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

Chapter 1

GNU Debugger Version 6.8 for theOpenRISC 1000 Architecture

1.1 About

This is the code changes to GDB 6.8 to support the OpenRISC 1000 Architecture. Only files that areadditional to GDB are documented here. A full description of the port is described in the EmbecosmApplication Note "Howto: Porting the GNU Debugger: Practical Experience with the OpenRISC 1000Architecture".

1.2 Installation

The changes to the standard GDB 6.8 distribution are available as a patch file from www.embecosm.com.

Apply this patch, then see the INSTALL file in the main directory for information on building and installingthese programs

1.3 Documentation

Basic instructions on using GDB with the OpenRISC 1000 can be found in the main GDB manual (as atexinfo file in the gdb/doc subdirectory). A more detailed explanation can be found in or1k.texinfo in thesame directory.

These documents may be converted to HTML, PDF, info files or PostScript by the commands "make html","make pdf", "make info" and "make ps" respectively in the gdb/doc subdirectory of the build directory.

1.4 Copying

This file is part of GDB.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU GeneralPublic License as published by the Free Software Foundation; either version 3 of the License, or (at youroption) any later version.

Page 24: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

2 GNU Debugger Version 6.8 for the OpenRISC 1000 Architecture

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; withouteven the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Seethe GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see<http://www.gnu.org/licenses/>.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 25: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

Chapter 2

Todo List

Page 26: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

4 Todo List

Global jp1_ll_read_jp1 I really do not believe this can work. ioctl() expects a FD (presumably or1k_-jtag_connection.device.lp). A read() call would be the more usual way to actually obtain data, giventhe data is set using a write() call.

Global jp1_ll_read_stream The expression precedence in the original setting of TMS bit seemed in error(due to a misunderstanding of the relative precedence of + and <<. The changed expression shouldbe correct, but needs testing.

Global or1k_jtag_stall The old code always read back at least twice after setting the stall bit. We’veassumed that wasn’t necessary (is any read back necessary?).

Global or1k_jtag_stall The old code also disabled HW trace. Was that really necessary?

Global or1k_pseudo_register_read The floating point and vector registers ought to be done as pseudo-registers.

Global or1k_pseudo_register_write The floating point and vector registers ought to be done as pseudo-registers.

Global or1k_register_name The floating point and vector registers ought to be done as pseudo-registers.

Global or1k_register_reggroup_p The Vector and Floating Point registers ought to be displayed aspseudo-registers.

Global or1k_register_type I don’t fully understand exactly what this does, but I think this makes sense!

Global or1k_registers_info At present all registers are printed with the default method. Should there besomething special for FP registers?

Global or1k_return_value This implementation is labelled OR1K, but in fact is just for the 32 bit ver-sion, OR32. This should be made explicit

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 27: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

Chapter 3

Data Structure Index

3.1 Data Structures

Here are the data structures with brief descriptions:

gdbarch_tdep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9jtr_chain_message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10jtr_chain_response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11jtr_failure_response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12jtr_read_block_message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13jtr_read_block_response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14jtr_read_message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15jtr_read_response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16jtr_write_block_message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17jtr_write_block_response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18jtr_write_message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19jtr_write_response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20temp_insn_struct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Page 28: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6 Data Structure Index

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 29: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

Chapter 4

File Index

4.1 File List

Here is a list of all files with brief descriptions:

mainpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120gdb/or1k-jtag.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23gdb/or1k-jtag.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52gdb/or1k-tdep.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57gdb/or1k-tdep.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81gdb/remote-or1k.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98opcodes/or32-dis.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121opcodes/or32-opc.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

Page 30: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

8 File Index

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 31: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

Chapter 5

Data Structure Documentation

5.1 gdbarch_tdep Struct Reference

#include <or1k-tdep.h>

Data Fields

• unsigned int num_matchpoints• unsigned int num_gpr_regs• int bytes_per_word• int bytes_per_address

5.1.1 Detailed Description

OR1K specific per-architecture information. Replaces struct_or1k_implementation. A lot of this infocomes from the config regs, so cannot be put in place until we have the actual target. Up until then we havereasonable defaults.

5.1.2 Field Documentation

5.1.2.1 unsigned int gdbarch_tdep::num_matchpoints

5.1.2.2 unsigned int gdbarch_tdep::num_gpr_regs

5.1.2.3 int gdbarch_tdep::bytes_per_word

5.1.2.4 int gdbarch_tdep::bytes_per_address

The documentation for this struct was generated from the following file:

• gdb/or1k-tdep.h

Page 32: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

10 Data Structure Documentation

5.2 jtr_chain_message Struct Reference

#include <or1k-jtag.h>

Data Fields

• uint32_t command• uint32_t length• uint32_t chain

5.2.1 Field Documentation

5.2.1.1 uint32_t jtr_chain_message::command

5.2.1.2 uint32_t jtr_chain_message::length

5.2.1.3 uint32_t jtr_chain_message::chain

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 33: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

5.3 jtr_chain_response Struct Reference 11

5.3 jtr_chain_response Struct Reference

#include <or1k-jtag.h>

Data Fields

• int32_t status

5.3.1 Field Documentation

5.3.1.1 int32_t jtr_chain_response::status

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 34: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

12 Data Structure Documentation

5.4 jtr_failure_response Struct Reference

#include <or1k-jtag.h>

Data Fields

• int32_t status

5.4.1 Field Documentation

5.4.1.1 int32_t jtr_failure_response::status

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 35: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

5.5 jtr_read_block_message Struct Reference 13

5.5 jtr_read_block_message Struct Reference

#include <or1k-jtag.h>

Data Fields

• uint32_t command• uint32_t length• uint32_t address• int32_t num_regs

5.5.1 Field Documentation

5.5.1.1 uint32_t jtr_read_block_message::command

5.5.1.2 uint32_t jtr_read_block_message::length

5.5.1.3 uint32_t jtr_read_block_message::address

5.5.1.4 int32_t jtr_read_block_message::num_regs

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 36: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

14 Data Structure Documentation

5.6 jtr_read_block_response Struct Reference

#include <or1k-jtag.h>

Data Fields

• int32_t status• int32_t num_regs

5.6.1 Field Documentation

5.6.1.1 int32_t jtr_read_block_response::status

5.6.1.2 int32_t jtr_read_block_response::num_regs

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 37: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

5.7 jtr_read_message Struct Reference 15

5.7 jtr_read_message Struct Reference

#include <or1k-jtag.h>

Data Fields

• uint32_t command• uint32_t length• uint32_t address

5.7.1 Field Documentation

5.7.1.1 uint32_t jtr_read_message::command

5.7.1.2 uint32_t jtr_read_message::length

5.7.1.3 uint32_t jtr_read_message::address

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 38: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

16 Data Structure Documentation

5.8 jtr_read_response Struct Reference

#include <or1k-jtag.h>

Data Fields

• int32_t status• uint32_t data_h• uint32_t data_l

5.8.1 Field Documentation

5.8.1.1 int32_t jtr_read_response::status

5.8.1.2 uint32_t jtr_read_response::data_h

5.8.1.3 uint32_t jtr_read_response::data_l

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 39: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

5.9 jtr_write_block_message Struct Reference 17

5.9 jtr_write_block_message Struct Reference

#include <or1k-jtag.h>

Data Fields

• uint32_t command• uint32_t length• uint32_t address• int32_t num_regs• uint32_t data [1]

5.9.1 Field Documentation

5.9.1.1 uint32_t jtr_write_block_message::command

5.9.1.2 uint32_t jtr_write_block_message::length

5.9.1.3 uint32_t jtr_write_block_message::address

5.9.1.4 int32_t jtr_write_block_message::num_regs

5.9.1.5 uint32_t jtr_write_block_message::data[1]

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 40: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

18 Data Structure Documentation

5.10 jtr_write_block_response Struct Reference

#include <or1k-jtag.h>

Data Fields

• int32_t status

5.10.1 Field Documentation

5.10.1.1 int32_t jtr_write_block_response::status

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 41: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

5.11 jtr_write_message Struct Reference 19

5.11 jtr_write_message Struct Reference

#include <or1k-jtag.h>

Data Fields

• uint32_t command• uint32_t length• uint32_t address• uint32_t data_h• uint32_t data_l

5.11.1 Field Documentation

5.11.1.1 uint32_t jtr_write_message::command

5.11.1.2 uint32_t jtr_write_message::length

5.11.1.3 uint32_t jtr_write_message::address

5.11.1.4 uint32_t jtr_write_message::data_h

5.11.1.5 uint32_t jtr_write_message::data_l

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 42: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

20 Data Structure Documentation

5.12 jtr_write_response Struct Reference

#include <or1k-jtag.h>

Data Fields

• int32_t status

5.12.1 Field Documentation

5.12.1.1 int32_t jtr_write_response::status

The documentation for this struct was generated from the following file:

• gdb/or1k-jtag.h

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 43: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

5.13 temp_insn_struct Struct Reference 21

5.13 temp_insn_struct Struct Reference

Data Fields

• unsigned long insn• unsigned long insn_mask• int in_pass

5.13.1 Field Documentation

5.13.1.1 unsigned long temp_insn_struct::insn

5.13.1.2 unsigned long temp_insn_struct::insn_mask

5.13.1.3 int temp_insn_struct::in_pass

The documentation for this struct was generated from the following file:

• opcodes/or32-opc.c

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 44: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

22 Data Structure Documentation

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 45: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

Chapter 6

File Documentation

6.1 gdb/or1k-jtag.c File Reference

#include "defs.h"

#include "inferior.h"

#include "bfd.h"

#include "symfile.h"

#include "gdb_wait.h"

#include "gdbcmd.h"

#include "gdbcore.h"

#include "serial.h"

#include "target.h"

#include "gdb_string.h"

#include "or1k-tdep.h"

#include "or1k-jtag.h"

#include <sys/poll.h>

#include <sys/socket.h>

#include <netdb.h>

#include <netinet/in.h>

#include <netinet/tcp.h>

#include <sys/select.h>

#include <sys/time.h>

#include <unistd.h>

#include <signal.h>

#include <sys/types.h>

#include <sys/stat.h>

#include <sys/ioctl.h>

Page 46: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

24 File Documentation

#include <fcntl.h>

#include <inttypes.h>

Include dependency graph for or1k-jtag.c:

gdb/or1k-jtag.c

defs.h inferior.h bfd.h symfile.h gdb_wait.h gdbcmd.h gdbcore.h serial.h target.h gdb_string.h or1k-tdep.h or1k-jtag.h

sys/types.h inttypes.h

sys/poll.h sys/socket.h netdb.h netinet/in.h netinet/tcp.h sys/select.h sys/time.h unistd.h signal.h sys/stat.h sys/ioctl.h fcntl.h

Defines

• #define OR1K_JTAG_FAST_WAIT 1• #define OR1K_JTAG_SLOW_WAIT 1000• #define JP1_TCK 0x01• #define JP1_TRST 0x02• #define JP1_TMS 0x04• #define JP1_TDI 0x08• #define JP1_TDO 0x80• #define JP1_WAIT()• #define JP1_RETRY_WAIT() (usleep (100))• #define JP1_NUM_RETRIES 16• #define JP1_CRC_SIZE 8

Functions

• void or1k_jtag_init (char ∗args)• void or1k_jtag_close ()• ULONGEST or1k_jtag_read_spr (unsigned int sprnum)• void or1k_jtag_write_spr (unsigned int sprnum, ULONGEST data)• int or1k_jtag_read_mem (CORE_ADDR addr, gdb_byte ∗bdata, int len)• int or1k_jtag_write_mem (CORE_ADDR addr, const gdb_byte ∗bdata, int len)• void or1k_jtag_stall ()• void or1k_jtag_unstall ()• void or1k_jtag_wait (int fast)• static int jp1_ll_crc_calc (int crc, int input_bit)• static void jp1_ll_reset_jp1 ()• static unsigned char jp1_ll_read_jp1 ()• static void jp1_ll_write_jp1 (unsigned char tms, unsigned char tdi)• static ULONGEST jp1_ll_read_stream (ULONGEST stream, int len, int set_last_bit)• static void jp1_ll_write_stream (ULONGEST stream, int len, int set_last_bit)• static void jp1_ll_prepare_control ()• static void jp1_ll_prepare_data ()• static int jtr_ll_connect (char ∗hostname, char ∗port_or_service)• static void jtr_ll_close ()• static enum or1k_jtag_errors jtr_ll_check (enum or1k_jtag_errors result)• static enum or1k_jtag_errors jtr_ll_read (int fd, void ∗buf, int len)• static enum or1k_jtag_errors jtr_ll_write (int fd, void ∗buf, int len)• static enum or1k_jtag_errors jtr_ll_response (int fd, void ∗resp_buf, int len)• static enum or1k_jtag_errors jp1_read_jtag_reg (unsigned int regnum, ULONGEST ∗data)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 47: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 25

• static enum or1k_jtag_errors jp1_write_jtag_reg (unsigned int regnum, ULONGEST data)• static enum or1k_jtag_errors jp1_read_jtag_block (unsigned int regnum, uint32_t ∗bdata, int count)• static enum or1k_jtag_errors jp1_write_jtag_block (unsigned int regnum, const uint32_t ∗bdata, int

count)• static enum or1k_jtag_errors jp1_select_chain (int chain)• static enum or1k_jtag_errors jtr_read_jtag_reg (unsigned int regnum, ULONGEST ∗data)• static enum or1k_jtag_errors jtr_write_jtag_reg (unsigned long int regnum, ULONGEST data)• static enum or1k_jtag_errors jtr_read_jtag_block (CORE_ADDR regnum, uint32_t ∗bdata, int

count)• static enum or1k_jtag_errors jtr_write_jtag_block (CORE_ADDR regnum, const uint32_t ∗bdata,

int count)• static enum or1k_jtag_errors jtr_select_chain (int chain)• static void or1k_jtag_read_jtag_reg (unsigned int regnum, ULONGEST ∗data)• static void or1k_jtag_write_jtag_reg (unsigned int regnum, ULONGEST data)• static void or1k_jtag_read_jtag_block (unsigned int regnum, uint32_t ∗bdata, int count)• static void or1k_jtag_write_jtag_block (unsigned int regnum, const uint32_t ∗bdata, int count)• static void or1k_jtag_select_chain (int chain)• static void or1k_jtag_reset ()• static const char ∗ or1k_jtag_err_name (enum or1k_jtag_errors e)

Variables

• static int jp1_crc_r• static int jp1_crc_w = 0• static int or1k_select_dr = 0• static int jp1_chain_addr_size [ ] = { 0, 32, 0, 0, 5 }• static int jp1_chain_data_size [ ] = { 0, 32, 0, 32, 32 }• static int jp1_chain_is_valid [ ] = { 0, 1, 0, 1, 1 }• static int jp1_chain_has_crc [ ] = { 0, 1, 0, 1, 1 }• static int jp1_chain_has_rw [ ] = { 0, 1, 0, 0, 1 }• static int or1k_jtag_current_chain• struct {

enum { OR1K_JTAG_NOT_CONNECTED, OR1K_JTAG_LOCAL, OR1K_JTAG_REMOTE }union {

int lpint fd

} deviceenum { ... } location

} or1k_jtag_connection

• enum or1k_dbg_if_version_enum or1k_dbg_if_version = OR1K_DBG_IF_ORPSOC

6.1.1 Define Documentation

6.1.1.1 #define JP1_CRC_SIZE 8

Selects crc trailer size in bits. Currently supported: 8

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 48: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

26 File Documentation

6.1.1.2 #define JP1_NUM_RETRIES 16

6.1.1.3 #define JP1_RETRY_WAIT() (usleep (100))

6.1.1.4 #define JP1_TCK 0x01

JTAG TCK pin

6.1.1.5 #define JP1_TDI 0x08

JTAG TDI pin

6.1.1.6 #define JP1_TDO 0x80

JTAG TDO pin

6.1.1.7 #define JP1_TMS 0x04

JTAG TMS pin

6.1.1.8 #define JP1_TRST 0x02

JTAG TRST pin

6.1.1.9 #define JP1_WAIT()

6.1.1.10 #define OR1K_JTAG_FAST_WAIT 1

Updated for GDB 6.8 by Jeremy Bennett. All code converted to ANSI C style and in general to GDB for-mat. All global OpenRISC specific functions and variables should now have a prefix of or1k_ or OR1K_.

The coding for the local JTAG connections assumes a Xilinx JP1 port connecting via the local parallelport. Constants and routines processing these have the prefix jp1_ or JP1_. Remote connections use theOpenRISC remote JTAG protocol.

The interface is layered

The highest level is the public functions, which operate in terms of entities that are visible in GDB: open &close the connection, read and write SPRs, read and write memory, stall and unstall the processor. Thesefunctions always succeed Function prefixes: or1k_jtag_

The next level is the abstraction provided by the OR1K Remote JTAG protocol: read/write a JTAG register,read/write a block of JTAG registers and select a scan chain. These functions may encounter errors andwill deal with them, but otherwise return no error result. Static function prefixes: or1k_jtag_

The next level is the two sets corresponding to the remote JTAG protocol, one for use with a locallyconnected (JP1) JTAG and one for a remote connection. These functions deal with errors and return anerror code to indicate an error has occurred. Static function prefixes: jp1_ and jtr_ respectively.

The final level comes in separate flavours for local use (low level routines to drive JTAG) and remote use(to build and send/receive packets). These functions deal with errors and return an error code to indicatean error has occurred. Static function prefixes: jp1_ll_ and jtr_ll_ respectively.

Errors are either dealt with silently or (if fatal) via the GDB error() function.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 49: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 27

Note:

Few people use the JP1 direct connection, and there is no confidence that this code works at all!

Commenting compatible with Doxygen added throughout. Wait us when single stepping

6.1.1.11 #define OR1K_JTAG_SLOW_WAIT 1000

Wait us when not single stepping

6.1.2 Function Documentation

6.1.2.1 static int jp1_ll_crc_calc (int crc, int input_bit) [static]

Generates new crc, sending in new bit input_bit

Note:

Only actually calculates anything if the CRC size is 8.

Parameters:

← crc Current CRC← input_bit New bit to incorporate

Returns:

New CRC

6.1.2.2 static void jp1_ll_prepare_control () [static]

Force JTAG SELECT_IR state

Should be called before every control write.

If we are not in SELECT_DR, we must be in RUN TEST/IDLE, so step the state to SELECT_DR. Onemore step takes us to SELECT_IR. Set the or1k_select_dr flag to false.

Here is the call graph for this function:

jp1_ll_prepare_control jp1_ll_write_jp1 jp1_ll_crc_calc

6.1.2.3 static void jp1_ll_prepare_data () [static]

Force JTAG SELECT_DR state

If we are not in SELECT_DR, we must be in RUN TEST/IDLE, so step the state to SELECT_DR.

Here is the call graph for this function:

jp1_ll_prepare_data jp1_ll_write_jp1 jp1_ll_crc_calc

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 50: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

28 File Documentation

6.1.2.4 static unsigned char jp1_ll_read_jp1 () [static]

Gets TD0 from JP1

This is done using ioctl().

Rewritten by Jeremy Bennett to work whatever the TMS and TDI bit positions in JP1.

Todo

I really do not believe this can work. ioctl() expects a FD (presumably or1k_jtag_-connection.device.lp). A read() call would be the more usual way to actually obtain data, given thedata is set using a write() call.

Writes:

TCK=0 TRST=1 TMS=bit0 TDI=bit1TCK=1 TRST=1 TMS=bit0 TDI=bit1

Returns:

Bit 0 is the value of TD0.

Here is the call graph for this function:

jp1_ll_read_jp1 jp1_ll_crc_calc

6.1.2.5 static ULONGEST jp1_ll_read_stream (ULONGEST stream, int len, int set_last_bit)[static]

Read a stream of bits from TDO whilst also writing TDI and optionally TMS

Reads a bitstream of 1 or more bits from TDO, MS bit first whilst writing a bitstream of the same lengthLS bit first. Optionally (if set_last_bit is 1) writes the MS bit with TMS also set.

Todo

The expression precedence in the original setting of TMS bit seemed in error (due to a misunderstand-ing of the relative precedence of + and <<. The changed expression should be correct, but needstesting.

Note:

If len is > sizeof (ULONGEST), then then only 0’s are written for all except the MS sizeof(ULONGEST) bits of stream.

Parameters:

← stream string of bits to write to TDI

← len number of bits to write

← set_last_bit if true also set TMS bit with last TDI bit.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 51: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 29

Returns:

Bitstream read MS bit first from TDO.

Here is the call graph for this function:

jp1_ll_read_stream

jp1_ll_read_jp1

jp1_ll_write_jp1

jp1_ll_crc_calc

6.1.2.6 static void jp1_ll_reset_jp1 () [static]

Resets the local JTAG via JP1

Only works if this is a local connection

Writes:

TCK=0 TRST=0 TMS=0 TDI=0TCK=0 TRST=1 TMS=0 TDI=0

JTAG reset is active low

6.1.2.7 static void jp1_ll_write_jp1 (unsigned char tms, unsigned char tdi) [static]

Clocks a bit into the local JTAG via JP1

Takes TMS and TDI values from the bottom two bits of the argument

Rewritten by Jeremy Bennett to work whatever the TMS and TDI bit positions in JP1.

Writes:

TCK=0 TRST=1 TMS=tms TDI=tdiTCK=1 TRST=1 TMS=tms TDI=tdi

Parameters:

← tms The JTAG TMS pin to be clocked in

← tdi The JTAG TDI pin to be clocked in

Here is the call graph for this function:

jp1_ll_write_jp1 jp1_ll_crc_calc

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 52: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

30 File Documentation

6.1.2.8 static void jp1_ll_write_stream (ULONGEST stream, int len, int set_last_bit) [static]

Write a stream of bits to TDI and optionally TMS

Writes bitstream of 1 or more bits to TDI, MS bit first. Optionally (if set_last_bit is 1) writes the last bitwith TMS also set.

Note:

If len is > sizeof (ULONGEST), then then only 0’s are written for all the bits > sizeof (ULONGEST)

Parameters:

← stream string of bits to write to TDI

← len number of bits to write

← set_last_bit if true also set TMS bit with last TDI bit.

Here is the call graph for this function:

jp1_ll_write_stream jp1_ll_write_jp1 jp1_ll_crc_calc

6.1.2.9 static enum or1k_jtag_errors jp1_read_jtag_block (unsigned int regnum, uint32_t ∗ bdata,int count) [static]

Process a local OpenRISC 1000 JTAG block read command

Process the JTAG state machine to read values from a block of registers/memory. Built on top of the localroutine to read a single register.

If any of the individual reads fail, give up and return the error code of that failure. Otherwise return success.

Parameters:

← regnum The first register for the block from which to read

→ bdata Pointer to block for the returned values

→ count How many registers to read.

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

jp1_read_jtag_block jp1_read_jtag_reg

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 53: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 31

6.1.2.10 static enum or1k_jtag_errors jp1_read_jtag_reg (unsigned int regnum, ULONGEST ∗data) [static]

Read a JTAG register from a local JTAG connection.

What this does depends on which chain is selected. Drive the JTAG state machine to read a value from aregister

Parameters:

← regnum The JTAG register from which to read

→ data Pointer for the returned value.

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

jp1_read_jtag_reg

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

6.1.2.11 static enum or1k_jtag_errors jp1_select_chain (int chain) [static]

Process a local OpenRISC 1000 JTAG set chain command

Process the JTAG state machine to select the specified chain, unless it is already selected.

Parameters:

← chain The scan chain to use

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

jp1_select_chain

jp1_ll_prepare_control

jp1_ll_write_jp1

jp1_ll_write_stream

jp1_ll_crc_calc

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 54: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

32 File Documentation

6.1.2.12 static enum or1k_jtag_errors jp1_write_jtag_block (unsigned int regnum, const uint32_t∗ bdata, int count) [static]

Process a local OpenRISC 1000 JTAG block write command

Process the JTAG state machine to write values to a block of registers/memory. Built on top of the localroutine to write a single register.

If any of the individual writes fail, give up and return the error code of that failure. Otherwise returnsuccess.

Parameters:

← regnum The first register for the block to which to write

→ bdata Pointer to block for the values to write

→ count How many registers to write.

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

jp1_write_jtag_block jp1_write_jtag_reg

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

6.1.2.13 static enum or1k_jtag_errors jp1_write_jtag_reg (unsigned int regnum, ULONGESTdata) [static]

Write a JTAG register on a local JTAG connection.

What this does depends on which chain is selected. Drive the JTAG state machine to read a value from aregister

Parameters:

← regnum The register to write to

← data Data to write

Returns:

system error (positive) or OR1K JTAG error code

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 55: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 33

Here is the call graph for this function:

jp1_write_jtag_reg

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

6.1.2.14 static enum or1k_jtag_errors jtr_ll_check (enum or1k_jtag_errors result) [static]

Close down a remote connection if the server has terminated

Utility function which closes the remote connection if the error result OR1K_JTAG_ERR_SERVER_-TERMINATED has been received.

Parameters:

← result Result code to check

Returns:

The result passed as argument (for convenience)

Here is the call graph for this function:

jtr_ll_check jtr_ll_close

6.1.2.15 static void jtr_ll_close () [static]

Close down an OpenRISC 1000 JTAG remote connection

Closes the connection without waiting for any queued messages on the socket.

In this version the remote socket FD is always used and the result is discarded, since it is never used by thecalling function.

6.1.2.16 static int jtr_ll_connect (char ∗ hostname, char ∗ port_or_service) [static]

Connect to a remote OpenRISC 1000 JTAG server.

Added by CZ 24/05/01

Makes the connection as a socket and returns the file descriptor for the socket.

Parameters:

← hostname The host to connect to

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 56: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

34 File Documentation

← port_or_service Port or service to connect to

Returns:

A file descriptor for the new socket or 0 on error.

6.1.2.17 static enum or1k_jtag_errors jtr_ll_read (int fd, void ∗ buf, int len) [static]

Read from a remote OpenRISC 1000 JTAG connection

Added by CZ 24/05/01. Modified by Jeremy Bennett.

The read should always be blocking, so if we get a result indicating a non-blocking FD, we simulate theblocking behavior using poll(). May take several reads to get the whole buffer in.

Parameters:

← fd File descriptor for remote connection→ buf Buffer for data that is read← len Number of bytes to read

Returns:

system error (positive) or OR1K JTAG error code

6.1.2.18 static enum or1k_jtag_errors jtr_ll_response (int fd, void ∗ resp_buf, int len)[static]

Fetch a remote OpenRISC 1000 JTAG response

All OR1K reponse structs start with a uint32_t status field. If a response is an error response this is all thatis set.

If the response is not an error, then there may be further bytes to get. The total number to get is gives bylen.

All data in the response is in raw network format. A bug has been fixed which converted the status to hostformat in the buffer (that should be done by the caller).

All errors are not logged using the GDB logging function, not just plain printf.

Parameters:

← fd File descriptor for remote connection→ resp_buf Buffer for the response← len Size of the response buffer in bytes if this is a successful response.

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

jtr_ll_response

jtr_ll_check

jtr_ll_read

jtr_ll_close

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 57: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 35

6.1.2.19 static enum or1k_jtag_errors jtr_ll_write (int fd, void ∗ buf, int len) [static]

Write to a remote OpenRISC 1000 JTAG connection

Added by CZ 24/05/01. Modified by Jeremy Bennett.

The write should always be blocking, so if we get a result indicating a non-blocking FD, we simulate theblocking behavior using poll(). May take several writes to get the whole buffer out.

Parameters:

← fd File descriptor for remote connection

← buf Buffer of data to be written

← len Number of bytes to write

Returns:

system error (positive) or OR1K JTAG error code

6.1.2.20 static enum or1k_jtag_errors jtr_read_jtag_block (CORE_ADDR regnum, uint32_t ∗bdata, int count) [static]

Read a block of JTAG registers from a remote OpenRISC 1000 JTAG server

What this does depends on which chain is selected.

Construct the command from the args and send it. If successful get the response.

All args and the results are in host format. All transmitted data is in network format. This routine convertsbetween the two

Parameters:

← regnum The first register to read

→ bdata Pointer to block of memory for the returned values.

→ count Number of registers to read.

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

jtr_read_jtag_block

jtr_ll_check

jtr_ll_read

jtr_ll_response

jtr_ll_write

jtr_ll_close

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 58: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

36 File Documentation

6.1.2.21 static enum or1k_jtag_errors jtr_read_jtag_reg (unsigned int regnum, ULONGEST ∗data) [static]

Read a JTAG register from a remote OpenRISC 1000 JTAG server

What this does depends on which chain is selected.

Build the command from the args and send it. If successful get the response.

All args and the results are in host format. All transmitted data is in network format. This routine convertsbetween the two

Parameters:

← regnum The JTAG register to read

→ data Pointer for the returned value.

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

jtr_read_jtag_reg

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

6.1.2.22 static enum or1k_jtag_errors jtr_select_chain (int chain) [static]

Select a remote OpenRISC 1000 JTAG chain command

Construct the command from the args and send it. If successful get the response.

All args and the results are in host format. All transmitted data is in network format. This routine convertsbetween the two

Parameters:

← chain The scan chain to use

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

jtr_select_chain

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 59: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 37

6.1.2.23 static enum or1k_jtag_errors jtr_write_jtag_block (CORE_ADDR regnum, constuint32_t ∗ bdata, int count) [static]

Write a block of JTAG registers on a remote OpenRISC 1000 JTAG server

What this does depends on which chain is selected.

Construct the command from the args and send it. If successful get the response.

All args and the results are in host format. All transmitted data is in network format. This routine convertsbetween the two

Parameters:

← regnum The start address address for the block to be read

→ bdata Pointer to values to write to the block of memory.

→ count Number of values to read.

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

jtr_write_jtag_block

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

6.1.2.24 static enum or1k_jtag_errors jtr_write_jtag_reg (unsigned long int regnum, ULONGESTdata) [static]

Write a JTAG register on a remote OpenRISC 1000 JTAG server

What this does depends on which chain is selected.

Build the command from the args and send it. If successful get the response.

All args and the results are in host format. All transmitted data is in network format. This routine convertsbetween the two

Parameters:

← regnum The JTAG register to write

→ data The data to write

Returns:

system error (positive) or OR1K JTAG error code

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 60: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

38 File Documentation

Here is the call graph for this function:

jtr_write_jtag_reg

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

6.1.2.25 void or1k_jtag_close ()

Close down an OpenRISC 1000 JTAG connection.

Fixed an apparent problem - jtr_ll_close() should not be used with the local connection, since it isn’t asocket.

Here is the call graph for this function:

or1k_jtag_close jtr_ll_close

6.1.2.26 static const char ∗ or1k_jtag_err_name (enum or1k_jtag_errors e) [static]

Utility method to turn an OpenRISC 1000 JTAG error into a string

Positive error values are system errors, negative values OpenRISC 100 JTAG errors.

Parameters:

← e The error number

6.1.2.27 void or1k_jtag_init (char ∗ args)

Initialize a new OpenRISC 1000 JTAG connection.

Initialize a new connection to the or1k board, and make sure we are really connected.

Parameters:

← args The entity to connect to followed by an optional NO_RESET flag

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 61: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 39

Here is the call graph for this function:

or1k_jtag_init

jp1_ll_reset_jp1

jtr_ll_close

jtr_ll_connect

or1k_jtag_reset

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1

jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_read

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

jp1_write_jtag_reg

jtr_write_jtag_reg

6.1.2.28 static void or1k_jtag_read_jtag_block (unsigned int regnum, uint32_t ∗ bdata, int count)[static]

Function to read a block of JTAG registers via OpenRISC 1000 JTAG

Call either the local or remote version of the corresponding JTAG function as appropriate.

Parameters:

← regnum The starting register

→ bdata Pointer to a buffer for the results

← count Number of registers to be read

Returns:

system error (positive) or OR1K JTAG error code

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 62: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

40 File Documentation

Here is the call graph for this function:

or1k_jtag_read_jtag_block

jp1_read_jtag_block

jtr_read_jtag_block

or1k_jtag_err_name

jp1_read_jtag_reg

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_read

jtr_ll_response

jtr_ll_write

jtr_ll_close

6.1.2.29 static void or1k_jtag_read_jtag_reg (unsigned int regnum, ULONGEST ∗ data)[static]

Function to read a JTAG register

Call either the local or remote version of the corresponding JTAG function as appropriate.

Parameters:

← regnum The JTAG register to read

→ data Where to put the written value

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

or1k_jtag_read_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 63: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 41

6.1.2.30 int or1k_jtag_read_mem (CORE_ADDR addr, gdb_byte ∗ bdata, int len)

Global function to read a block of memory via OpenRISC 1000 JTAG

Use the underlying JTAG protocol calls to select the relevant scan chain and read the memory. Alwayssucceeds.

The underlying protocol only reads whole uint32_t words, so we must fix this if the address and/or len arenot on a word boundary with partial reads.

This needs to work even for very small blocks of data (where the start and end may be in the same word).

This also runs into endianism issues, since this is a read of a stream of bytes, but the underlying JTAG callis a stream of uint32_t. We need to handle this appropriately.

Parameters:

← addr The starting address for the read

→ bdata Pointer to a buffer for the results

← len Number of values to be read

Returns:

The number of bytes read, or zero if there is an error

Here is the call graph for this function:

or1k_jtag_read_mem

or1k_jtag_read_jtag_block

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

jp1_read_jtag_block

jtr_read_jtag_block

or1k_jtag_err_name

jp1_read_jtag_reg

jp1_ll_prepare_data jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_read

jtr_ll_response

jtr_ll_write

jtr_ll_closejtr_read_jtag_reg

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

6.1.2.31 ULONGEST or1k_jtag_read_spr (unsigned int sprnum)

Global function to read a special purpose register via OpenRISC 1000 JTAG

This can be used to read GPRs, since GPRs are mapped onto SPRs.

Use the underlying JTAG protocol calls to select the relevant scan chain and get the SPR value. Alwayssucceeds.

Parameters:

← sprnum The address (register) to read

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 64: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

42 File Documentation

Returns:

The value read

Here is the call graph for this function:

or1k_jtag_read_spr

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

6.1.2.32 static void or1k_jtag_reset () [static]

Function to reset the CPU.

This takes the processor into reset and then releases the reset.

The code is drawn from the GDB 5.3 code, pending clarification of how the reset works on real hardware.However there is no attempt to clear HW trace (not available with Igor Moder’s version of the JTAGhardware), nor to set the stall flag (reset is defined to clear stall).

Use the underlying JTAG protocol calls to select the relevant scan chain and change the relevant registers.Always succeeds.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 65: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 43

Here is the call graph for this function:

or1k_jtag_reset

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1

jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

jp1_write_jtag_reg

jtr_write_jtag_reg

6.1.2.33 static void or1k_jtag_select_chain (int chain) [static]

Function to select a scan chain via OpenRISC 1000 JTAG

Call either the local or remote version of the corresponding JTAG function as appropriate.

Parameters:

← chain The scan chain to use

Returns:

system error (positive) or OR1K JTAG error code

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 66: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

44 File Documentation

Here is the call graph for this function:

or1k_jtag_select_chain

jp1_select_chain

jtr_select_chain

or1k_jtag_err_name

jp1_ll_prepare_control

jp1_ll_write_jp1

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

6.1.2.34 void or1k_jtag_stall ()

Global function to stall the CPU

Use the underlying JTAG protocol calls to select the relevant scan chain and change the relevant registers.Always succeeds.

Todo

The old code always read back at least twice after setting the stall bit. We’ve assumed that wasn’tnecessary (is any read back necessary?).

Todo

The old code also disabled HW trace. Was that really necessary?

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 67: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 45

Here is the call graph for this function:

or1k_jtag_stall

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1

jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

jp1_write_jtag_reg

jtr_write_jtag_reg

6.1.2.35 void or1k_jtag_unstall ()

Global function to unstall the CPU

Use the underlying JTAG protocol calls to select the relevant scan chain and change the relevant registers.Always succeeds.

Note:

At one stage the code used to loop to check the stall flag had been cleared. However that could allowtime for the target to execute and then stall again, so this function would hang.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 68: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

46 File Documentation

Here is the call graph for this function:

or1k_jtag_unstall

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1

jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

jp1_write_jtag_reg

jtr_write_jtag_reg

6.1.2.36 void or1k_jtag_wait (int fast)

Global function to wait for the CPU to stall

Use the underlying JTAG protocol calls to wait for the processor to stall. Always succeeds.

The wait time should be small if we are single stepping, but can be longer otherwise. This is controlled bythe argument.

Parameters:

← fast 1 (true) if the wait should be quick.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 69: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 47

Here is the call graph for this function:

or1k_jtag_wait

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

6.1.2.37 static void or1k_jtag_write_jtag_block (unsigned int regnum, const uint32_t ∗ bdata, intcount) [static]

Function to write a block of JTAG registers via OpenRISC 1000 JTAG

Call either the local or remote version of the corresponding JTAG function as appropriate.

Parameters:

← regnum The starting register to write

→ bdata Pointer to a buffer with the values to write

← count Number of values to write

Returns:

system error (positive) or OR1K JTAG error code

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 70: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

48 File Documentation

Here is the call graph for this function:

or1k_jtag_write_jtag_block

jp1_write_jtag_block

jtr_write_jtag_block

or1k_jtag_err_name

jp1_write_jtag_reg

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

6.1.2.38 static void or1k_jtag_write_jtag_reg (unsigned int regnum, ULONGEST data)[static]

Function to write a JTAG register

Call either the local or remote version of the corresponding JTAG function as appropriate.

Parameters:

← regnum The JTAG register to write

← data The value to write

Returns:

system error (positive) or OR1K JTAG error code

Here is the call graph for this function:

or1k_jtag_write_jtag_reg

jp1_write_jtag_reg

jtr_write_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 71: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 49

6.1.2.39 int or1k_jtag_write_mem (CORE_ADDR addr, const gdb_byte ∗ bdata, int len)

Global function to write a block of memory via OpenRISC 1000 JTAG

Use the underlying JTAG protocol calls to select the relevant scan chain and write the memory. Alwayssucceeds.

The underlying protocol only writes whole words, so we must fix this if the address and/or len are not on aword boundary with partial writes.

This also runs into endianism issues, since this is a read of a stream of bytes, but the underlying JTAG callis a stream of uint32_t. We need to handle this appropriately.

Parameters:

← addr The starting address for the read→ bdata Pointer to a buffer for the results← len Number of values to be read

Returns:

The number of bytes read, or zero if there is an error

Here is the call graph for this function:

or1k_jtag_write_mem

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

or1k_jtag_write_jtag_block

or1k_jtag_write_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1

jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

jp1_write_jtag_block

jtr_write_jtag_block

jp1_write_jtag_reg

jtr_write_jtag_reg

6.1.2.40 void or1k_jtag_write_spr (unsigned int sprnum, ULONGEST data)

Global function to write a special purpose register via OpenRISC 1000 JTAG

This can be used to write GPRs, since GPRs are mapped onto SPRs.

Use the underlying JTAG protocol calls to select the relevant scan chain and write the SPR value. Alwayssucceeds.

Parameters:

← sprnum The SPR to write

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 72: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

50 File Documentation

← data The value to write

Here is the call graph for this function:

or1k_jtag_write_spr

or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_select_chain

jtr_select_chain

or1k_jtag_err_name

jp1_ll_prepare_control

jp1_ll_write_jp1

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_write_jtag_reg

jtr_write_jtag_reg

jp1_ll_prepare_data

jp1_ll_read_jp1jp1_ll_read_stream

6.1.3 Variable Documentation

6.1.3.1 union { ... } device

6.1.3.2 int fd

6.1.3.3 int jp1_chain_addr_size[ ] = { 0, 32, 0, 0, 5 } [static]

Scan chain info.

6.1.3.4 int jp1_chain_data_size[ ] = { 0, 32, 0, 32, 32 } [static]

6.1.3.5 int jp1_chain_has_crc[ ] = { 0, 1, 0, 1, 1 } [static]

6.1.3.6 int jp1_chain_has_rw[ ] = { 0, 1, 0, 0, 1 } [static]

6.1.3.7 int jp1_chain_is_valid[ ] = { 0, 1, 0, 1, 1 } [static]

6.1.3.8 int jp1_crc_r [static]

CRC of current read data

6.1.3.9 int jp1_crc_w = 0 [static]

CRC of current written data

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 73: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.1 gdb/or1k-jtag.c File Reference 51

6.1.3.10 enum { ... } location

6.1.3.11 int lp

6.1.3.12 enum or1k_dbg_if_version_enum or1k_dbg_if_version = OR1K_DBG_IF_ORPSOC

Global variable identifying the debug interface version. Assume consistency with GDB 5.3, unless other-wise corrected.

6.1.3.13 struct { ... } or1k_jtag_connection

Information about the JTAG connection, if any

6.1.3.14 int or1k_jtag_current_chain [static]

Currently selected scan chain - just to prevent unnecessary transfers.

6.1.3.15 int or1k_select_dr = 0 [static]

Designates whether we are in SELECT_DR state

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 74: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

52 File Documentation

6.2 gdb/or1k-jtag.h File Reference

#include <sys/types.h>

#include <inttypes.h>

Include dependency graph for or1k-jtag.h:

gdb/or1k-jtag.h

sys/types.h inttypes.h

This graph shows which files directly or indirectly include this file:

gdb/or1k-jtag.h

gdb/or1k-jtag.c gdb/remote-or1k.c

Data Structures

• struct jtr_read_message

• struct jtr_write_message

• struct jtr_read_block_message

• struct jtr_write_block_message

• struct jtr_chain_message

• struct jtr_failure_response

• struct jtr_read_response

• struct jtr_write_response

• struct jtr_read_block_response

• struct jtr_write_block_response

• struct jtr_chain_response

Defines

• #define OR1K_JI_SIZE (4)

• #define OR1K_SC_SIZE (4)

• #define OR1K_JTAG_RISCOP

• #define OR1K_JTAG_RISCOP_STALL 0x00000001

• #define OR1K_JTAG_RISCOP_RESET 0x00000002

• #define OR1K_MAX_JTAG_WRITE 1024

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 75: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.2 gdb/or1k-jtag.h File Reference 53

Enumerations

• enum or1k_jtag_instr { OR1K_JI_CHAIN_SELECT = 3, OR1K_JI_DEBUG = 8 }• enum or1k_jtag_chains { OR1K_SC_UNDEF = -1, OR1K_SC_RISC_DEBUG = 1, OR1K_SC_-

REGISTER = 4, OR1K_SC_WISHBONE = 5 }• enum or1k_dbg_if_version_enum { OR1K_DBG_IF_ORPSOC, OR1K_DBG_IF_MOHOR }• enum or1k_jtag_proxy_protocol_commands {

OR1K_JTAG_COMMAND_READ = 1, OR1K_JTAG_COMMAND_WRITE = 2, OR1K_JTAG_-COMMAND_READ_BLOCK = 3, OR1K_JTAG_COMMAND_WRITE_BLOCK = 4,

OR1K_JTAG_COMMAND_CHAIN = 5 }• enum or1k_jtag_errors {

OR1K_JTAG_ERR_NONE = 0, OR1K_JTAG_ERR_CRC = -1, OR1K_JTAG_ERR_MEM = -2,OR1K_JTAG_ERR_INVALID_COMMAND = -3,

OR1K_JTAG_ERR_SERVER_TERMINATED = -4, OR1K_JTAG_ERR_NO_CONNECTION =-5, OR1K_JTAG_ERR_PROTOCOL_ERROR = -6, OR1K_JTAG_ERR_COMMAND_NOT_-IMPLEMENTED = -7,

OR1K_JTAG_ERR_INVALID_CHAIN = -8, OR1K_JTAG_ERR_INVALID_ADDRESS = -9,OR1K_JTAG_ERR_ACCESS_EXCEPTION = -10, OR1K_JTAG_ERR_INVALID_LENGTH = -11,

OR1K_JTAG_ERR_OUT_OF_MEMORY = -12 }

Functions

• void or1k_jtag_init (char ∗args)• void or1k_jtag_close ()• ULONGEST or1k_jtag_read_spr (unsigned int sprnum)• void or1k_jtag_write_spr (unsigned int sprnum, ULONGEST data)• int or1k_jtag_read_mem (CORE_ADDR addr, gdb_byte ∗bdata, int len)• int or1k_jtag_write_mem (CORE_ADDR addr, const gdb_byte ∗bdata, int len)• void or1k_jtag_stall ()• void or1k_jtag_unstall ()• void or1k_jtag_wait (int fast)

Variables

• enum or1k_dbg_if_version_enum or1k_dbg_if_version

6.2.1 Define Documentation

6.2.1.1 #define OR1K_JI_SIZE (4)

————————————————————————— Updated for GDB 6.8 by Jeremy Bennett.All code converted to ANSI C style and in general to GDB format. All global OpenRISC specific functionsand variables should now have a prefix of or1k_ or OR1K_.

JTAG connects to or1k target ops. See or1k-tdep.c. This header is also used by Or1ksim, the OpenRISC1000 architectural simulator. ————————————————————————–

JTAG instruction size. See JTAG documentation about these.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 76: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

54 File Documentation

6.2.1.2 #define OR1K_JTAG_RISCOP

Value:

(OR1K_DBG_IF_ORPSOC == or1k_dbg_if_version ? 0x04 : \0x00 )

JTAG registers (for use with ORK1_SC_REGISTER scan chain). There are two flavours of this, dependingwhich version of the debug interface you are using.

6.2.1.3 #define OR1K_JTAG_RISCOP_RESET 0x00000002

6.2.1.4 #define OR1K_JTAG_RISCOP_STALL 0x00000001

6.2.1.5 #define OR1K_MAX_JTAG_WRITE 1024

Maximum size of write block sent in one go

6.2.1.6 #define OR1K_SC_SIZE (4)

Scan chain size in bits.

6.2.2 Enumeration Type Documentation

6.2.2.1 enum or1k_dbg_if_version_enum

Version of the debug interface. This affects the address on the control (SC_REGISTER) scan chain.

Enumerator:

OR1K_DBG_IF_ORPSOC

OR1K_DBG_IF_MOHOR

6.2.2.2 enum or1k_jtag_chains

All JTAG chains.

Enumerator:

OR1K_SC_UNDEF

OR1K_SC_RISC_DEBUG

OR1K_SC_REGISTER

OR1K_SC_WISHBONE

6.2.2.3 enum or1k_jtag_errors

Error codes for the OpenRISC 1000 JTAG debugging protocol

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 77: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.2 gdb/or1k-jtag.h File Reference 55

Enumerator:

OR1K_JTAG_ERR_NONE

OR1K_JTAG_ERR_CRC

OR1K_JTAG_ERR_MEM

OR1K_JTAG_ERR_INVALID_COMMAND

OR1K_JTAG_ERR_SERVER_TERMINATED

OR1K_JTAG_ERR_NO_CONNECTION

OR1K_JTAG_ERR_PROTOCOL_ERROR

OR1K_JTAG_ERR_COMMAND_NOT_IMPLEMENTED

OR1K_JTAG_ERR_INVALID_CHAIN

OR1K_JTAG_ERR_INVALID_ADDRESS

OR1K_JTAG_ERR_ACCESS_EXCEPTION

OR1K_JTAG_ERR_INVALID_LENGTH

OR1K_JTAG_ERR_OUT_OF_MEMORY

6.2.2.4 enum or1k_jtag_instr

JTAG instructions. See JTAG documentation about these.

Enumerator:

OR1K_JI_CHAIN_SELECT

OR1K_JI_DEBUG

6.2.2.5 enum or1k_jtag_proxy_protocol_commands

The OR1K JTAG proxy protocol commands.

Enumerator:

OR1K_JTAG_COMMAND_READ

OR1K_JTAG_COMMAND_WRITE

OR1K_JTAG_COMMAND_READ_BLOCK

OR1K_JTAG_COMMAND_WRITE_BLOCK

OR1K_JTAG_COMMAND_CHAIN

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 78: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

56 File Documentation

6.2.3 Function Documentation

6.2.3.1 void or1k_jtag_close ()

6.2.3.2 void or1k_jtag_init (char ∗ args)

6.2.3.3 int or1k_jtag_read_mem (CORE_ADDR addr, gdb_byte ∗ bdata, int len)

6.2.3.4 ULONGEST or1k_jtag_read_spr (unsigned int sprnum)

6.2.3.5 void or1k_jtag_stall ()

6.2.3.6 void or1k_jtag_unstall ()

6.2.3.7 void or1k_jtag_wait (int fast)

6.2.3.8 int or1k_jtag_write_mem (CORE_ADDR addr, const gdb_byte ∗ bdata, int len)

6.2.3.9 void or1k_jtag_write_spr (unsigned int sprnum, ULONGEST data)

6.2.4 Variable Documentation

6.2.4.1 enum or1k_dbg_if_version_enum or1k_dbg_if_version

Global variable identifying the debug interface version. Assume consistency with GDB 5.3, unless other-wise corrected.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 79: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 57

6.3 gdb/or1k-tdep.c File Reference

#include "demangle.h"

#include "defs.h"

#include "gdb_string.h"

#include "frame.h"

#include "inferior.h"

#include "symtab.h"

#include "value.h"

#include "gdbcmd.h"

#include "language.h"

#include "gdbcore.h"

#include "symfile.h"

#include "objfiles.h"

#include "gdbtypes.h"

#include "target.h"

#include "regcache.h"

#include "opcode/or32.h"

#include "or1k-tdep.h"

#include "safe-ctype.h"

#include "block.h"

#include "reggroups.h"

#include "arch-utils.h"

#include "frame-unwind.h"

#include "frame-base.h"

#include "dwarf2-frame.h"

#include "trad-frame.h"

#include <inttypes.h>

Include dependency graph for or1k-tdep.c:

gdb/or1k-tdep.c

demangle.h defs.h gdb_string.h frame.h inferior.h symtab.h value.h gdbcmd.h language.h gdbcore.h symfile.h objfiles.h gdbtypes.h target.h regcache.h opcode/or32.h or1k-tdep.h safe-ctype.h block.h reggroups.h arch-utils.h frame-unwind.h frame-base.h dwarf2-frame.h trad-frame.h inttypes.h

Functions

• static unsigned long int or1k_fetch_instruction (struct frame_info ∗next_frame, CORE_ADDR addr)• static void or1k_store_instruction (struct frame_info ∗next_frame, CORE_ADDR addr, unsigned

long int insn)• static int or1k_frame_size (struct frame_info ∗next_frame, CORE_ADDR func_start_addr)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 80: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

58 File Documentation

• static int or1k_frame_fp_loc (struct frame_info ∗next_frame, CORE_ADDR func_start_addr)• static int or1k_frame_size_check (struct frame_info ∗next_frame, CORE_ADDR func_start_addr)• static int or1k_link_address (struct frame_info ∗next_frame, CORE_ADDR func_start_addr)• static int or1k_get_saved_reg (struct frame_info ∗next_frame, CORE_ADDR instr_start_addr, int∗reg_offset)

• static struct trad_frame_cache ∗ or1k_frame_unwind_cache (struct frame_info ∗next_frame, void∗∗this_prologue_cache)

• static void or1k_frame_this_id (struct frame_info ∗next_frame, void ∗∗this_prologue_cache, structframe_id ∗this_id)

• static void or1k_frame_prev_register (struct frame_info ∗next_frame, void ∗∗this_prologue_cache,int regnum, int ∗optimizedp, enum lval_type ∗lvalp, CORE_ADDR ∗addrp, int ∗realregp, gdb_byte∗bufferp)

• static CORE_ADDR or1k_frame_base_address (struct frame_info ∗next_frame, void ∗∗this_-prologue_cache)

• static enum return_value_convention or1k_return_value (struct gdbarch ∗gdbarch, struct type ∗type,struct regcache ∗regcache, gdb_byte ∗readbuf, const gdb_byte ∗writebuf)

• static const gdb_byte ∗ or1k_breakpoint_from_pc (struct gdbarch ∗gdbarch, CORE_ADDR ∗bp_-addr, int ∗bp_size)

• static int or1k_single_step_through_delay (struct gdbarch ∗gdbarch, struct frame_info ∗this_frame)• static void or1k_pseudo_register_read (struct gdbarch ∗gdbarch, struct regcache ∗regcache, int reg-

num, gdb_byte ∗buf)• static void or1k_pseudo_register_write (struct gdbarch ∗gdbarch, struct regcache ∗regcache, int reg-

num, const gdb_byte ∗buf)• static const char ∗ or1k_register_name (struct gdbarch ∗gdbarch, int regnum)• static struct type ∗ or1k_register_type (struct gdbarch ∗arch, int regnum)• static void or1k_registers_info (struct gdbarch ∗gdbarch, struct ui_file ∗file, struct frame_info∗frame, int regnum, int all)

• static int or1k_register_reggroup_p (struct gdbarch ∗gdbarch, int regnum, struct reggroup ∗group)• static CORE_ADDR or1k_skip_prologue (struct gdbarch ∗gdbarch, CORE_ADDR pc)• static CORE_ADDR or1k_frame_align (struct gdbarch ∗gdbarch, CORE_ADDR sp)• static CORE_ADDR or1k_unwind_pc (struct gdbarch ∗gdbarch, struct frame_info ∗next_frame)• static CORE_ADDR or1k_unwind_sp (struct gdbarch ∗gdbarch, struct frame_info ∗next_frame)• static CORE_ADDR or1k_push_dummy_call (struct gdbarch ∗gdbarch, struct value ∗function,

struct regcache ∗regcache, CORE_ADDR bp_addr, int nargs, struct value ∗∗args, CORE_ADDRsp, int struct_return, CORE_ADDR struct_addr)

• static struct frame_id or1k_unwind_dummy_id (struct gdbarch ∗gdbarch, struct frame_info ∗next_-frame)

• static struct frame_unwind ∗ or1k_frame_sniffer (struct frame_info ∗next_frame)• static struct gdbarch ∗ or1k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list ∗arches)• static void or1k_dump_tdep (struct gdbarch ∗gdbarch, struct ui_file ∗file)• static const char ∗ or1k_spr_group_name (int group)• static char ∗ or1k_spr_register_name (int group, int index, char ∗name)• static int or1k_groupnum_from_name (char ∗group_name)• static int or1k_regnum_from_name (int group, char ∗name)• static int or1k_tokenize (char ∗str, char ∗∗tok)• static char ∗ or1k_parse_spr_params (char ∗args, int ∗group, int ∗index, int is_set)• static ULONGEST or1k_read_spr (unsigned int regnum)• static void or1k_write_spr (unsigned int regnum, ULONGEST data)• static void info_spr_command (char ∗args, int from_tty)• static void or1k_spr_command (char ∗args, int from_tty)• static void info_matchpoints_command (char ∗args, int from_tty)• static void or1k_info_spr_command (char ∗args, int from_tty)• void _initialize_or1k_tdep (void)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 81: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 59

6.3.1 Function Documentation

6.3.1.1 void _initialize_or1k_tdep (void)

Main entry point for target architecture initialization

In this version initializes the architecture via registers_gdbarch_init(). Add a command to set and showspecial purpose registers.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 82: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

60 File Documentation

Here is the call graph for this function:

_initialize_or1k_tdep

build_automata

or1k_dump_tdep

or1k_gdbarch_init

or1k_info_spr_command

or1k_spr_command

cover_insn

insn_extract

parse_params

debug

letter_signed

num_ones

or1k_breakpoint_from_pc

or1k_frame_align

or1k_frame_base_address

or1k_frame_sniffer

or1k_pseudo_register_read

or1k_pseudo_register_write

or1k_push_dummy_call

or1k_register_nameor1k_register_reggroup_p

or1k_register_type

or1k_registers_info

or1k_return_value

or1k_single_step_through_delay

or1k_skip_prologue

or1k_unwind_dummy_id

or1k_unwind_pc

or1k_unwind_sp

print_insn_big_or32

print_insn_little_or32

or1k_frame_prev_register

or1k_frame_this_id

insn_decode

or1k_fetch_instruction

or1k_frame_fp_loc

or1k_frame_size

or1k_frame_size_check

or1k_get_saved_reg

or1k_link_address

find_bytes_big

print_insn

find_bytes_little

or1k_parse_spr_params

or1k_spr_group_name

or1k_spr_register_name

or1k_read_spr

or1k_groupnum_from_name

or1k_regnum_from_name

or1k_write_spr

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 83: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 61

6.3.1.2 static void info_matchpoints_command (char ∗ args, int from_tty) [static]

6.3.1.3 static void info_spr_command (char ∗ args, int from_tty) [static]

6.3.1.4 static const gdb_byte ∗ or1k_breakpoint_from_pc (struct gdbarch ∗ gdbarch,CORE_ADDR ∗ bp_addr, int ∗ bp_size) [static]

Determine the instruction to use for a breakpoint.

Given the address at which to insert a breakpoint (bp_addr), what will that breakpoint be?

For or1k, we have a breakpoint instruction. Since all or1k instructions are 32 bits, this is all we need,regardless of address.

Parameters:

← gdbarch The GDB architecture being used

← bp_addr The breakpoint address in question

→ bp_size The size of instruction selected

Returns:

The chosen breakpoint instruction

6.3.1.5 static void or1k_dump_tdep (struct gdbarch ∗ gdbarch, struct ui_file ∗ file) [static]

Dump the target specific data for this architecture

Parameters:

← gdbarch The architecture of interest

← file Where to dump the data

6.3.1.6 static unsigned long int or1k_fetch_instruction (struct frame_info ∗ next_frame,CORE_ADDR addr) [static]

Get an instruction from a frame

This reads from memory, but if the instruction has been substituted by a software breakpoint, returns theinstruction that has been replaced, NOT the break point instruction

Depending on whether this has a frame available we use a frame based memory access or independentmemory access. Underneath they are both the same, but annoyingly save_frame_unwind_memory invertsthe status returned!

Parameters:

← next_frame Information about the next frame.

← addr Address from which to get the instruction

Returns:

The instruction

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 84: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

62 File Documentation

6.3.1.7 static CORE_ADDR or1k_frame_align (struct gdbarch ∗ gdbarch, CORE_ADDR sp)[static]

Align the stack frame

OpenRISC 1000 uses a falling stack frame, so this aligns down to the nearest 8 bytes. Useful when we’bebuilding a dummy frame.

Parameters:

← gdbarch The GDB architecture being used

← sp Current stack pointer

Returns:

The aligned stack frame address

6.3.1.8 static CORE_ADDR or1k_frame_base_address (struct frame_info ∗ next_frame, void ∗∗this_prologue_cache) [static]

Return the base address of the frame

The commenting in the GDB source code could mean our stack pointer or our frame pointer, since we havea falling stack, but index within the frame using negative offsets from the FP.

This seems to be the function used to determine the value of $fp, but the value required seems to be thestack pointer, so we return that, even if the value of $fp will be wrong.

Parameters:

← next_frame The NEXT frame (i.e. inner from here, the one THIS frame called)

← this_prologue_cache Any cached prologue for THIS function.

Returns:

The frame base address

6.3.1.9 static int or1k_frame_fp_loc (struct frame_info ∗ next_frame, CORE_ADDR instr_addr)[static]

Return the offset from the stack pointer of the saved FP location

Given the function start address, find the size of the stack frame. We are looking for the instruction

l.sw <save_loc>(r1),r2

If this is not found at the start address + 4, then this is an error.

See also:

or1k_frame_unwind_cache() for details of the OR1K prolog

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 85: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 63

Parameters:

← next_frame The NEXT frame (i.e. inner from here, the one THIS frame called), or NULL if thisinformation is not available.

← instr_addr Address where we find this instruction (function start + OR1K_INSTLEN)

Returns:

The offset from the stack pointer where the old frame pointer is saved or -1 if we don’t find thisinstruction.

Here is the call graph for this function:

or1k_frame_fp_loc or1k_fetch_instruction

6.3.1.10 static void or1k_frame_prev_register (struct frame_info ∗ next_frame, void ∗∗this_prologue_cache, int regnum, int ∗ optimizedp, enum lval_type ∗ lvalp,CORE_ADDR ∗ addrp, int ∗ realregp, gdb_byte ∗ bufferp) [static]

Get a register from THIS frame

Given a pointer to the NEXT frame, return the details of a register in the PREVIOUS frame.

Parameters:

← next_frame The NEXT frame (i.e. inner from here, the one THIS frame called)← this_prologue_cache Any cached prologue associated with THIS frame, which may therefore tell

us about registers in the PREVIOUS frame.← regnum The register of interest in the PREVIOUS frame→ optimizedp True (1) if the register has been optimized out.→ lvalp What sort of l-value (if any) does the register represent→ addrp Address in THIS frame where the register’s value may be found (-1 if not available)→ realregp Register in this frame where the register’s value may be found (-1 if not available)→ bufferp If non-NULL, buffer where the value held in the register may be put

Here is the call graph for this function:

or1k_frame_prev_register or1k_frame_unwind_cache

or1k_frame_fp_loc

or1k_frame_size

or1k_frame_size_check

or1k_get_saved_reg

or1k_link_address

or1k_unwind_pc

or1k_unwind_sp

or1k_fetch_instruction

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 86: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

64 File Documentation

6.3.1.11 static int or1k_frame_size (struct frame_info ∗ next_frame, CORE_ADDR instr_addr)[static]

Return the size of the new stack frame

Given the function start address, find the size of the stack frame. We are looking for the instruction

l.addi r1,r1,-<frame_size>

If this is not found at the start address, then this must be frameless invocation, for which we return size 0.

See also:

or1k_frame_unwind_cache() for details of the OR1K prolog

Parameters:

← next_frame The NEXT frame (i.e. inner from here, the one THIS frame called), or NULL if thisinformation is not available.

← instr_addr Function start address

Returns:

The size of the new stack frame, or zero if this is frameless

Here is the call graph for this function:

or1k_frame_size or1k_fetch_instruction

6.3.1.12 static int or1k_frame_size_check (struct frame_info ∗ next_frame, CORE_ADDRinstr_addr) [static]

Check the frame size is what expected

Given the function start address, find the setting of the frame pointer. This should choose a frame sizematching that used earlier to set the stack pointer. We look for the instruction:

l.addi r2,r1,<frame_size>

If this is not found at the start address + 8, with the expected frame size then this is an error.

There is no return value - the function raises an error if the instruction is not found.

See also:

or1k_frame_unwind_cache() for details of the OR1K prolog

Parameters:

← next_frame The NEXT frame (i.e. inner from here, the one THIS frame called), or NULL if thisinformation is not available.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 87: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 65

← instr_addr Address where we find this instruction (function start + 2∗OR1K_INSTLEN)

Returns:

The frame size found, or -1 if the instruction was not there.

Here is the call graph for this function:

or1k_frame_size_check or1k_fetch_instruction

6.3.1.13 static struct frame_unwind ∗ or1k_frame_sniffer (struct frame_info ∗ next_frame)[static, read]

The OpenRISC 1000 registered frame sniffer

This function just identifies our family of frame sniffing functions.

Parameters:

← next_frame The "next" (i.e. inner, newer from here, the one THIS frame called) frame.

Returns:

A pointer to a struct identifying the sniffing functions

Here is the call graph for this function:

or1k_frame_sniffer

or1k_frame_prev_register

or1k_frame_this_id

or1k_frame_unwind_cache

or1k_frame_fp_loc

or1k_frame_size

or1k_frame_size_check

or1k_get_saved_reg

or1k_link_address

or1k_unwind_pc

or1k_unwind_sp

or1k_fetch_instruction

6.3.1.14 static void or1k_frame_this_id (struct frame_info ∗ next_frame, void ∗∗this_prologue_cache, struct frame_id ∗ this_id) [static]

Find the frame ID of this frame

Given a GDB frame (called by THIS frame), determine the address of oru frame and from this create a newGDB frame struct. The info required is obtained from the prologue cache for THIS frame.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 88: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

66 File Documentation

Parameters:

← next_frame The NEXT frame (i.e. inner from here, the one THIS frame called)

← this_prologue_cache Any cached prologue for THIS function.

→ this_id Frame ID of our own frame.

Returns:

Frame ID for THIS frame

Here is the call graph for this function:

or1k_frame_this_id or1k_frame_unwind_cache

or1k_frame_fp_loc

or1k_frame_size

or1k_frame_size_check

or1k_get_saved_reg

or1k_link_address

or1k_unwind_pc

or1k_unwind_sp

or1k_fetch_instruction

6.3.1.15 static struct trad_frame_cache ∗ or1k_frame_unwind_cache (struct frame_info ∗next_frame, void ∗∗ this_prologue_cache) [static, read]

Initialize a prologue (unwind) cache

Build up the information (saved registers etc) for the given frame if it does not already exist.

The OR1K has a falling stack frame and a simple prolog. The Stack pointer is R1 and the frame pointerR2. The frame base is therefore the address held in R2 and the stack pointer (R1) is the frame base of theNEXT frame.

l.addi r1,r1,-frame_size # SP now points to end of new stack framel.sw save_loc(r1),r2 # old FP saved in new stack framel.addi r2,r1,frame_size # FP now points to base of new stack framel.sw save_loc-4(r1),r9 # Link (return) addressl.sw x(r1),ry # Save any callee saved regs

The frame pointer is not necessarily saved right at the end of the stack frame - OR1K saves enough spacefor any args to called functions right at the end. The offsets x for the various registers saved always rise inincrements of 4, starting at save_loc+4.

This prolog is used, even for -O3 with GCC.

All this analysis must allow for the possibility that the PC is in the middle of the prologue. Data shouldonly be set up insofar as it has been computed.

A suite of "helper" routines are used, allowing reuse for or1k_skip_prologue().

Reportedly, this is only valid for frames less than 0x7fff in size.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 89: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 67

Parameters:

← next_frame The NEXT frame (i.e. inner from here, the one THIS frame called)

↔ this_prologue_cache The prologue cache. If not supplied, we build it.

Returns:

The prolog cache (duplicates the return through the argument)

Here is the call graph for this function:

or1k_frame_unwind_cache

or1k_frame_fp_loc

or1k_frame_size

or1k_frame_size_check

or1k_get_saved_reg

or1k_link_address

or1k_unwind_pc

or1k_unwind_sp

or1k_fetch_instruction

6.3.1.16 static struct gdbarch ∗ or1k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list ∗arches) [static, read]

Architecture initialization for OpenRISC 1000

Looks for a candidate architecture in the list of architectures supplied using the info supplied. If nonematch, create a new architecture.

Parameters:

← info Information about the target architecture

← arches The list of currently know architectures

Returns:

A structure describing the target architecture

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 90: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

68 File Documentation

Here is the call graph for this function:

or1k_gdbarch_init

or1k_breakpoint_from_pc

or1k_frame_align

or1k_frame_base_address

or1k_frame_sniffer

or1k_unwind_pc

or1k_unwind_sp

or1k_pseudo_register_read

or1k_pseudo_register_write

or1k_push_dummy_call

or1k_register_nameor1k_register_reggroup_p

or1k_register_type

or1k_registers_info

or1k_return_value

or1k_single_step_through_delay

or1k_skip_prologue

or1k_unwind_dummy_id

print_insn_big_or32

print_insn_little_or32

or1k_frame_prev_register

or1k_frame_this_id or1k_frame_unwind_cacheor1k_frame_fp_loc

or1k_frame_size

or1k_frame_size_check

or1k_get_saved_reg

or1k_link_address

or1k_fetch_instruction

insn_decode debug

find_bytes_big

print_insn

or32_extract

or32_opcode_match

or32_print_immediate

or32_print_register

letter_range

letter_signed

build_address_symbolic

find_bytes_little

6.3.1.17 static int or1k_get_saved_reg (struct frame_info ∗ next_frame, CORE_ADDR instr_addr,int ∗ reg_offset) [static]

Get a saved register’s details

Given an address, see if it contains an instruction to save a register with the specified offset from the stackpointer. The locations increment by 4 from the location where the FP was saved for each callee savedregister. We look for the instruction:

l.sw x(r1),ry

If this is found with the expected offset (x), then the register number (y) is returned. If not -1 is returned(not a register). The register must be one of the 10 callee saved registers (r10, r12, r14, r16, r18, r20, r22,r24, r26, r28, r30).

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 91: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 69

See also:

or1k_frame_unwind_cache() for details of the OR1K prolog

Parameters:

← next_frame The NEXT frame (i.e. inner from here, the one THIS frame called), or NULL if thisinformation is not available.

← instr_addr Location of this instruction

→ reg_offset Offset where the register is saved

Returns:

The register number if this instruction is found, otherwise -1

Here is the call graph for this function:

or1k_get_saved_reg or1k_fetch_instruction

6.3.1.18 static int or1k_groupnum_from_name (char ∗ group_name) [static]

Get SPR group number from a name

Parameters:

← group_name SPR register group

Returns:

The index, or negative if no match.

Here is the call graph for this function:

or1k_groupnum_from_name or1k_spr_group_name

6.3.1.19 static void or1k_info_spr_command (char ∗ args, int from_tty) [static]

Show the value of a special purpose register or group

This is a custom extension to the GDB info command.

Parameters:

← args

← from_tty True (1) if GDB is running from a TTY, false (0) otherwise.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 92: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

70 File Documentation

Here is the call graph for this function:

or1k_info_spr_command

or1k_parse_spr_params

or1k_spr_group_name

or1k_spr_register_name

or1k_read_spr

or1k_groupnum_from_name

or1k_regnum_from_name

or1k_tokenize

6.3.1.20 static int or1k_link_address (struct frame_info ∗ next_frame, CORE_ADDR instr_addr)[static]

See if the link (return) address is saved as expected

Given the function start address, find the saving of the link address. The location (as an offset from the stackpointer) should be 4 less than the offset where the frame pointer was saved. We look for the instruction:

l.sw <save_loc-4>(r1),r9

This instruction may be missing - leaf functions do not necessarily save the return address on the stack.

See also:

or1k_frame_unwind_cache() for details of the OR1K prolog

Parameters:

← next_frame The NEXT frame (i.e. inner from here, the one THIS frame called), or NULL if thisinformation is not available.

← instr_addr Address where we find this instruction (function start + 12)

Returns:

The link offset if the instruction was found, -1 otherwise

Here is the call graph for this function:

or1k_link_address or1k_fetch_instruction

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 93: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 71

6.3.1.21 static char ∗ or1k_parse_spr_params (char ∗ arg_str, int ∗ group, int ∗ index, int is_set)[static]

Parses args for spr commands

Determines the special purpose register (SPR) name and puts result into group and index

Syntax is:

<spr_args> -> <group_ref> | <reg_name><group_ref> -> <group_id> <index><group_id> -> <group_num> | <group_name>

Where the indices/names have to be valid.

So to parse, we look for 1 or 2 args. If 1 it must be a unique register name. If 2, the first must be a groupnumber or name and the second an index within that group.

Also responsible for providing diagnostics if the arguments do not match.

Rewritten for GDB 6.8 to use the new UI calls and remove assorted bugs. Syntax also slightly restricted tobe more comprehensible.

Parameters:

← arg_str The argument string

→ group The group this SPR belongs in, or -1 to indicate failure

→ index Index of the register within the group, or -1 to indicate the whole group

← is_set 1 (true) if we are called from the "spr" command (so there is an extra arg) rather than the"info spr" command. Needed to distinguish between the case where info is sought from a registerspecified as group and index and setting a uniquely identified register to a value.

Returns:

A pointer to any remaining args

Here is the call graph for this function:

or1k_parse_spr_params

or1k_groupnum_from_name

or1k_spr_group_name

or1k_regnum_from_nameor1k_spr_register_name

or1k_tokenize

6.3.1.22 static void or1k_pseudo_register_read (struct gdbarch ∗ gdbarch, struct regcache ∗regcache, int regnum, gdb_byte ∗ buf) [static]

Read a pseudo register

Since we have no pseudo registers this is a null function for now.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 94: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

72 File Documentation

Todo

The floating point and vector registers ought to be done as pseudo-registers.

Parameters:

← gdbarch The GDB architecture to consider← regcache The cached register values as an array← regnum The register to read→ buf A buffer to put the result in

6.3.1.23 static void or1k_pseudo_register_write (struct gdbarch ∗ gdbarch, struct regcache ∗regcache, int regnum, const gdb_byte ∗ buf) [static]

Write a pseudo register

Since we have no pseudo registers this is a null function for now.

Todo

The floating point and vector registers ought to be done as pseudo-registers.

Parameters:

← gdbarch The GDB architecture to consider← regcache The cached register values as an array← regnum The register to read← buf A buffer with the value to write

6.3.1.24 static CORE_ADDR or1k_push_dummy_call (struct gdbarch ∗ gdbarch, struct value ∗function, struct regcache ∗ regcache, CORE_ADDR bp_addr, int nargs, struct value ∗∗args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) [static]

Create a dummy stack frame

The arguments are placed in registers and/or pushed on the stack as per the OR1K ABI.

Parameters:

← gdbarch The architecture to use← function Pointer to the function that will be called← regcache The register cache to use← bp_addr Breakpoint address← nargs Number of ags to push← args The arguments← sp The stack pointer← struct_return True (1) if this returns a structure← struct_addr Address for returning structures

Returns:

The updated stack pointer

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 95: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 73

6.3.1.25 static ULONGEST or1k_read_spr (unsigned int regnum) [static]

Read a special purpose register from the target

This has to be done using the target remote command "readspr"

Parameters:

← regnum The register to read

Returns:

The value read

6.3.1.26 static const char ∗ or1k_register_name (struct gdbarch ∗ gdbarch, int regnum)[static]

Return the register name for the OpenRISC 1000 architecture

This version converted to ANSI C, made static and incorporates the static table of register names (this isthe only place it is referenced).

Todo

The floating point and vector registers ought to be done as pseudo-registers.

Parameters:

← gdbarch The GDB architecture being used

← regnum The register number

Returns:

The textual name of the register

6.3.1.27 static int or1k_register_reggroup_p (struct gdbarch ∗ gdbarch, int regnum, structreggroup ∗ group) [static]

Identify if a register belongs to a specified group

Return true if the specified register is a member of the specified register group.

These are the groups of registers that can be displayed via "info reg".

Todo

The Vector and Floating Point registers ought to be displayed as pseudo-registers.

Parameters:

← gdbarch The GDB architecture to consider

← regnum The register to consider

← group The group to consider

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 96: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

74 File Documentation

Returns:

True (1) if regnum is a member of group

Here is the call graph for this function:

or1k_register_reggroup_p or1k_register_name

6.3.1.28 static struct type ∗ or1k_register_type (struct gdbarch ∗ arch, int regnum) [static,read]

Identify the type of a register

Todo

I don’t fully understand exactly what this does, but I think this makes sense!

Parameters:

← arch The GDB architecture to consider

← regnum The register to identify

Returns:

The type of the register

6.3.1.29 static void or1k_registers_info (struct gdbarch ∗ gdbarch, struct ui_file ∗ file, structframe_info ∗ frame, int regnum, int all) [static]

Handle the "info register" command

Print the identified register, unless it is -1, in which case print all the registers. If all is 1 means all registers,otherwise only the core GPRs.

Todo

At present all registers are printed with the default method. Should there be something special for FPregisters?

Parameters:

← gdbarch The GDB architecture being used

← file File handle for use with any custom I/O

← frame Frame info for use with custom output

← regnum Register of interest, or -1 if all registers

← all 1 if all means all, 0 if all means just GPRs

Returns:

The aligned stack frame address

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 97: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 75

Here is the call graph for this function:

or1k_registers_info or1k_register_name

6.3.1.30 static int or1k_regnum_from_name (int group, char ∗ name) [static]

Get register index in special purpose register group from name

The name may either be SPR<group_num>_<index> or a known unique name. In either case the groupnumber must match the supplied group number.

Parameters:

← group SPR register group

← name Register name

Returns:

The index, or negative if no match.

Here is the call graph for this function:

or1k_regnum_from_name or1k_spr_register_name

6.3.1.31 static enum return_value_convention or1k_return_value (struct gdbarch ∗ gdbarch,struct type ∗ type, struct regcache ∗ regcache, gdb_byte ∗ readbuf, const gdb_byte ∗writebuf) [static]

Determine the return convention used for a given type

Optionally, fetch or set the return value via "readbuf" or "writebuf" respectively using "regcache" for theregister values.

The OpenRISC 1000 returns scalar values via R11 and (for 64 bit values on 32 bit architectures) R12.Structs and unions are returned by reference, with the address in R11

Throughout use read_memory(), not target_read_memory(), since the address may be invalid and we wantan error reported (read_memory() is target_read_memory() with error reporting).

Todo

This implementation is labelled OR1K, but in fact is just for the 32 bit version, OR32. This should bemade explicit

Parameters:

← gdbarch The GDB architecture being used

← type The type of the entity to be returned

← regcache The register cache

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 98: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

76 File Documentation

← readbuf Buffer into which the return value should be written

→ writebuf Buffer from which the return value should be written

Returns:

The type of return value

6.3.1.32 static int or1k_single_step_through_delay (struct gdbarch ∗ gdbarch, struct frame_info ∗this_frame) [static]

Determine if we are executing a delay slot

Looks at the instruction at the previous instruction to see if it was one with a delay slot.

Parameters:

← gdbarch The GDB architecture being used

← this_frame Information about THIS frame

Returns:

1 (true) if this instruction is executing a delay slot, 0 (false) otherwise.

Here is the call graph for this function:

or1k_single_step_through_delay

insn_decode

or1k_fetch_instruction

debug

6.3.1.33 static CORE_ADDR or1k_skip_prologue (struct gdbarch ∗ gdbarch, CORE_ADDR pc)[static]

Skip a function prolog

If the input address, PC, is in a function prologue, return the address of the end of the prologue, otherwisereturn the input address.

See also:

For details of the stack frame, see the function or1k_frame_unwind_cache().

This function reuses the helper functions from or1k_frame_unwind_cache() to locate the various parts ofthe prolog.

This is very tricky. Essentially we look for the parts of a prolog. If we get a mismatch, we never know if itis because we are not in prolog, or because the prolog is broken.

Parameters:

← gdbarch The GDB architecture being used

← pc Current program counter

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 99: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 77

Returns:

The address of the end of the prolog if the PC is in a function prologue, otherwise the input address.

Here is the call graph for this function:

or1k_skip_prologue

or1k_frame_fp_loc

or1k_frame_size

or1k_frame_size_check

or1k_get_saved_reg

or1k_link_address

or1k_fetch_instruction

6.3.1.34 static void or1k_spr_command (char ∗ args, int from_tty) [static]

Set a special purpose register

This is a custom command added to GDB.

Parameters:

← args

← from_tty True (1) if GDB is running from a TTY, false (0) otherwise.

Here is the call graph for this function:

or1k_spr_command

or1k_parse_spr_params

or1k_spr_group_name

or1k_spr_register_name

or1k_read_spr

or1k_write_spr

or1k_groupnum_from_name

or1k_regnum_from_name

or1k_tokenize

6.3.1.35 static const char ∗ or1k_spr_group_name (int group) [static]

Returns a special purpose register group name

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 100: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

78 File Documentation

Parameters:

← group The SPR group number

Returns:

The SPR name (pointer to the name argument)

6.3.1.36 static char ∗ or1k_spr_register_name (int group, int index, char ∗ name) [static]

Returns a special purpose register name

Parameters:

← group The SPR group

← index The index within the SPR group

→ name Array to put the name in

Returns:

The SPR name (pointer to the name argument)

6.3.1.37 static void or1k_store_instruction (struct frame_info ∗ next_frame, CORE_ADDR addr,unsigned long int insn) [static]

Store an instruction in a frame

This writes to memory. Unlike its counterpart to fetch the instruction it does nothing about breakpoints

Depending on whether this has a frame available we use a frame based memory access or independentmemory access.

Parameters:

← next_frame Information about the next frame. Here for compatibility with the fetch function, butignored.

← addr Address to which to put the instruction

← insn The instruction to be written

6.3.1.38 static int or1k_tokenize (char ∗ str, char ∗∗ tok) [static]

Get the next token from a string

I can’t believe there isn’t a library argument for this, but strtok is deprecated.

Take a string and find the start of the next token and its length. A token is anything containing non-blankcharacters.

Parameters:

← str The string to look at (may be NULL).

→ tok Pointer to the start of the token within str. May be NULL if this result is not wanted (e.g. justthe length is wanted. If no token is found will be the NULL char at the end of the string, if theoriginal str was NULL, this will be NULL.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 101: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.3 gdb/or1k-tdep.c File Reference 79

Returns:

The length of the token found

6.3.1.39 static struct frame_id or1k_unwind_dummy_id (struct gdbarch ∗ gdbarch, structframe_info ∗ next_frame) [static, read]

Unwind a dummy stack frame

Tear down a dummy frame created by or1k_push_dummy_call(). This data has to be constructed manuallyfrom the data in our hand. The frame_id info in next_frame is not complete, and a call to unwind it willjust recurse to us (we think).

The stack pointer and program counter can be unwound. From the program counter, the start of the functioncan be determined.

Parameters:

← gdbarch The architecture to use← next_frame Information about the next frame

Returns:

Frame ID of the preceding frame

6.3.1.40 static CORE_ADDR or1k_unwind_pc (struct gdbarch ∗ gdbarch, struct frame_info ∗next_frame) [static]

Unwind the program counter from a stack frame

This just uses the built in frame unwinder

Parameters:

← gdbarch The GDB architecture being used← next_frame Frame info for the NEXT frame

Returns:

The program counter for THIS frame

6.3.1.41 static CORE_ADDR or1k_unwind_sp (struct gdbarch ∗ gdbarch, struct frame_info ∗next_frame) [static]

Unwind the stack pointer from a stack frame

This just uses the built in frame unwinder

Parameters:

← gdbarch The GDB architecture being used← next_frame Frame info for the NEXT frame

Returns:

The stack pointer for THIS frame

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 102: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

80 File Documentation

6.3.1.42 static void or1k_write_spr (unsigned int regnum, ULONGEST data) [static]

Write a special purpose register on the target

This has to be done using the target remote command "writespr"

Since the SPRs may map to GPR’s or the other GDB register (PPC, NPC, SR), any register cache is flushed.

Parameters:

← regnum The register to write

← data The value to write

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 103: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.4 gdb/or1k-tdep.h File Reference 81

6.4 gdb/or1k-tdep.h File Reference

This graph shows which files directly or indirectly include this file:

gdb/or1k-tdep.h

gdb/or1k-tdep.c gdb/or1k-jtag.c gdb/remote-or1k.c

Data Structures

• struct gdbarch_tdep

Defines

• #define OR1K_BRK_INSTR_STRUCT {0x21, 0x00, 0x00, 0x01}• #define OR1K_BRK_INSTR 0x21000001• #define OR1K_NOP_EXIT 0x15000001• #define OR1K_SPG_SIZE_BITS 11• #define OR1K_SPG_SIZE (1 << OR1K_SPG_SIZE_BITS)• #define OR1K_SPG_SYS 0• #define OR1K_SPG_DMMU 1• #define OR1K_SPG_IMMU 2• #define OR1K_SPG_DC 3• #define OR1K_SPG_IC 4• #define OR1K_SPG_MAC 5• #define OR1K_SPG_DEBUG 6• #define OR1K_SPG_PC 7• #define OR1K_SPG_PM 8• #define OR1K_SPG_PIC 9• #define OR1K_SPG_TT 10• #define OR1K_SPG_FPU 11• #define OR1K_NUM_SPGS (OR1K_SPG_FPU + 1)• #define OR1K_SPG_SYS_VR 0• #define OR1K_SPG_SYS_UPR 1• #define OR1K_SPG_SYS_CPUCFGR 2• #define OR1K_SPG_SYS_DMMUCFGR 3• #define OR1K_SPG_SYS_IMMUCFGR 4• #define OR1K_SPG_SYS_DCCFGR 5• #define OR1K_SPG_SYS_ICCFGR 6• #define OR1K_SPG_SYS_DCFGR 7• #define OR1K_SPG_SYS_PCCFGR 8• #define OR1K_SPG_SYS_NPC 16• #define OR1K_SPG_SYS_SR 17• #define OR1K_SPG_SYS_PPC 18• #define OR1K_SPG_SYS_FPCSR 20• #define OR1K_SPG_SYS_EPCR 32• #define OR1K_SPG_SYS_EPCR_END (OR1K_SPG_SYS_EPCR + 15)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 104: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

82 File Documentation

• #define OR1K_SPG_SYS_EEAR 48• #define OR1K_SPG_SYS_EEAR_END (OR1K_SPG_SYS_EEAR + 15)• #define OR1K_SPG_SYS_ESR 64• #define OR1K_SPG_SYS_ESR_END (OR1K_SPG_SYS_ESR + 15)• #define OR1K_SPG_SYS_GPR 1024• #define OR1K_SPG_SYS_GPR_END (OR1K_SPG_SYS_GPR + OR1K_MAX_GPR_REGS)• #define OR1K_SPG_SYS_LAST OR1K_SPG_SYS_GPR_END• #define OR1K_SPG_DMMU_DMMUCR 0• #define OR1K_SPG_DMMU_DMMUPR 1• #define OR1K_SPG_DMMU_DTLBEIR 2• #define OR1K_SPG_DMMU_DATBMR 4• #define OR1K_SPG_DMMU_DATBMR_END (OR1K_SPG_DMMU_DATBMR + 3)• #define OR1K_SPG_DMMU_DATBTR 8• #define OR1K_SPG_DMMU_DATBTR_END (OR1K_SPG_DMMU_DATBTR + 3)• #define OR1K_SPG_DMMU_DTLBW0MR 512• #define OR1K_SPG_DMMU_DTLBW0MR_END (OR1K_SPG_DMMU_DTLBW0MR + 127)• #define OR1K_SPG_DMMU_DTLBW0TR 640• #define OR1K_SPG_DMMU_DTLBW0TR_END (OR1K_SPG_DMMU_DTLBW0TR + 127)• #define OR1K_SPG_DMMU_DTLBW1MR 768• #define OR1K_SPG_DMMU_DTLBW1MR_END (OR1K_SPG_DMMU_DTLBW1MR + 127)• #define OR1K_SPG_DMMU_DTLBW1TR 896• #define OR1K_SPG_DMMU_DTLBW1TR_END (OR1K_SPG_DMMU_DTLBW1TR + 127)• #define OR1K_SPG_DMMU_DTLBW2MR 1024• #define OR1K_SPG_DMMU_DTLBW2MR_END (OR1K_SPG_DMMU_DTLBW2MR + 127)• #define OR1K_SPG_DMMU_DTLBW2TR 1152• #define OR1K_SPG_DMMU_DTLBW2TR_END (OR1K_SPG_DMMU_DTLBW2TR + 127)• #define OR1K_SPG_DMMU_DTLBW3MR 1280• #define OR1K_SPG_DMMU_DTLBW3MR_END (OR1K_SPG_DMMU_DTLBW3MR + 127)• #define OR1K_SPG_DMMU_DTLBW3TR 1408• #define OR1K_SPG_DMMU_DTLBW3TR_END (OR1K_SPG_DMMU_DTLBW3TR + 127)• #define OR1K_SPG_DMMU_LAST OR1K_SPG_DMMU_DTLBW3TR_END• #define OR1K_SPG_IMMU_IMMUCR 0• #define OR1K_SPG_IMMU_IMMUPR 1• #define OR1K_SPG_IMMU_ITLBEIR 2• #define OR1K_SPG_IMMU_IATBMR 4• #define OR1K_SPG_IMMU_IATBMR_END (OR1K_SPG_IMMU_IATBMR + 3)• #define OR1K_SPG_IMMU_IATBTR 8• #define OR1K_SPG_IMMU_IATBTR_END (OR1K_SPG_IMMU_IATBTR + 3)• #define OR1K_SPG_IMMU_ITLBW0MR 512• #define OR1K_SPG_IMMU_ITLBW0MR_END (OR1K_SPG_IMMU_ITLBW0MR + 127)• #define OR1K_SPG_IMMU_ITLBW0TR 640• #define OR1K_SPG_IMMU_ITLBW0TR_END (OR1K_SPG_IMMU_ITLBW0TR + 127)• #define OR1K_SPG_IMMU_ITLBW1MR 768• #define OR1K_SPG_IMMU_ITLBW1MR_END (OR1K_SPG_IMMU_ITLBW1MR + 127)• #define OR1K_SPG_IMMU_ITLBW1TR 896• #define OR1K_SPG_IMMU_ITLBW1TR_END (OR1K_SPG_IMMU_ITLBW1TR + 127)• #define OR1K_SPG_IMMU_ITLBW2MR 1024• #define OR1K_SPG_IMMU_ITLBW2MR_END (OR1K_SPG_IMMU_ITLBW2MR + 127)• #define OR1K_SPG_IMMU_ITLBW2TR 1152• #define OR1K_SPG_IMMU_ITLBW2TR_END (OR1K_SPG_IMMU_ITLBW2TR + 127)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 105: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.4 gdb/or1k-tdep.h File Reference 83

• #define OR1K_SPG_IMMU_ITLBW3MR 1280• #define OR1K_SPG_IMMU_ITLBW3MR_END (OR1K_SPG_IMMU_ITLBW3MR + 127)• #define OR1K_SPG_IMMU_ITLBW3TR 1408• #define OR1K_SPG_IMMU_ITLBW3TR_END (OR1K_SPG_IMMU_ITLBW3TR + 127)• #define OR1K_SPG_IMMU_LAST OR1K_SPG_IMMU_ITLBW3TR_END• #define OR1K_SPG_DC_DCCR 0• #define OR1K_SPG_DC_DCBPR 1• #define OR1K_SPG_DC_DCBFR 2• #define OR1K_SPG_DC_DCBIR 3• #define OR1K_SPG_DC_DCBWR 4• #define OR1K_SPG_DC_DCBLR 5• #define OR1K_SPG_DC_LAST OR1K_SPG_DC_DCBLR• #define OR1K_SPG_IC_ICCR 0• #define OR1K_SPG_IC_ICBPR 1• #define OR1K_SPG_IC_ICBIR 2• #define OR1K_SPG_IC_ICBLR 3• #define OR1K_SPG_IC_LAST OR1K_SPG_IC_ICBLR• #define OR1K_SPG_MAC_MACLO 1• #define OR1K_SPG_MAC_MACHI 2• #define OR1K_SPG_MAC_LAST OR1K_SPG_MAC_MACHI• #define OR1K_SPG_DEBUG_DVR 0• #define OR1K_SPG_DEBUG_DVR_END (OR1K_SPG_DEBUG_DVR + 7)• #define OR1K_SPG_DEBUG_DCR 8• #define OR1K_SPG_DEBUG_DCR_END (OR1K_SPG_DEBUG_DCR + 7)• #define OR1K_SPG_DEBUG_DMR1 16• #define OR1K_SPG_DEBUG_DMR2 17• #define OR1K_SPG_DEBUG_DCWR0 18• #define OR1K_SPG_DEBUG_DCWR1 19• #define OR1K_SPG_DEBUG_DSR 20• #define OR1K_SPG_DEBUG_DRR 21• #define OR1K_SPG_DEBUG_LAST OR1K_SPG_DEBUG_DRR• #define OR1K_SPG_PC_PCCR 0• #define OR1K_SPG_PC_PCCR_END (OR1K_SPG_PC_PCCR + 7)• #define OR1K_SPG_PC_PCMR 8• #define OR1K_SPG_PC_PCMR_END (OR1K_SPG_PC_PCMR + 7)• #define OR1K_SPG_PC_LAST OR1K_SPG_PC_PCMR_END• #define OR1K_SPG_PM_PMR 0• #define OR1K_SPG_PM_LAST OR1K_SPG_PM_PMR• #define OR1K_SPG_PIC_PICMR 0• #define OR1K_SPG_PIC_PICSR 2• #define OR1K_SPG_PIC_LAST OR1K_SPG_PIC_PICSR• #define OR1K_SPG_TT_TTMR 0• #define OR1K_SPG_TT_TTCR 1• #define OR1K_SPG_TT_LAST OR1K_SPG_TT_TTCR• #define OR1K_SPG_FPU_LAST -1• #define OR1K_SPR(group, index) (((group) << OR1K_SPG_SIZE_BITS) + (index))• #define OR1K_VR_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_VR)• #define OR1K_UPR_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_UPR)• #define OR1K_CPUCFGR_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_-

CPUCFGR)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 106: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

84 File Documentation

• #define OR1K_DCFGR_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_DCFGR)• #define OR1K_NPC_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_NPC)• #define OR1K_SR_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_SR)• #define OR1K_PPC_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_PPC)• #define OR1K_EPCR_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_EPCR)• #define OR1K_DVR0_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG, OR1K_SPG_DEBUG_-

DVR)• #define OR1K_DCR0_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG, OR1K_SPG_DEBUG_-

DCR)• #define OR1K_DMR1_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG, OR1K_SPG_DEBUG_-

DMR1)• #define OR1K_DMR2_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG, OR1K_SPG_DEBUG_-

DMR2)• #define OR1K_DCWR0_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG, OR1K_SPG_DEBUG_-

DCWR0)• #define OR1K_DCWR1_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG, OR1K_SPG_DEBUG_-

DCWR0)• #define OR1K_DSR_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG, OR1K_SPG_DEBUG_DSR)• #define OR1K_DRR_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG, OR1K_SPG_DEBUG_DRR)• #define OR1K_ZERO_REGNUM 0• #define OR1K_SP_REGNUM 1• #define OR1K_FP_REGNUM 2• #define OR1K_FIRST_ARG_REGNUM 3• #define OR1K_LAST_ARG_REGNUM 8• #define OR1K_LR_REGNUM 9• #define OR1K_RV_REGNUM 11• #define OR1K_PPC_REGNUM (OR1K_MAX_GPR_REGS + 0)• #define OR1K_NPC_REGNUM (OR1K_MAX_GPR_REGS + 1)• #define OR1K_SR_REGNUM (OR1K_MAX_GPR_REGS + 2)• #define OR1K_DCR_DP 0x0000001• #define OR1K_DCR_CC 0x000000e• #define OR1K_DCR_CC_OFF 1• #define OR1K_DCR_SC 0x0000010• #define OR1K_DCR_CT 0x00000e0• #define OR1K_DCR_CT_OFF 5• #define OR1K_DMR1_CW 0x00000003• #define OR1K_DMR1_CW_AND 0x00000001• #define OR1K_DMR1_CW_OR 0x00000002• #define OR1K_DMR1_CW_SZ 2• #define OR1K_DMR1_ST 0x00400000• #define OR1K_DMR1_BT 0x00800000• #define OR1K_DMR2_WCE0 0x00000001• #define OR1K_DMR2_WCE1 0x00000002• #define OR1K_DMR2_AWTC_MASK 0x00000ffc• #define OR1K_DMR2_WGB_MASK 0x003ff000• #define OR1K_DMR2_WBS_MASK 0xffc00000• #define OR1K_DMR2_AWTC_OFF 2• #define OR1K_DMR2_WGB_OFF 12• #define OR1K_DMR2_WBS_OFF 22• #define OR1K_DSR_RSTE 0x00000001

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 107: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.4 gdb/or1k-tdep.h File Reference 85

• #define OR1K_DSR_BUSEE 0x00000002• #define OR1K_DSR_DPFE 0x00000004• #define OR1K_DSR_IPFE 0x00000008• #define OR1K_DSR_TTE 0x00000010• #define OR1K_DSR_AE 0x00000020• #define OR1K_DSR_IIE 0x00000040• #define OR1K_DSR_INTE 0x00000080• #define OR1K_DSR_DME 0x00000100• #define OR1K_DSR_IME 0x00000200• #define OR1K_DSR_RE 0x00000400• #define OR1K_DSR_SCE 0x00000800• #define OR1K_DSR_FPE 0x00001000• #define OR1K_DSR_TE 0x00002000• #define OR1K_DRR_RSTE 0x00000001• #define OR1K_DRR_BUSEE 0x00000002• #define OR1K_DRR_DPFE 0x00000004• #define OR1K_DRR_IPFE 0x00000008• #define OR1K_DRR_TTE 0x00000010• #define OR1K_DRR_AE 0x00000020• #define OR1K_DRR_IIE 0x00000040• #define OR1K_DRR_INTE 0x00000080• #define OR1K_DRR_DME 0x00000100• #define OR1K_DRR_IME 0x00000200• #define OR1K_DRR_RE 0x00000400• #define OR1K_DRR_SCE 0x00000800• #define OR1K_DRR_FPE 0x00001000• #define OR1K_DRR_TE 0x00002000• #define OR1K_SPR_UPR_UP 0x00000001• #define OR1K_SPR_UPR_DCP 0x00000002• #define OR1K_SPR_UPR_ICP 0x00000004• #define OR1K_SPR_UPR_DMP 0x00000008• #define OR1K_SPR_UPR_IMP 0x00000010• #define OR1K_SPR_UPR_MP 0x00000020• #define OR1K_SPR_UPR_DUP 0x00000040• #define OR1K_SPR_UPR_PCUP 0x00000080• #define OR1K_SPR_UPR_PMP 0x00000100• #define OR1K_SPR_UPR_PICP 0x00000200• #define OR1K_SPR_UPR_TTP 0x00000400• #define OR1K_SPR_CPUCFGR_NSGF 0x0000000f• #define OR1K_SPR_CPUCFGR_CGF 0x00000010• #define OR1K_SPR_CPUCFGR_OB32S 0x00000020• #define OR1K_SPR_CPUCFGR_OB64S 0x00000040• #define OR1K_SPR_CPUCFGR_OF32S 0x00000080• #define OR1K_SPR_CPUCFGR_OF64S 0x00000100• #define OR1K_SPR_CPUCFGR_OV64S 0x00000400• #define OR1K_SPR_DCFGR_NDP 0x00000007• #define OR1K_SPR_DCFGR_WPCI 0x00000008• #define OR1K_MAX_GPR_REGS 32• #define OR1K_NUM_PSEUDO_REGS 0• #define OR1K_NUM_REGS (OR1K_MAX_GPR_REGS + 3)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 108: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

86 File Documentation

• #define OR1K_TOTAL_NUM_REGS (OR1K_NUM_REGS + OR1K_NUM_PSEUDO_REGS)• #define OR1K_MAX_MATCHPOINTS 8• #define OR1K_MAX_HW_WATCHES OR1K_MAX_MATCHPOINTS• #define OR1K_STACK_ALIGN 4• #define OR1K_INSTLEN 4• #define OR1K_NUM_TAP_RECORDS 8• #define OR1K_FRAME_RED_ZONE_SIZE 2536• #define OR1K_RESET_VECTOR 0x100• #define OR1K_BUSERR_VECTOR 0x200• #define OR1K_DPF_VECTOR 0x300• #define OR1K_IPF_VECTOR 0x400• #define OR1K_TT_VECTOR 0x500• #define OR1K_ALIGN_VECTOR 0x600• #define OR1K_ILL_VECTOR 0x700• #define OR1K_EXT_VECTOR 0x800• #define OR1K_DTLB_VECTOR 0x900• #define OR1K_ITLB_VECTOR 0xa00• #define OR1K_RANGE_VECTOR 0xb00• #define OR1K_SYS_VECTOR 0xc00• #define OR1K_FP_VECTOR 0xd00• #define OR1K_TRAP_VECTOR 0xe00• #define OR1K_SEXT16(v) (((v) & 0x00008000) ? ((v) - 0x00010000) : (v))• #define OR1K_SEXT26(v) (((v) & 0x02000000) ? ((v) - 0x04000000) : (v))• #define OR1K_OPCODE1(i) (((i) & 0xfc000000) >> 26)• #define OR1K_OPCODE2(i)• #define OR1K_OPCODE3(i)• #define OR1K_OPCODE4(i)• #define OR1K_OPCODE5(i) (((i) & 0xffff0000) >> 16)• #define OR1K_OPCODE6(i) (((i) & 0xff000000) >> 24)• #define OR1K_OPCODE7(i) (((i) & 0xfc000000) >> 21)• #define OR1K_D_REG(i) (((i) & 0x03e00000) >> 21)• #define OR1K_A_REG(i) (((i) & 0x001f0000) >> 16)• #define OR1K_B_REG(i) (((i) & 0x0000f800) >> 11)• #define OR1K_IMM(i) (OR1K_SEXT16((i) & 0x0000ffff))• #define OR1K_IMM2(i)• #define OR1K_OFFSET(i) (OR1K_SEXT26((i) & 0x03ffffff) ))• #define OR1K_SHIFT(i) ((i) & 0x0000003f)• #define OR1K_OP_ADD 0xe00• #define OR1K_OP_ADDC 0xe01• #define OR1K_OP_ADDI 0x27• #define OR1K_OP_AND 0xe03• #define OR1K_OP_ANDI 0x29• #define OR1K_OP_BF 0x04• #define OR1K_OP_BNF 0x03• #define OR1K_OP_TRAP 0x2100• #define OR1K_OP_J 0x00• #define OR1K_OP_JAL 0x01• #define OR1K_OP_JALR 0x12• #define OR1K_OP_JR 0x11• #define OR1K_OP_LBS 0x24

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 109: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.4 gdb/or1k-tdep.h File Reference 87

• #define OR1K_OP_LBZ 0x23• #define OR1K_OP_LHS 0x26• #define OR1K_OP_LHZ 0x25• #define OR1K_OP_LWS 0x22• #define OR1K_OP_LWZ 0x21• #define OR1K_OP_MFSPR 0x07• #define OR1K_OP_MOVHI 0x06• #define OR1K_OP_MTSPR 0x10• #define OR1K_OP_MUL 0xe36• #define OR1K_OP_MULI 0x2c• #define OR1K_OP_MULU 0xe3b• #define OR1K_OP_NOP 0x15• #define OR1K_OP_OR 0xe04• #define OR1K_OP_ORI 0x2a• #define OR1K_OP_RFE 0x09• #define OR1K_OP_RORI 0xe3• #define OR1K_OP_SB 0x36• #define OR1K_OP_SFEQ 0x720• #define OR1K_OP_SFGES 0x72b• #define OR1K_OP_SFGEU 0x723• #define OR1K_OP_SFGTS 0x72a• #define OR1K_OP_SFGTU 0x722• #define OR1K_OP_SFLES 0x72d• #define OR1K_OP_SFLEU 0x725• #define OR1K_OP_SFLTS 0x72c• #define OR1K_OP_SFLTU 0x724• #define OR1K_OP_SFNE 0x721• #define OR1K_OP_SLL 0x3808• #define OR1K_OP_SLLI 0xe0• #define OR1K_OP_SRA 0x3828• #define OR1K_OP_SRAI 0xe2• #define OR1K_OP_SRL 0x3818• #define OR1K_OP_SRLI 0xe1• #define OR1K_OP_SUB 0xe02• #define OR1K_OP_SW 0x35• #define OR1K_OP_SYS 0x2000• #define OR1K_OP_XOR 0xe05• #define OR1K_OP_XORI 0x2b

Functions

• int print_insn_big_or32 (bfd_vma memaddr, struct disassemble_info ∗info)• int print_insn_little_or32 (bfd_vma memaddr, struct disassemble_info ∗info)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 110: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

88 File Documentation

6.4.1 Define Documentation

6.4.1.1 #define OR1K_A_REG(i) (((i) & 0x001f0000) >> 16)

6.4.1.2 #define OR1K_ALIGN_VECTOR 0x600

6.4.1.3 #define OR1K_B_REG(i) (((i) & 0x0000f800) >> 11)

6.4.1.4 #define OR1K_BRK_INSTR 0x21000001

Numeric instruction used for a breakpoint

6.4.1.5 #define OR1K_BRK_INSTR_STRUCT {0x21, 0x00, 0x00, 0x01}

Byte array for the TRAP instruction used for breakpoints

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 111: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.4 gdb/or1k-tdep.h File Reference 89

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 112: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

90 File Documentation

6.4.1.6 #define OR1K_BUSERR_VECTOR 0x200

6.4.1.7 #define OR1K_CPUCFGR_SPRNUM OR1K_SPR (OR1K_SPG_SYS,OR1K_SPG_SYS_CPUCFGR)

6.4.1.8 #define OR1K_D_REG(i) (((i) & 0x03e00000) >> 21)

6.4.1.9 #define OR1K_DCFGR_SPRNUM OR1K_SPR (OR1K_SPG_SYS,OR1K_SPG_SYS_DCFGR)

6.4.1.10 #define OR1K_DCR0_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG,OR1K_SPG_DEBUG_DCR)

6.4.1.11 #define OR1K_DCR_CC 0x000000e

6.4.1.12 #define OR1K_DCR_CC_OFF 1

6.4.1.13 #define OR1K_DCR_CT 0x00000e0

6.4.1.14 #define OR1K_DCR_CT_OFF 5

6.4.1.15 #define OR1K_DCR_DP 0x0000001

6.4.1.16 #define OR1K_DCR_SC 0x0000010

6.4.1.17 #define OR1K_DCWR0_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG,OR1K_SPG_DEBUG_DCWR0)

6.4.1.18 #define OR1K_DCWR1_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG,OR1K_SPG_DEBUG_DCWR0)

6.4.1.19 #define OR1K_DMR1_BT 0x00800000

6.4.1.20 #define OR1K_DMR1_CW 0x00000003

6.4.1.21 #define OR1K_DMR1_CW_AND 0x00000001

6.4.1.22 #define OR1K_DMR1_CW_OR 0x00000002

6.4.1.23 #define OR1K_DMR1_CW_SZ 2

6.4.1.24 #define OR1K_DMR1_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG,OR1K_SPG_DEBUG_DMR1)

6.4.1.25 #define OR1K_DMR1_ST 0x00400000

6.4.1.26 #define OR1K_DMR2_AWTC_MASK 0x00000ffc

6.4.1.27 #define OR1K_DMR2_AWTC_OFF 2

6.4.1.28 #define OR1K_DMR2_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG,OR1K_SPG_DEBUG_DMR2)

6.4.1.29 #define OR1K_DMR2_WBS_MASK 0xffc00000

6.4.1.30 #define OR1K_DMR2_WBS_OFF 22

6.4.1.31 #define OR1K_DMR2_WCE0 0x00000001

6.4.1.32 #define OR1K_DMR2_WCE1 0x00000002

6.4.1.33 #define OR1K_DMR2_WGB_MASK 0x003ff000

6.4.1.34 #define OR1K_DMR2_WGB_OFF 12

6.4.1.35 #define OR1K_DPF_VECTOR 0x300

6.4.1.36 #define OR1K_DRR_AE 0x00000020

6.4.1.37 #define OR1K_DRR_BUSEE 0x00000002

6.4.1.38 #define OR1K_DRR_DME 0x00000100

6.4.1.39 #define OR1K_DRR_DPFE 0x00000004

6.4.1.40 #define OR1K_DRR_FPE 0x00001000

6.4.1.41 #define OR1K_DRR_IIE 0x00000040

6.4.1.42 #define OR1K_DRR_IME 0x00000200

6.4.1.43 #define OR1K_DRR_INTE 0x00000080

6.4.1.44 #define OR1K_DRR_IPFE 0x00000008

6.4.1.45 #define OR1K_DRR_RE 0x00000400

6.4.1.46 #define OR1K_DRR_RSTE 0x00000001

6.4.1.47 #define OR1K_DRR_SCE 0x00000800

6.4.1.48 #define OR1K_DRR_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG,OR1K_SPG_DEBUG_DRR)

6.4.1.49 #define OR1K_DRR_TE 0x00002000

6.4.1.50 #define OR1K_DRR_TTE 0x00000010

6.4.1.51 #define OR1K_DSR_AE 0x00000020

6.4.1.52 #define OR1K_DSR_BUSEE 0x00000002

6.4.1.53 #define OR1K_DSR_DME 0x00000100

6.4.1.54 #define OR1K_DSR_DPFE 0x00000004

6.4.1.55 #define OR1K_DSR_FPE 0x00001000

6.4.1.56 #define OR1K_DSR_IIE 0x00000040

6.4.1.57 #define OR1K_DSR_IME 0x00000200

6.4.1.58 #define OR1K_DSR_INTE 0x00000080

6.4.1.59 #define OR1K_DSR_IPFE 0x00000008

6.4.1.60 #define OR1K_DSR_RE 0x00000400

6.4.1.61 #define OR1K_DSR_RSTE 0x00000001

6.4.1.62 #define OR1K_DSR_SCE 0x00000800

6.4.1.63 #define OR1K_DSR_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG,OR1K_SPG_DEBUG_DSR)

6.4.1.64 #define OR1K_DSR_TE 0x00002000

6.4.1.65 #define OR1K_DSR_TTE 0x00000010

6.4.1.66 #define OR1K_DTLB_VECTOR 0x900

6.4.1.67 #define OR1K_DVR0_SPRNUM OR1K_SPR (OR1K_SPG_DEBUG,OR1K_SPG_DEBUG_DVR)

6.4.1.68 #define OR1K_EPCR_SPRNUM OR1K_SPR (OR1K_SPG_SYS,OR1K_SPG_SYS_EPCR)

6.4.1.69 #define OR1K_EXT_VECTOR 0x800

6.4.1.70 #define OR1K_FIRST_ARG_REGNUM 3

6.4.1.71 #define OR1K_FP_REGNUM 2

6.4.1.72 #define OR1K_FP_VECTOR 0xd00

6.4.1.73 #define OR1K_FRAME_RED_ZONE_SIZE 2536

6.4.1.74 #define OR1K_ILL_VECTOR 0x700

6.4.1.75 #define OR1K_IMM(i) (OR1K_SEXT16((i) & 0x0000ffff))

6.4.1.76 #define OR1K_IMM2(i)

Value:

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 113: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.4 gdb/or1k-tdep.h File Reference 91

(OR1K_SEXT16((((i) & 0x03e00000) >> 10) | \((i) & 0x000003ff)))

6.4.1.77 #define OR1K_INSTLEN 4

6.4.1.78 #define OR1K_IPF_VECTOR 0x400

6.4.1.79 #define OR1K_ITLB_VECTOR 0xa00

6.4.1.80 #define OR1K_LAST_ARG_REGNUM 8

6.4.1.81 #define OR1K_LR_REGNUM 9

6.4.1.82 #define OR1K_MAX_GPR_REGS 32

6.4.1.83 #define OR1K_MAX_HW_WATCHES OR1K_MAX_MATCHPOINTS

6.4.1.84 #define OR1K_MAX_MATCHPOINTS 8

6.4.1.85 #define OR1K_NOP_EXIT 0x15000001

Numeric instruction used for a l.nop NOP_EXIT

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 114: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

92 File Documentation

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 115: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.4 gdb/or1k-tdep.h File Reference 93

6.4.1.86 #define OR1K_NPC_REGNUM (OR1K_MAX_GPR_REGS + 1)

6.4.1.87 #define OR1K_NPC_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_NPC)

6.4.1.88 #define OR1K_NUM_PSEUDO_REGS 0

6.4.1.89 #define OR1K_NUM_REGS (OR1K_MAX_GPR_REGS + 3)

6.4.1.90 #define OR1K_NUM_SPGS (OR1K_SPG_FPU + 1)

6.4.1.91 #define OR1K_NUM_TAP_RECORDS 8

6.4.1.92 #define OR1K_OFFSET(i) (OR1K_SEXT26((i) & 0x03ffffff) ))

6.4.1.93 #define OR1K_OP_ADD 0xe00

6.4.1.94 #define OR1K_OP_ADDC 0xe01

6.4.1.95 #define OR1K_OP_ADDI 0x27

6.4.1.96 #define OR1K_OP_AND 0xe03

6.4.1.97 #define OR1K_OP_ANDI 0x29

6.4.1.98 #define OR1K_OP_BF 0x04

6.4.1.99 #define OR1K_OP_BNF 0x03

6.4.1.100 #define OR1K_OP_J 0x00

6.4.1.101 #define OR1K_OP_JAL 0x01

6.4.1.102 #define OR1K_OP_JALR 0x12

6.4.1.103 #define OR1K_OP_JR 0x11

6.4.1.104 #define OR1K_OP_LBS 0x24

6.4.1.105 #define OR1K_OP_LBZ 0x23

6.4.1.106 #define OR1K_OP_LHS 0x26

6.4.1.107 #define OR1K_OP_LHZ 0x25

6.4.1.108 #define OR1K_OP_LWS 0x22

6.4.1.109 #define OR1K_OP_LWZ 0x21

6.4.1.110 #define OR1K_OP_MFSPR 0x07

6.4.1.111 #define OR1K_OP_MOVHI 0x06

6.4.1.112 #define OR1K_OP_MTSPR 0x10

6.4.1.113 #define OR1K_OP_MUL 0xe36

6.4.1.114 #define OR1K_OP_MULI 0x2c

6.4.1.115 #define OR1K_OP_MULU 0xe3b

6.4.1.116 #define OR1K_OP_NOP 0x15

6.4.1.117 #define OR1K_OP_OR 0xe04

6.4.1.118 #define OR1K_OP_ORI 0x2a

6.4.1.119 #define OR1K_OP_RFE 0x09

6.4.1.120 #define OR1K_OP_RORI 0xe3

6.4.1.121 #define OR1K_OP_SB 0x36

6.4.1.122 #define OR1K_OP_SFEQ 0x720

6.4.1.123 #define OR1K_OP_SFGES 0x72b

6.4.1.124 #define OR1K_OP_SFGEU 0x723

6.4.1.125 #define OR1K_OP_SFGTS 0x72a

6.4.1.126 #define OR1K_OP_SFGTU 0x722

6.4.1.127 #define OR1K_OP_SFLES 0x72d

6.4.1.128 #define OR1K_OP_SFLEU 0x725

6.4.1.129 #define OR1K_OP_SFLTS 0x72c

6.4.1.130 #define OR1K_OP_SFLTU 0x724

6.4.1.131 #define OR1K_OP_SFNE 0x721

6.4.1.132 #define OR1K_OP_SLL 0x3808

6.4.1.133 #define OR1K_OP_SLLI 0xe0

6.4.1.134 #define OR1K_OP_SRA 0x3828

6.4.1.135 #define OR1K_OP_SRAI 0xe2

6.4.1.136 #define OR1K_OP_SRL 0x3818

6.4.1.137 #define OR1K_OP_SRLI 0xe1

6.4.1.138 #define OR1K_OP_SUB 0xe02

6.4.1.139 #define OR1K_OP_SW 0x35

6.4.1.140 #define OR1K_OP_SYS 0x2000

6.4.1.141 #define OR1K_OP_TRAP 0x2100

6.4.1.142 #define OR1K_OP_XOR 0xe05

6.4.1.143 #define OR1K_OP_XORI 0x2b

6.4.1.144 #define OR1K_OPCODE1(i) (((i) & 0xfc000000) >> 26)

6.4.1.145 #define OR1K_OPCODE2(i)

Value:

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 116: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

94 File Documentation

((((i) & 0xfc000000) >> 20) | \(((i) & 0x00000300) >> 6) | \((i) & 0x0000000f))

6.4.1.146 #define OR1K_OPCODE3(i)

Value:

((((i) & 0xfc000000) >> 24) | \(((i) & 0x000000c0) >> 6))

6.4.1.147 #define OR1K_OPCODE4(i)

Value:

((((i) & 0xfc000000) >> 18) | \(((i) & 0x000003c0) >> 2) | \((i) & 0x0000000f))

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 117: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.4 gdb/or1k-tdep.h File Reference 95

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 118: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

96 File Documentation

6.4.1.148 #define OR1K_OPCODE5(i) (((i) & 0xffff0000) >> 16)

6.4.1.149 #define OR1K_OPCODE6(i) (((i) & 0xff000000) >> 24)

6.4.1.150 #define OR1K_OPCODE7(i) (((i) & 0xfc000000) >> 21)

6.4.1.151 #define OR1K_PPC_REGNUM (OR1K_MAX_GPR_REGS + 0)

6.4.1.152 #define OR1K_PPC_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_PPC)

6.4.1.153 #define OR1K_RANGE_VECTOR 0xb00

6.4.1.154 #define OR1K_RESET_VECTOR 0x100

6.4.1.155 #define OR1K_RV_REGNUM 11

6.4.1.156 #define OR1K_SEXT16(v) (((v) & 0x00008000) ? ((v) - 0x00010000) : (v))

6.4.1.157 #define OR1K_SEXT26(v) (((v) & 0x02000000) ? ((v) - 0x04000000) : (v))

6.4.1.158 #define OR1K_SHIFT(i) ((i) & 0x0000003f)

6.4.1.159 #define OR1K_SP_REGNUM 1

6.4.1.160 #define OR1K_SPG_DC 3

6.4.1.161 #define OR1K_SPG_DC_DCBFR 2

6.4.1.162 #define OR1K_SPG_DC_DCBIR 3

6.4.1.163 #define OR1K_SPG_DC_DCBLR 5

6.4.1.164 #define OR1K_SPG_DC_DCBPR 1

6.4.1.165 #define OR1K_SPG_DC_DCBWR 4

6.4.1.166 #define OR1K_SPG_DC_DCCR 0

6.4.1.167 #define OR1K_SPG_DC_LAST OR1K_SPG_DC_DCBLR

6.4.1.168 #define OR1K_SPG_DEBUG 6

6.4.1.169 #define OR1K_SPG_DEBUG_DCR 8

6.4.1.170 #define OR1K_SPG_DEBUG_DCR_END (OR1K_SPG_DEBUG_DCR + 7)

6.4.1.171 #define OR1K_SPG_DEBUG_DCWR0 18

6.4.1.172 #define OR1K_SPG_DEBUG_DCWR1 19

6.4.1.173 #define OR1K_SPG_DEBUG_DMR1 16

6.4.1.174 #define OR1K_SPG_DEBUG_DMR2 17

6.4.1.175 #define OR1K_SPG_DEBUG_DRR 21

6.4.1.176 #define OR1K_SPG_DEBUG_DSR 20

6.4.1.177 #define OR1K_SPG_DEBUG_DVR 0

6.4.1.178 #define OR1K_SPG_DEBUG_DVR_END (OR1K_SPG_DEBUG_DVR + 7)

6.4.1.179 #define OR1K_SPG_DEBUG_LAST OR1K_SPG_DEBUG_DRR

6.4.1.180 #define OR1K_SPG_DMMU 1

6.4.1.181 #define OR1K_SPG_DMMU_DATBMR 4

6.4.1.182 #define OR1K_SPG_DMMU_DATBMR_END (OR1K_SPG_DMMU_DATBMR + 3)

6.4.1.183 #define OR1K_SPG_DMMU_DATBTR 8

6.4.1.184 #define OR1K_SPG_DMMU_DATBTR_END (OR1K_SPG_DMMU_DATBTR + 3)

6.4.1.185 #define OR1K_SPG_DMMU_DMMUCR 0

6.4.1.186 #define OR1K_SPG_DMMU_DMMUPR 1

6.4.1.187 #define OR1K_SPG_DMMU_DTLBEIR 2

6.4.1.188 #define OR1K_SPG_DMMU_DTLBW0MR 512

6.4.1.189 #define OR1K_SPG_DMMU_DTLBW0MR_END (OR1K_SPG_DMMU_DTLBW0MR+ 127)

6.4.1.190 #define OR1K_SPG_DMMU_DTLBW0TR 640

6.4.1.191 #define OR1K_SPG_DMMU_DTLBW0TR_END (OR1K_SPG_DMMU_DTLBW0TR +127)

6.4.1.192 #define OR1K_SPG_DMMU_DTLBW1MR 768

6.4.1.193 #define OR1K_SPG_DMMU_DTLBW1MR_END (OR1K_SPG_DMMU_DTLBW1MR+ 127)

6.4.1.194 #define OR1K_SPG_DMMU_DTLBW1TR 896

6.4.1.195 #define OR1K_SPG_DMMU_DTLBW1TR_END (OR1K_SPG_DMMU_DTLBW1TR +127)

6.4.1.196 #define OR1K_SPG_DMMU_DTLBW2MR 1024

6.4.1.197 #define OR1K_SPG_DMMU_DTLBW2MR_END (OR1K_SPG_DMMU_DTLBW2MR+ 127)

6.4.1.198 #define OR1K_SPG_DMMU_DTLBW2TR 1152

6.4.1.199 #define OR1K_SPG_DMMU_DTLBW2TR_END (OR1K_SPG_DMMU_DTLBW2TR +127)

6.4.1.200 #define OR1K_SPG_DMMU_DTLBW3MR 1280

6.4.1.201 #define OR1K_SPG_DMMU_DTLBW3MR_END (OR1K_SPG_DMMU_DTLBW3MR+ 127)

6.4.1.202 #define OR1K_SPG_DMMU_DTLBW3TR 1408

6.4.1.203 #define OR1K_SPG_DMMU_DTLBW3TR_END (OR1K_SPG_DMMU_DTLBW3TR +127)

6.4.1.204 #define OR1K_SPG_DMMU_LAST OR1K_SPG_DMMU_DTLBW3TR_END

6.4.1.205 #define OR1K_SPG_FPU 11

6.4.1.206 #define OR1K_SPG_FPU_LAST -1

6.4.1.207 #define OR1K_SPG_IC 4

6.4.1.208 #define OR1K_SPG_IC_ICBIR 2

6.4.1.209 #define OR1K_SPG_IC_ICBLR 3

6.4.1.210 #define OR1K_SPG_IC_ICBPR 1

6.4.1.211 #define OR1K_SPG_IC_ICCR 0

6.4.1.212 #define OR1K_SPG_IC_LAST OR1K_SPG_IC_ICBLR

6.4.1.213 #define OR1K_SPG_IMMU 2

6.4.1.214 #define OR1K_SPG_IMMU_IATBMR 4

6.4.1.215 #define OR1K_SPG_IMMU_IATBMR_END (OR1K_SPG_IMMU_IATBMR + 3)

6.4.1.216 #define OR1K_SPG_IMMU_IATBTR 8

6.4.1.217 #define OR1K_SPG_IMMU_IATBTR_END (OR1K_SPG_IMMU_IATBTR + 3)

6.4.1.218 #define OR1K_SPG_IMMU_IMMUCR 0

6.4.1.219 #define OR1K_SPG_IMMU_IMMUPR 1

6.4.1.220 #define OR1K_SPG_IMMU_ITLBEIR 2

6.4.1.221 #define OR1K_SPG_IMMU_ITLBW0MR 512

6.4.1.222 #define OR1K_SPG_IMMU_ITLBW0MR_END (OR1K_SPG_IMMU_ITLBW0MR +127)

6.4.1.223 #define OR1K_SPG_IMMU_ITLBW0TR 640

6.4.1.224 #define OR1K_SPG_IMMU_ITLBW0TR_END (OR1K_SPG_IMMU_ITLBW0TR +127)

6.4.1.225 #define OR1K_SPG_IMMU_ITLBW1MR 768

6.4.1.226 #define OR1K_SPG_IMMU_ITLBW1MR_END (OR1K_SPG_IMMU_ITLBW1MR +127)

6.4.1.227 #define OR1K_SPG_IMMU_ITLBW1TR 896

6.4.1.228 #define OR1K_SPG_IMMU_ITLBW1TR_END (OR1K_SPG_IMMU_ITLBW1TR +127)

6.4.1.229 #define OR1K_SPG_IMMU_ITLBW2MR 1024

6.4.1.230 #define OR1K_SPG_IMMU_ITLBW2MR_END (OR1K_SPG_IMMU_ITLBW2MR +127)

6.4.1.231 #define OR1K_SPG_IMMU_ITLBW2TR 1152

6.4.1.232 #define OR1K_SPG_IMMU_ITLBW2TR_END (OR1K_SPG_IMMU_ITLBW2TR +127)

6.4.1.233 #define OR1K_SPG_IMMU_ITLBW3MR 1280

6.4.1.234 #define OR1K_SPG_IMMU_ITLBW3MR_END (OR1K_SPG_IMMU_ITLBW3MR +127)

6.4.1.235 #define OR1K_SPG_IMMU_ITLBW3TR 1408

6.4.1.236 #define OR1K_SPG_IMMU_ITLBW3TR_END (OR1K_SPG_IMMU_ITLBW3TR +127)

6.4.1.237 #define OR1K_SPG_IMMU_LAST OR1K_SPG_IMMU_ITLBW3TR_END

6.4.1.238 #define OR1K_SPG_MAC 5

6.4.1.239 #define OR1K_SPG_MAC_LAST OR1K_SPG_MAC_MACHI

6.4.1.240 #define OR1K_SPG_MAC_MACHI 2

6.4.1.241 #define OR1K_SPG_MAC_MACLO 1

6.4.1.242 #define OR1K_SPG_PC 7

6.4.1.243 #define OR1K_SPG_PC_LAST OR1K_SPG_PC_PCMR_END

6.4.1.244 #define OR1K_SPG_PC_PCCR 0

6.4.1.245 #define OR1K_SPG_PC_PCCR_END (OR1K_SPG_PC_PCCR + 7)

6.4.1.246 #define OR1K_SPG_PC_PCMR 8

6.4.1.247 #define OR1K_SPG_PC_PCMR_END (OR1K_SPG_PC_PCMR + 7)

6.4.1.248 #define OR1K_SPG_PIC 9

6.4.1.249 #define OR1K_SPG_PIC_LAST OR1K_SPG_PIC_PICSR

6.4.1.250 #define OR1K_SPG_PIC_PICMR 0

6.4.1.251 #define OR1K_SPG_PIC_PICSR 2

6.4.1.252 #define OR1K_SPG_PM 8

6.4.1.253 #define OR1K_SPG_PM_LAST OR1K_SPG_PM_PMR

6.4.1.254 #define OR1K_SPG_PM_PMR 0

6.4.1.255 #define OR1K_SPG_SIZE (1 << OR1K_SPG_SIZE_BITS)

6.4.1.256 #define OR1K_SPG_SIZE_BITS 11

6.4.1.257 #define OR1K_SPG_SYS 0

6.4.1.258 #define OR1K_SPG_SYS_CPUCFGR 2

6.4.1.259 #define OR1K_SPG_SYS_DCCFGR 5

6.4.1.260 #define OR1K_SPG_SYS_DCFGR 7

6.4.1.261 #define OR1K_SPG_SYS_DMMUCFGR 3

6.4.1.262 #define OR1K_SPG_SYS_EEAR 48

6.4.1.263 #define OR1K_SPG_SYS_EEAR_END (OR1K_SPG_SYS_EEAR + 15)

6.4.1.264 #define OR1K_SPG_SYS_EPCR 32

6.4.1.265 #define OR1K_SPG_SYS_EPCR_END (OR1K_SPG_SYS_EPCR + 15)

6.4.1.266 #define OR1K_SPG_SYS_ESR 64

6.4.1.267 #define OR1K_SPG_SYS_ESR_END (OR1K_SPG_SYS_ESR + 15)

6.4.1.268 #define OR1K_SPG_SYS_FPCSR 20

6.4.1.269 #define OR1K_SPG_SYS_GPR 1024

6.4.1.270 #define OR1K_SPG_SYS_GPR_END (OR1K_SPG_SYS_GPR +OR1K_MAX_GPR_REGS)

6.4.1.271 #define OR1K_SPG_SYS_ICCFGR 6

6.4.1.272 #define OR1K_SPG_SYS_IMMUCFGR 4

6.4.1.273 #define OR1K_SPG_SYS_LAST OR1K_SPG_SYS_GPR_END

6.4.1.274 #define OR1K_SPG_SYS_NPC 16

6.4.1.275 #define OR1K_SPG_SYS_PCCFGR 8

6.4.1.276 #define OR1K_SPG_SYS_PPC 18

6.4.1.277 #define OR1K_SPG_SYS_SR 17

6.4.1.278 #define OR1K_SPG_SYS_UPR 1

6.4.1.279 #define OR1K_SPG_SYS_VR 0

6.4.1.280 #define OR1K_SPG_TT 10

6.4.1.281 #define OR1K_SPG_TT_LAST OR1K_SPG_TT_TTCR

6.4.1.282 #define OR1K_SPG_TT_TTCR 1

6.4.1.283 #define OR1K_SPG_TT_TTMR 0

6.4.1.284 #define OR1K_SPR(group, index) (((group) << OR1K_SPG_SIZE_BITS) + (index))

6.4.1.285 #define OR1K_SPR_CPUCFGR_CGF 0x00000010

6.4.1.286 #define OR1K_SPR_CPUCFGR_NSGF 0x0000000f

6.4.1.287 #define OR1K_SPR_CPUCFGR_OB32S 0x00000020

6.4.1.288 #define OR1K_SPR_CPUCFGR_OB64S 0x00000040

6.4.1.289 #define OR1K_SPR_CPUCFGR_OF32S 0x00000080

6.4.1.290 #define OR1K_SPR_CPUCFGR_OF64S 0x00000100

6.4.1.291 #define OR1K_SPR_CPUCFGR_OV64S 0x00000400

6.4.1.292 #define OR1K_SPR_DCFGR_NDP 0x00000007

6.4.1.293 #define OR1K_SPR_DCFGR_WPCI 0x00000008

6.4.1.294 #define OR1K_SPR_UPR_DCP 0x00000002

6.4.1.295 #define OR1K_SPR_UPR_DMP 0x00000008

6.4.1.296 #define OR1K_SPR_UPR_DUP 0x00000040

6.4.1.297 #define OR1K_SPR_UPR_ICP 0x00000004

6.4.1.298 #define OR1K_SPR_UPR_IMP 0x00000010

6.4.1.299 #define OR1K_SPR_UPR_MP 0x00000020

6.4.1.300 #define OR1K_SPR_UPR_PCUP 0x00000080

6.4.1.301 #define OR1K_SPR_UPR_PICP 0x00000200

6.4.1.302 #define OR1K_SPR_UPR_PMP 0x00000100

6.4.1.303 #define OR1K_SPR_UPR_TTP 0x00000400

6.4.1.304 #define OR1K_SPR_UPR_UP 0x00000001

6.4.1.305 #define OR1K_SR_REGNUM (OR1K_MAX_GPR_REGS + 2)

6.4.1.306 #define OR1K_SR_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_SR)

6.4.1.307 #define OR1K_STACK_ALIGN 4

6.4.1.308 #define OR1K_SYS_VECTOR 0xc00

6.4.1.309 #define OR1K_TOTAL_NUM_REGS (OR1K_NUM_REGS +OR1K_NUM_PSEUDO_REGS)

6.4.1.310 #define OR1K_TRAP_VECTOR 0xe00

6.4.1.311 #define OR1K_TT_VECTOR 0x500

6.4.1.312 #define OR1K_UPR_SPRNUM OR1K_SPR (OR1K_SPG_SYS,OR1K_SPG_SYS_UPR)

6.4.1.313 #define OR1K_VR_SPRNUM OR1K_SPR (OR1K_SPG_SYS, OR1K_SPG_SYS_VR)

6.4.1.314 #define OR1K_ZERO_REGNUM 0

6.4.2 Function Documentation

6.4.2.1 int print_insn_big_or32 (bfd_vma memaddr, struct disassemble_info ∗ info)

—————————————————————————- Disassemble a big-endian or32 instruction

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 119: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.4 gdb/or1k-tdep.h File Reference 97

Print one instruction from MEMADDR on INFO->STREAM.

Parameters:

← memaddr Address of the instruction to print

← info Info about the disassembly, in particular with the stream to write to.

Returns:

The size of the instruction (always 4 on or32). ————————————————————————–

Here is the call graph for this function:

print_insn_big_or32

find_bytes_big

print_insn or32_extract

or32_opcode_match

or32_print_immediate

or32_print_register

letter_range

letter_signed

build_address_symbolic

6.4.2.2 int print_insn_little_or32 (bfd_vma memaddr, struct disassemble_info ∗ info)

—————————————————————————- Disassemble a little-endian or32 instruc-tion

Print one instruction from MEMADDR on INFO->STREAM.

Parameters:

← memaddr Address of the instruction to print

← info Info about the disassembly, in particular with the stream to write to.

Returns:

The size of the instruction (always 4 on or32). ————————————————————————–

Here is the call graph for this function:

print_insn_little_or32

find_bytes_little

print_insn or32_extract

or32_opcode_match

or32_print_immediate

or32_print_register

letter_range

letter_signed

build_address_symbolic

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 120: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

98 File Documentation

6.5 gdb/remote-or1k.c File Reference

#include "defs.h"

#include "inferior.h"

#include "bfd.h"

#include "symfile.h"

#include "gdb_wait.h"

#include "gdbcmd.h"

#include "gdbcore.h"

#include "target.h"

#include "gdb_string.h"

#include "event-loop.h"

#include "event-top.h"

#include "inf-loop.h"

#include "regcache.h"

#include <signal.h>

#include <sys/types.h>

#include <sys/stat.h>

#include <sys/ioctl.h>

#include <fcntl.h>

#include "or1k-tdep.h"

#include "or1k-jtag.h"

#include "exceptions.h"

#include "frame.h"

#include "opcode/or32.h"

#include "solib.h"

#include <arpa/inet.h>

Include dependency graph for remote-or1k.c:

gdb/remote-or1k.c

defs.h inferior.h bfd.h symfile.h gdb_wait.h gdbcmd.h gdbcore.h target.h gdb_string.h event-loop.h event-top.h inf-loop.h regcache.h signal.h

sys/types.h

sys/stat.h sys/ioctl.h fcntl.h or1k-tdep.h or1k-jtag.h exceptions.h frame.h opcode/or32.h solib.h arpa/inet.h

inttypes.h

Functions

• ULONGEST or1k_read_spr (unsigned int regnum)• void or1k_write_spr (unsigned int regnum, ULONGEST data)• static void or1k_interrupt_query ()• static void or1k_interrupt (int signo)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 121: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 99

• static void or1k_interrupt_twice (int signo)• static unsigned char or1k_gdb_to_dcr_type (enum target_hw_bp_type gdb_type)• static int or1k_set_breakpoint (CORE_ADDR addr)• static int or1k_clear_breakpoint (CORE_ADDR addr)• static int or1k_watchpoint_gc ()• static int or1k_stopped_watchpoint_info (CORE_ADDR ∗addr_p, int ∗mp_p)• static int or1k_regnum_to_sprnum (int regnum)• static void or1k_commit_debug_registers ()• static void or1k_start_remote (struct ui_out ∗uiout, void ∗arg)• static void or1k_files_info (struct target_ops ∗target)• static void or1k_open (char ∗name, int from_tty)• static void or1k_close (int quitting)• static void or1k_detach (char ∗args, int from_tty)• static void or1k_fetch_registers (struct regcache ∗regcache, int regnum)• static void or1k_store_registers (struct regcache ∗regcache, int regnum)• static void or1k_prepare_to_store (struct regcache ∗regcache)• static LONGEST or1k_xfer_partial (struct target_ops ∗ops, enum target_object object, const char∗annex, gdb_byte ∗readbuf, const gdb_byte ∗writebuf, ULONGEST offset, LONGEST len)

• static int or1k_insert_breakpoint (struct bp_target_info ∗bpi)• static int or1k_remove_breakpoint (struct bp_target_info ∗bpi)• static int or1k_can_use_hw_matchpoint (int type, int count, int othertype)• static int or1k_insert_hw_breakpoint (struct bp_target_info ∗bpi)• static int or1k_remove_hw_breakpoint (struct bp_target_info ∗bpi)• static int or1k_insert_watchpoint (CORE_ADDR addr, int len, int type)• static int or1k_remove_watchpoint (CORE_ADDR addr, int len, int type)• static int or1k_stopped_by_watchpoint ()• static int or1k_stopped_data_address (struct target_ops ∗target, CORE_ADDR ∗addr_p)• static int or1k_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)• static void or1k_resume (ptid_t ptid, int step, enum target_signal sig)• static ptid_t or1k_wait (ptid_t remote_ptid, struct target_waitstatus ∗status)• static void or1k_stop ()• static void or1k_kill ()• static void or1k_create_inferior (char ∗execfile, char ∗args, char ∗∗env, int from_tty)• static void or1k_mourn_inferior ()• static void or1k_rcmd (char ∗command, struct ui_file ∗outbuf)• static int or1k_first_free_matchpoint ()• static int or1k_matchpoint_equal (int mp, CORE_ADDR addr, unsigned char cc, unsigned char sc,

unsigned char ct)• void _initialize_remote_or1k ()

Variables

• static struct target_ops or1k_target• static int or1k_is_single_stepping• struct {

unsigned long int dvr [OR1K_MAX_MATCHPOINTS]struct {

enum { OR1K_CT_DISABLED = 0, OR1K_CT_FETCH = 1, OR1K_CT_LEA = 2, OR1K_CT_SEA = 3, OR1K_CT_LDATA = 4, OR1K_CT_SDATA = 5, OR1K_CT_AEA = 6, OR1K_CT_ADATA = 7 }enum { OR1K_CC_MASKED = 0, OR1K_CC_EQ = 1, OR1K_CC_LT = 2, OR1K_CC_LE = 3, OR1K_CC_GT = 4, OR1K_CC_GE = 5, OR1K_CC_NE = 6, OR1K_CC_RESERVED = 7 }

enum { ... } :: ct

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 122: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

100 File Documentation

int scenum { ... } :: ccint dp

} dcr [OR1K_MAX_MATCHPOINTS]unsigned long int dmr1unsigned long int dmr2unsigned long int dsrunsigned long int drr

} or1k_dbgcache

• static void(∗ or1k_old_intr_handler )(int) = NULL

6.5.1 Function Documentation

6.5.1.1 void _initialize_remote_or1k ()

Main entry point for the remote OpenRISC JTAG protocol

Initializes the target ops for each version of the remote protocol. Currently only the JTAG protocol isimplemented.

Note:

Earlier versions of this code provided for a "sim" and "dummy" target. However these never had anyfunctionality, so have been deleted.

Returns:

New CRC

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 123: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 101

Here is the call graph for this function:

_initialize_remote_or1k

or1k_can_use_hw_matchpoint

or1k_close

or1k_create_inferior

or1k_detach

or1k_fetch_registers

or1k_files_info

or1k_insert_breakpoint

or1k_insert_hw_breakpoint

or1k_insert_watchpoint

or1k_kill

or1k_mourn_inferior

or1k_open

or1k_prepare_to_store

or1k_rcmd

or1k_region_ok_for_hw_watchpoint

or1k_remove_breakpoint

or1k_remove_hw_breakpoint

or1k_remove_watchpoint

or1k_resume

or1k_stop

or1k_stopped_by_watchpoint

or1k_stopped_data_address

or1k_store_registers

or1k_wait

or1k_xfer_partial

or1k_jtag_close jtr_ll_close

or1k_jtag_read_spr

or1k_regnum_to_sprnum

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

or1k_set_breakpoint

or1k_first_free_matchpointor1k_gdb_to_dcr_type

or1k_watchpoint_gc

or1k_jtag_init

or1k_jtag_stall

or1k_start_remote

jp1_ll_reset_jp1

or1k_jtag_write_spr

or1k_clear_breakpoint

or1k_matchpoint_equal

or1k_commit_debug_registers

or1k_jtag_unstall

or1k_stopped_watchpoint_info

or1k_interrupt or1k_jtag_wait

or1k_jtag_read_mem

or1k_jtag_write_mem

6.5.1.2 static int or1k_can_use_hw_matchpoint (int type, int count, int othertype) [static]

Tell whether we can support a hardware breakpoint or watchpoint

There are only a fixed number of hardware breakpoints available. Check if there are any left. Hardwarewatchpoints need TWO matchpoints.

This is only an approximation. An exact response would need full knowledge of all the HW resourcesrequested and would need to guarantee those resources were not subsequently cannabalized for non-HWbreakpoints and watchpoints.

The algorithm is to multiply count by 1 for breakpoints and 2 for watchpoints and add 2 if othertype is set.Any matchpoints already used are ignored (we cannot know if they relate to the question currently beingasked). This approach means we will never reject when there is HW breakpoint resource available, but wemay sometimes accept when there turns out to be no HW resource available. But GDB handles that OK(see section 5.1.2 in the user guide).

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 124: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

102 File Documentation

Parameters:

← type What type of matchpoint are we asking about? This function is apparently only called forbp_hardware_watchpoint, bp_read_watchpoint, bp_write_watchpoint (but the enum is calledaccess_watchpoint) or bp_hardware_breakpoint

← count How many of this type of matchpoint have been used (including this one)

← othertype 1 (true) if this is a call about a watchpoint and watchpoints (but not breakpoints) of othertypes have been set.

Returns:

the number of watchpoints of this type that can be set if count watchpoints can be set, 0 if watchpointsof this type cannot be set and negative if watchpoints of this type can be set, but there are none available.

6.5.1.3 static int or1k_clear_breakpoint (CORE_ADDR addr) [static]

Clear a breakpoint.

Parameters:

← addr The address at which to clear the breakpoint

Returns:

0 if the breakpoint was cleared, non-zero otherwise

Here is the call graph for this function:

or1k_clear_breakpoint or1k_matchpoint_equal

6.5.1.4 static void or1k_close (int quitting) [static]

Close a connection to the remote server

Use the target extra op is there is one. Don’t mourn the inferior - it calls us, so we’ll get a never endingloop!

param[in] quitting If true (1) GDB is going to shut down, so don’t worry to wait for everything to complete.

Here is the call graph for this function:

or1k_close or1k_jtag_close jtr_ll_close

6.5.1.5 static void or1k_commit_debug_registers () [static]

Sync debug registers

Synchronizes debug registers in memory with those on target. This used to track if there was any change,but there always is with debuggers, so now we just write them every time.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 125: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 103

The old code did a lot of this via low-level manipulation of the JTAG interface. For now it is replaced bystraightward reading/writing of the SPRs.

Here is the call graph for this function:

or1k_commit_debug_registers or1k_jtag_write_spr

or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_select_chain

jtr_select_chain

or1k_jtag_err_name

jp1_ll_prepare_control

jp1_ll_write_jp1

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_write_jtag_reg

jtr_write_jtag_reg

jp1_ll_prepare_data

jp1_ll_read_jp1jp1_ll_read_stream

6.5.1.6 static void or1k_create_inferior (char ∗ execfile, char ∗ args, char ∗∗ env, int from_tty)[static]

Start running on the target board by creating an inferior process

Parameters:

← execfile What to run

← args Arguments to pass to the inferior process

← env Environment for the inferior process

← from_tty 1 (true) if this session can write to the terminal

6.5.1.7 static void or1k_detach (char ∗ args, int from_tty) [static]

Detach from the remote server

There is only one remote connection, so no argument should be given.

Parameters:

← args Any args given to the detach command

← from_tty True (1) if this GDB session is run from a terminal, so messages can be output.

Here is the call graph for this function:

or1k_detach or1k_close or1k_jtag_close jtr_ll_close

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 126: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

104 File Documentation

6.5.1.8 static void or1k_fetch_registers (struct regcache ∗ regcache, int regnum) [static]

Fetch remote registers

The remote registers are fetched into the register cache

Parameters:

← regcache The register cache to use

← regnum The desired register number, or -1 if all are wanted

Here is the call graph for this function:

or1k_fetch_registers

or1k_jtag_read_spr

or1k_regnum_to_sprnum

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

6.5.1.9 static void or1k_files_info (struct target_ops ∗ target) [static]

Print info on this target.

Parameters:

← target GDB ops for the target - ignored.

6.5.1.10 static int or1k_first_free_matchpoint () [static]

Find the first free matchpoint

Returns:

The first free matchpoint, or -1 if none is available.

6.5.1.11 static unsigned char or1k_gdb_to_dcr_type (enum target_hw_bp_type gdb_type)[static]

Translate GDB watchpoint type into data control register compare to bits

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 127: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 105

Parameters:

← gdb_type GDB watchpoint type

Returns:

The corresponding data control register compare to bits

6.5.1.12 static int or1k_insert_breakpoint (struct bp_target_info ∗ bpi) [static]

Insert a breakpoint

Try to insert a breakpoint. Use hardware breakpoints if they are supported, software breakpoints otherwise.

Parameters:

← bpi Break point info with details of the address and a cache to hold the existing memory value ifoverwriting.

Returns:

0 if the breakpoint was set, non-zero otherwise

Here is the call graph for this function:

or1k_insert_breakpoint or1k_set_breakpoint or1k_first_free_matchpoint

6.5.1.13 static int or1k_insert_hw_breakpoint (struct bp_target_info ∗ bpi) [static]

Insert a hardware breakpoint

Try to insert a hardware breakpoint if they are supported.

Parameters:

← bpi Break point info with details of the address and a cache to hold the existing memory value ifoverwriting.

Returns:

0 if the breakpoint was set, non-zero otherwise

Here is the call graph for this function:

or1k_insert_hw_breakpoint or1k_set_breakpoint or1k_first_free_matchpoint

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 128: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

106 File Documentation

6.5.1.14 static int or1k_insert_watchpoint (CORE_ADDR addr, int len, int type) [static]

Set a data watchpoint.

A GDB data watchpoint uses a pair of HW watchpoints. The first looks for accesses greater than or equal tothe start address, the second looks for accesses less than or equal to the end address. This allows watchingof any length of object.

However because of the way the OpenRISC 1000 chains its watchpoints, a suitable adjacent pair must befound. So the watchpoint garbage collector is used to shuffle them all up.

Parameters:

← addr Address to be watched

← len Length of the entity to be watched

← type hw_write (0) for a write watchpoint, hw_read (1) for a read watchpoint, or hw_access (2) fora read/write watchpoint.

Returns:

0 if the watchpoint was set, -1 otherwise (it must be -1, not just any non-zero number, since break-point.c tests explicitly for -1

Here is the call graph for this function:

or1k_insert_watchpoint

or1k_first_free_matchpoint

or1k_gdb_to_dcr_type

or1k_watchpoint_gc

6.5.1.15 static void or1k_interrupt (int signo) [static]

The command line interface’s stop routine from an interrupt

Attempt to stop the processor. Set a more severe interrupt routine, so that a second ctrl-C will force moreaggressive behavior.

Parameters:

← signo The signal which triggered this handle (always SIGINT)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 129: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 107

Here is the call graph for this function:

or1k_interrupt

or1k_interrupt_twice

or1k_stop

or1k_interrupt_query or1k_mourn_inferior

or1k_commit_debug_registers

or1k_jtag_stall

or1k_jtag_unstall

or1k_jtag_write_spr or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_select_chain

jtr_select_chain

or1k_jtag_err_name

jp1_ll_prepare_control

jp1_ll_write_jp1

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_write_jtag_reg

jtr_write_jtag_reg

jp1_ll_prepare_data

jp1_ll_read_jp1

jp1_ll_read_stream

or1k_jtag_read_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

6.5.1.16 static void or1k_interrupt_query () [static]

Ask the user about an interrupt

Ctrl-C has been received.

Here is the call graph for this function:

or1k_interrupt_query or1k_mourn_inferior

6.5.1.17 static void or1k_interrupt_twice (int signo) [static]

More aggressive interrupt handler

The user typed ∧C twice. We ask if they want to kill everything. If they don’t we put this signal handlerback in place, so another ctrl-C will bring us back heer.

Parameters:

← signo The signal which triggered this handle (always SIGINT)

Here is the call graph for this function:

or1k_interrupt_twice or1k_interrupt_query or1k_mourn_inferior

6.5.1.18 static void or1k_kill () [static]

Kill the process running on the board

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 130: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

108 File Documentation

We just ignore the target. Mourning the inferior will cause the connection to be closed.

Here is the call graph for this function:

or1k_kill or1k_mourn_inferior

6.5.1.19 static int or1k_matchpoint_equal (int mp, CORE_ADDR addr, unsigned char cc,unsigned char sc, unsigned char ct) [static]

See if a matchpoint has the given qualities

The fields in the matchpoint DVR and DCR registers must match and the matchpoint must be in use.

Parameters:

← mp The matchpoint of interest

← addr The address to compare

← cc The condition code to compare

← sc The signedness to compare

← ct The comparision type to compare

Returns:

1 (true) if the fields are the same and the matchpoint is in use

6.5.1.20 static void or1k_mourn_inferior () [static]

Mourn the inferior process

We don’t atually want to unpush the target - we should be able to call run again to restart it. Use the genericmourn and mark it as exited (it it was running).

6.5.1.21 static void or1k_open (char ∗ name, int from_tty) [static]

Open a connection to the remote server

Initialise the connection, then push the current target.

Parameters:

← name The arguments passed to the target command on GDB - usually the address of the remoteserver

← from_tty 1 (true) if the GDB session is being run from a terminal and so can receive messages. 0(false) otherwise.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 131: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 109

Here is the call graph for this function:

or1k_open

or1k_jtag_init

or1k_jtag_read_spr

or1k_jtag_stallor1k_start_remote

jp1_ll_reset_jp1

jtr_ll_close

jtr_ll_connect

or1k_jtag_reset or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1

jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_read

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

jp1_write_jtag_reg

jtr_write_jtag_reg

6.5.1.22 static void or1k_prepare_to_store (struct regcache ∗ regcache) [static]

Prepare to store registers

This is a null function for the OpenRisc 1000 architecture

Parameters:

← regcache The register cache to use

6.5.1.23 static void or1k_rcmd (char ∗ command, struct ui_file ∗ outbuf) [static]

Send a command to the remote target

The target can’t actually run any remote commands, in the sense of having a command interpreter. Howeverwe use this as a GDB "standard" way of wrapping up commands to access the SPRs.

Current commands supported are:

• readspr <regno>

• writespr <regno>

The output is either the value read (for successful read) or OK (for successful write) or E01 to indicate andwrror. All values are represented as unsigned hex.

Parameters:

← command The command to execute

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 132: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

110 File Documentation

→ output The result of the command

Here is the call graph for this function:

or1k_rcmd

or1k_jtag_read_spr

or1k_jtag_write_spr

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

jp1_read_jtag_reg

jtr_read_jtag_reg

or1k_jtag_err_name

jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

or1k_jtag_write_jtag_reg

jp1_write_jtag_reg

jtr_write_jtag_reg

6.5.1.24 ULONGEST or1k_read_spr (unsigned int regnum)

6.5.1.25 static int or1k_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) [static]

Can we put a HW watchpoint of the given size at the given address

We can always use a HW watchpoint, so long as there are HW watchpoints available. This doesn’t have tocheck availablility (see or1k_can_use_hw_matchpoint().

Parameters:

← addr The address of interest

← len The length of the region to watch

Returns:

1 (true) to indicate we always can do a HW watchpoint

6.5.1.26 static int or1k_regnum_to_sprnum (int regnum) [static]

Convert a register number to SPR number

OR1K debug unit has GPRs mapped to SPRs, which are not compact, so we are mapping them for GDB.

Rewritten by CZ 12/09/01

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 133: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 111

Parameters:

← regnum The register

Returns:

The corresponding SPR or -1 on failure

6.5.1.27 static int or1k_remove_breakpoint (struct bp_target_info ∗ bpi) [static]

Remove a breakpoint

Parameters:

← bpi Break point info with details of the address and a cache to hold the existing memory value ifoverwriting.

Returns:

0 if the breakpoint was cleared, non-zero otherwise

Here is the call graph for this function:

or1k_remove_breakpoint or1k_clear_breakpoint or1k_matchpoint_equal

6.5.1.28 static int or1k_remove_hw_breakpoint (struct bp_target_info ∗ bpi) [static]

Remove a hardware breakpoint

Parameters:

← bpi Break point info with details of the address and a cache to hold the existing memory value ifoverwriting.

Returns:

0 if the breakpoint was cleared, non-zero otherwise

Here is the call graph for this function:

or1k_remove_hw_breakpoint or1k_clear_breakpoint or1k_matchpoint_equal

6.5.1.29 static int or1k_remove_watchpoint (CORE_ADDR addr, int len, int type) [static]

Remove a data watchpoint.

Parameters:

← addr Address being watched

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 134: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

112 File Documentation

← len Length of the entity being watched← type 0 for a write watchpoint, 1 for a read watchpoint, or 2 for a read/write watchpoint

Returns:

0 if the watchpoint was cleared, non-zero otherwise

Here is the call graph for this function:

or1k_remove_watchpoint

or1k_gdb_to_dcr_type

or1k_matchpoint_equal

6.5.1.30 static void or1k_resume (ptid_t ptid, int step, enum target_signal sig) [static]

Resume execution of the target process.

"step" says whether to single-step or to run free; "siggnal" is the signal value (e.g. SIGINT) to be given tothe target, or zero for no signal.

When we enter this routine the target should be stalled.

In general GDB sorts out issues of restarting across breakpoints. However have to deal with the specialcase where a breakpoint occurred in the delay slot of a branch instruction. In this case the branch shouldbe restarted, BUT ONLY if the branch had originally been executed.

For now we ignore this case (it really is very hard.

Parameters:

← ptid The process or thread ID - ignored here← step If true (1) single step the target← sig Signal to give to the target

Here is the call graph for this function:

or1k_resume

or1k_commit_debug_registers

or1k_jtag_write_spr

or1k_jtag_unstall

or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_select_chain

jtr_select_chain

or1k_jtag_err_name

jp1_ll_prepare_control

jp1_ll_write_jp1

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_write_jtag_reg

jtr_write_jtag_reg

jp1_ll_prepare_data

jp1_ll_read_jp1

jp1_ll_read_stream

or1k_jtag_read_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 135: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 113

6.5.1.31 static int or1k_set_breakpoint (CORE_ADDR addr) [static]

Set a breakpoint.

Parameters:

← addr The address at which to set the breakpoint

Returns:

0 if the breakpoint was set, non-zero otherwise

Here is the call graph for this function:

or1k_set_breakpoint or1k_first_free_matchpoint

6.5.1.32 static void or1k_start_remote (struct ui_out ∗ uiout, void ∗ arg_p) [static]

Start the remote target

This is a wrapper for GDB’s start_remote function, suitable for use with catch_exception.

Parameters:

← uiout UI handle - not used

← arg_p Reference to the generic argument supplied through catch_exception. In this case a pointerto the from_tty parameter.

6.5.1.33 static void or1k_stop () [static]

Stop the remote process

This is the generic stop called via the target vector. When a target interrupt is requested, either by thecommand line or the GUI, we will eventually end up here.

Just stall the processor, put it into single step mode and unstall.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 136: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

114 File Documentation

Here is the call graph for this function:

or1k_stop

or1k_commit_debug_registers

or1k_jtag_stall

or1k_jtag_unstall

or1k_jtag_write_spr or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_select_chain

jtr_select_chain

or1k_jtag_err_name

jp1_ll_prepare_control

jp1_ll_write_jp1

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_write_jtag_reg

jtr_write_jtag_reg

jp1_ll_prepare_data

jp1_ll_read_jp1

jp1_ll_read_stream

or1k_jtag_read_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

6.5.1.34 static int or1k_stopped_by_watchpoint () [static]

Report if we stopped due to a watchpoint

All the information is calculated by or1k_stopped_data_address, so we must reuse that.

Returns:

1 (true) if we were stopped by a watchpoint, 0 (false) otherwise

Here is the call graph for this function:

or1k_stopped_by_watchpoint or1k_stopped_watchpoint_info

6.5.1.35 static int or1k_stopped_data_address (struct target_ops ∗ target, CORE_ADDR ∗addr_p) [static]

Address for which we were stopped by a remote watchpoint

This is true if a triggered breakpoint was ANDed with the previous watchpoint in the chain. If so, theprevious matchpoint has the start address.

This function is called once when a watchpoint is hit, and must clear the watchpoint status

Parameters:

← target The target_ops we are using. Not clear why we need this!

→ addr_p Where to put the address associated with the watchpoint.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 137: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 115

Returns:

1 (true) if we get the address, 0 (false) otherwise

Here is the call graph for this function:

or1k_stopped_data_address or1k_stopped_watchpoint_info

6.5.1.36 static int or1k_stopped_watchpoint_info (CORE_ADDR ∗ addr_p, int ∗ mp_p)[static]

Find if we were stopped by a watchpoint, and if so which address

This is true if a triggered breakpoint was ANDed with the previous watchpoint in the chain. If so, theprevious matchpoint has the start address.

This is an internal utility for use by or1k_stopped_watchpoint() and or1k_stopped_data_address().

Note:

This will only find the FIRST watchpoint triggered.

Parameters:

→ addr_p Where to put the address associated with the watchpoint if non-NULL

→ mp_p Where to put the matchpoint which triggered the WP

Returns:

1 (true) if we get the address, 0 (false) otherwise

6.5.1.37 static void or1k_store_registers (struct regcache ∗ regcache, int regnum) [static]

Store remote registers

The remote registers are written from the register cache

Parameters:

← regcache The register cache to use

← regnum The desired register number, or -1 if all are wanted

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 138: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

116 File Documentation

Here is the call graph for this function:

or1k_store_registers

or1k_jtag_write_spr

or1k_regnum_to_sprnum

or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_select_chain

jtr_select_chain

or1k_jtag_err_name

jp1_ll_prepare_control

jp1_ll_write_jp1

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_write_jtag_reg

jtr_write_jtag_reg

jp1_ll_prepare_data

jp1_ll_read_jp1jp1_ll_read_stream

6.5.1.38 static ptid_t or1k_wait (ptid_t remote_ptid, struct target_waitstatus ∗ status) [static]

Wait until the remote server stops, and return a wait status.

Seems to assume that the remote target is identified solely by PID with no thread or lightweight threadcomponent.

This is mostly a case of just sorting out the type of exception. GDB will automatically sort out restartingwith breakpoints removed etc.

Note:

The old code differentiated a high priority and a low priority interrupt, which no longer exists on theOR1K. The old code also omitted tick timer and floating point exceptions, which have been added.

Parameters:

← remote_ptid The process/thread ID of the remote target

→ status Status of the waiting process

Returns:

The remote_ptid unchanged

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 139: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 117

Here is the call graph for this function:

or1k_wait

or1k_interrupt

or1k_jtag_read_spr

or1k_jtag_wait

or1k_interrupt_twice

or1k_stop

or1k_interrupt_query or1k_mourn_inferior

or1k_commit_debug_registers

or1k_jtag_stall

or1k_jtag_unstall

or1k_jtag_write_spr

or1k_jtag_select_chain

or1k_jtag_write_jtag_reg

jp1_select_chain

jtr_select_chain

or1k_jtag_err_name

jp1_ll_prepare_control

jp1_ll_write_jp1

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_ll_read

jp1_write_jtag_reg

jtr_write_jtag_reg

jp1_ll_prepare_data

jp1_ll_read_jp1

jp1_ll_read_stream

or1k_jtag_read_jtag_reg

jp1_read_jtag_reg

jtr_read_jtag_reg

6.5.1.39 static int or1k_watchpoint_gc () [static]

Garbage collect the HW watchpoints

Some functions require more than one OpenRISC 1000 HW watchpoint to be chained together. Chainedwathcpoints must be adjacent, but setting of breakpoints (which uses a single HW matchpoint/watchpoint)can lead to fragmentation of the watchpoint list.

This function allows the currently used matchpoints to be shuffled up. In other words we have a GARBAGECOLLECTOR (omninous music, thunder clouds gather, lightning flashes).

For added fun, watchpoints 8 and 9 cannot be moved, and hence nothing that depends on them.

Returns:

The number of free watchpoints

6.5.1.40 void or1k_write_spr (unsigned int regnum, ULONGEST data)

6.5.1.41 LONGEST or1k_xfer_partial (struct target_ops ∗ ops, enum target_object object, constchar ∗ annex, gdb_byte ∗ readbuf, const gdb_byte ∗ writebuf, ULONGEST offset,LONGEST len) [static]

Transfer some data to or from the target

One and only one of readbuf or writebuf should be non-NULL, which indicates whether this is a read orwrite operation.

OR1K reads and writes are in words, so we may need to do partial read/writes at each end of the transfer.

Parameters:

← ops The target_ops vector to use

← object The type of object to transfer

← annex Additional object specific information (not used)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 140: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

118 File Documentation

→ readbuf Buffer for read data

← writebuf Buffer of data to write

← offset Offset into object

← len Max bytes to transer

Returns:

Number of bytes transferred or -1 if not supported

Here is the call graph for this function:

or1k_xfer_partial

or1k_jtag_read_mem

or1k_jtag_write_mem

or1k_jtag_read_jtag_block

or1k_jtag_read_jtag_reg

or1k_jtag_select_chain

jp1_read_jtag_block

jtr_read_jtag_block

or1k_jtag_err_name

jp1_read_jtag_reg jp1_ll_prepare_data

jp1_ll_write_jp1

jp1_ll_read_jp1

jp1_ll_read_stream

jp1_ll_write_stream

jp1_ll_crc_calc

jtr_ll_check

jtr_ll_readjtr_ll_response

jtr_ll_write

jtr_ll_close

jtr_read_jtag_reg

jp1_select_chain

jtr_select_chain

jp1_ll_prepare_control

or1k_jtag_write_jtag_block

or1k_jtag_write_jtag_reg

jp1_write_jtag_block

jtr_write_jtag_block

jp1_write_jtag_reg

jtr_write_jtag_reg

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 141: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.5 gdb/remote-or1k.c File Reference 119

6.5.2 Variable Documentation

6.5.2.1 enum { ... } cc

6.5.2.2 enum { ... } ct

6.5.2.3 struct { ... } dcr[OR1K_MAX_MATCHPOINTS]

6.5.2.4 unsigned long int dmr1

6.5.2.5 unsigned long int dmr2

6.5.2.6 int dp

6.5.2.7 unsigned long int drr

6.5.2.8 unsigned long int dsr

6.5.2.9 unsigned long int dvr[OR1K_MAX_MATCHPOINTS]

6.5.2.10 struct { ... } or1k_dbgcache [static]

Cached OR1K debug register values (ignores counters for now).

6.5.2.11 int or1k_is_single_stepping [static]

Are we single stepping

6.5.2.12 void(∗ or1k_old_intr_handler)(int) = NULL [static]

Old SIGINT handler.

6.5.2.13 struct target_ops or1k_target [static]

Updated for GDB 6.8 by Jeremy Bennett. All code converted to ANSI C style and in general to GDB for-mat. All global OpenRISC specific functions and variables should now have a prefix of or1k_ or OR1K_.

This original code defined three possible remote targets "jtag", "sim" and "dummy", all using the Open-RISC 1000 remote protocol. However only "jtag" is actually implemented, and in this version, all theredundant code is stripped out. The intention is that in time all remote debugging will be via the RemoteSerial Protocol.

Commenting compatible with Doxygen added throughout.

The current OR1K target

6.5.2.14 int sc

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 142: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

120 File Documentation

6.6 mainpage File Reference

6.6.1 Detailed Description

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 143: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.7 opcodes/or32-dis.c File Reference 121

6.7 opcodes/or32-dis.c File Reference

#include "dis-asm.h"

#include "opcode/or32.h"

#include "safe-ctype.h"

#include <string.h>

#include <stdlib.h>

Include dependency graph for or32-dis.c:

opcodes/or32-dis.c

dis-asm.h opcode/or32.h safe-ctype.h string.h stdlib.h

Defines

• #define EXTEND29(x) ((x) & (unsigned long) 0x10000000 ? ((x) | (unsigned long) 0xf0000000) :((x)))

Typedefs

• typedef bfd_vma CORE_ADDR

Functions

• int build_address_symbolic (CORE_ADDR addr, int do_demangle, char ∗∗name, int ∗offset, char∗∗filename, int ∗line, int ∗unmapped)

• static void find_bytes_big (unsigned char ∗insn_ch, unsigned long ∗insn)

• static void find_bytes_little (unsigned char ∗insn_ch, unsigned long ∗insn)

• static unsigned long or32_extract (char param_ch, char ∗enc_initial, unsigned long int insn)

• static int or32_opcode_match (unsigned long insn, char ∗encoding)

• static void or32_print_register (char param_ch, char ∗encoding, unsigned long insn, structdisassemble_info ∗info)

• static void or32_print_immediate (bfd_vma memaddr, char param_ch, char ∗encoding, unsignedlong insn, struct disassemble_info ∗info)

• static int print_insn (bfd_vma memaddr, struct disassemble_info ∗info)

• int print_insn_big_or32 (bfd_vma memaddr, struct disassemble_info ∗info)

• int print_insn_little_or32 (bfd_vma memaddr, struct disassemble_info ∗info)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 144: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

122 File Documentation

6.7.1 Define Documentation

6.7.1.1 #define EXTEND29(x) ((x) & (unsigned long) 0x10000000 ? ((x) | (unsigned long)0xf0000000) : ((x)))

6.7.2 Typedef Documentation

6.7.2.1 typedef bfd_vma CORE_ADDR

6.7.3 Function Documentation

6.7.3.1 int build_address_symbolic (CORE_ADDR addr, int do_demangle, char ∗∗ name, int ∗offset, char ∗∗ filename, int ∗ line, int ∗ unmapped)

6.7.3.2 static void find_bytes_big (unsigned char ∗ insn_ch, unsigned long ∗ insn) [static]

—————————————————————————- Map 4 bytes of instruction into one 32-bitword for big-endian target

Parameters:

← insn_ch The 4 bytes of the instruction

→ insn The 32-bit word ————————————————————————–

6.7.3.3 static void find_bytes_little (unsigned char ∗ insn_ch, unsigned long ∗ insn) [static]

—————————————————————————- Map 4 bytes of instruction into one 32-bitword for little-endian target

Parameters:

← insn_ch The 4 bytes of the instruction

→ insn The 32-bit word ————————————————————————–

6.7.3.4 static unsigned long or32_extract (char param_ch, char ∗ enc_initial, unsigned long intinsn) [static]

—————————————————————————- Extract an instruction field

Parameters:

← param_ch The character identifying the field

← enc_initial A string with 1 char for each bit in the instruction, the char indicating the field the bitbelongs to

← insn The instruction

Returns:

The value of the field ————————————————————————–

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 145: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.7 opcodes/or32-dis.c File Reference 123

Here is the call graph for this function:

or32_extract

letter_range

letter_signed

6.7.3.5 static int or32_opcode_match (unsigned long insn, char ∗ encoding) [static]

—————————————————————————- Test if an instruction matches an encoding

Parameters:

← insn The instruction

← encoding The encoding

Returns:

1 (true) if they match, 0 otherwise ————————————————————————–

Here is the call graph for this function:

or32_opcode_match or32_extract

letter_range

letter_signed

6.7.3.6 static void or32_print_immediate (bfd_vma memaddr, char param_ch, char ∗ encoding,unsigned long insn, struct disassemble_info ∗ info) [static]

—————————————————————————- Print immediate to INFO->STREAM.

Used only by print_insn.

Fixed in GDB 6.8 to print signed immediate fields correctly and to set the target fields of jump and branchto symbols if possible.

Parameters:

← memaddr Address of this instruction

← param_ch The character encoding the field of interest

← encoding The encoding

← insn The instruction

← info Info about the disassembly, in particular with the stream to write to. ————————————————————————–

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 146: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

124 File Documentation

Here is the call graph for this function:

or32_print_immediate

build_address_symbolic

letter_signed

or32_extract letter_range

6.7.3.7 static void or32_print_register (char param_ch, char ∗ encoding, unsigned long insn,struct disassemble_info ∗ info) [static]

—————————————————————————- Print register to INFO->STREAM.

Used only by print_insn.

Parameters:

← param_ch The character encoding the field of interest

← encoding The encoding

← insn The instruction

← info Info about the disassembly, in particular with the stream to write to. ————————————————————————–

Here is the call graph for this function:

or32_print_register or32_extract

letter_range

letter_signed

6.7.3.8 static int print_insn (bfd_vma memaddr, struct disassemble_info ∗ info) [static]

—————————————————————————- Print one instruction

Print one instruction from MEMADDR on INFO->STREAM.

Parameters:

← memaddr Address of the instruction to print

← info Info about the disassembly, in particular with the stream to write to.

Returns:

The size of the instruction (always 4 on or32). ————————————————————————–

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 147: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.7 opcodes/or32-dis.c File Reference 125

Here is the call graph for this function:

print_insn or32_extract

or32_opcode_match

or32_print_immediate

or32_print_register

letter_range

letter_signed

build_address_symbolic

6.7.3.9 int print_insn_big_or32 (bfd_vma memaddr, struct disassemble_info ∗ info)

—————————————————————————- Disassemble a big-endian or32 instruction

Print one instruction from MEMADDR on INFO->STREAM.

Parameters:

← memaddr Address of the instruction to print

← info Info about the disassembly, in particular with the stream to write to.

Returns:

The size of the instruction (always 4 on or32). ————————————————————————–

Here is the call graph for this function:

print_insn_big_or32

find_bytes_big

print_insn or32_extract

or32_opcode_match

or32_print_immediate

or32_print_register

letter_range

letter_signed

build_address_symbolic

6.7.3.10 int print_insn_little_or32 (bfd_vma memaddr, struct disassemble_info ∗ info)

—————————————————————————- Disassemble a little-endian or32 instruc-tion

Print one instruction from MEMADDR on INFO->STREAM.

Parameters:

← memaddr Address of the instruction to print

← info Info about the disassembly, in particular with the stream to write to.

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 148: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

126 File Documentation

Returns:

The size of the instruction (always 4 on or32). ————————————————————————–

Here is the call graph for this function:

print_insn_little_or32

find_bytes_little

print_insn or32_extract

or32_opcode_match

or32_print_immediate

or32_print_register

letter_range

letter_signed

build_address_symbolic

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 149: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.8 opcodes/or32-opc.c File Reference 127

6.8 opcodes/or32-opc.c File Reference

#include <string.h>

#include <stdio.h>

#include <stdlib.h>

#include "safe-ctype.h"

#include "ansidecl.h"

#include "opcode/or32.h"

Include dependency graph for or32-opc.c:

opcodes/or32-opc.c

string.h stdio.h stdlib.h safe-ctype.h ansidecl.h opcode/or32.h

Data Structures

• struct temp_insn_struct

Defines

• #define EFN &l_none• #define EF(func) EFN• #define EFI EFN• #define MAX_AUTOMATA_SIZE 1200• #define MAX_OP_TABLE_SIZE 1200• #define LEAF_FLAG 0x80000000• #define MAX_LEN 8• #define MIN(x, y) ((x) < (y) ? (x) : (y))

Functions

• static void ATTRIBUTE_PRINTF_2 debug (int level ATTRIBUTE_UNUSED, const char ∗formatATTRIBUTE_UNUSED,...)

• int insn_len (int insn_index ATTRIBUTE_UNUSED)• int letter_signed (char l)• int letter_range (char l)• int insn_index (char ∗insn)• const char ∗ insn_name (int index)• void l_none (void)• static unsigned long insn_extract (char param_ch, char ∗enc_initial)• static unsigned long ∗ cover_insn (unsigned long ∗cur, int pass, unsigned int mask)• static int num_ones (unsigned long value)• static struct insn_op_struct ∗ parse_params (const struct or32_opcode ∗opcode, struct insn_op_struct∗cur)

• void build_automata (void)

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 150: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

128 File Documentation

• void destruct_automata (void)

• int insn_decode (unsigned int insn)

• static unsigned long extend_imm (unsigned long imm, char l)

• static unsigned long or32_extract (char param_ch, char ∗enc_initial, unsigned long insn)

• static void or32_print_register (char param_ch, char ∗encoding, unsigned long insn)

• static void or32_print_immediate (char param_ch, char ∗encoding, unsigned long insn)

• int disassemble_insn (unsigned long insn)

Variables

• struct or32_letter or32_letters [ ]

• struct or32_opcode or32_opcodes [ ]

• const unsigned int or32_num_opcodes = ((sizeof(or32_opcodes)) / (sizeof(struct or32_opcode))) - 1

• unsigned long ∗ automata

• int nuncovered

• int curpass = 0

• struct temp_insn_struct ∗ ti

• struct insn_op_struct ∗ op_data

• struct insn_op_struct ∗∗ op_start

• static char disassembled_str [50]

• char ∗ disassembled = &disassembled_str[0]

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 151: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.8 opcodes/or32-opc.c File Reference 129

6.8.1 Define Documentation

6.8.1.1 #define EF(func) EFN

6.8.1.2 #define EFI EFN

6.8.1.3 #define EFN &l_none

6.8.1.4 #define LEAF_FLAG 0x80000000

6.8.1.5 #define MAX_AUTOMATA_SIZE 1200

6.8.1.6 #define MAX_LEN 8

6.8.1.7 #define MAX_OP_TABLE_SIZE 1200

6.8.1.8 #define MIN(x, y) ((x) < (y) ? (x) : (y))

6.8.2 Function Documentation

6.8.2.1 void build_automata (void)

Here is the call graph for this function:

build_automata

cover_insn

insn_extract

parse_params

debug

letter_signed

num_ones

6.8.2.2 static unsigned long∗ cover_insn (unsigned long ∗ cur, int pass, unsigned int mask)[static]

Here is the call graph for this function:

cover_insn debug

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 152: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

130 File Documentation

6.8.2.3 static void ATTRIBUTE_PRINTF_2 debug (int level ATTRIBUTE_UNUSED, const char∗format ATTRIBUTE_UNUSED, ...) [static]

6.8.2.4 void destruct_automata (void)

6.8.2.5 int disassemble_insn (unsigned long insn)

Here is the call graph for this function:

disassemble_insn

insn_decode

insn_len

or32_print_immediate

or32_print_register

debug

build_address_symbolic

letter_signed

or32_extract letter_range

6.8.2.6 static unsigned long extend_imm (unsigned long imm, char l) [static]

Here is the call graph for this function:

extend_imm

letter_range

letter_signed

6.8.2.7 int insn_decode (unsigned int insn)

Here is the call graph for this function:

insn_decode debug

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 153: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

6.8 opcodes/or32-opc.c File Reference 131

6.8.2.8 static unsigned long insn_extract (char param_ch, char ∗ enc_initial) [static]

6.8.2.9 int insn_index (char ∗ insn)

6.8.2.10 int insn_len (int insn_index ATTRIBUTE_UNUSED)

6.8.2.11 const char∗ insn_name (int index)

6.8.2.12 void l_none (void)

6.8.2.13 int letter_range (char l)

6.8.2.14 int letter_signed (char l)

6.8.2.15 static int num_ones (unsigned long value) [static]

6.8.2.16 static unsigned long or32_extract (char param_ch, char ∗ enc_initial, unsigned long insn)[static]

6.8.2.17 static void or32_print_immediate (char param_ch, char ∗ encoding, unsigned long insn)[static]

Here is the call graph for this function:

or32_print_immediate extend_imm letter_signed

or32_extract letter_range

6.8.2.18 static void or32_print_register (char param_ch, char ∗ encoding, unsigned long insn)[static]

Here is the call graph for this function:

or32_print_register or32_extract

letter_range

letter_signed

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 154: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

132 File Documentation

6.8.2.19 static struct insn_op_struct∗ parse_params (const struct or32_opcode ∗ opcode, structinsn_op_struct ∗ cur) [static, read]

Here is the call graph for this function:

parse_params

debug

insn_extract

letter_signed

num_ones

6.8.3 Variable Documentation

6.8.3.1 unsigned long∗ automata

6.8.3.2 int curpass = 0

6.8.3.3 char∗ disassembled = &disassembled_str[0]

6.8.3.4 char disassembled_str[50] [static]

6.8.3.5 int nuncovered

6.8.3.6 struct insn_op_struct∗ op_data

6.8.3.7 struct insn_op_struct ∗∗ op_start

6.8.3.8 struct or32_letter or32_letters[ ]

Initial value:

{{ ’A’, NUM_UNSIGNED },{ ’B’, NUM_UNSIGNED },{ ’D’, NUM_UNSIGNED },{ ’I’, NUM_SIGNED },{ ’K’, NUM_UNSIGNED },{ ’L’, NUM_UNSIGNED },{ ’N’, NUM_SIGNED },{ ’0’, NUM_UNSIGNED },{ ’\0’, 0 }

}

6.8.3.9 const unsigned int or32_num_opcodes = ((sizeof(or32_opcodes)) / (sizeof(structor32_opcode))) - 1

6.8.3.10 struct or32_opcode or32_opcodes[ ]

6.8.3.11 struct temp_insn_struct ∗ ti

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 155: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

Index

_initialize_or1k_tdepor1k-tdep.c, 59

_initialize_remote_or1kremote-or1k.c, 100

addressjtr_read_block_message, 13jtr_read_message, 15jtr_write_block_message, 17jtr_write_message, 19

automataor32-opc.c, 132

build_address_symbolicor32-dis.c, 122

build_automataor32-opc.c, 129

bytes_per_addressgdbarch_tdep, 9

bytes_per_wordgdbarch_tdep, 9

ccremote-or1k.c, 119

chainjtr_chain_message, 10

commandjtr_chain_message, 10jtr_read_block_message, 13jtr_read_message, 15jtr_write_block_message, 17jtr_write_message, 19

CORE_ADDRor32-dis.c, 122

cover_insnor32-opc.c, 129

ctremote-or1k.c, 119

curpassor32-opc.c, 132

datajtr_write_block_message, 17

data_hjtr_read_response, 16jtr_write_message, 19

data_ljtr_read_response, 16jtr_write_message, 19

dcrremote-or1k.c, 119

debugor32-opc.c, 129

destruct_automataor32-opc.c, 130

deviceor1k-jtag.c, 50

disassemble_insnor32-opc.c, 130

disassembledor32-opc.c, 132

disassembled_stror32-opc.c, 132

dmr1remote-or1k.c, 119

dmr2remote-or1k.c, 119

dpremote-or1k.c, 119

drrremote-or1k.c, 119

dsrremote-or1k.c, 119

dvrremote-or1k.c, 119

EFor32-opc.c, 129

EFIor32-opc.c, 129

EFNor32-opc.c, 129

EXTEND29or32-dis.c, 122

extend_immor32-opc.c, 130

fdor1k-jtag.c, 50

find_bytes_bigor32-dis.c, 122

Page 156: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

134 INDEX

find_bytes_littleor32-dis.c, 122

gdb/or1k-jtag.c, 23gdb/or1k-jtag.h, 52gdb/or1k-tdep.c, 57gdb/or1k-tdep.h, 81gdb/remote-or1k.c, 98gdbarch_tdep, 9

bytes_per_address, 9bytes_per_word, 9num_gpr_regs, 9num_matchpoints, 9

in_passtemp_insn_struct, 21

info_matchpoints_commandor1k-tdep.c, 61

info_spr_commandor1k-tdep.c, 61

insntemp_insn_struct, 21

insn_decodeor32-opc.c, 130

insn_extractor32-opc.c, 130

insn_indexor32-opc.c, 131

insn_lenor32-opc.c, 131

insn_masktemp_insn_struct, 21

insn_nameor32-opc.c, 131

jp1_chain_addr_sizeor1k-jtag.c, 50

jp1_chain_data_sizeor1k-jtag.c, 50

jp1_chain_has_crcor1k-jtag.c, 50

jp1_chain_has_rwor1k-jtag.c, 50

jp1_chain_is_validor1k-jtag.c, 50

jp1_crc_ror1k-jtag.c, 50

JP1_CRC_SIZEor1k-jtag.c, 25

jp1_crc_wor1k-jtag.c, 50

jp1_ll_crc_calcor1k-jtag.c, 27

jp1_ll_prepare_control

or1k-jtag.c, 27jp1_ll_prepare_data

or1k-jtag.c, 27jp1_ll_read_jp1

or1k-jtag.c, 27jp1_ll_read_stream

or1k-jtag.c, 28jp1_ll_reset_jp1

or1k-jtag.c, 29jp1_ll_write_jp1

or1k-jtag.c, 29jp1_ll_write_stream

or1k-jtag.c, 29JP1_NUM_RETRIES

or1k-jtag.c, 25jp1_read_jtag_block

or1k-jtag.c, 30jp1_read_jtag_reg

or1k-jtag.c, 30JP1_RETRY_WAIT

or1k-jtag.c, 26jp1_select_chain

or1k-jtag.c, 31JP1_TCK

or1k-jtag.c, 26JP1_TDI

or1k-jtag.c, 26JP1_TDO

or1k-jtag.c, 26JP1_TMS

or1k-jtag.c, 26JP1_TRST

or1k-jtag.c, 26JP1_WAIT

or1k-jtag.c, 26jp1_write_jtag_block

or1k-jtag.c, 31jp1_write_jtag_reg

or1k-jtag.c, 32jtr_chain_message, 10

chain, 10command, 10length, 10

jtr_chain_response, 11status, 11

jtr_failure_response, 12status, 12

jtr_ll_checkor1k-jtag.c, 33

jtr_ll_closeor1k-jtag.c, 33

jtr_ll_connector1k-jtag.c, 33

jtr_ll_read

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 157: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

INDEX 135

or1k-jtag.c, 34jtr_ll_response

or1k-jtag.c, 34jtr_ll_write

or1k-jtag.c, 35jtr_read_block_message, 13

address, 13command, 13length, 13num_regs, 13

jtr_read_block_response, 14num_regs, 14status, 14

jtr_read_jtag_blockor1k-jtag.c, 35

jtr_read_jtag_regor1k-jtag.c, 35

jtr_read_message, 15address, 15command, 15length, 15

jtr_read_response, 16data_h, 16data_l, 16status, 16

jtr_select_chainor1k-jtag.c, 36

jtr_write_block_message, 17address, 17command, 17data, 17length, 17num_regs, 17

jtr_write_block_response, 18status, 18

jtr_write_jtag_blockor1k-jtag.c, 36

jtr_write_jtag_regor1k-jtag.c, 37

jtr_write_message, 19address, 19command, 19data_h, 19data_l, 19length, 19

jtr_write_response, 20status, 20

l_noneor32-opc.c, 131

LEAF_FLAGor32-opc.c, 129

lengthjtr_chain_message, 10

jtr_read_block_message, 13jtr_read_message, 15jtr_write_block_message, 17jtr_write_message, 19

letter_rangeor32-opc.c, 131

letter_signedor32-opc.c, 131

locationor1k-jtag.c, 50

lpor1k-jtag.c, 51

mainpage, 120MAX_AUTOMATA_SIZE

or32-opc.c, 129MAX_LEN

or32-opc.c, 129MAX_OP_TABLE_SIZE

or32-opc.c, 129MIN

or32-opc.c, 129

num_gpr_regsgdbarch_tdep, 9

num_matchpointsgdbarch_tdep, 9

num_onesor32-opc.c, 131

num_regsjtr_read_block_message, 13jtr_read_block_response, 14jtr_write_block_message, 17

nuncoveredor32-opc.c, 132

op_dataor32-opc.c, 132

op_startor32-opc.c, 132

opcodes/or32-dis.c, 121opcodes/or32-opc.c, 127or1k-jtag.c

device, 50fd, 50jp1_chain_addr_size, 50jp1_chain_data_size, 50jp1_chain_has_crc, 50jp1_chain_has_rw, 50jp1_chain_is_valid, 50jp1_crc_r, 50JP1_CRC_SIZE, 25jp1_crc_w, 50jp1_ll_crc_calc, 27

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 158: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

136 INDEX

jp1_ll_prepare_control, 27jp1_ll_prepare_data, 27jp1_ll_read_jp1, 27jp1_ll_read_stream, 28jp1_ll_reset_jp1, 29jp1_ll_write_jp1, 29jp1_ll_write_stream, 29JP1_NUM_RETRIES, 25jp1_read_jtag_block, 30jp1_read_jtag_reg, 30JP1_RETRY_WAIT, 26jp1_select_chain, 31JP1_TCK, 26JP1_TDI, 26JP1_TDO, 26JP1_TMS, 26JP1_TRST, 26JP1_WAIT, 26jp1_write_jtag_block, 31jp1_write_jtag_reg, 32jtr_ll_check, 33jtr_ll_close, 33jtr_ll_connect, 33jtr_ll_read, 34jtr_ll_response, 34jtr_ll_write, 35jtr_read_jtag_block, 35jtr_read_jtag_reg, 35jtr_select_chain, 36jtr_write_jtag_block, 36jtr_write_jtag_reg, 37location, 50lp, 51or1k_dbg_if_version, 51or1k_jtag_close, 38or1k_jtag_connection, 51or1k_jtag_current_chain, 51or1k_jtag_err_name, 38OR1K_JTAG_FAST_WAIT, 26or1k_jtag_init, 38or1k_jtag_read_jtag_block, 39or1k_jtag_read_jtag_reg, 40or1k_jtag_read_mem, 40or1k_jtag_read_spr, 41or1k_jtag_reset, 42or1k_jtag_select_chain, 43OR1K_JTAG_SLOW_WAIT, 27or1k_jtag_stall, 44or1k_jtag_unstall, 45or1k_jtag_wait, 46or1k_jtag_write_jtag_block, 47or1k_jtag_write_jtag_reg, 48or1k_jtag_write_mem, 48or1k_jtag_write_spr, 49

or1k_select_dr, 51or1k-jtag.h

OR1K_DBG_IF_MOHOR, 54OR1K_DBG_IF_ORPSOC, 54OR1K_JI_CHAIN_SELECT, 55OR1K_JI_DEBUG, 55OR1K_JTAG_COMMAND_CHAIN, 55OR1K_JTAG_COMMAND_READ, 55OR1K_JTAG_COMMAND_READ_BLOCK,

55OR1K_JTAG_COMMAND_WRITE, 55OR1K_JTAG_COMMAND_WRITE_-

BLOCK, 55OR1K_JTAG_ERR_ACCESS_EXCEPTION,

55OR1K_JTAG_ERR_COMMAND_NOT_-

IMPLEMENTED, 55OR1K_JTAG_ERR_CRC, 55OR1K_JTAG_ERR_INVALID_ADDRESS,

55OR1K_JTAG_ERR_INVALID_CHAIN, 55OR1K_JTAG_ERR_INVALID_COMMAND,

55OR1K_JTAG_ERR_INVALID_LENGTH, 55OR1K_JTAG_ERR_MEM, 55OR1K_JTAG_ERR_NO_CONNECTION, 55OR1K_JTAG_ERR_NONE, 55OR1K_JTAG_ERR_OUT_OF_MEMORY, 55OR1K_JTAG_ERR_PROTOCOL_ERROR,

55OR1K_JTAG_ERR_SERVER_-

TERMINATED, 55OR1K_SC_REGISTER, 54OR1K_SC_RISC_DEBUG, 54OR1K_SC_UNDEF, 54OR1K_SC_WISHBONE, 54or1k_dbg_if_version, 56or1k_dbg_if_version_enum, 54OR1K_JI_SIZE, 53or1k_jtag_chains, 54or1k_jtag_close, 56or1k_jtag_errors, 54or1k_jtag_init, 56or1k_jtag_instr, 55or1k_jtag_proxy_protocol_commands, 55or1k_jtag_read_mem, 56or1k_jtag_read_spr, 56OR1K_JTAG_RISCOP, 53OR1K_JTAG_RISCOP_RESET, 54OR1K_JTAG_RISCOP_STALL, 54or1k_jtag_stall, 56or1k_jtag_unstall, 56or1k_jtag_wait, 56or1k_jtag_write_mem, 56

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 159: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

INDEX 137

or1k_jtag_write_spr, 56OR1K_MAX_JTAG_WRITE, 54OR1K_SC_SIZE, 54

or1k-tdep.c_initialize_or1k_tdep, 59info_matchpoints_command, 61info_spr_command, 61or1k_breakpoint_from_pc, 61or1k_dump_tdep, 61or1k_fetch_instruction, 61or1k_frame_align, 61or1k_frame_base_address, 62or1k_frame_fp_loc, 62or1k_frame_prev_register, 63or1k_frame_size, 63or1k_frame_size_check, 64or1k_frame_sniffer, 65or1k_frame_this_id, 65or1k_frame_unwind_cache, 66or1k_gdbarch_init, 67or1k_get_saved_reg, 68or1k_groupnum_from_name, 69or1k_info_spr_command, 69or1k_link_address, 70or1k_parse_spr_params, 70or1k_pseudo_register_read, 71or1k_pseudo_register_write, 72or1k_push_dummy_call, 72or1k_read_spr, 72or1k_register_name, 73or1k_register_reggroup_p, 73or1k_register_type, 74or1k_registers_info, 74or1k_regnum_from_name, 75or1k_return_value, 75or1k_single_step_through_delay, 76or1k_skip_prologue, 76or1k_spr_command, 77or1k_spr_group_name, 77or1k_spr_register_name, 78or1k_store_instruction, 78or1k_tokenize, 78or1k_unwind_dummy_id, 79or1k_unwind_pc, 79or1k_unwind_sp, 79or1k_write_spr, 79

or1k-tdep.hOR1K_A_REG, 88OR1K_ALIGN_VECTOR, 88OR1K_B_REG, 88OR1K_BRK_INSTR, 88OR1K_BRK_INSTR_STRUCT, 88OR1K_BUSERR_VECTOR, 88OR1K_CPUCFGR_SPRNUM, 90

OR1K_D_REG, 90OR1K_DCFGR_SPRNUM, 90OR1K_DCR0_SPRNUM, 90OR1K_DCR_CC, 90OR1K_DCR_CC_OFF, 90OR1K_DCR_CT, 90OR1K_DCR_CT_OFF, 90OR1K_DCR_DP, 90OR1K_DCR_SC, 90OR1K_DCWR0_SPRNUM, 90OR1K_DCWR1_SPRNUM, 90OR1K_DMR1_BT, 90OR1K_DMR1_CW, 90OR1K_DMR1_CW_AND, 90OR1K_DMR1_CW_OR, 90OR1K_DMR1_CW_SZ, 90OR1K_DMR1_SPRNUM, 90OR1K_DMR1_ST, 90OR1K_DMR2_AWTC_MASK, 90OR1K_DMR2_AWTC_OFF, 90OR1K_DMR2_SPRNUM, 90OR1K_DMR2_WBS_MASK, 90OR1K_DMR2_WBS_OFF, 90OR1K_DMR2_WCE0, 90OR1K_DMR2_WCE1, 90OR1K_DMR2_WGB_MASK, 90OR1K_DMR2_WGB_OFF, 90OR1K_DPF_VECTOR, 90OR1K_DRR_AE, 90OR1K_DRR_BUSEE, 90OR1K_DRR_DME, 90OR1K_DRR_DPFE, 90OR1K_DRR_FPE, 90OR1K_DRR_IIE, 90OR1K_DRR_IME, 90OR1K_DRR_INTE, 90OR1K_DRR_IPFE, 90OR1K_DRR_RE, 90OR1K_DRR_RSTE, 90OR1K_DRR_SCE, 90OR1K_DRR_SPRNUM, 90OR1K_DRR_TE, 90OR1K_DRR_TTE, 90OR1K_DSR_AE, 90OR1K_DSR_BUSEE, 90OR1K_DSR_DME, 90OR1K_DSR_DPFE, 90OR1K_DSR_FPE, 90OR1K_DSR_IIE, 90OR1K_DSR_IME, 90OR1K_DSR_INTE, 90OR1K_DSR_IPFE, 90OR1K_DSR_RE, 90OR1K_DSR_RSTE, 90

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 160: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

138 INDEX

OR1K_DSR_SCE, 90OR1K_DSR_SPRNUM, 90OR1K_DSR_TE, 90OR1K_DSR_TTE, 90OR1K_DTLB_VECTOR, 90OR1K_DVR0_SPRNUM, 90OR1K_EPCR_SPRNUM, 90OR1K_EXT_VECTOR, 90OR1K_FIRST_ARG_REGNUM, 90OR1K_FP_REGNUM, 90OR1K_FP_VECTOR, 90OR1K_FRAME_RED_ZONE_SIZE, 90OR1K_ILL_VECTOR, 90OR1K_IMM, 90OR1K_IMM2, 90OR1K_INSTLEN, 91OR1K_IPF_VECTOR, 91OR1K_ITLB_VECTOR, 91OR1K_LAST_ARG_REGNUM, 91OR1K_LR_REGNUM, 91OR1K_MAX_GPR_REGS, 91OR1K_MAX_HW_WATCHES, 91OR1K_MAX_MATCHPOINTS, 91OR1K_NOP_EXIT, 91OR1K_NPC_REGNUM, 91OR1K_NPC_SPRNUM, 93OR1K_NUM_PSEUDO_REGS, 93OR1K_NUM_REGS, 93OR1K_NUM_SPGS, 93OR1K_NUM_TAP_RECORDS, 93OR1K_OFFSET, 93OR1K_OP_ADD, 93OR1K_OP_ADDC, 93OR1K_OP_ADDI, 93OR1K_OP_AND, 93OR1K_OP_ANDI, 93OR1K_OP_BF, 93OR1K_OP_BNF, 93OR1K_OP_J, 93OR1K_OP_JAL, 93OR1K_OP_JALR, 93OR1K_OP_JR, 93OR1K_OP_LBS, 93OR1K_OP_LBZ, 93OR1K_OP_LHS, 93OR1K_OP_LHZ, 93OR1K_OP_LWS, 93OR1K_OP_LWZ, 93OR1K_OP_MFSPR, 93OR1K_OP_MOVHI, 93OR1K_OP_MTSPR, 93OR1K_OP_MUL, 93OR1K_OP_MULI, 93OR1K_OP_MULU, 93

OR1K_OP_NOP, 93OR1K_OP_OR, 93OR1K_OP_ORI, 93OR1K_OP_RFE, 93OR1K_OP_RORI, 93OR1K_OP_SB, 93OR1K_OP_SFEQ, 93OR1K_OP_SFGES, 93OR1K_OP_SFGEU, 93OR1K_OP_SFGTS, 93OR1K_OP_SFGTU, 93OR1K_OP_SFLES, 93OR1K_OP_SFLEU, 93OR1K_OP_SFLTS, 93OR1K_OP_SFLTU, 93OR1K_OP_SFNE, 93OR1K_OP_SLL, 93OR1K_OP_SLLI, 93OR1K_OP_SRA, 93OR1K_OP_SRAI, 93OR1K_OP_SRL, 93OR1K_OP_SRLI, 93OR1K_OP_SUB, 93OR1K_OP_SW, 93OR1K_OP_SYS, 93OR1K_OP_TRAP, 93OR1K_OP_XOR, 93OR1K_OP_XORI, 93OR1K_OPCODE1, 93OR1K_OPCODE2, 93OR1K_OPCODE3, 94OR1K_OPCODE4, 94OR1K_OPCODE5, 94OR1K_OPCODE6, 96OR1K_OPCODE7, 96OR1K_PPC_REGNUM, 96OR1K_PPC_SPRNUM, 96OR1K_RANGE_VECTOR, 96OR1K_RESET_VECTOR, 96OR1K_RV_REGNUM, 96OR1K_SEXT16, 96OR1K_SEXT26, 96OR1K_SHIFT, 96OR1K_SP_REGNUM, 96OR1K_SPG_DC, 96OR1K_SPG_DC_DCBFR, 96OR1K_SPG_DC_DCBIR, 96OR1K_SPG_DC_DCBLR, 96OR1K_SPG_DC_DCBPR, 96OR1K_SPG_DC_DCBWR, 96OR1K_SPG_DC_DCCR, 96OR1K_SPG_DC_LAST, 96OR1K_SPG_DEBUG, 96OR1K_SPG_DEBUG_DCR, 96

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 161: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

INDEX 139

OR1K_SPG_DEBUG_DCR_END, 96OR1K_SPG_DEBUG_DCWR0, 96OR1K_SPG_DEBUG_DCWR1, 96OR1K_SPG_DEBUG_DMR1, 96OR1K_SPG_DEBUG_DMR2, 96OR1K_SPG_DEBUG_DRR, 96OR1K_SPG_DEBUG_DSR, 96OR1K_SPG_DEBUG_DVR, 96OR1K_SPG_DEBUG_DVR_END, 96OR1K_SPG_DEBUG_LAST, 96OR1K_SPG_DMMU, 96OR1K_SPG_DMMU_DATBMR, 96OR1K_SPG_DMMU_DATBMR_END, 96OR1K_SPG_DMMU_DATBTR, 96OR1K_SPG_DMMU_DATBTR_END, 96OR1K_SPG_DMMU_DMMUCR, 96OR1K_SPG_DMMU_DMMUPR, 96OR1K_SPG_DMMU_DTLBEIR, 96OR1K_SPG_DMMU_DTLBW0MR, 96OR1K_SPG_DMMU_DTLBW0MR_END,

96OR1K_SPG_DMMU_DTLBW0TR, 96OR1K_SPG_DMMU_DTLBW0TR_END, 96OR1K_SPG_DMMU_DTLBW1MR, 96OR1K_SPG_DMMU_DTLBW1MR_END,

96OR1K_SPG_DMMU_DTLBW1TR, 96OR1K_SPG_DMMU_DTLBW1TR_END, 96OR1K_SPG_DMMU_DTLBW2MR, 96OR1K_SPG_DMMU_DTLBW2MR_END,

96OR1K_SPG_DMMU_DTLBW2TR, 96OR1K_SPG_DMMU_DTLBW2TR_END, 96OR1K_SPG_DMMU_DTLBW3MR, 96OR1K_SPG_DMMU_DTLBW3MR_END,

96OR1K_SPG_DMMU_DTLBW3TR, 96OR1K_SPG_DMMU_DTLBW3TR_END, 96OR1K_SPG_DMMU_LAST, 96OR1K_SPG_FPU, 96OR1K_SPG_FPU_LAST, 96OR1K_SPG_IC, 96OR1K_SPG_IC_ICBIR, 96OR1K_SPG_IC_ICBLR, 96OR1K_SPG_IC_ICBPR, 96OR1K_SPG_IC_ICCR, 96OR1K_SPG_IC_LAST, 96OR1K_SPG_IMMU, 96OR1K_SPG_IMMU_IATBMR, 96OR1K_SPG_IMMU_IATBMR_END, 96OR1K_SPG_IMMU_IATBTR, 96OR1K_SPG_IMMU_IATBTR_END, 96OR1K_SPG_IMMU_IMMUCR, 96OR1K_SPG_IMMU_IMMUPR, 96

OR1K_SPG_IMMU_ITLBEIR, 96OR1K_SPG_IMMU_ITLBW0MR, 96OR1K_SPG_IMMU_ITLBW0MR_END, 96OR1K_SPG_IMMU_ITLBW0TR, 96OR1K_SPG_IMMU_ITLBW0TR_END, 96OR1K_SPG_IMMU_ITLBW1MR, 96OR1K_SPG_IMMU_ITLBW1MR_END, 96OR1K_SPG_IMMU_ITLBW1TR, 96OR1K_SPG_IMMU_ITLBW1TR_END, 96OR1K_SPG_IMMU_ITLBW2MR, 96OR1K_SPG_IMMU_ITLBW2MR_END, 96OR1K_SPG_IMMU_ITLBW2TR, 96OR1K_SPG_IMMU_ITLBW2TR_END, 96OR1K_SPG_IMMU_ITLBW3MR, 96OR1K_SPG_IMMU_ITLBW3MR_END, 96OR1K_SPG_IMMU_ITLBW3TR, 96OR1K_SPG_IMMU_ITLBW3TR_END, 96OR1K_SPG_IMMU_LAST, 96OR1K_SPG_MAC, 96OR1K_SPG_MAC_LAST, 96OR1K_SPG_MAC_MACHI, 96OR1K_SPG_MAC_MACLO, 96OR1K_SPG_PC, 96OR1K_SPG_PC_LAST, 96OR1K_SPG_PC_PCCR, 96OR1K_SPG_PC_PCCR_END, 96OR1K_SPG_PC_PCMR, 96OR1K_SPG_PC_PCMR_END, 96OR1K_SPG_PIC, 96OR1K_SPG_PIC_LAST, 96OR1K_SPG_PIC_PICMR, 96OR1K_SPG_PIC_PICSR, 96OR1K_SPG_PM, 96OR1K_SPG_PM_LAST, 96OR1K_SPG_PM_PMR, 96OR1K_SPG_SIZE, 96OR1K_SPG_SIZE_BITS, 96OR1K_SPG_SYS, 96OR1K_SPG_SYS_CPUCFGR, 96OR1K_SPG_SYS_DCCFGR, 96OR1K_SPG_SYS_DCFGR, 96OR1K_SPG_SYS_DMMUCFGR, 96OR1K_SPG_SYS_EEAR, 96OR1K_SPG_SYS_EEAR_END, 96OR1K_SPG_SYS_EPCR, 96OR1K_SPG_SYS_EPCR_END, 96OR1K_SPG_SYS_ESR, 96OR1K_SPG_SYS_ESR_END, 96OR1K_SPG_SYS_FPCSR, 96OR1K_SPG_SYS_GPR, 96OR1K_SPG_SYS_GPR_END, 96OR1K_SPG_SYS_ICCFGR, 96OR1K_SPG_SYS_IMMUCFGR, 96OR1K_SPG_SYS_LAST, 96

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 162: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

140 INDEX

OR1K_SPG_SYS_NPC, 96OR1K_SPG_SYS_PCCFGR, 96OR1K_SPG_SYS_PPC, 96OR1K_SPG_SYS_SR, 96OR1K_SPG_SYS_UPR, 96OR1K_SPG_SYS_VR, 96OR1K_SPG_TT, 96OR1K_SPG_TT_LAST, 96OR1K_SPG_TT_TTCR, 96OR1K_SPG_TT_TTMR, 96OR1K_SPR, 96OR1K_SPR_CPUCFGR_CGF, 96OR1K_SPR_CPUCFGR_NSGF, 96OR1K_SPR_CPUCFGR_OB32S, 96OR1K_SPR_CPUCFGR_OB64S, 96OR1K_SPR_CPUCFGR_OF32S, 96OR1K_SPR_CPUCFGR_OF64S, 96OR1K_SPR_CPUCFGR_OV64S, 96OR1K_SPR_DCFGR_NDP, 96OR1K_SPR_DCFGR_WPCI, 96OR1K_SPR_UPR_DCP, 96OR1K_SPR_UPR_DMP, 96OR1K_SPR_UPR_DUP, 96OR1K_SPR_UPR_ICP, 96OR1K_SPR_UPR_IMP, 96OR1K_SPR_UPR_MP, 96OR1K_SPR_UPR_PCUP, 96OR1K_SPR_UPR_PICP, 96OR1K_SPR_UPR_PMP, 96OR1K_SPR_UPR_TTP, 96OR1K_SPR_UPR_UP, 96OR1K_SR_REGNUM, 96OR1K_SR_SPRNUM, 96OR1K_STACK_ALIGN, 96OR1K_SYS_VECTOR, 96OR1K_TOTAL_NUM_REGS, 96OR1K_TRAP_VECTOR, 96OR1K_TT_VECTOR, 96OR1K_UPR_SPRNUM, 96OR1K_VR_SPRNUM, 96OR1K_ZERO_REGNUM, 96print_insn_big_or32, 96print_insn_little_or32, 97

OR1K_DBG_IF_MOHORor1k-jtag.h, 54

OR1K_DBG_IF_ORPSOCor1k-jtag.h, 54

OR1K_JI_CHAIN_SELECTor1k-jtag.h, 55

OR1K_JI_DEBUGor1k-jtag.h, 55

OR1K_JTAG_COMMAND_CHAINor1k-jtag.h, 55

OR1K_JTAG_COMMAND_READ

or1k-jtag.h, 55OR1K_JTAG_COMMAND_READ_BLOCK

or1k-jtag.h, 55OR1K_JTAG_COMMAND_WRITE

or1k-jtag.h, 55OR1K_JTAG_COMMAND_WRITE_BLOCK

or1k-jtag.h, 55OR1K_JTAG_ERR_ACCESS_EXCEPTION

or1k-jtag.h, 55OR1K_JTAG_ERR_COMMAND_NOT_-

IMPLEMENTEDor1k-jtag.h, 55

OR1K_JTAG_ERR_CRCor1k-jtag.h, 55

OR1K_JTAG_ERR_INVALID_ADDRESSor1k-jtag.h, 55

OR1K_JTAG_ERR_INVALID_CHAINor1k-jtag.h, 55

OR1K_JTAG_ERR_INVALID_COMMANDor1k-jtag.h, 55

OR1K_JTAG_ERR_INVALID_LENGTHor1k-jtag.h, 55

OR1K_JTAG_ERR_MEMor1k-jtag.h, 55

OR1K_JTAG_ERR_NO_CONNECTIONor1k-jtag.h, 55

OR1K_JTAG_ERR_NONEor1k-jtag.h, 55

OR1K_JTAG_ERR_OUT_OF_MEMORYor1k-jtag.h, 55

OR1K_JTAG_ERR_PROTOCOL_ERRORor1k-jtag.h, 55

OR1K_JTAG_ERR_SERVER_TERMINATEDor1k-jtag.h, 55

OR1K_SC_REGISTERor1k-jtag.h, 54

OR1K_SC_RISC_DEBUGor1k-jtag.h, 54

OR1K_SC_UNDEFor1k-jtag.h, 54

OR1K_SC_WISHBONEor1k-jtag.h, 54

OR1K_A_REGor1k-tdep.h, 88

OR1K_ALIGN_VECTORor1k-tdep.h, 88

OR1K_B_REGor1k-tdep.h, 88

or1k_breakpoint_from_pcor1k-tdep.c, 61

OR1K_BRK_INSTRor1k-tdep.h, 88

OR1K_BRK_INSTR_STRUCTor1k-tdep.h, 88

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 163: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

INDEX 141

OR1K_BUSERR_VECTORor1k-tdep.h, 88

or1k_can_use_hw_matchpointremote-or1k.c, 101

or1k_clear_breakpointremote-or1k.c, 102

or1k_closeremote-or1k.c, 102

or1k_commit_debug_registersremote-or1k.c, 102

OR1K_CPUCFGR_SPRNUMor1k-tdep.h, 90

or1k_create_inferiorremote-or1k.c, 103

OR1K_D_REGor1k-tdep.h, 90

or1k_dbg_if_versionor1k-jtag.c, 51or1k-jtag.h, 56

or1k_dbg_if_version_enumor1k-jtag.h, 54

or1k_dbgcacheremote-or1k.c, 119

OR1K_DCFGR_SPRNUMor1k-tdep.h, 90

OR1K_DCR0_SPRNUMor1k-tdep.h, 90

OR1K_DCR_CCor1k-tdep.h, 90

OR1K_DCR_CC_OFFor1k-tdep.h, 90

OR1K_DCR_CTor1k-tdep.h, 90

OR1K_DCR_CT_OFFor1k-tdep.h, 90

OR1K_DCR_DPor1k-tdep.h, 90

OR1K_DCR_SCor1k-tdep.h, 90

OR1K_DCWR0_SPRNUMor1k-tdep.h, 90

OR1K_DCWR1_SPRNUMor1k-tdep.h, 90

or1k_detachremote-or1k.c, 103

OR1K_DMR1_BTor1k-tdep.h, 90

OR1K_DMR1_CWor1k-tdep.h, 90

OR1K_DMR1_CW_ANDor1k-tdep.h, 90

OR1K_DMR1_CW_ORor1k-tdep.h, 90

OR1K_DMR1_CW_SZ

or1k-tdep.h, 90OR1K_DMR1_SPRNUM

or1k-tdep.h, 90OR1K_DMR1_ST

or1k-tdep.h, 90OR1K_DMR2_AWTC_MASK

or1k-tdep.h, 90OR1K_DMR2_AWTC_OFF

or1k-tdep.h, 90OR1K_DMR2_SPRNUM

or1k-tdep.h, 90OR1K_DMR2_WBS_MASK

or1k-tdep.h, 90OR1K_DMR2_WBS_OFF

or1k-tdep.h, 90OR1K_DMR2_WCE0

or1k-tdep.h, 90OR1K_DMR2_WCE1

or1k-tdep.h, 90OR1K_DMR2_WGB_MASK

or1k-tdep.h, 90OR1K_DMR2_WGB_OFF

or1k-tdep.h, 90OR1K_DPF_VECTOR

or1k-tdep.h, 90OR1K_DRR_AE

or1k-tdep.h, 90OR1K_DRR_BUSEE

or1k-tdep.h, 90OR1K_DRR_DME

or1k-tdep.h, 90OR1K_DRR_DPFE

or1k-tdep.h, 90OR1K_DRR_FPE

or1k-tdep.h, 90OR1K_DRR_IIE

or1k-tdep.h, 90OR1K_DRR_IME

or1k-tdep.h, 90OR1K_DRR_INTE

or1k-tdep.h, 90OR1K_DRR_IPFE

or1k-tdep.h, 90OR1K_DRR_RE

or1k-tdep.h, 90OR1K_DRR_RSTE

or1k-tdep.h, 90OR1K_DRR_SCE

or1k-tdep.h, 90OR1K_DRR_SPRNUM

or1k-tdep.h, 90OR1K_DRR_TE

or1k-tdep.h, 90OR1K_DRR_TTE

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 164: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

142 INDEX

or1k-tdep.h, 90OR1K_DSR_AE

or1k-tdep.h, 90OR1K_DSR_BUSEE

or1k-tdep.h, 90OR1K_DSR_DME

or1k-tdep.h, 90OR1K_DSR_DPFE

or1k-tdep.h, 90OR1K_DSR_FPE

or1k-tdep.h, 90OR1K_DSR_IIE

or1k-tdep.h, 90OR1K_DSR_IME

or1k-tdep.h, 90OR1K_DSR_INTE

or1k-tdep.h, 90OR1K_DSR_IPFE

or1k-tdep.h, 90OR1K_DSR_RE

or1k-tdep.h, 90OR1K_DSR_RSTE

or1k-tdep.h, 90OR1K_DSR_SCE

or1k-tdep.h, 90OR1K_DSR_SPRNUM

or1k-tdep.h, 90OR1K_DSR_TE

or1k-tdep.h, 90OR1K_DSR_TTE

or1k-tdep.h, 90OR1K_DTLB_VECTOR

or1k-tdep.h, 90or1k_dump_tdep

or1k-tdep.c, 61OR1K_DVR0_SPRNUM

or1k-tdep.h, 90OR1K_EPCR_SPRNUM

or1k-tdep.h, 90OR1K_EXT_VECTOR

or1k-tdep.h, 90or1k_fetch_instruction

or1k-tdep.c, 61or1k_fetch_registers

remote-or1k.c, 103or1k_files_info

remote-or1k.c, 104OR1K_FIRST_ARG_REGNUM

or1k-tdep.h, 90or1k_first_free_matchpoint

remote-or1k.c, 104OR1K_FP_REGNUM

or1k-tdep.h, 90OR1K_FP_VECTOR

or1k-tdep.h, 90or1k_frame_align

or1k-tdep.c, 61or1k_frame_base_address

or1k-tdep.c, 62or1k_frame_fp_loc

or1k-tdep.c, 62or1k_frame_prev_register

or1k-tdep.c, 63OR1K_FRAME_RED_ZONE_SIZE

or1k-tdep.h, 90or1k_frame_size

or1k-tdep.c, 63or1k_frame_size_check

or1k-tdep.c, 64or1k_frame_sniffer

or1k-tdep.c, 65or1k_frame_this_id

or1k-tdep.c, 65or1k_frame_unwind_cache

or1k-tdep.c, 66or1k_gdb_to_dcr_type

remote-or1k.c, 104or1k_gdbarch_init

or1k-tdep.c, 67or1k_get_saved_reg

or1k-tdep.c, 68or1k_groupnum_from_name

or1k-tdep.c, 69OR1K_ILL_VECTOR

or1k-tdep.h, 90OR1K_IMM

or1k-tdep.h, 90OR1K_IMM2

or1k-tdep.h, 90or1k_info_spr_command

or1k-tdep.c, 69or1k_insert_breakpoint

remote-or1k.c, 105or1k_insert_hw_breakpoint

remote-or1k.c, 105or1k_insert_watchpoint

remote-or1k.c, 105OR1K_INSTLEN

or1k-tdep.h, 91or1k_interrupt

remote-or1k.c, 106or1k_interrupt_query

remote-or1k.c, 107or1k_interrupt_twice

remote-or1k.c, 107OR1K_IPF_VECTOR

or1k-tdep.h, 91or1k_is_single_stepping

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 165: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

INDEX 143

remote-or1k.c, 119OR1K_ITLB_VECTOR

or1k-tdep.h, 91OR1K_JI_SIZE

or1k-jtag.h, 53or1k_jtag_chains

or1k-jtag.h, 54or1k_jtag_close

or1k-jtag.c, 38or1k-jtag.h, 56

or1k_jtag_connectionor1k-jtag.c, 51

or1k_jtag_current_chainor1k-jtag.c, 51

or1k_jtag_err_nameor1k-jtag.c, 38

or1k_jtag_errorsor1k-jtag.h, 54

OR1K_JTAG_FAST_WAITor1k-jtag.c, 26

or1k_jtag_initor1k-jtag.c, 38or1k-jtag.h, 56

or1k_jtag_instror1k-jtag.h, 55

or1k_jtag_proxy_protocol_commandsor1k-jtag.h, 55

or1k_jtag_read_jtag_blockor1k-jtag.c, 39

or1k_jtag_read_jtag_regor1k-jtag.c, 40

or1k_jtag_read_memor1k-jtag.c, 40or1k-jtag.h, 56

or1k_jtag_read_spror1k-jtag.c, 41or1k-jtag.h, 56

or1k_jtag_resetor1k-jtag.c, 42

OR1K_JTAG_RISCOPor1k-jtag.h, 53

OR1K_JTAG_RISCOP_RESETor1k-jtag.h, 54

OR1K_JTAG_RISCOP_STALLor1k-jtag.h, 54

or1k_jtag_select_chainor1k-jtag.c, 43

OR1K_JTAG_SLOW_WAITor1k-jtag.c, 27

or1k_jtag_stallor1k-jtag.c, 44or1k-jtag.h, 56

or1k_jtag_unstallor1k-jtag.c, 45

or1k-jtag.h, 56or1k_jtag_wait

or1k-jtag.c, 46or1k-jtag.h, 56

or1k_jtag_write_jtag_blockor1k-jtag.c, 47

or1k_jtag_write_jtag_regor1k-jtag.c, 48

or1k_jtag_write_memor1k-jtag.c, 48or1k-jtag.h, 56

or1k_jtag_write_spror1k-jtag.c, 49or1k-jtag.h, 56

or1k_killremote-or1k.c, 107

OR1K_LAST_ARG_REGNUMor1k-tdep.h, 91

or1k_link_addressor1k-tdep.c, 70

OR1K_LR_REGNUMor1k-tdep.h, 91

or1k_matchpoint_equalremote-or1k.c, 108

OR1K_MAX_GPR_REGSor1k-tdep.h, 91

OR1K_MAX_HW_WATCHESor1k-tdep.h, 91

OR1K_MAX_JTAG_WRITEor1k-jtag.h, 54

OR1K_MAX_MATCHPOINTSor1k-tdep.h, 91

or1k_mourn_inferiorremote-or1k.c, 108

OR1K_NOP_EXITor1k-tdep.h, 91

OR1K_NPC_REGNUMor1k-tdep.h, 91

OR1K_NPC_SPRNUMor1k-tdep.h, 93

OR1K_NUM_PSEUDO_REGSor1k-tdep.h, 93

OR1K_NUM_REGSor1k-tdep.h, 93

OR1K_NUM_SPGSor1k-tdep.h, 93

OR1K_NUM_TAP_RECORDSor1k-tdep.h, 93

OR1K_OFFSETor1k-tdep.h, 93

or1k_old_intr_handlerremote-or1k.c, 119

OR1K_OP_ADDor1k-tdep.h, 93

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 166: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

144 INDEX

OR1K_OP_ADDCor1k-tdep.h, 93

OR1K_OP_ADDIor1k-tdep.h, 93

OR1K_OP_ANDor1k-tdep.h, 93

OR1K_OP_ANDIor1k-tdep.h, 93

OR1K_OP_BFor1k-tdep.h, 93

OR1K_OP_BNFor1k-tdep.h, 93

OR1K_OP_Jor1k-tdep.h, 93

OR1K_OP_JALor1k-tdep.h, 93

OR1K_OP_JALRor1k-tdep.h, 93

OR1K_OP_JRor1k-tdep.h, 93

OR1K_OP_LBSor1k-tdep.h, 93

OR1K_OP_LBZor1k-tdep.h, 93

OR1K_OP_LHSor1k-tdep.h, 93

OR1K_OP_LHZor1k-tdep.h, 93

OR1K_OP_LWSor1k-tdep.h, 93

OR1K_OP_LWZor1k-tdep.h, 93

OR1K_OP_MFSPRor1k-tdep.h, 93

OR1K_OP_MOVHIor1k-tdep.h, 93

OR1K_OP_MTSPRor1k-tdep.h, 93

OR1K_OP_MULor1k-tdep.h, 93

OR1K_OP_MULIor1k-tdep.h, 93

OR1K_OP_MULUor1k-tdep.h, 93

OR1K_OP_NOPor1k-tdep.h, 93

OR1K_OP_ORor1k-tdep.h, 93

OR1K_OP_ORIor1k-tdep.h, 93

OR1K_OP_RFEor1k-tdep.h, 93

OR1K_OP_RORIor1k-tdep.h, 93

OR1K_OP_SBor1k-tdep.h, 93

OR1K_OP_SFEQor1k-tdep.h, 93

OR1K_OP_SFGESor1k-tdep.h, 93

OR1K_OP_SFGEUor1k-tdep.h, 93

OR1K_OP_SFGTSor1k-tdep.h, 93

OR1K_OP_SFGTUor1k-tdep.h, 93

OR1K_OP_SFLESor1k-tdep.h, 93

OR1K_OP_SFLEUor1k-tdep.h, 93

OR1K_OP_SFLTSor1k-tdep.h, 93

OR1K_OP_SFLTUor1k-tdep.h, 93

OR1K_OP_SFNEor1k-tdep.h, 93

OR1K_OP_SLLor1k-tdep.h, 93

OR1K_OP_SLLIor1k-tdep.h, 93

OR1K_OP_SRAor1k-tdep.h, 93

OR1K_OP_SRAIor1k-tdep.h, 93

OR1K_OP_SRLor1k-tdep.h, 93

OR1K_OP_SRLIor1k-tdep.h, 93

OR1K_OP_SUBor1k-tdep.h, 93

OR1K_OP_SWor1k-tdep.h, 93

OR1K_OP_SYSor1k-tdep.h, 93

OR1K_OP_TRAPor1k-tdep.h, 93

OR1K_OP_XORor1k-tdep.h, 93

OR1K_OP_XORIor1k-tdep.h, 93

OR1K_OPCODE1or1k-tdep.h, 93

OR1K_OPCODE2or1k-tdep.h, 93

OR1K_OPCODE3or1k-tdep.h, 94

OR1K_OPCODE4or1k-tdep.h, 94

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 167: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

INDEX 145

OR1K_OPCODE5or1k-tdep.h, 94

OR1K_OPCODE6or1k-tdep.h, 96

OR1K_OPCODE7or1k-tdep.h, 96

or1k_openremote-or1k.c, 108

or1k_parse_spr_paramsor1k-tdep.c, 70

OR1K_PPC_REGNUMor1k-tdep.h, 96

OR1K_PPC_SPRNUMor1k-tdep.h, 96

or1k_prepare_to_storeremote-or1k.c, 109

or1k_pseudo_register_reador1k-tdep.c, 71

or1k_pseudo_register_writeor1k-tdep.c, 72

or1k_push_dummy_callor1k-tdep.c, 72

OR1K_RANGE_VECTORor1k-tdep.h, 96

or1k_rcmdremote-or1k.c, 109

or1k_read_spror1k-tdep.c, 72remote-or1k.c, 110

or1k_region_ok_for_hw_watchpointremote-or1k.c, 110

or1k_register_nameor1k-tdep.c, 73

or1k_register_reggroup_por1k-tdep.c, 73

or1k_register_typeor1k-tdep.c, 74

or1k_registers_infoor1k-tdep.c, 74

or1k_regnum_from_nameor1k-tdep.c, 75

or1k_regnum_to_sprnumremote-or1k.c, 110

or1k_remove_breakpointremote-or1k.c, 111

or1k_remove_hw_breakpointremote-or1k.c, 111

or1k_remove_watchpointremote-or1k.c, 111

OR1K_RESET_VECTORor1k-tdep.h, 96

or1k_resumeremote-or1k.c, 112

or1k_return_value

or1k-tdep.c, 75OR1K_RV_REGNUM

or1k-tdep.h, 96OR1K_SC_SIZE

or1k-jtag.h, 54or1k_select_dr

or1k-jtag.c, 51or1k_set_breakpoint

remote-or1k.c, 112OR1K_SEXT16

or1k-tdep.h, 96OR1K_SEXT26

or1k-tdep.h, 96OR1K_SHIFT

or1k-tdep.h, 96or1k_single_step_through_delay

or1k-tdep.c, 76or1k_skip_prologue

or1k-tdep.c, 76OR1K_SP_REGNUM

or1k-tdep.h, 96OR1K_SPG_DC

or1k-tdep.h, 96OR1K_SPG_DC_DCBFR

or1k-tdep.h, 96OR1K_SPG_DC_DCBIR

or1k-tdep.h, 96OR1K_SPG_DC_DCBLR

or1k-tdep.h, 96OR1K_SPG_DC_DCBPR

or1k-tdep.h, 96OR1K_SPG_DC_DCBWR

or1k-tdep.h, 96OR1K_SPG_DC_DCCR

or1k-tdep.h, 96OR1K_SPG_DC_LAST

or1k-tdep.h, 96OR1K_SPG_DEBUG

or1k-tdep.h, 96OR1K_SPG_DEBUG_DCR

or1k-tdep.h, 96OR1K_SPG_DEBUG_DCR_END

or1k-tdep.h, 96OR1K_SPG_DEBUG_DCWR0

or1k-tdep.h, 96OR1K_SPG_DEBUG_DCWR1

or1k-tdep.h, 96OR1K_SPG_DEBUG_DMR1

or1k-tdep.h, 96OR1K_SPG_DEBUG_DMR2

or1k-tdep.h, 96OR1K_SPG_DEBUG_DRR

or1k-tdep.h, 96OR1K_SPG_DEBUG_DSR

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 168: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

146 INDEX

or1k-tdep.h, 96OR1K_SPG_DEBUG_DVR

or1k-tdep.h, 96OR1K_SPG_DEBUG_DVR_END

or1k-tdep.h, 96OR1K_SPG_DEBUG_LAST

or1k-tdep.h, 96OR1K_SPG_DMMU

or1k-tdep.h, 96OR1K_SPG_DMMU_DATBMR

or1k-tdep.h, 96OR1K_SPG_DMMU_DATBMR_END

or1k-tdep.h, 96OR1K_SPG_DMMU_DATBTR

or1k-tdep.h, 96OR1K_SPG_DMMU_DATBTR_END

or1k-tdep.h, 96OR1K_SPG_DMMU_DMMUCR

or1k-tdep.h, 96OR1K_SPG_DMMU_DMMUPR

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBEIR

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW0MR

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW0MR_END

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW0TR

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW0TR_END

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW1MR

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW1MR_END

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW1TR

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW1TR_END

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW2MR

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW2MR_END

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW2TR

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW2TR_END

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW3MR

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW3MR_END

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW3TR

or1k-tdep.h, 96OR1K_SPG_DMMU_DTLBW3TR_END

or1k-tdep.h, 96OR1K_SPG_DMMU_LAST

or1k-tdep.h, 96OR1K_SPG_FPU

or1k-tdep.h, 96OR1K_SPG_FPU_LAST

or1k-tdep.h, 96OR1K_SPG_IC

or1k-tdep.h, 96OR1K_SPG_IC_ICBIR

or1k-tdep.h, 96OR1K_SPG_IC_ICBLR

or1k-tdep.h, 96OR1K_SPG_IC_ICBPR

or1k-tdep.h, 96OR1K_SPG_IC_ICCR

or1k-tdep.h, 96OR1K_SPG_IC_LAST

or1k-tdep.h, 96OR1K_SPG_IMMU

or1k-tdep.h, 96OR1K_SPG_IMMU_IATBMR

or1k-tdep.h, 96OR1K_SPG_IMMU_IATBMR_END

or1k-tdep.h, 96OR1K_SPG_IMMU_IATBTR

or1k-tdep.h, 96OR1K_SPG_IMMU_IATBTR_END

or1k-tdep.h, 96OR1K_SPG_IMMU_IMMUCR

or1k-tdep.h, 96OR1K_SPG_IMMU_IMMUPR

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBEIR

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW0MR

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW0MR_END

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW0TR

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW0TR_END

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW1MR

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW1MR_END

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW1TR

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW1TR_END

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW2MR

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW2MR_END

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 169: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

INDEX 147

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW2TR

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW2TR_END

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW3MR

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW3MR_END

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW3TR

or1k-tdep.h, 96OR1K_SPG_IMMU_ITLBW3TR_END

or1k-tdep.h, 96OR1K_SPG_IMMU_LAST

or1k-tdep.h, 96OR1K_SPG_MAC

or1k-tdep.h, 96OR1K_SPG_MAC_LAST

or1k-tdep.h, 96OR1K_SPG_MAC_MACHI

or1k-tdep.h, 96OR1K_SPG_MAC_MACLO

or1k-tdep.h, 96OR1K_SPG_PC

or1k-tdep.h, 96OR1K_SPG_PC_LAST

or1k-tdep.h, 96OR1K_SPG_PC_PCCR

or1k-tdep.h, 96OR1K_SPG_PC_PCCR_END

or1k-tdep.h, 96OR1K_SPG_PC_PCMR

or1k-tdep.h, 96OR1K_SPG_PC_PCMR_END

or1k-tdep.h, 96OR1K_SPG_PIC

or1k-tdep.h, 96OR1K_SPG_PIC_LAST

or1k-tdep.h, 96OR1K_SPG_PIC_PICMR

or1k-tdep.h, 96OR1K_SPG_PIC_PICSR

or1k-tdep.h, 96OR1K_SPG_PM

or1k-tdep.h, 96OR1K_SPG_PM_LAST

or1k-tdep.h, 96OR1K_SPG_PM_PMR

or1k-tdep.h, 96OR1K_SPG_SIZE

or1k-tdep.h, 96OR1K_SPG_SIZE_BITS

or1k-tdep.h, 96OR1K_SPG_SYS

or1k-tdep.h, 96OR1K_SPG_SYS_CPUCFGR

or1k-tdep.h, 96OR1K_SPG_SYS_DCCFGR

or1k-tdep.h, 96OR1K_SPG_SYS_DCFGR

or1k-tdep.h, 96OR1K_SPG_SYS_DMMUCFGR

or1k-tdep.h, 96OR1K_SPG_SYS_EEAR

or1k-tdep.h, 96OR1K_SPG_SYS_EEAR_END

or1k-tdep.h, 96OR1K_SPG_SYS_EPCR

or1k-tdep.h, 96OR1K_SPG_SYS_EPCR_END

or1k-tdep.h, 96OR1K_SPG_SYS_ESR

or1k-tdep.h, 96OR1K_SPG_SYS_ESR_END

or1k-tdep.h, 96OR1K_SPG_SYS_FPCSR

or1k-tdep.h, 96OR1K_SPG_SYS_GPR

or1k-tdep.h, 96OR1K_SPG_SYS_GPR_END

or1k-tdep.h, 96OR1K_SPG_SYS_ICCFGR

or1k-tdep.h, 96OR1K_SPG_SYS_IMMUCFGR

or1k-tdep.h, 96OR1K_SPG_SYS_LAST

or1k-tdep.h, 96OR1K_SPG_SYS_NPC

or1k-tdep.h, 96OR1K_SPG_SYS_PCCFGR

or1k-tdep.h, 96OR1K_SPG_SYS_PPC

or1k-tdep.h, 96OR1K_SPG_SYS_SR

or1k-tdep.h, 96OR1K_SPG_SYS_UPR

or1k-tdep.h, 96OR1K_SPG_SYS_VR

or1k-tdep.h, 96OR1K_SPG_TT

or1k-tdep.h, 96OR1K_SPG_TT_LAST

or1k-tdep.h, 96OR1K_SPG_TT_TTCR

or1k-tdep.h, 96OR1K_SPG_TT_TTMR

or1k-tdep.h, 96OR1K_SPR

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 170: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

148 INDEX

or1k-tdep.h, 96or1k_spr_command

or1k-tdep.c, 77OR1K_SPR_CPUCFGR_CGF

or1k-tdep.h, 96OR1K_SPR_CPUCFGR_NSGF

or1k-tdep.h, 96OR1K_SPR_CPUCFGR_OB32S

or1k-tdep.h, 96OR1K_SPR_CPUCFGR_OB64S

or1k-tdep.h, 96OR1K_SPR_CPUCFGR_OF32S

or1k-tdep.h, 96OR1K_SPR_CPUCFGR_OF64S

or1k-tdep.h, 96OR1K_SPR_CPUCFGR_OV64S

or1k-tdep.h, 96OR1K_SPR_DCFGR_NDP

or1k-tdep.h, 96OR1K_SPR_DCFGR_WPCI

or1k-tdep.h, 96or1k_spr_group_name

or1k-tdep.c, 77or1k_spr_register_name

or1k-tdep.c, 78OR1K_SPR_UPR_DCP

or1k-tdep.h, 96OR1K_SPR_UPR_DMP

or1k-tdep.h, 96OR1K_SPR_UPR_DUP

or1k-tdep.h, 96OR1K_SPR_UPR_ICP

or1k-tdep.h, 96OR1K_SPR_UPR_IMP

or1k-tdep.h, 96OR1K_SPR_UPR_MP

or1k-tdep.h, 96OR1K_SPR_UPR_PCUP

or1k-tdep.h, 96OR1K_SPR_UPR_PICP

or1k-tdep.h, 96OR1K_SPR_UPR_PMP

or1k-tdep.h, 96OR1K_SPR_UPR_TTP

or1k-tdep.h, 96OR1K_SPR_UPR_UP

or1k-tdep.h, 96OR1K_SR_REGNUM

or1k-tdep.h, 96OR1K_SR_SPRNUM

or1k-tdep.h, 96OR1K_STACK_ALIGN

or1k-tdep.h, 96or1k_start_remote

remote-or1k.c, 113or1k_stop

remote-or1k.c, 113or1k_stopped_by_watchpoint

remote-or1k.c, 114or1k_stopped_data_address

remote-or1k.c, 114or1k_stopped_watchpoint_info

remote-or1k.c, 115or1k_store_instruction

or1k-tdep.c, 78or1k_store_registers

remote-or1k.c, 115OR1K_SYS_VECTOR

or1k-tdep.h, 96or1k_target

remote-or1k.c, 119or1k_tokenize

or1k-tdep.c, 78OR1K_TOTAL_NUM_REGS

or1k-tdep.h, 96OR1K_TRAP_VECTOR

or1k-tdep.h, 96OR1K_TT_VECTOR

or1k-tdep.h, 96or1k_unwind_dummy_id

or1k-tdep.c, 79or1k_unwind_pc

or1k-tdep.c, 79or1k_unwind_sp

or1k-tdep.c, 79OR1K_UPR_SPRNUM

or1k-tdep.h, 96OR1K_VR_SPRNUM

or1k-tdep.h, 96or1k_wait

remote-or1k.c, 116or1k_watchpoint_gc

remote-or1k.c, 117or1k_write_spr

or1k-tdep.c, 79remote-or1k.c, 117

or1k_xfer_partialremote-or1k.c, 117

OR1K_ZERO_REGNUMor1k-tdep.h, 96

or32-dis.cbuild_address_symbolic, 122CORE_ADDR, 122EXTEND29, 122find_bytes_big, 122find_bytes_little, 122or32_extract, 122or32_opcode_match, 123

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 171: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

INDEX 149

or32_print_immediate, 123or32_print_register, 124print_insn, 124print_insn_big_or32, 125print_insn_little_or32, 125

or32-opc.cautomata, 132build_automata, 129cover_insn, 129curpass, 132debug, 129destruct_automata, 130disassemble_insn, 130disassembled, 132disassembled_str, 132EF, 129EFI, 129EFN, 129extend_imm, 130insn_decode, 130insn_extract, 130insn_index, 131insn_len, 131insn_name, 131l_none, 131LEAF_FLAG, 129letter_range, 131letter_signed, 131MAX_AUTOMATA_SIZE, 129MAX_LEN, 129MAX_OP_TABLE_SIZE, 129MIN, 129num_ones, 131nuncovered, 132op_data, 132op_start, 132or32_extract, 131or32_letters, 132or32_num_opcodes, 132or32_opcodes, 132or32_print_immediate, 131or32_print_register, 131parse_params, 131ti, 132

or32_extractor32-dis.c, 122or32-opc.c, 131

or32_lettersor32-opc.c, 132

or32_num_opcodesor32-opc.c, 132

or32_opcode_matchor32-dis.c, 123

or32_opcodes

or32-opc.c, 132or32_print_immediate

or32-dis.c, 123or32-opc.c, 131

or32_print_registeror32-dis.c, 124or32-opc.c, 131

parse_paramsor32-opc.c, 131

print_insnor32-dis.c, 124

print_insn_big_or32or1k-tdep.h, 96or32-dis.c, 125

print_insn_little_or32or1k-tdep.h, 97or32-dis.c, 125

remote-or1k.c_initialize_remote_or1k, 100cc, 119ct, 119dcr, 119dmr1, 119dmr2, 119dp, 119drr, 119dsr, 119dvr, 119or1k_can_use_hw_matchpoint, 101or1k_clear_breakpoint, 102or1k_close, 102or1k_commit_debug_registers, 102or1k_create_inferior, 103or1k_dbgcache, 119or1k_detach, 103or1k_fetch_registers, 103or1k_files_info, 104or1k_first_free_matchpoint, 104or1k_gdb_to_dcr_type, 104or1k_insert_breakpoint, 105or1k_insert_hw_breakpoint, 105or1k_insert_watchpoint, 105or1k_interrupt, 106or1k_interrupt_query, 107or1k_interrupt_twice, 107or1k_is_single_stepping, 119or1k_kill, 107or1k_matchpoint_equal, 108or1k_mourn_inferior, 108or1k_old_intr_handler, 119or1k_open, 108or1k_prepare_to_store, 109

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen

Page 172: GDB 6.8 for the OpenRISC 1000 Architecture · GDB 6.8 for the OpenRISC 1000 Architecture Generated by Doxygen 1.5.6 Wed Nov 12 17:19:29 2008

150 INDEX

or1k_rcmd, 109or1k_read_spr, 110or1k_region_ok_for_hw_watchpoint, 110or1k_regnum_to_sprnum, 110or1k_remove_breakpoint, 111or1k_remove_hw_breakpoint, 111or1k_remove_watchpoint, 111or1k_resume, 112or1k_set_breakpoint, 112or1k_start_remote, 113or1k_stop, 113or1k_stopped_by_watchpoint, 114or1k_stopped_data_address, 114or1k_stopped_watchpoint_info, 115or1k_store_registers, 115or1k_target, 119or1k_wait, 116or1k_watchpoint_gc, 117or1k_write_spr, 117or1k_xfer_partial, 117sc, 119

scremote-or1k.c, 119

statusjtr_chain_response, 11jtr_failure_response, 12jtr_read_block_response, 14jtr_read_response, 16jtr_write_block_response, 18jtr_write_response, 20

temp_insn_struct, 21in_pass, 21insn, 21insn_mask, 21

tior32-opc.c, 132

Generated on Wed Nov 12 17:19:29 2008 for GDB 6.8 for the OpenRISC 1000 Architecture by Doxygen