This is an automated email from Gerrit.

Peter Mamonov ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/4027

-- gerrit

commit 9985ecf07214d9744f6d7342524eed6d85d5f21d
Author: Peter Mamonov <[email protected]>
Date:   Wed Jun 1 13:27:51 2016 +0300

    mips64: add mips64mode32 command
    
    Change-Id: Icce0cc011b10a0b951c4765c9f2f233ec9feb28a
    Signed-off-by: Peter Mamonov <[email protected]>

diff --git a/src/target/mips_mips64.c b/src/target/mips_mips64.c
index 8153f1a..381e6c5 100644
--- a/src/target/mips_mips64.c
+++ b/src/target/mips_mips64.c
@@ -35,6 +35,8 @@
 #include "target_type.h"
 #include "register.h"
 
+static int mips64mode32 = 0;
+
 static void mips_mips64_enable_breakpoints(struct target *target);
 static void mips_mips64_enable_watchpoints(struct target *target);
 static int mips_mips64_set_breakpoint(struct target *target,
@@ -943,6 +945,31 @@ static int mips_mips64_checksum_memory(struct target 
*target, uint64_t address,
        return ERROR_FAIL; /* use bulk read method */
 }
 
+COMMAND_HANDLER(handle_mips64mode32)
+{
+       if (CMD_ARGC > 0)
+               COMMAND_PARSE_NUMBER(int, CMD_ARGV[0], mips64mode32);
+
+       if (mips64mode32)
+               command_print(CMD_CTX, "enabled");
+       else
+               command_print(CMD_CTX, "disabled");
+
+       return ERROR_OK;
+}
+
+
+static const struct command_registration mips64_commands_handlers[] = {
+       {
+               .name = "mips64mode32",
+               .mode = COMMAND_EXEC,
+               .help = "Enable/disable 32 bit mode",
+               .usage = "[1|0]",
+               .handler = handle_mips64mode32
+       },
+       COMMAND_REGISTRATION_DONE
+};
+
 struct target_type mips_mips64_target = {
        .name = "mips_mips64",
 
@@ -976,6 +1003,8 @@ struct target_type mips_mips64_target = {
        .target_create = mips_mips64_target_create,
        .init_target = mips_mips64_init_target,
        .examine = mips_mips64_examine,
+
+       .commands = mips64_commands_handlers,
 };
 
 #endif /* BUILD_TARGET64 */

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to