src/scripttools/debugging/scripts/commands/delete.qs
author Eckhart Koeppen <eckhart.koppen@nokia.com>
Wed, 28 Apr 2010 13:15:16 +0300
branchRCL_3
changeset 15 b25b6dc3ff8b
parent 0 1918ee327afb
permissions -rw-r--r--
2010-17 8b4fb6db9a24f58dafbd4734d9c4a87a72f9ad8f

name = "delete";

group = "breakpoints";

shortDescription = "Delete breakpoint(s)";

longDescription = "delete <breakpoint-id> : Deletes the breakpoint with the given id.";

seeAlso = [ "clear", "disable" ];

function execute() {
    if (arguments.length == 0) {
        // delete all breakpoints
        scheduleClearBreakpoints();
        state = 1;
    } else {
        var id = parseInt(arguments[0]);
        if (isNaN(id)) {
            message("Breakpoint id expected.");
            return;
        }
        scheduleDeleteBreakpoint(id);
        breakpointId = id;
        state = 2;
    }
}

function handleResponse(resp) {
    if (state == 1) {
    } else if (state == 2) {
        if (resp.error != 0) {
            message("No breakpoint number " + breakpointId + ".");
            return;
        }
    }
}