OpenOCD
arc_cmd.c File Reference
Include dependency graph for arc_cmd.c:

Go to the source code of this file.

Enumerations

enum  add_reg_type_flags { CFG_ADD_REG_TYPE_FLAGS_NAME , CFG_ADD_REG_TYPE_FLAGS_FLAG }
 
enum  add_reg_type_struct { CFG_ADD_REG_TYPE_STRUCT_NAME , CFG_ADD_REG_TYPE_STRUCT_BITFIELD }
 
enum  add_reg_types { CFG_ADD_REG_TYPE_FLAG , CFG_ADD_REG_TYPE_STRUCT }
 
enum  opts_add_reg {
  CFG_ADD_REG_NAME , CFG_ADD_REG_ARCH_NUM , CFG_ADD_REG_IS_CORE , CFG_ADD_REG_IS_BCR ,
  CFG_ADD_REG_GDB_FEATURE , CFG_ADD_REG_TYPE , CFG_ADD_REG_GENERAL
}
 

Functions

 COMMAND_HANDLER (arc_handle_actionpoints_num)
 
 COMMAND_HANDLER (arc_handle_add_reg)
 
 COMMAND_HANDLER (arc_handle_add_reg_type_flags)
 
 COMMAND_HANDLER (arc_handle_add_reg_type_struct)
 
 COMMAND_HANDLER (arc_handle_get_aux_reg)
 
 COMMAND_HANDLER (arc_handle_get_core_reg)
 
 COMMAND_HANDLER (arc_handle_get_reg_field)
 
 COMMAND_HANDLER (arc_handle_set_aux_reg)
 
 COMMAND_HANDLER (arc_handle_set_core_reg)
 
 COMMAND_HANDLER (arc_l1_cache_disable_auto_cmd)
 
 COMMAND_HANDLER (arc_l2_cache_disable_auto_cmd)
 
 COMMAND_HANDLER (arc_set_reg_exists)
 
static COMMAND_HELPER (arc_handle_add_reg_do, struct arc_reg_desc *reg)
 
static COMMAND_HELPER (arc_handle_add_reg_type_flags_ops, struct arc_reg_data_type *type)
 
static COMMAND_HELPER (arc_handle_add_reg_type_struct_opts, struct arc_reg_data_type *type)
 
void free_reg_desc (struct arc_reg_desc *r)
 
static const char * validate_register (const struct arc_reg_desc *const reg, bool arch_num_set)
 

Variables

static const struct command_registration arc_cache_group_handlers []
 
static const struct command_registration arc_core_command_handlers []
 
static const struct command_registration arc_jtag_command_group []
 
static const struct command_registration arc_l2_cache_group_handlers []
 
const struct command_registration arc_monitor_command_handlers []
 
static const struct nvp nvp_add_reg_type_flags_opts []
 
static const struct nvp nvp_add_reg_type_struct_opts []
 
static const struct nvp opts_nvp_add_reg []
 

Enumeration Type Documentation

◆ add_reg_type_flags

Enumerator
CFG_ADD_REG_TYPE_FLAGS_NAME 
CFG_ADD_REG_TYPE_FLAGS_FLAG 

Definition at line 31 of file arc_cmd.c.

◆ add_reg_type_struct

Enumerator
CFG_ADD_REG_TYPE_STRUCT_NAME 
CFG_ADD_REG_TYPE_STRUCT_BITFIELD 

Definition at line 193 of file arc_cmd.c.

◆ add_reg_types

Enumerator
CFG_ADD_REG_TYPE_FLAG 
CFG_ADD_REG_TYPE_STRUCT 

Definition at line 26 of file arc_cmd.c.

◆ opts_add_reg

Enumerator
CFG_ADD_REG_NAME 
CFG_ADD_REG_ARCH_NUM 
CFG_ADD_REG_IS_CORE 
CFG_ADD_REG_IS_BCR 
CFG_ADD_REG_GDB_FEATURE 
CFG_ADD_REG_TYPE 
CFG_ADD_REG_GENERAL 

Definition at line 506 of file arc_cmd.c.

Function Documentation

◆ COMMAND_HANDLER() [1/12]

COMMAND_HANDLER ( arc_handle_actionpoints_num  )

Definition at line 762 of file arc_cmd.c.

◆ COMMAND_HANDLER() [2/12]

COMMAND_HANDLER ( arc_handle_add_reg  )

Definition at line 646 of file arc_cmd.c.

References CALL_COMMAND_HANDLER, ERROR_FAIL, ERROR_OK, free_reg_desc(), and LOG_ERROR.

◆ COMMAND_HANDLER() [3/12]

◆ COMMAND_HANDLER() [4/12]

◆ COMMAND_HANDLER() [5/12]

◆ COMMAND_HANDLER() [6/12]

◆ COMMAND_HANDLER() [7/12]

◆ COMMAND_HANDLER() [8/12]

◆ COMMAND_HANDLER() [9/12]

COMMAND_HANDLER ( arc_handle_set_core_reg  )

Definition at line 289 of file arc_cmd.c.

◆ COMMAND_HANDLER() [10/12]

COMMAND_HANDLER ( arc_l1_cache_disable_auto_cmd  )

◆ COMMAND_HANDLER() [11/12]

COMMAND_HANDLER ( arc_l2_cache_disable_auto_cmd  )

