remove target_type register_command callback

Uses chaining of command_registration structures to eliminate all
target_type register_callback routines.  Exports the command_handler
registration arrays for those target types that are used by others.
This commit is contained in:
Zachary T Welch
2009-11-23 08:17:01 -08:00
parent 144e3678bd
commit 66ee303456
31 changed files with 89 additions and 149 deletions
+4 -9
View File
@@ -3652,6 +3652,9 @@ static const struct command_registration xscale_any_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
static const struct command_registration xscale_command_handlers[] = {
{
.chain = arm_command_handlers,
},
{
.name = "xscale",
.mode = COMMAND_ANY,
@@ -3661,14 +3664,6 @@ static const struct command_registration xscale_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
static int xscale_register_commands(struct command_context *cmd_ctx)
{
armv4_5_register_commands(cmd_ctx);
return ERROR_OK;
}
struct target_type xscale_target =
{
.name = "xscale",
@@ -3702,7 +3697,7 @@ struct target_type xscale_target =
.add_watchpoint = xscale_add_watchpoint,
.remove_watchpoint = xscale_remove_watchpoint,
.register_commands = xscale_register_commands,
.commands = xscale_command_handlers,
.target_create = xscale_target_create,
.init_target = xscale_init_target,