1
0
Fork 0

DBG: added a plugin define

DBG: changed the order of importance in valfromstring
GUI: fixed spelling mistake xD
This commit is contained in:
mr.exodia 2013-11-24 23:15:26 +01:00
parent f4ee9959cb
commit ae46df3278
5 changed files with 13 additions and 12 deletions

View File

@ -11,6 +11,9 @@
#include "_plugin_types.h"
//defines
#define PLUG_SDKVERSION 1
//structures
struct PLUG_INITSTRUCT
{

View File

@ -365,7 +365,6 @@ bool labelfromstring(const char* text, uint* addr)
sqlstringescape(text, labeltext);
char sql[deflen]="";
sprintf(sql, "SELECT addr,mod FROM labels WHERE text='%s'", labeltext);
puts(sql);
sqlite3_stmt* stmt;
if(sqlite3_prepare_v2(userdb, sql, -1, &stmt, 0)!=SQLITE_OK)
{
@ -388,7 +387,6 @@ bool labelfromstring(const char* text, uint* addr)
sqlite3_finalize(stmt);
return true;
}
puts(modname);
//TODO: fix this
*addr+=modbasefromname(modname);
sqlite3_finalize(stmt);

View File

@ -1223,10 +1223,10 @@ bool valfromstring(const char* string, uint* value, int* value_size, bool* isvar
}
else if(labelfromstring(string, value)) //then come labels
return true;
else if(symfromname(string, value)) //then come symbols
return true;
else if(valapifromstring(string, value, value_size, true, silent, hexonly)) //then come APIs
return true;
else if(symfromname(string, value)) //then come symbols (as symbols also take API names)
return true;
else if(varget(string, value, value_size, 0)) //finally variables
{
if(isvar)

View File

@ -63,16 +63,16 @@ void CPUDisassembly::contextMenuEvent(QContextMenuEvent* event)
switch(wBPList.bp[wI].slot)
{
case 0:
msetHwBPOnSlot0Action->setText("Set Hardware on Execution on Slot 0 (0x" + QString("%1").arg(wBPList.bp[wI].addr, 8, 16, QChar('0')).toUpper() + ")");
msetHwBPOnSlot0Action->setText("Replace Slot 0 (0x" + QString("%1").arg(wBPList.bp[wI].addr, 8, 16, QChar('0')).toUpper() + ")");
break;
case 1:
msetHwBPOnSlot1Action->setText("Set Hardware on Execution on Slot 1 (0x" + QString("%1").arg(wBPList.bp[wI].addr, 8, 16, QChar('0')).toUpper() + ")");
msetHwBPOnSlot1Action->setText("Replace Slot 1 (0x" + QString("%1").arg(wBPList.bp[wI].addr, 8, 16, QChar('0')).toUpper() + ")");
break;
case 2:
msetHwBPOnSlot2Action->setText("Set Hardware on Execution on Slot 2 (0x" + QString("%1").arg(wBPList.bp[wI].addr, 8, 16, QChar('0')).toUpper() + ")");
msetHwBPOnSlot2Action->setText("Replace Slot 2 (0x" + QString("%1").arg(wBPList.bp[wI].addr, 8, 16, QChar('0')).toUpper() + ")");
break;
case 3:
msetHwBPOnSlot3Action->setText("Set Hardware on Execution on Slot 3 (0x" + QString("%1").arg(wBPList.bp[wI].addr, 8, 16, QChar('0')).toUpper() + ")");
msetHwBPOnSlot3Action->setText("Replace Slot 3 (0x" + QString("%1").arg(wBPList.bp[wI].addr, 8, 16, QChar('0')).toUpper() + ")");
break;
default:
break;
@ -155,10 +155,10 @@ void CPUDisassembly::setupRightClickContextMenu()
mHwSlotSelectMenu = new QMenu("Set Hardware on Execution", this);
mSetHwBpAction = new QAction("Set Hardware on Execution", this);
connect(mSetHwBpAction, SIGNAL(triggered()), this, SLOT(toogleHwBpActionSlot()));
connect(mSetHwBpAction, SIGNAL(triggered()), this, SLOT(toggleHwBpActionSlot()));
mClearHwBpAction = new QAction("Remove Hardware", this);
connect(mClearHwBpAction, SIGNAL(triggered()), this, SLOT(toogleHwBpActionSlot()));
connect(mClearHwBpAction, SIGNAL(triggered()), this, SLOT(toggleHwBpActionSlot()));
msetHwBPOnSlot0Action = new QAction("Set Hardware on Execution on Slot 0 (Free)", this);
connect(msetHwBPOnSlot0Action, SIGNAL(triggered()), this, SLOT(setHwBpOnSlot0ActionSlot()));
@ -205,7 +205,7 @@ void CPUDisassembly::toggleInt3BPAction()
}
void CPUDisassembly::toogleHwBpActionSlot()
void CPUDisassembly::toggleHwBpActionSlot()
{
uint_t wVA = rvaToVa(getInitialSelection());
BPXTYPE wBpType = DbgGetBpxTypeAt(wVA);

View File

@ -26,7 +26,7 @@ signals:
public slots:
void toggleInt3BPAction();
void toogleHwBpActionSlot();
void toggleHwBpActionSlot();
void setHwBpOnSlot0ActionSlot();
void setHwBpOnSlot1ActionSlot();
void setHwBpOnSlot2ActionSlot();