/** lc3_add_break * * Adds a breakpoint at the given symbol. * @param state lc3_state * @param symbol symbol to add breakpoint to * @param label label for this breakpoint * @param condition If condition evaluates to true then the breakpoint will stop execution. * @param times Hit count. After the breakpoint is hit this number of times it disappears * @return true if there was an error adding the breakpoint false otherwise. */ bool lc3_add_break(lc3_state& state, const std::string& symbol, const std::string& label, const std::string& condition, int times) { int addr = lc3_sym_lookup(state, symbol); if (addr == -1) return true; return lc3_add_break(state, addr, label, condition, times); }
/** SetTemppoint * * Sets a temporary breakpoint */ void MemoryGrid::OnTemppoint(wxCommandEvent& event) { int addr = -1; addr = GetSelectedRow(); if (addr == -1) return; bool exist = lc3_add_break(state, (unsigned short) addr, "", "1", 1); if (exist) lc3_remove_break(state, (unsigned short) addr); Refresh(addr); }
void do_break(const std::string& symbol, const std::string& name, const std::string& condition, int times) { lc3_add_break(state, symbol, name, condition, times); memory->Update(); }
void do_break(unsigned short address, const std::string& name, const std::string& condition, int times) { lc3_add_break(state, address, name, condition, times); memory->Update(); }
void do_tempbreak(const std::string& symbol) { lc3_add_break(state, symbol, "", "1", 1); memory->Update(); }
void do_tempbreak(unsigned short address) { lc3_add_break(state, address, "", "1", 1); memory->Update(); }