static void OnExecuteCommand(Gtk::ComboBoxEntryText& cmd_ent, Gtk::FileChooserButton& ch_btn) { ExecState& es = GetES(); Execution::Data& edat = es.eDat; if( !es.isExec ) { ConsoleSetter ess(es); Gtk::Entry& ent = *cmd_ent.get_entry(); std::string cmd = ent.get_text().raw(); if( cmd.size() ) { Gtk::TextView& txt_view = es.detailsView; // переставим команду наверх по истории cmd_ent.remove_text(cmd); cmd_ent.prepend_text(cmd); ent.set_text(""); // очищаем AppendCommandText(txt_view, "Execute Command: '" + cmd + "'"); ConsoleOF cof; ExitData ed = ExecuteAsync(ch_btn.get_filename().c_str(), cmd.c_str(), OF2RRF(cof), &edat.pid); std::string exit_str = ExitDescription(ed); AppendCommandText(txt_view, "Exit Status: " + exit_str + "."); es.SetStatus(ed.IsGood() ? std::string() : exit_str); } } else edat.StopExecution("\"command\""); }
static void TestASM() { CommentLine("TestASM"); println("testing asm"); printf("Accumulator EAX: %p\n", GetEAX()); printf("Base EBX: %p\n", GetEBX()); printf("Counter ECX: %p\n", GetECX()); printf("Data EDX: %p\n", GetEDX()); printf("src str ndx ESI: %p\n", GetESI()); printf("dst str ndx EDI: %p\n", GetEDI()); printf("stack top ESP: %p\n", GetESP()); printf("frame base EBP: %p\n", GetEBP()); // printf("insn ptr EIP: %p\n", GetEIP()); printf("code segment CS: %p\n", GetCS()); printf("stack SS: %p\n", GetSS()); printf("data segment DS: %p\n", GetDS()); printf("data segment ES: %p\n", GetES()); }