Ejemplo n.º 1
0
/** lc3_add_watch
  *
  * Adds a watchpoint at the given symbol. A watch point is a breakpoint on data.
  * @param state lc3_state
  * @param symbol symbol to add watchpoint 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_watch(lc3_state& state, const std::string& symbol, const std::string& condition, const std::string& label, int times)
{
    int addr = lc3_sym_lookup(state, symbol);
    if (addr == -1) return true;

    return lc3_add_watch(state, false, addr, condition, label, times);
}
Ejemplo n.º 2
0
/** SetWatchpoint
  *
  * Sets a watchpoint
  */
void MemoryGrid::OnWatchpoint(wxCommandEvent& event)
{
    int addr = -1;
    addr = GetSelectedRow();
    if (addr == -1) return;

    bool exist = lc3_add_watch(state, false, (unsigned short) addr, "1");
    if (exist) lc3_remove_watch(state, false, (unsigned short) addr);
    Refresh(addr);
}
Ejemplo n.º 3
0
void do_watch(unsigned char reg, const std::string& condition, const std::string& name, int times)
{
    lc3_add_watch(state, true, reg, condition, name, times);
    registers->Update();
}
Ejemplo n.º 4
0
void do_watch(const std::string& symbol, const std::string& condition, const std::string& name, int times)
{
    lc3_add_watch(state, symbol, condition, name, times);
    memory->Update();
}
Ejemplo n.º 5
0
void do_watch(unsigned short address, const std::string& condition, const std::string& name, int times)
{
    lc3_add_watch(state, false, address, condition, name, times);
    memory->Update();
}