* util.c [LINUX] (clearbpt): Output panic message and return -1 if breakpoint is already clear, like the non-LINUX version. All callers check the TCB_BPTSET flag so this should never happen. Non-Linux clearbpt and both versions of setbpt have equivalent checks. This was the odd one out, so make it consistent.
Signed-off-by: Jamie Lokier <ja...@shareable.org> --- util.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/util.c b/util.c index bd12c0f..9e9fe1e 100644 --- a/util.c +++ b/util.c @@ -1555,6 +1555,10 @@ clearbpt(tcp) struct tcb *tcp; { arg_setup_state state; + if (!(tcp->flags & TCB_BPTSET)) { + fprintf(stderr, "PANIC: TCB not set in pid %u\n", tcp->pid); + return -1; + } if (arg_setup (tcp, &state) < 0 || restore_arg0 (tcp, &state, tcp->inst[0]) < 0 || restore_arg1 (tcp, &state, tcp->inst[1]) < 0 -- 1.7.0.4 _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev