]> git.sur5r.net Git - openocd/commit
propagate return status of set_breakpoint() up call chain
authorMike Dunn <mikedunn@newsguy.com>
Sun, 12 Sep 2010 19:05:07 +0000 (12:05 -0700)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Mon, 13 Sep 2010 17:45:42 +0000 (19:45 +0200)
commit81e0d4438ec4b4112e28a9e90ba2fc1fb548310b
treecc2493e7ee844649b7433cb384acec1cc13b8bcd
parent8afd2309a4e18b222da189eb51f46339f17201d5
propagate return status of set_breakpoint() up call chain

Hi everyone,

I figured since I was poking around in the breakpoint code on other arches, I'd
add this change to those arches that don't do it already.  This patch propagates
the return code of <arch>_set_breakpoint() up the call stack.  This ensures that
the higher layer breakpoint infrastructure is aware that an error ocurred, in
which case the breakpoint is not recorded.

Normally I wouldn't touch code that I can't test, but the code is very
uniform across architectures, and the change is rather benign, so I figured
after careful inspection that it is safe.  If the maintainers or others think
this is imprudent, the patch can be dropped.

Also changed the error code to something more appropriate in two cases where
hardware resources are unavailable.

Comments and criticisms of course gratefully received.

Mike

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/target/cortex_a8.c
src/target/cortex_m3.c
src/target/mips_m4k.c