◆ COMMAND_HANDLER() [12/12]

◆ COMMAND_HELPER() [1/3]

◆ COMMAND_HELPER() [2/3]

◆ COMMAND_HELPER() [3/3]

◆ free_reg_desc()

void free_reg_desc ( struct arc_reg_desc r)

Definition at line 527 of file arc_cmd.c.

References arc_reg_desc::gdb_xml_feature, and arc_reg_desc::name.

Referenced by arc_deinit_target(), and COMMAND_HANDLER().

◆ validate_register()

static const char* validate_register ( const struct arc_reg_desc *const  reg,
bool  arch_num_set 
)
static

Definition at line 44 of file arc_cmd.c.

References reg::name, and NULL.

Referenced by COMMAND_HELPER().

Variable Documentation

◆ arc_cache_group_handlers

const struct command_registration arc_cache_group_handlers[]
static
Initial value:
= {
{
.name = "auto",
.handler = arc_l1_cache_disable_auto_cmd,
.mode = COMMAND_ANY,
.help = "Disable or enable L1",
.usage = "(1|0)",
},
{
.name = "l2",
.mode = COMMAND_ANY,
.help = "L2 cache command group",
.usage = "",
},
}
static const struct command_registration arc_l2_cache_group_handlers[]
Definition: arc_cmd.c:798
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_ANY
Definition: command.h:42

Definition at line 762 of file arc_cmd.c.

◆ arc_core_command_handlers

const struct command_registration arc_core_command_handlers[]
static

Definition at line 762 of file arc_cmd.c.

◆ arc_jtag_command_group

const struct command_registration arc_jtag_command_group[]
static

Definition at line 289 of file arc_cmd.c.

◆ arc_l2_cache_group_handlers

const struct command_registration arc_l2_cache_group_handlers[]
static
Initial value:
= {
{
.name = "auto",
.handler = arc_l2_cache_disable_auto_cmd,
.mode = COMMAND_ANY,
.usage = "(1|0)",
.help = "Disable or enable L2",
},
}

Definition at line 762 of file arc_cmd.c.

◆ arc_monitor_command_handlers

const struct command_registration arc_monitor_command_handlers[]
Initial value:
= {
{
.name = "arc",
.mode = COMMAND_ANY,
.help = "ARC monitor command group",
.usage = "",
},
}
static const struct command_registration arc_core_command_handlers[]
Definition: arc_cmd.c:828

Definition at line 762 of file arc_cmd.c.

◆ nvp_add_reg_type_flags_opts

const struct nvp nvp_add_reg_type_flags_opts[]
static
Initial value:
= {
{ .name = "-name", .value = CFG_ADD_REG_TYPE_FLAGS_NAME },
{ .name = "-flag", .value = CFG_ADD_REG_TYPE_FLAGS_FLAG },
{ .name = NULL, .value = -1 }
}
@ CFG_ADD_REG_TYPE_FLAGS_FLAG
Definition: arc_cmd.c:33
@ CFG_ADD_REG_TYPE_FLAGS_NAME
Definition: arc_cmd.c:32
#define NULL
Definition: usb.h:16

Definition at line 1 of file arc_cmd.c.

Referenced by COMMAND_HELPER().

◆ nvp_add_reg_type_struct_opts

const struct nvp nvp_add_reg_type_struct_opts[]
static
Initial value:
= {
{ .name = "-name", .value = CFG_ADD_REG_TYPE_STRUCT_NAME },
{ .name = "-bitfield", .value = CFG_ADD_REG_TYPE_STRUCT_BITFIELD },
{ .name = NULL, .value = -1 }
}
@ CFG_ADD_REG_TYPE_STRUCT_BITFIELD
Definition: arc_cmd.c:195
@ CFG_ADD_REG_TYPE_STRUCT_NAME
Definition: arc_cmd.c:194

Definition at line 129 of file arc_cmd.c.

Referenced by COMMAND_HELPER().

◆ opts_nvp_add_reg

const struct nvp opts_nvp_add_reg[]
static
Initial value:
= {
{ .name = "-name", .value = CFG_ADD_REG_NAME },
{ .name = "-num", .value = CFG_ADD_REG_ARCH_NUM },
{ .name = "-core", .value = CFG_ADD_REG_IS_CORE },
{ .name = "-bcr", .value = CFG_ADD_REG_IS_BCR },
{ .name = "-feature", .value = CFG_ADD_REG_GDB_FEATURE },
{ .name = "-type", .value = CFG_ADD_REG_TYPE },
{ .name = "-g", .value = CFG_ADD_REG_GENERAL },
{ .name = NULL, .value = -1 }
}
@ CFG_ADD_REG_ARCH_NUM
Definition: arc_cmd.c:508
@ CFG_ADD_REG_NAME
Definition: arc_cmd.c:507
@ CFG_ADD_REG_GDB_FEATURE
Definition: arc_cmd.c:511
@ CFG_ADD_REG_GENERAL
Definition: arc_cmd.c:513
@ CFG_ADD_REG_IS_BCR
Definition: arc_cmd.c:510
@ CFG_ADD_REG_IS_CORE
Definition: arc_cmd.c:509
@ CFG_ADD_REG_TYPE
Definition: arc_cmd.c:512

Definition at line 442 of file arc_cmd.c.

Referenced by COMMAND_HELPER().