MCPcopy Create free account
hub / github.com/covscript/covscript / cs_debugger_func_callback

Function cs_debugger_func_callback

sources/debugger.cpp:433–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433void cs_debugger_func_callback(const std::string &decl, cs::statement_base *stmt)
434{
435 if (context->compiler->csyms.count(stmt->get_file_path()) > 0) {
436 cs::csym_info &csym = context->compiler->csyms[stmt->get_file_path()];
437 std::size_t current_line = stmt->get_line_num();
438 if (current_line >= csym.map.size())
439 return;
440 std::size_t actual_line = csym.map[current_line - 1];
441 if (actual_line >= csym.codes.size() || actual_line == 0)
442 return;
443 std::cout << "\nHit breakpoint, at \"" << csym.file << "\", line " << actual_line << ", " << decl << std::endl;
444 }
445 else
446 std::cout << "\nHit breakpoint, at \"" << stmt->get_file_path() << "\", line " << stmt->get_line_num() << ", " << decl << std::endl;
447 current_level = cs::current_process->stack.size();
448 exec_by_step = true;
449}
450
451cs::array split(const std::string &str)
452{

Callers 4

call_rrMethod · 0.85
call_vvMethod · 0.85
call_rlMethod · 0.85
call_elMethod · 0.85

Calls 2

sizeMethod · 0.80
get_line_numMethod · 0.45

Tested by

no test coverage detected