From 66ee303456910f684244a20a0ac2e958d40b78cb Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Mon, 23 Nov 2009 08:17:01 -0800 Subject: 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. --- src/target/cortex_a8.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/target/cortex_a8.c') diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c index 325a54b5..b85481a9 100644 --- a/src/target/cortex_a8.c +++ b/src/target/cortex_a8.c @@ -1641,6 +1641,12 @@ static const struct command_registration cortex_a8_exec_command_handlers[] = { COMMAND_REGISTRATION_DONE }; static const struct command_registration cortex_a8_command_handlers[] = { + { + .chain = arm_command_handlers, + }, + { + .chain = armv7a_command_handlers, + }, { .name = "cortex_a8", .mode = COMMAND_ANY, @@ -1650,13 +1656,6 @@ static const struct command_registration cortex_a8_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -static int cortex_a8_register_commands(struct command_context *cmd_ctx) -{ - armv4_5_register_commands(cmd_ctx); - armv7a_register_commands(cmd_ctx); - return register_commands(cmd_ctx, NULL, cortex_a8_command_handlers); -} - struct target_type cortexa8_target = { .name = "cortex_a8", @@ -1689,7 +1688,7 @@ struct target_type cortexa8_target = { .add_watchpoint = NULL, .remove_watchpoint = NULL, - .register_commands = cortex_a8_register_commands, + .commands = cortex_a8_command_handlers, .target_create = cortex_a8_target_create, .init_target = cortex_a8_init_target, .examine = cortex_a8_examine, -- cgit v1.2.3