DBG: added a plugin define
DBG: changed the order of importance in valfromstring GUI: fixed spelling mistake xD
This commit is contained in:
parent
f4ee9959cb
commit
ae46df3278
|
@ -11,6 +11,9 @@
|
||||||
|
|
||||||
#include "_plugin_types.h"
|
#include "_plugin_types.h"
|
||||||
|
|
||||||
|
//defines
|
||||||
|
#define PLUG_SDKVERSION 1
|
||||||
|
|
||||||
//structures
|
//structures
|
||||||
struct PLUG_INITSTRUCT
|
struct PLUG_INITSTRUCT
|
||||||
{
|
{
|
||||||
|
|
|
@ -365,7 +365,6 @@ bool labelfromstring(const char* text, uint* addr)
|
||||||
sqlstringescape(text, labeltext);
|
sqlstringescape(text, labeltext);
|
||||||
char sql[deflen]="";
|
char sql[deflen]="";
|
||||||
sprintf(sql, "SELECT addr,mod FROM labels WHERE text='%s'", labeltext);
|
sprintf(sql, "SELECT addr,mod FROM labels WHERE text='%s'", labeltext);
|
||||||
puts(sql);
|
|
||||||
sqlite3_stmt* stmt;
|
sqlite3_stmt* stmt;
|
||||||
if(sqlite3_prepare_v2(userdb, sql, -1, &stmt, 0)!=SQLITE_OK)
|
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);
|
sqlite3_finalize(stmt);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
puts(modname);
|
|
||||||
//TODO: fix this
|
//TODO: fix this
|
||||||
*addr+=modbasefromname(modname);
|
*addr+=modbasefromname(modname);
|
||||||
sqlite3_finalize(stmt);
|
sqlite3_finalize(stmt);
|
||||||
|
|
|
@ -1223,10 +1223,10 @@ bool valfromstring(const char* string, uint* value, int* value_size, bool* isvar
|
||||||
}
|
}
|
||||||
else if(labelfromstring(string, value)) //then come labels
|
else if(labelfromstring(string, value)) //then come labels
|
||||||
return true;
|
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
|
else if(valapifromstring(string, value, value_size, true, silent, hexonly)) //then come APIs
|
||||||
return true;
|
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
|
else if(varget(string, value, value_size, 0)) //finally variables
|
||||||
{
|
{
|
||||||
if(isvar)
|
if(isvar)
|
||||||
|
|
|
@ -63,16 +63,16 @@ void CPUDisassembly::contextMenuEvent(QContextMenuEvent* event)
|
||||||
switch(wBPList.bp[wI].slot)
|
switch(wBPList.bp[wI].slot)
|
||||||
{
|
{
|
||||||
case 0:
|
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;
|
break;
|
||||||
case 1:
|
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;
|
break;
|
||||||
case 2:
|
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;
|
break;
|
||||||
case 3:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -155,10 +155,10 @@ void CPUDisassembly::setupRightClickContextMenu()
|
||||||
mHwSlotSelectMenu = new QMenu("Set Hardware on Execution", this);
|
mHwSlotSelectMenu = new QMenu("Set Hardware on Execution", this);
|
||||||
|
|
||||||
mSetHwBpAction = new QAction("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);
|
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);
|
msetHwBPOnSlot0Action = new QAction("Set Hardware on Execution on Slot 0 (Free)", this);
|
||||||
connect(msetHwBPOnSlot0Action, SIGNAL(triggered()), this, SLOT(setHwBpOnSlot0ActionSlot()));
|
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());
|
uint_t wVA = rvaToVa(getInitialSelection());
|
||||||
BPXTYPE wBpType = DbgGetBpxTypeAt(wVA);
|
BPXTYPE wBpType = DbgGetBpxTypeAt(wVA);
|
||||||
|
|
|
@ -26,7 +26,7 @@ signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void toggleInt3BPAction();
|
void toggleInt3BPAction();
|
||||||
void toogleHwBpActionSlot();
|
void toggleHwBpActionSlot();
|
||||||
void setHwBpOnSlot0ActionSlot();
|
void setHwBpOnSlot0ActionSlot();
|
||||||
void setHwBpOnSlot1ActionSlot();
|
void setHwBpOnSlot1ActionSlot();
|
||||||
void setHwBpOnSlot2ActionSlot();
|
void setHwBpOnSlot2ActionSlot();
|
||||||
|
|
Loading…
Reference in New Issue