diff options
author | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-05-17 10:17:21 +0100 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-05-17 10:17:58 +0100 |
commit | 3ecc191b361d913d3bdf156568454de57f093aee (patch) | |
tree | 8e92175c5391510c50cb5fd2e0b28bf63549a81f /src/server | |
parent | 5fd1c2db9ad43cc893d6287549262f82e6932e90 (diff) | |
download | openocd_libswd-3ecc191b361d913d3bdf156568454de57f093aee.tar.gz openocd_libswd-3ecc191b361d913d3bdf156568454de57f093aee.tar.bz2 openocd_libswd-3ecc191b361d913d3bdf156568454de57f093aee.tar.xz openocd_libswd-3ecc191b361d913d3bdf156568454de57f093aee.zip |
gdbserver: gdb cmds returning failure on success
The gdb_memory_map cmd for example fell through and returned
ERROR_COMMAND_SYNTAX_ERROR on success - behaviour is now as expected.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/gdb_server.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 5b4fb7a6..a84c618a 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2503,26 +2503,29 @@ COMMAND_HANDLER(handle_gdb_port_command) COMMAND_HANDLER(handle_gdb_memory_map_command) { - if (CMD_ARGC == 1) - COMMAND_PARSE_ENABLE(CMD_ARGV[0], gdb_use_memory_map); + if (CMD_ARGC != 1) + return ERROR_COMMAND_SYNTAX_ERROR; - return ERROR_COMMAND_SYNTAX_ERROR; + COMMAND_PARSE_ENABLE(CMD_ARGV[0], gdb_use_memory_map); + return ERROR_OK; } COMMAND_HANDLER(handle_gdb_flash_program_command) { - if (CMD_ARGC == 1) - COMMAND_PARSE_ENABLE(CMD_ARGV[0], gdb_flash_program); + if (CMD_ARGC != 1) + return ERROR_COMMAND_SYNTAX_ERROR; - return ERROR_COMMAND_SYNTAX_ERROR; + COMMAND_PARSE_ENABLE(CMD_ARGV[0], gdb_flash_program); + return ERROR_OK; } COMMAND_HANDLER(handle_gdb_report_data_abort_command) { - if (CMD_ARGC == 1) - COMMAND_PARSE_ENABLE(CMD_ARGV[0], gdb_report_data_abort); + if (CMD_ARGC != 1) + return ERROR_COMMAND_SYNTAX_ERROR; - return ERROR_COMMAND_SYNTAX_ERROR; + COMMAND_PARSE_ENABLE(CMD_ARGV[0], gdb_report_data_abort); + return ERROR_OK; } /* gdb_breakpoint_override */ |