target: whitespace cleanup
Change-Id: I1453f4f3dc0add529da20577e38b8b82d7d00366 Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net> Reviewed-on: http://openocd.zylin.com/18 Reviewed-by: Alex Austin <alex.austin@spectrumdsi.com> Tested-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>__archive__
parent
5a7cff26a5
commit
8cd3832e2b
|
@ -3051,41 +3051,40 @@ static int handle_bp_command_set(struct command_context *cmd_ctx,
|
||||||
{
|
{
|
||||||
struct target *target = get_current_target(cmd_ctx);
|
struct target *target = get_current_target(cmd_ctx);
|
||||||
|
|
||||||
if (asid == 0)
|
if (asid == 0)
|
||||||
{ int retval = breakpoint_add(target, addr, length, hw);
|
{
|
||||||
if (ERROR_OK == retval)
|
int retval = breakpoint_add(target, addr, length, hw);
|
||||||
command_print(cmd_ctx, "breakpoint set at 0x%8.8" PRIx32 "", addr);
|
if (ERROR_OK == retval)
|
||||||
else
|
command_print(cmd_ctx, "breakpoint set at 0x%8.8" PRIx32 "", addr);
|
||||||
{
|
|
||||||
LOG_ERROR("Failure setting breakpoint, the same address(IVA) is already used");
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (addr == 0)
|
|
||||||
{
|
|
||||||
int retval = context_breakpoint_add(target, asid, length, hw);
|
|
||||||
if (ERROR_OK == retval)
|
|
||||||
command_print(cmd_ctx, "Context breakpoint set at 0x%8.8" PRIx32 "", asid);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LOG_ERROR("Failure setting breakpoint, the same address(CONTEXTID) is already used");
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int retval = hybrid_breakpoint_add(target, addr, asid, length, hw);
|
LOG_ERROR("Failure setting breakpoint, the same address(IVA) is already used");
|
||||||
if(ERROR_OK == retval)
|
return retval;
|
||||||
command_print(cmd_ctx, "Hybrid breakpoint set at 0x%8.8" PRIx32 "", asid);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LOG_ERROR("Failure setting breakpoint, the same address is already used");
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (addr == 0)
|
||||||
|
{
|
||||||
|
int retval = context_breakpoint_add(target, asid, length, hw);
|
||||||
|
if (ERROR_OK == retval)
|
||||||
|
command_print(cmd_ctx, "Context breakpoint set at 0x%8.8" PRIx32 "", asid);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_ERROR("Failure setting breakpoint, the same address(CONTEXTID) is already used");
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int retval = hybrid_breakpoint_add(target, addr, asid, length, hw);
|
||||||
|
if(ERROR_OK == retval)
|
||||||
|
command_print(cmd_ctx, "Hybrid breakpoint set at 0x%8.8" PRIx32 "", asid);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_ERROR("Failure setting breakpoint, the same address is already used");
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
}
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
COMMAND_HANDLER(handle_bp_command)
|
COMMAND_HANDLER(handle_bp_command)
|
||||||
|
@ -3106,7 +3105,6 @@ COMMAND_HANDLER(handle_bp_command)
|
||||||
return handle_bp_command_set(CMD_CTX, addr, asid, length, hw);
|
return handle_bp_command_set(CMD_CTX, addr, asid, length, hw);
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
|
|
||||||
if(strcmp(CMD_ARGV[2], "hw") == 0)
|
if(strcmp(CMD_ARGV[2], "hw") == 0)
|
||||||
{
|
{
|
||||||
hw = BKPT_HARD;
|
hw = BKPT_HARD;
|
||||||
|
@ -3132,12 +3130,11 @@ COMMAND_HANDLER(handle_bp_command)
|
||||||
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], asid);
|
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], asid);
|
||||||
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], length);
|
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], length);
|
||||||
return handle_bp_command_set(CMD_CTX, addr, asid, length, hw);
|
return handle_bp_command_set(CMD_CTX, addr, asid, length, hw);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
command_print(CMD_CTX, "usage: bp <address> [<asid>]<length> ['hw'|'hw_ctx']");
|
command_print(CMD_CTX, "usage: bp <address> [<asid>]<length> ['hw'|'hw_ctx']");
|
||||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
COMMAND_HANDLER(handle_rbp_command)
|
COMMAND_HANDLER(handle_rbp_command)
|
||||||
|
|
Loading…
Reference in New Issue