From ae46df3278f24917fea2ab24ff86469e4977970c Mon Sep 17 00:00:00 2001 From: "mr.exodia" Date: Sun, 24 Nov 2013 23:15:26 +0100 Subject: [PATCH] DBG: added a plugin define DBG: changed the order of importance in valfromstring GUI: fixed spelling mistake xD --- x64_dbg_dbg/_plugins.h | 3 +++ x64_dbg_dbg/addrinfo.cpp | 2 -- x64_dbg_dbg/value.cpp | 4 ++-- x64_dbg_gui/Project/Src/Gui/CPUDisassembly.cpp | 14 +++++++------- x64_dbg_gui/Project/Src/Gui/CPUDisassembly.h | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/x64_dbg_dbg/_plugins.h b/x64_dbg_dbg/_plugins.h index d82b6092..11000a5a 100644 --- a/x64_dbg_dbg/_plugins.h +++ b/x64_dbg_dbg/_plugins.h @@ -11,6 +11,9 @@ #include "_plugin_types.h" +//defines +#define PLUG_SDKVERSION 1 + //structures struct PLUG_INITSTRUCT { diff --git a/x64_dbg_dbg/addrinfo.cpp b/x64_dbg_dbg/addrinfo.cpp index 7e77fd71..fb1574ba 100644 --- a/x64_dbg_dbg/addrinfo.cpp +++ b/x64_dbg_dbg/addrinfo.cpp @@ -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); diff --git a/x64_dbg_dbg/value.cpp b/x64_dbg_dbg/value.cpp index 0605e85c..220031c8 100644 --- a/x64_dbg_dbg/value.cpp +++ b/x64_dbg_dbg/value.cpp @@ -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) diff --git a/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.cpp b/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.cpp index fa9d8969..7cb71ee8 100644 --- a/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.cpp +++ b/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.cpp @@ -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); diff --git a/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.h b/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.h index 12878409..e79e77fa 100644 --- a/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.h +++ b/x64_dbg_gui/Project/Src/Gui/CPUDisassembly.h @@ -26,7 +26,7 @@ signals: public slots: void toggleInt3BPAction(); - void toogleHwBpActionSlot(); + void toggleHwBpActionSlot(); void setHwBpOnSlot0ActionSlot(); void setHwBpOnSlot1ActionSlot(); void setHwBpOnSlot2ActionSlot();