Skip to content

Commit

Permalink
DBG: added DbgIsRunLocked
Browse files Browse the repository at this point in the history
BRIDGE: added BridgeGetDbgVersion
GUI: use BridgeGetDbgVersion
  • Loading branch information
mrexodia committed Jun 2, 2014
1 parent 46cf431 commit 49bfaeb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
12 changes: 12 additions & 0 deletions x64_dbg_bridge/bridgemain.cpp
Expand Up @@ -203,6 +203,11 @@ BRIDGE_IMPEXP bool BridgeSettingSetUint(const char* section, const char* key, du
return BridgeSettingSet(section, key, newvalue);
}

BRIDGE_IMPEXP int BridgeGetDbgVersion()
{
return DBG_VERSION;
}

//Debugger
BRIDGE_IMPEXP bool DbgMemRead(duint va, unsigned char* dest, duint size)
{
Expand Down Expand Up @@ -631,6 +636,13 @@ BRIDGE_IMPEXP bool DbgLoopDel(int depth, duint addr)
return true;
}

BRIDGE_IMPEXP bool DbgIsRunLocked()
{
if(_dbg_sendmessage(DBG_IS_RUN_LOCKED, 0, 0))
return true;
return false;
}

//GUI
BRIDGE_IMPEXP void GuiDisasmAt(duint addr, duint cip)
{
Expand Down
5 changes: 4 additions & 1 deletion x64_dbg_bridge/bridgemain.h
Expand Up @@ -44,6 +44,7 @@ BRIDGE_IMPEXP bool BridgeSettingGet(const char* section, const char* key, char*
BRIDGE_IMPEXP bool BridgeSettingGetUint(const char* section, const char* key, duint* value);
BRIDGE_IMPEXP bool BridgeSettingSet(const char* section, const char* key, const char* value);
BRIDGE_IMPEXP bool BridgeSettingSetUint(const char* section, const char* key, duint value);
BRIDGE_IMPEXP int BridgeGetDbgVersion();

//Debugger defines
#define MAX_LABEL_SIZE 256
Expand Down Expand Up @@ -142,7 +143,8 @@ enum DBGMSG
DBG_LOOP_GET, // param1=FUNCTION_LOOP_INFO* info, param2=unused
DBG_LOOP_OVERLAPS, // param1=FUNCTION_LOOP_INFO* info, param2=unused
DBG_LOOP_ADD, // param1=FUNCTION_LOOP_INFO* info, param2=unused
DBG_LOOP_DEL // param1=FUNCTION_LOOP_INFO* info, param2=unused
DBG_LOOP_DEL, // param1=FUNCTION_LOOP_INFO* info, param2=unused
DBG_IS_RUN_LOCKED // param1=unused, param2=unused
};

enum SCRIPTLINETYPE
Expand Down Expand Up @@ -524,6 +526,7 @@ BRIDGE_IMPEXP bool DbgLoopGet(int depth, duint addr, duint* start, duint* end);
BRIDGE_IMPEXP bool DbgLoopOverlaps(int depth, duint start, duint end);
BRIDGE_IMPEXP bool DbgLoopAdd(duint start, duint end);
BRIDGE_IMPEXP bool DbgLoopDel(int depth, duint addr);
BRIDGE_IMPEXP bool DbgIsRunLocked();

//Gui defines
#define GUI_PLUGIN_MENU 0
Expand Down
6 changes: 6 additions & 0 deletions x64_dbg_dbg/_exports.cpp
Expand Up @@ -899,6 +899,12 @@ extern "C" DLL_EXPORT uint _dbg_sendmessage(DBGMSG type, void* param1, void* par
return (uint)loopdel(info->depth, info->addr);
}
break;

case DBG_IS_RUN_LOCKED:
{
return (uint)waitislocked(WAITID_RUN);
}
break;
}
return 0;
}
2 changes: 1 addition & 1 deletion x64_dbg_gui/Project/Src/Gui/MainWindow.cpp
Expand Up @@ -334,7 +334,7 @@ void MainWindow::displayAboutWidget()
#else
QString title="About x32_dbg";
#endif
title += QString().sprintf(" v%d", DBG_VERSION);
title += QString().sprintf(" v%d", BridgeGetDbgVersion());
QMessageBox msg(QMessageBox::Information, title, "Created by:\nSigma (GUI)\nMr. eXoDia (DBG)\n\nSpecial Thanks:\nVisualPharm (http://visualpharm.com)\nReversingLabs (http://reversinglabs.com)\nBeatriX (http://beaengine.org)\nQt Project (http://qt-project.org)\nFugue Icons (http://yusukekamiyamane.com)\nNanomite (https://github.com/zer0fl4g/Nanomite)");
msg.setWindowIcon(QIcon(":/icons/images/information.png"));
msg.setParent(this, Qt::Dialog);
Expand Down

0 comments on commit 49bfaeb

Please sign in to comment.