]> git.sur5r.net Git - openocd/commitdiff
ARM11: register (most) standard ARM commands
authorDavid Brownell <dbrownell@users.sourceforge.net>
Tue, 17 Nov 2009 00:36:12 +0000 (16:36 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Tue, 17 Nov 2009 00:36:12 +0000 (16:36 -0800)
Have ARM11 register the "standard" ARM commands.  For now, only
disassembly really works.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/target/arm11.c
src/target/armv4_5.c

index 750c1f5902dce37873815e5ee6b8a12f98a7cf43..4d9016fdc28bed8b8e17933d9c36523c103a0403 100644 (file)
@@ -2138,6 +2138,8 @@ static int arm11_register_commands(struct command_context *cmd_ctx)
 
        struct command *top_cmd, *mw_cmd;
 
+       armv4_5_register_commands(cmd_ctx);
+
        top_cmd = register_command(cmd_ctx, NULL, "arm11",
                        NULL, COMMAND_ANY, NULL);
 
index 7c4861ffff7cb83724e069d16e25161cb5111e26..b60b8b275dd0caed6d428198fffed7c21807de73 100644 (file)
@@ -378,6 +378,12 @@ COMMAND_HANDLER(handle_armv4_5_reg_command)
        if (armv4_5_mode_to_number(armv4_5->core_mode)==-1)
                return ERROR_FAIL;
 
+       if (!armv4_5->full_context) {
+               command_print(cmd_ctx, "error: target doesn't support %s",
+                               CMD_NAME);
+               return ERROR_FAIL;
+       }
+
        for (num = 0; num <= 15; num++)
        {
                output_len = 0;
@@ -522,7 +528,8 @@ int armv4_5_register_commands(struct command_context *cmd_ctx)
                        "display/change ARM core state <arm | thumb>");
        register_command(cmd_ctx, armv4_5_cmd, "disassemble",
                        handle_armv4_5_disassemble_command, COMMAND_EXEC,
-                       "disassemble instructions <address> [<count> ['thumb']]");
+                       "disassemble instructions "
+                               "<address> [<count> ['thumb']]");
 
        return ERROR_OK;
 }