DBG: removed sqlite
This commit is contained in:
parent
42b5e38f4b
commit
f6d04a90a8
Binary file not shown.
Binary file not shown.
|
@ -558,7 +558,7 @@ extern "C" DLL_EXPORT int _dbg_getbplist(BPXTYPE type, BPMAP* bpmap)
|
|||
{
|
||||
if(!bpmap)
|
||||
return 0;
|
||||
BREAKPOINT* list;
|
||||
std::vector<BREAKPOINT> list;
|
||||
int bpcount=bpgetlist(&list);
|
||||
if(bpcount==0)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include <map>
|
||||
#include <tlhelp32.h>
|
||||
#include "..\x64_dbg_bridge\bridgemain.h"
|
||||
#include "sqlite\sqlite3.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include "dbghelp\dbghelp.h"
|
||||
|
|
|
@ -2,12 +2,10 @@
|
|||
#include "debugger.h"
|
||||
#include "console.h"
|
||||
#include "memory.h"
|
||||
#include "sqlhelper.h"
|
||||
#include "breakpoint.h"
|
||||
#include "threading.h"
|
||||
#include "symbolinfo.h"
|
||||
|
||||
sqlite3* userdb;
|
||||
static ModulesInfo modinfo;
|
||||
static CommentsInfo comments;
|
||||
static LabelsInfo labels;
|
||||
|
@ -18,73 +16,33 @@ static LoopsInfo loops;
|
|||
///basic database functions
|
||||
void dbinit()
|
||||
{
|
||||
//initialize user database
|
||||
lock(WAITID_USERDB);
|
||||
if(sqlite3_open(":memory:", &userdb))
|
||||
{
|
||||
unlock(WAITID_USERDB);
|
||||
dputs("failed to open database!");
|
||||
return;
|
||||
}
|
||||
unlock(WAITID_USERDB);
|
||||
sqlloadsavedb(userdb, dbpath, false);
|
||||
if(!sqlexec(userdb, "CREATE TABLE IF NOT EXISTS labels (id INTEGER PRIMARY KEY AUTOINCREMENT, mod TEXT, addr INT64 NOT NULL, text TEXT NOT NULL)"))
|
||||
dprintf("SQL Error: %s\n", sqllasterror());
|
||||
if(!sqlexec(userdb, "CREATE TABLE IF NOT EXISTS comments (id INTEGER PRIMARY KEY AUTOINCREMENT, mod TEXT, addr INT64 NOT NULL, text TEXT NOT NULL)"))
|
||||
dprintf("SQL Error: %s\n", sqllasterror());
|
||||
if(!sqlexec(userdb, "CREATE TABLE IF NOT EXISTS bookmarks (id INTEGER PRIMARY KEY AUTOINCREMENT, mod TEXT, addr INT64 NOT NULL)"))
|
||||
dprintf("SQL Error: %s\n", sqllasterror());
|
||||
if(!sqlexec(userdb, "CREATE TABLE IF NOT EXISTS breakpoints (id INTEGER PRIMARY KEY AUTOINCREMENT, addr INT64 NOT NULL, enabled INT NOT NULL, singleshoot INT NOT NULL, oldbytes INT NOT NULL, type INT NOT NULL, titantype INT NOT NULL, mod TEXT, name TEXT)"))
|
||||
dprintf("SQL Error: %s\n", sqllasterror());
|
||||
if(!sqlexec(userdb, "CREATE TABLE IF NOT EXISTS functions (id INTEGER PRIMARY KEY AUTOINCREMENT, mod TEXT, start INT64 NOT NULL, end INT64 NOT NULL, manual BOOL NOT NULL)"))
|
||||
dprintf("SQL Error: %s\n", sqllasterror());
|
||||
if(!sqlexec(userdb, "CREATE TABLE IF NOT EXISTS loops (id INTEGER PRIMARY KEY AUTOINCREMENT, mod TEXT, start INT64 NOT NULL, end INT64 NOT NULL, parent INT, depth INT NOT NULL, manual BOOL NOT NULL)"))
|
||||
dprintf("SQL Error: %s\n", sqllasterror());
|
||||
bpenumall(0); //update breakpoint list
|
||||
GuiUpdateBreakpointsView();
|
||||
dbreadcache();
|
||||
}
|
||||
|
||||
bool dbload()
|
||||
{
|
||||
if(!FileExists(dbpath))
|
||||
{
|
||||
dbinit();
|
||||
return true;
|
||||
}
|
||||
return sqlloadsavedb(userdb, dbpath, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dbsave()
|
||||
{
|
||||
CreateDirectoryA(sqlitedb_basedir, 0); //create database directory
|
||||
return sqlloadsavedb(userdb, dbpath, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
void readcache()
|
||||
void dbreadcache()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void writecache()
|
||||
void dbwritecache()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void dbclose()
|
||||
{
|
||||
writecache(); //write db structures to sqlite database
|
||||
//NOTE: remove breakpoints without module
|
||||
if(!sqlexec(userdb, "DELETE FROM breakpoints WHERE mod IS NULL"))
|
||||
dprintf("SQL Error: %s\n", sqllasterror());
|
||||
//NOTE: remove singleshoot breakpoints (mostly temporary breakpoints)
|
||||
if(!sqlexec(userdb, "DELETE FROM breakpoints WHERE singleshoot=1 AND type=0"))
|
||||
dprintf("SQL Error: %s\n", sqllasterror());
|
||||
dbsave();
|
||||
wait(WAITID_USERDB); //wait for the SQLite operation to complete before closing
|
||||
lock(WAITID_USERDB);
|
||||
sqlite3_db_release_memory(userdb);
|
||||
sqlite3_close(userdb); //close user database
|
||||
unlock(WAITID_USERDB);
|
||||
dbwritecache();
|
||||
}
|
||||
|
||||
///module functions
|
||||
|
@ -279,7 +237,7 @@ bool commentset(uint addr, const char* text)
|
|||
if(!*text) //NOTE: delete when there is no text
|
||||
return commentdel(addr);
|
||||
COMMENTSINFO info;
|
||||
sqlstringescape(text, info.text);
|
||||
strcpy(info.text, text);
|
||||
modnamefromaddr(addr, info.mod, true);
|
||||
info.addr=addr-modbasefromaddr(addr);
|
||||
if(comments.count(addr)) //contains addr
|
||||
|
@ -287,40 +245,6 @@ bool commentset(uint addr, const char* text)
|
|||
else
|
||||
comments.insert(std::make_pair(addr, info));
|
||||
return true;
|
||||
/*
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr) or !text or strlen(text)>=MAX_COMMENT_SIZE-1)
|
||||
return false;
|
||||
if(!*text) //NOTE: delete when there is no text
|
||||
return commentdel(addr);
|
||||
char commenttext[MAX_COMMENT_SIZE]="";
|
||||
sqlstringescape(text, commenttext);
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true)) //comments without module
|
||||
{
|
||||
sprintf(sql, "SELECT text FROM comments WHERE mod IS NULL AND addr=%"fext"d", addr);
|
||||
if(sqlhasresult(userdb, sql)) //there is a comment already
|
||||
sprintf(sql, "UPDATE comments SET text='%s' WHERE mod IS NULL AND addr=%"fext"d", commenttext, addr);
|
||||
else //insert
|
||||
sprintf(sql, "INSERT INTO comments (addr,text) VALUES (%"fext"d,'%s')", addr, commenttext);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint modbase=modbasefromaddr(addr);
|
||||
uint rva=addr-modbase;
|
||||
sprintf(sql, "SELECT text FROM comments WHERE mod='%s' AND addr=%"fext"d", modname, rva);
|
||||
if(sqlhasresult(userdb, sql)) //there is a comment already
|
||||
sprintf(sql, "UPDATE comments SET text='%s' WHERE mod='%s' AND addr=%"fext"d", commenttext, modname, rva);
|
||||
else //insert
|
||||
sprintf(sql, "INSERT INTO comments (mod,addr,text) VALUES ('%s',%"fext"d,'%s')", modname, rva, commenttext);
|
||||
}
|
||||
if(!sqlexec(userdb, sql))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
bool commentget(uint addr, char* text)
|
||||
|
@ -333,17 +257,6 @@ bool commentget(uint addr, char* text)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr) or !text)
|
||||
return false;
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true)) //comments without module
|
||||
sprintf(sql, "SELECT text FROM comments WHERE mod IS NULL AND addr=%"fext"d", addr);
|
||||
else
|
||||
sprintf(sql, "SELECT text FROM comments WHERE mod='%s' AND addr=%"fext"d", modname, addr-modbasefromaddr(addr));
|
||||
return sqlgettext(userdb, sql, text);
|
||||
*/
|
||||
}
|
||||
|
||||
bool commentdel(uint addr)
|
||||
|
@ -356,30 +269,6 @@ bool commentdel(uint addr)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr))
|
||||
return false;
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true)) //comments without module
|
||||
sprintf(sql, "SELECT id FROM comments WHERE mod IS NULL AND addr=%"fext"d", addr);
|
||||
else
|
||||
{
|
||||
uint modbase=modbasefromaddr(addr);
|
||||
uint rva=addr-modbase;
|
||||
sprintf(sql, "SELECT id FROM comments WHERE mod='%s' AND addr=%"fext"d", modname, rva);
|
||||
}
|
||||
int del_id=0;
|
||||
if(!sqlgetint(userdb, sql, &del_id))
|
||||
return false;
|
||||
sprintf(sql, "DELETE FROM comments WHERE id=%d", del_id);
|
||||
if(!sqlexec(userdb, sql))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
///label functions
|
||||
|
@ -390,7 +279,7 @@ bool labelset(uint addr, const char* text)
|
|||
if(!*text) //NOTE: delete when there is no text
|
||||
return labeldel(addr);
|
||||
LABELSINFO label;
|
||||
sqlstringescape(text, label.text);
|
||||
strcpy(label.text, text);
|
||||
modnamefromaddr(addr, label.mod, true);
|
||||
label.addr=addr-modbasefromaddr(addr);
|
||||
if(labels.count(addr)) //contains
|
||||
|
@ -398,43 +287,15 @@ bool labelset(uint addr, const char* text)
|
|||
else
|
||||
labels.insert(std::make_pair(addr, label));
|
||||
return true;
|
||||
/*
|
||||
if(!modnamefromaddr(addr, modname, true)) //labels without module
|
||||
{
|
||||
sprintf(sql, "SELECT text FROM labels WHERE mod IS NULL AND addr=%"fext"d", addr);
|
||||
if(sqlhasresult(userdb, sql)) //there is a label already
|
||||
sprintf(sql, "UPDATE labels SET text='%s' WHERE mod IS NULL AND addr=%"fext"d", labeltext, addr);
|
||||
else //insert
|
||||
sprintf(sql, "INSERT INTO labels (addr,text) VALUES (%"fext"d,'%s')", addr, labeltext);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint modbase=modbasefromaddr(addr);
|
||||
uint rva=addr-modbase;
|
||||
sprintf(sql, "SELECT text FROM labels WHERE mod='%s' AND addr=%"fext"d", modname, rva);
|
||||
if(sqlhasresult(userdb, sql)) //there is a label already
|
||||
sprintf(sql, "UPDATE labels SET text='%s' WHERE mod='%s' AND addr=%"fext"d", labeltext, modname, rva);
|
||||
else //insert
|
||||
sprintf(sql, "INSERT INTO labels (mod,addr,text) VALUES ('%s',%"fext"d,'%s')", modname, rva, labeltext);
|
||||
}
|
||||
if(!sqlexec(userdb, sql))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
bool labelfromstring(const char* text, uint* addr)
|
||||
{
|
||||
if(!DbgIsDebugging())
|
||||
return false;
|
||||
char labeltext[MAX_LABEL_SIZE]="";
|
||||
sqlstringescape(text, labeltext);
|
||||
for(LabelsInfo::iterator i=labels.begin(); i!=labels.end(); ++i)
|
||||
{
|
||||
if(!strcmp(i->second.text, labeltext))
|
||||
if(!strcmp(i->second.text, text))
|
||||
{
|
||||
if(addr)
|
||||
*addr=i->first;
|
||||
|
@ -442,45 +303,6 @@ bool labelfromstring(const char* text, uint* addr)
|
|||
}
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
if(!text or !strlen(text) or !addr)
|
||||
return 0;
|
||||
char labeltext[MAX_LABEL_SIZE]="";
|
||||
sqlstringescape(text, labeltext);
|
||||
char sql[deflen]="";
|
||||
sprintf(sql, "SELECT addr,mod FROM labels WHERE text='%s'", labeltext);
|
||||
sqlite3_stmt* stmt;
|
||||
lock(WAITID_USERDB);
|
||||
if(sqlite3_prepare_v2(userdb, sql, -1, &stmt, 0)!=SQLITE_OK)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
if(sqlite3_step(stmt)!=SQLITE_ROW)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
#ifdef _WIN64
|
||||
*addr=sqlite3_column_int64(stmt, 0); //addr
|
||||
#else
|
||||
*addr=sqlite3_column_int(stmt, 0); //addr
|
||||
#endif // _WIN64
|
||||
const char* modname=(const char*)sqlite3_column_text(stmt, 1); //mod
|
||||
if(!modname)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
}
|
||||
//TODO: fix this
|
||||
*addr+=modbasefromname(modname);
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
bool labelget(uint addr, char* text)
|
||||
|
@ -493,17 +315,6 @@ bool labelget(uint addr, char* text)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr) or !text)
|
||||
return false;
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true)) //labels without module
|
||||
sprintf(sql, "SELECT text FROM labels WHERE mod IS NULL AND addr=%"fext"d", addr);
|
||||
else
|
||||
sprintf(sql, "SELECT text FROM labels WHERE mod='%s' AND addr=%"fext"d", modname, addr-modbasefromaddr(addr));
|
||||
return sqlgettext(userdb, sql, text);
|
||||
*/
|
||||
}
|
||||
|
||||
bool labeldel(uint addr)
|
||||
|
@ -516,30 +327,6 @@ bool labeldel(uint addr)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr))
|
||||
return false;
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true)) //labels without module
|
||||
sprintf(sql, "SELECT id FROM labels WHERE mod IS NULL AND addr=%"fext"d", addr);
|
||||
else
|
||||
{
|
||||
uint modbase=modbasefromaddr(addr);
|
||||
uint rva=addr-modbase;
|
||||
sprintf(sql, "SELECT id FROM labels WHERE mod='%s' AND addr=%"fext"d", modname, rva);
|
||||
}
|
||||
int del_id=0;
|
||||
if(!sqlgetint(userdb, sql, &del_id))
|
||||
return false;
|
||||
sprintf(sql, "DELETE FROM labels WHERE id=%d", del_id);
|
||||
if(!sqlexec(userdb, sql))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
///bookmark functions
|
||||
|
@ -552,34 +339,6 @@ bool bookmarkset(uint addr)
|
|||
bookmark.addr=addr-modbasefromaddr(addr);
|
||||
bookmarks.insert(std::make_pair(addr, bookmark));
|
||||
return true;
|
||||
/*
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true)) //bookmarks without module
|
||||
{
|
||||
sprintf(sql, "SELECT * FROM bookmarks WHERE mod IS NULL AND addr=%"fext"d", addr);
|
||||
if(sqlhasresult(userdb, sql)) //there is a bookmark already
|
||||
return true;
|
||||
else //insert
|
||||
sprintf(sql, "INSERT INTO bookmarks (addr) VALUES (%"fext"d)", addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint modbase=modbasefromaddr(addr);
|
||||
uint rva=addr-modbase;
|
||||
sprintf(sql, "SELECT * FROM bookmarks WHERE mod='%s' AND addr=%"fext"d", modname, rva);
|
||||
if(sqlhasresult(userdb, sql)) //there is a bookmark already
|
||||
return true;
|
||||
else //insert
|
||||
sprintf(sql, "INSERT INTO bookmarks (mod,addr) VALUES ('%s',%"fext"d)", modname, rva);
|
||||
}
|
||||
if(!sqlexec(userdb, sql))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
bool bookmarkget(uint addr)
|
||||
|
@ -589,17 +348,6 @@ bool bookmarkget(uint addr)
|
|||
if(bookmarks.count(addr))
|
||||
return true;
|
||||
return false;
|
||||
/*
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr))
|
||||
return false;
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true)) //bookmarks without module
|
||||
sprintf(sql, "SELECT * FROM bookmarks WHERE mod IS NULL AND addr=%"fext"d", addr);
|
||||
else
|
||||
sprintf(sql, "SELECT * FROM bookmarks WHERE mod='%s' AND addr=%"fext"d", modname, addr-modbasefromaddr(addr));
|
||||
return sqlhasresult(userdb, sql);
|
||||
*/
|
||||
}
|
||||
|
||||
bool bookmarkdel(uint addr)
|
||||
|
@ -612,30 +360,6 @@ bool bookmarkdel(uint addr)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr))
|
||||
return false;
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true)) //bookmarks without module
|
||||
sprintf(sql, "SELECT id FROM bookmarks WHERE mod IS NULL AND addr=%"fext"d", addr);
|
||||
else
|
||||
{
|
||||
uint modbase=modbasefromaddr(addr);
|
||||
uint rva=addr-modbase;
|
||||
sprintf(sql, "SELECT id FROM bookmarks WHERE mod='%s' AND addr=%"fext"d", modname, rva);
|
||||
}
|
||||
int del_id=0;
|
||||
if(!sqlgetint(userdb, sql, &del_id))
|
||||
return false;
|
||||
sprintf(sql, "DELETE FROM bookmarks WHERE id=%d", del_id);
|
||||
if(!sqlexec(userdb, sql))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
///function database
|
||||
|
@ -656,49 +380,6 @@ bool functionget(uint addr, uint* start, uint* end)
|
|||
}
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr))
|
||||
return false;
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
uint modbase=0;
|
||||
if(!modnamefromaddr(addr, modname, true))
|
||||
sprintf(sql, "SELECT start,end FROM functions WHERE mod IS NULL AND start<=%"fext"d AND end>=%"fext"d", addr, addr);
|
||||
else
|
||||
{
|
||||
modbase=modbasefromaddr(addr);
|
||||
uint rva=addr-modbase;
|
||||
sprintf(sql, "SELECT start,end FROM functions WHERE mod='%s' AND start<=%"fext"d AND end>=%"fext"d", modname, rva, rva);
|
||||
}
|
||||
sqlite3_stmt* stmt;
|
||||
lock(WAITID_USERDB);
|
||||
if(sqlite3_prepare_v2(userdb, sql, -1, &stmt, 0)!=SQLITE_OK)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
if(sqlite3_step(stmt)!=SQLITE_ROW)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
#ifdef _WIN64
|
||||
uint dbstart=sqlite3_column_int64(stmt, 0)+modbase; //start
|
||||
uint dbend=sqlite3_column_int64(stmt, 1)+modbase; //end
|
||||
#else
|
||||
uint dbstart=sqlite3_column_int(stmt, 0)+modbase; //addr
|
||||
uint dbend=sqlite3_column_int(stmt, 1)+modbase; //end
|
||||
#endif // _WIN64
|
||||
sqlite3_finalize(stmt);
|
||||
if(start)
|
||||
*start=dbstart;
|
||||
if(end)
|
||||
*end=dbend;
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
bool functionoverlaps(uint start, uint end)
|
||||
|
@ -713,21 +394,6 @@ bool functionoverlaps(uint start, uint end)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
char sql[deflen]="";
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
//check for function overlaps
|
||||
if(!modnamefromaddr(start, modname, true))
|
||||
sprintf(sql, "SELECT manual FROM functions WHERE mod IS NULL AND start<=%"fext"d AND end>=%"fext"d", end, start);
|
||||
else
|
||||
{
|
||||
uint modbase=modbasefromaddr(start);
|
||||
sprintf(sql, "SELECT manual FROM functions WHERE mod='%s' AND start<=%"fext"d AND end>=%"fext"d", modname, end-modbase, start-modbase);
|
||||
}
|
||||
if(sqlhasresult(userdb, sql)) //functions overlap
|
||||
return true;
|
||||
return false;
|
||||
*/
|
||||
}
|
||||
|
||||
bool functionadd(uint start, uint end, bool manual)
|
||||
|
@ -744,31 +410,6 @@ bool functionadd(uint start, uint end, bool manual)
|
|||
function.manual=manual;
|
||||
functions.push_back(function);
|
||||
return true;
|
||||
/*
|
||||
char sql[deflen]="";
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
uint modbase=0;
|
||||
//check for function overlaps
|
||||
if(!modnamefromaddr(start, modname, true))
|
||||
sprintf(sql, "SELECT manual FROM functions WHERE mod IS NULL AND start<=%"fext"d AND end>=%"fext"d", end, start);
|
||||
else
|
||||
{
|
||||
modbase=modbasefromaddr(start);
|
||||
sprintf(sql, "SELECT manual FROM functions WHERE mod='%s' AND start<=%"fext"d AND end>=%"fext"d", modname, end-modbase, start-modbase);
|
||||
}
|
||||
if(sqlhasresult(userdb, sql)) //functions overlap
|
||||
return false;
|
||||
if(modbase)
|
||||
sprintf(sql, "INSERT INTO functions (mod,start,end,manual) VALUES('%s',%"fext"d,%"fext"d,%d)", modname, start-modbase, end-modbase, manual);
|
||||
else
|
||||
sprintf(sql, "INSERT INTO functions (start,end,manual) VALUES(%"fext"d,%"fext"d,%d)", start, end, manual);
|
||||
if(!sqlexec(userdb, sql))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
bool functiondel(uint addr)
|
||||
|
@ -785,23 +426,6 @@ bool functiondel(uint addr)
|
|||
}
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true))
|
||||
sprintf(sql, "DELETE FROM functions WHERE mod IS NULL AND start<=%"fext"d AND end>=%"fext"d", addr, addr);
|
||||
else
|
||||
{
|
||||
uint rva=addr-modbasefromaddr(addr);
|
||||
sprintf(sql, "DELETE FROM functions WHERE mod='%s' AND start<=%"fext"d AND end>=%"fext"d", modname, rva, rva);
|
||||
}
|
||||
if(!sqlexec(userdb, sql))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
bool loopget(int depth, uint addr, uint* start, uint* end)
|
||||
|
@ -821,49 +445,6 @@ bool loopget(int depth, uint addr, uint* start, uint* end)
|
|||
}
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr))
|
||||
return false;
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
char sql[deflen]="";
|
||||
uint modbase=0;
|
||||
if(!modnamefromaddr(addr, modname, true))
|
||||
sprintf(sql, "SELECT start,end FROM loops WHERE mod IS NULL AND start<=%"fext"d AND end>=%"fext"d AND depth=%d", addr, addr, depth);
|
||||
else
|
||||
{
|
||||
modbase=modbasefromaddr(addr);
|
||||
uint rva=addr-modbase;
|
||||
sprintf(sql, "SELECT start,end FROM loops WHERE mod='%s' AND start<=%"fext"d AND end>=%"fext"d AND depth=%d", modname, rva, rva, depth);
|
||||
}
|
||||
sqlite3_stmt* stmt;
|
||||
lock(WAITID_USERDB);
|
||||
if(sqlite3_prepare_v2(userdb, sql, -1, &stmt, 0)!=SQLITE_OK)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
if(sqlite3_step(stmt)!=SQLITE_ROW)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
#ifdef _WIN64
|
||||
uint dbstart=sqlite3_column_int64(stmt, 0)+modbase; //start
|
||||
uint dbend=sqlite3_column_int64(stmt, 1)+modbase; //end
|
||||
#else
|
||||
uint dbstart=sqlite3_column_int(stmt, 0)+modbase; //addr
|
||||
uint dbend=sqlite3_column_int(stmt, 1)+modbase; //end
|
||||
#endif // _WIN64
|
||||
sqlite3_finalize(stmt);
|
||||
if(start)
|
||||
*start=dbstart;
|
||||
if(end)
|
||||
*end=dbend;
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
bool loopadd(uint start, uint end, bool manual)
|
||||
|
@ -913,35 +494,6 @@ bool loopoverlaps(int depth, uint start, uint end, int* finaldepth)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
/*
|
||||
char sql[deflen]="";
|
||||
char modname[MAX_MODULE_SIZE]="";
|
||||
|
||||
//check if the new loop fits in the old loop
|
||||
if(!modnamefromaddr(start, modname, true))
|
||||
sprintf(sql, "SELECT manual FROM loops WHERE mod IS NULL AND start<%"fext"d AND end>%"fext"d AND depth=%d", start, end, depth);
|
||||
else
|
||||
{
|
||||
uint modbase=modbasefromaddr(start);
|
||||
sprintf(sql, "SELECT manual FROM loops WHERE mod='%s' AND start<%"fext"d AND end>%"fext"d AND depth=%d", modname, start-modbase, end-modbase, depth);
|
||||
}
|
||||
if(sqlhasresult(userdb, sql)) //new loop fits in the old loop
|
||||
return loopoverlaps(depth+1, start, end); //check the next depth
|
||||
|
||||
//check for loop overlaps
|
||||
if(!modnamefromaddr(start, modname, true))
|
||||
sprintf(sql, "SELECT manual FROM loops WHERE mod IS NULL AND start<=%"fext"d AND end>=%"fext"d AND depth=%d", end, start, depth);
|
||||
else
|
||||
{
|
||||
uint modbase=modbasefromaddr(start);
|
||||
sprintf(sql, "SELECT manual FROM loops WHERE mod='%s' AND start<=%"fext"d AND end>=%"fext"d AND depth=%d", modname, end-modbase, start-modbase, depth);
|
||||
}
|
||||
if(finaldepth)
|
||||
*finaldepth=depth;
|
||||
if(sqlhasresult(userdb, sql)) //loops overlap
|
||||
return true;
|
||||
return false;
|
||||
*/
|
||||
}
|
||||
|
||||
bool loopdel(int depth, uint addr)
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
#include "_global.h"
|
||||
|
||||
//superglobal variables
|
||||
extern sqlite3* userdb;
|
||||
|
||||
//structures
|
||||
struct MODINFO
|
||||
{
|
||||
|
@ -68,28 +65,37 @@ typedef std::vector<LOOPSINFO> LoopsInfo;
|
|||
void dbinit();
|
||||
bool dbsave();
|
||||
bool dbload();
|
||||
void dbreadcache();
|
||||
void dbwritecache();
|
||||
void dbclose();
|
||||
|
||||
bool modload(uint base, uint size, const char* fullpath);
|
||||
bool modunload(uint base);
|
||||
void modclear();
|
||||
bool modnamefromaddr(uint addr, char* modname, bool extension);
|
||||
uint modbasefromaddr(uint addr);
|
||||
uint modbasefromname(const char* modname);
|
||||
|
||||
bool apienumexports(uint base, EXPORTENUMCALLBACK cbEnum);
|
||||
|
||||
bool commentset(uint addr, const char* text);
|
||||
bool commentget(uint addr, char* text);
|
||||
bool commentdel(uint addr);
|
||||
|
||||
bool labelset(uint addr, const char* text);
|
||||
bool labelfromstring(const char* text, uint* addr);
|
||||
bool labelget(uint addr, char* text);
|
||||
bool labeldel(uint addr);
|
||||
|
||||
bool bookmarkset(uint addr);
|
||||
bool bookmarkget(uint addr);
|
||||
bool bookmarkdel(uint addr);
|
||||
|
||||
bool functionget(uint addr, uint* start, uint* end);
|
||||
bool functionoverlaps(uint start, uint end);
|
||||
bool functionadd(uint start, uint end, bool manual);
|
||||
bool functiondel(uint addr);
|
||||
|
||||
bool loopget(int depth, uint addr, uint* start, uint* end);
|
||||
bool loopoverlaps(int depth, uint start, uint end, int* finaldepth);
|
||||
bool loopadd(uint start, uint end, bool manual);
|
||||
|
|
|
@ -1,281 +1,142 @@
|
|||
#include "breakpoint.h"
|
||||
#include "debugger.h"
|
||||
#include "addrinfo.h"
|
||||
#include "sqlhelper.h"
|
||||
#include "console.h"
|
||||
#include "memory.h"
|
||||
#include "threading.h"
|
||||
|
||||
static BREAKPOINT bpall[1000]; //TODO: fix this size
|
||||
static int bpcount=0;
|
||||
static BreakpointsMap breakpoints;
|
||||
|
||||
int bpgetlist(BREAKPOINT** list)
|
||||
int bpgetlist(std::vector<BREAKPOINT>* list)
|
||||
{
|
||||
if(list)
|
||||
*list=bpall;
|
||||
return bpcount;
|
||||
if(!DbgIsDebugging())
|
||||
return false;
|
||||
BREAKPOINT curBp;
|
||||
int count=0;
|
||||
for(BreakpointsMap::iterator i=breakpoints.begin(); i!=breakpoints.end(); ++i)
|
||||
{
|
||||
curBp=i->second;
|
||||
curBp.addr+=curBp.modbase;
|
||||
curBp.active=memisvalidreadptr(fdProcessInfo->hProcess, curBp.addr);
|
||||
count++;
|
||||
if(list)
|
||||
list->push_back(curBp);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
bool bpnew(uint addr, bool enabled, bool singleshoot, short oldbytes, BP_TYPE type, DWORD titantype, const char* name)
|
||||
{
|
||||
if(bpget(addr, type, name, 0)) //breakpoint found
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr) or bpget(addr, type, name, 0))
|
||||
return false;
|
||||
char modname[256]="";
|
||||
char sql[deflen]="";
|
||||
char bpname[MAX_BREAKPOINT_SIZE]="";
|
||||
if(modnamefromaddr(addr, modname, true)) //no module
|
||||
{
|
||||
uint modbase=modbasefromaddr(addr);
|
||||
if(name and *name)
|
||||
{
|
||||
sqlstringescape(name, bpname);
|
||||
sprintf(sql, "INSERT INTO breakpoints (addr,enabled,singleshoot,oldbytes,type,titantype,mod,name) VALUES (%"fext"d,%d,%d,%d,%d,%d,'%s','%s')", addr-modbase, enabled, singleshoot, oldbytes, type, titantype, modname, bpname);
|
||||
}
|
||||
else
|
||||
sprintf(sql, "INSERT INTO breakpoints (addr,enabled,singleshoot,oldbytes,type,titantype,mod) VALUES (%"fext"d,%d,%d,%d,%d,%d,'%s')", addr-modbase, enabled, singleshoot, oldbytes, type, titantype, modname);
|
||||
}
|
||||
BREAKPOINT bp;
|
||||
modnamefromaddr(addr, bp.mod, true);
|
||||
bp.modbase=modbasefromaddr(addr);
|
||||
bp.active=true;
|
||||
bp.addr=addr-bp.modbase;
|
||||
bp.enabled=enabled;
|
||||
if(name and *name)
|
||||
strcpy(bp.name, name);
|
||||
else
|
||||
{
|
||||
if(name and *name)
|
||||
{
|
||||
sqlstringescape(name, bpname);
|
||||
sprintf(sql, "INSERT INTO breakpoints (addr,enabled,singleshoot,oldbytes,type,titantype,name) VALUES (%"fext"d,%d,%d,%d,%d,%d,'%s')", addr, enabled, singleshoot, oldbytes, type, titantype, bpname);
|
||||
}
|
||||
else
|
||||
sprintf(sql, "INSERT INTO breakpoints (addr,enabled,singleshoot,oldbytes,type,titantype) VALUES (%"fext"d,%d,%d,%d,%d,%d)", addr, enabled, singleshoot, oldbytes, type, titantype);
|
||||
}
|
||||
if(!sqlexec(userdb, sql))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
}
|
||||
bpenumall(0); //update breakpoint list
|
||||
GuiUpdateBreakpointsView();
|
||||
*bp.name='\0';
|
||||
bp.oldbytes=oldbytes;
|
||||
bp.singleshoot=singleshoot;
|
||||
bp.titantype=titantype;
|
||||
bp.type=type;
|
||||
breakpoints.insert(std::make_pair(std::make_pair(addr, type), bp));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool bpget(uint addr, BP_TYPE type, const char* name, BREAKPOINT* bp)
|
||||
{
|
||||
char sql[deflen]="";
|
||||
char modname[256]="";
|
||||
char bpname[MAX_BREAKPOINT_SIZE]="";
|
||||
uint modbase=0;
|
||||
if(!modnamefromaddr(addr, modname, true)) //no module
|
||||
if(!DbgIsDebugging())
|
||||
return false;
|
||||
BREAKPOINT curBp;
|
||||
for(BreakpointsMap::iterator i=breakpoints.begin(); i!=breakpoints.end(); ++i)
|
||||
{
|
||||
if(bp)
|
||||
*bp->mod=0;
|
||||
curBp=i->second;
|
||||
curBp.addr+=curBp.modbase;
|
||||
curBp.active=memisvalidreadptr(fdProcessInfo->hProcess, curBp.addr);
|
||||
if(name and *name)
|
||||
{
|
||||
sqlstringescape(name, bpname);
|
||||
sprintf(sql, "SELECT addr,enabled,singleshoot,oldbytes,type,titantype,mod,name FROM breakpoints WHERE (addr=%"fext"d AND type=%d AND mod IS NULL) OR name='%s'", addr, type, bpname);
|
||||
if(i->first==std::make_pair(addr, type) or !strcmp(name, curBp.name))
|
||||
{
|
||||
if(bp)
|
||||
*bp=curBp;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
sprintf(sql, "SELECT addr,enabled,singleshoot,oldbytes,type,titantype,mod,name FROM breakpoints WHERE (addr=%"fext"d AND type=%d AND mod IS NULL)", addr, type);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(bp)
|
||||
strcpy(bp->mod, modname);
|
||||
modbase=modbasefromaddr(addr);
|
||||
if(name and *name)
|
||||
else if(i->first==std::make_pair(addr, type))
|
||||
{
|
||||
sqlstringescape(name, bpname);
|
||||
sprintf(sql, "SELECT addr,enabled,singleshoot,oldbytes,type,titantype,mod,name FROM breakpoints WHERE (addr=%"fext"d AND type=%d AND mod='%s') OR name='%s'", addr-modbase, type, modname, bpname);
|
||||
if(bp)
|
||||
*bp=curBp;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
sprintf(sql, "SELECT addr,enabled,singleshoot,oldbytes,type,titantype,mod,name FROM breakpoints WHERE (addr=%"fext"d AND type=%d AND mod='%s')", addr-modbase, type, modname);
|
||||
}
|
||||
sqlite3_stmt* stmt;
|
||||
lock(WAITID_USERDB);
|
||||
if(sqlite3_prepare_v2(userdb, sql, -1, &stmt, 0)!=SQLITE_OK)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
if(sqlite3_step(stmt)!=SQLITE_ROW)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
if(!bp) //just check if a breakpoint exists
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
}
|
||||
memset(bp, 0, sizeof(BREAKPOINT));
|
||||
if(!modbase)
|
||||
{
|
||||
const char* mod=(const char*)sqlite3_column_text(stmt, 6); //mod
|
||||
if(mod)
|
||||
modbase=modbasefromname(mod);
|
||||
}
|
||||
#ifdef _WIN64
|
||||
bp->addr=sqlite3_column_int64(stmt, 0)+modbase; //addr
|
||||
#else
|
||||
bp->addr=sqlite3_column_int(stmt, 0)+modbase; //addr
|
||||
#endif // _WIN64
|
||||
if(sqlite3_column_int(stmt, 1)) //enabled
|
||||
bp->enabled=true;
|
||||
else
|
||||
bp->enabled=false;
|
||||
if(sqlite3_column_int(stmt, 2)) //singleshoot
|
||||
bp->singleshoot=true;
|
||||
else
|
||||
bp->singleshoot=false;
|
||||
bp->oldbytes=(short)(sqlite3_column_int(stmt, 3)&0xFFFF); //oldbytes
|
||||
bp->type=(BP_TYPE)sqlite3_column_int(stmt, 4); //type
|
||||
bp->titantype=sqlite3_column_int(stmt, 5); //titantype
|
||||
const char* bpname_=(const char*)sqlite3_column_text(stmt, 7); //name
|
||||
if(bpname_)
|
||||
strcpy(bp->name, bpname_);
|
||||
else
|
||||
*bp->name=0;
|
||||
//TODO: fix this
|
||||
if(memisvalidreadptr(fdProcessInfo->hProcess, bp->addr))
|
||||
bp->active=true;
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bpdel(uint addr, BP_TYPE type)
|
||||
{
|
||||
BREAKPOINT found;
|
||||
if(!bpget(addr, type, 0, &found))
|
||||
if(!DbgIsDebugging())
|
||||
return false;
|
||||
char modname[256]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true)) //no module
|
||||
sprintf(sql, "DELETE FROM breakpoints WHERE addr=%"fext"d AND mod IS NULL AND type=%d", addr, type);
|
||||
else
|
||||
sprintf(sql, "DELETE FROM breakpoints WHERE addr=%"fext"d AND mod='%s' AND type=%d", addr-modbasefromaddr(addr), modname, type);
|
||||
if(!sqlexec(userdb, sql))
|
||||
if(breakpoints.count(std::make_pair(addr, type)))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
breakpoints.erase(std::make_pair(addr, type));
|
||||
return true;
|
||||
}
|
||||
bpenumall(0); //update breakpoint list
|
||||
GuiUpdateBreakpointsView();
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bpenable(uint addr, BP_TYPE type, bool enable)
|
||||
{
|
||||
BREAKPOINT found;
|
||||
if(!bpget(addr, type, 0, &found))
|
||||
if(!DbgIsDebugging())
|
||||
return false;
|
||||
char modname[256]="";
|
||||
char sql[deflen]="";
|
||||
if(!modnamefromaddr(addr, modname, true)) //no module
|
||||
sprintf(sql, "UPDATE breakpoints SET enabled=%d WHERE addr=%"fext"d AND mod IS NULL AND type=%d", enable, addr, type);
|
||||
else
|
||||
sprintf(sql, "UPDATE breakpoints SET enabled=%d WHERE addr=%"fext"d AND mod='%s' AND type=%d", enable, addr-modbasefromaddr(addr), modname, type);
|
||||
if(!sqlexec(userdb, sql))
|
||||
if(breakpoints.count(std::make_pair(addr, type)))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
breakpoints[std::make_pair(addr, type)].enabled=true;
|
||||
return true;
|
||||
}
|
||||
bpenumall(0); //update breakpoint list
|
||||
GuiUpdateBreakpointsView();
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bpsetname(uint addr, BP_TYPE type, const char* name)
|
||||
{
|
||||
if(!name)
|
||||
if(!DbgIsDebugging() or !name or !*name)
|
||||
return false;
|
||||
char modname[256]="";
|
||||
char sql[deflen]="";
|
||||
char bpname[MAX_BREAKPOINT_SIZE]="";
|
||||
sqlstringescape(name, bpname);
|
||||
if(!modnamefromaddr(addr, modname, true)) //no module
|
||||
sprintf(sql, "UPDATE breakpoints SET name='%s' WHERE addr=%"fext"d AND mod IS NULL AND type=%d", bpname, addr, type);
|
||||
else
|
||||
sprintf(sql, "UPDATE breakpoints SET name='%s' WHERE addr=%"fext"d AND mod='%s' AND type=%d", bpname, addr-modbasefromaddr(addr), modname, type);
|
||||
if(!sqlexec(userdb, sql))
|
||||
if(breakpoints.count(std::make_pair(addr, type)))
|
||||
{
|
||||
dprintf("SQL Error: %s\nSQL Query: %s\n", sqllasterror(), sql);
|
||||
return false;
|
||||
strcpy(breakpoints[std::make_pair(addr, type)].name, name);
|
||||
return true;
|
||||
}
|
||||
bpenumall(0); //update breakpoint list
|
||||
GuiUpdateBreakpointsView();
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bpenumall(BPENUMCALLBACK cbEnum, const char* module)
|
||||
{
|
||||
if(!DbgIsDebugging())
|
||||
return false;
|
||||
bool retval=true;
|
||||
if(!cbEnum)
|
||||
bpcount=0;
|
||||
char sql[deflen]="";
|
||||
if(!module)
|
||||
sprintf(sql, "SELECT addr,enabled,singleshoot,oldbytes,type,titantype,mod,name FROM breakpoints");
|
||||
else
|
||||
sprintf(sql, "SELECT addr,enabled,singleshoot,oldbytes,type,titantype,mod,name FROM breakpoints WHERE mod='%s'", module);
|
||||
sqlite3_stmt* stmt;
|
||||
lock(WAITID_USERDB);
|
||||
if(sqlite3_prepare_v2(userdb, sql, -1, &stmt, 0)!=SQLITE_OK)
|
||||
BREAKPOINT curBp;
|
||||
for(BreakpointsMap::iterator i=breakpoints.begin(); i!=breakpoints.end(); ++i)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
if(sqlite3_step(stmt)!=SQLITE_ROW)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
BREAKPOINT curbp;
|
||||
do
|
||||
{
|
||||
#ifdef _WIN64
|
||||
uint rva=sqlite3_column_int64(stmt, 0); //addr
|
||||
#else
|
||||
uint rva=sqlite3_column_int(stmt, 0); //addr
|
||||
#endif // _WIN64
|
||||
if(sqlite3_column_int(stmt, 1)) //enabled
|
||||
curbp.enabled=true;
|
||||
else
|
||||
curbp.enabled=false;
|
||||
if(sqlite3_column_int(stmt, 2)) //singleshoot
|
||||
curbp.singleshoot=true;
|
||||
else
|
||||
curbp.singleshoot=false;
|
||||
curbp.oldbytes=(short)(sqlite3_column_int(stmt, 3)&0xFFFF); //oldbytes
|
||||
curbp.type=(BP_TYPE)sqlite3_column_int(stmt, 4); //type
|
||||
curbp.titantype=sqlite3_column_int(stmt, 5); //titantype
|
||||
const char* modname=(const char*)sqlite3_column_text(stmt, 6); //mod
|
||||
if(modname)
|
||||
strcpy(curbp.mod, modname);
|
||||
else
|
||||
*curbp.mod=0;
|
||||
const char* bpname=(const char*)sqlite3_column_text(stmt, 7); //name
|
||||
if(bpname)
|
||||
strcpy(curbp.name, bpname);
|
||||
else
|
||||
*curbp.name=0;
|
||||
uint modbase=modbasefromname(modname);
|
||||
if(!modbase) //module not loaded
|
||||
*curbp.mod=0;
|
||||
curbp.addr=modbase+rva;
|
||||
if(cbEnum)
|
||||
curBp=i->second;
|
||||
curBp.addr+=curBp.modbase; //RVA to VA
|
||||
curBp.active=memisvalidreadptr(fdProcessInfo->hProcess, curBp.addr); //TODO: wtf am I doing?
|
||||
if(module and *module)
|
||||
{
|
||||
if(!cbEnum(&curbp))
|
||||
if(!strcmp(curBp.mod, module))
|
||||
{
|
||||
if(!cbEnum(&curBp))
|
||||
retval=false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!cbEnum(&curBp))
|
||||
retval=false;
|
||||
}
|
||||
else if(bpcount<1000)
|
||||
{
|
||||
memcpy(&bpall[bpcount], &curbp, sizeof(BREAKPOINT));
|
||||
bpcount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
while(sqlite3_step(stmt)==SQLITE_ROW);
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -286,9 +147,13 @@ bool bpenumall(BPENUMCALLBACK cbEnum)
|
|||
|
||||
int bpgetcount(BP_TYPE type)
|
||||
{
|
||||
char sql[deflen]="";
|
||||
sprintf(sql, "SELECT * FROM breakpoints WHERE type=%d", type);
|
||||
return sqlrowcount(userdb, sql);
|
||||
int count=0;
|
||||
for(BreakpointsMap::iterator i=breakpoints.begin(); i!=breakpoints.end(); ++i)
|
||||
{
|
||||
if(i->first.first==type)
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
void bptobridge(const BREAKPOINT* bp, BRIDGEBP* bridge)
|
||||
|
@ -315,4 +180,4 @@ void bptobridge(const BREAKPOINT* bp, BRIDGEBP* bridge)
|
|||
default:
|
||||
bridge->type=bp_none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ enum BP_TYPE
|
|||
//structs
|
||||
struct BREAKPOINT
|
||||
{
|
||||
uint modbase;
|
||||
uint addr;
|
||||
bool enabled;
|
||||
bool singleshoot;
|
||||
|
@ -28,10 +29,11 @@ struct BREAKPOINT
|
|||
|
||||
//typedefs
|
||||
typedef bool (*BPENUMCALLBACK)(const BREAKPOINT* bp);
|
||||
typedef std::map<uint addr, BREAKPOINT> BreakpointsMap;
|
||||
|
||||
typedef std::map<std::pair<uint, BP_TYPE>, BREAKPOINT> BreakpointsMap;
|
||||
|
||||
//functions
|
||||
int bpgetlist(BREAKPOINT** list);
|
||||
int bpgetlist(std::vector<BREAKPOINT>* list);
|
||||
bool bpnew(uint addr, bool enabled, bool singleshoot, short oldbytes, BP_TYPE type, DWORD titantype, const char* name);
|
||||
bool bpget(uint addr, BP_TYPE type, const char* name, BREAKPOINT* bp);
|
||||
bool bpdel(uint addr, BP_TYPE type);
|
||||
|
|
|
@ -46,7 +46,7 @@ static void cbUserBreakpoint();
|
|||
|
||||
void dbgdisablebpx()
|
||||
{
|
||||
BREAKPOINT* list;
|
||||
std::vector<BREAKPOINT> list;
|
||||
int bpcount=bpgetlist(&list);
|
||||
for(int i=0; i<bpcount; i++)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ void dbgdisablebpx()
|
|||
|
||||
void dbgenablebpx()
|
||||
{
|
||||
BREAKPOINT* list;
|
||||
std::vector<BREAKPOINT> list;
|
||||
int bpcount=bpgetlist(&list);
|
||||
for(int i=0; i<bpcount; i++)
|
||||
{
|
||||
|
@ -387,35 +387,36 @@ static BOOL CALLBACK SymRegisterCallbackProc64(HANDLE hProcess, ULONG ActionCode
|
|||
|
||||
static bool cbSetModuleBreakpoints(const BREAKPOINT* bp)
|
||||
{
|
||||
//TODO: more breakpoint types
|
||||
if(!bp->enabled)
|
||||
return true;
|
||||
switch(bp->type)
|
||||
{
|
||||
case BPNORMAL:
|
||||
if(bp->enabled)
|
||||
{
|
||||
if(!SetBPX(bp->addr, bp->titantype, (void*)cbUserBreakpoint))
|
||||
dprintf("could not set breakpoint "fhex"!\n", bp->addr);
|
||||
}
|
||||
break;
|
||||
{
|
||||
if(!SetBPX(bp->addr, bp->titantype, (void*)cbUserBreakpoint))
|
||||
dprintf("could not set breakpoint "fhex"!\n", bp->addr);
|
||||
}
|
||||
break;
|
||||
|
||||
case BPMEMORY:
|
||||
if(bp->enabled)
|
||||
{
|
||||
uint size=0;
|
||||
memfindbaseaddr(fdProcessInfo->hProcess, bp->addr, &size);
|
||||
bool restore=false;
|
||||
if(!bp->singleshoot)
|
||||
restore=true;
|
||||
if(!SetMemoryBPXEx(bp->addr, size, bp->titantype, restore, (void*)cbMemoryBreakpoint))
|
||||
dprintf("could not set memory breakpoint "fhex"!\n", bp->addr);
|
||||
}
|
||||
break;
|
||||
{
|
||||
uint size=0;
|
||||
memfindbaseaddr(fdProcessInfo->hProcess, bp->addr, &size);
|
||||
bool restore=false;
|
||||
if(!bp->singleshoot)
|
||||
restore=true;
|
||||
if(!SetMemoryBPXEx(bp->addr, size, bp->titantype, restore, (void*)cbMemoryBreakpoint))
|
||||
dprintf("could not set memory breakpoint "fhex"!\n", bp->addr);
|
||||
}
|
||||
break;
|
||||
|
||||
case BPHARDWARE:
|
||||
if(bp->enabled)
|
||||
{
|
||||
if(!SetHardwareBreakPoint(bp->addr, (bp->titantype>>8)&0xF, (bp->titantype>>4)&0xF, bp->titantype&0xF, (void*)cbHardwareBreakpoint))
|
||||
dprintf("could not set hardware breakpoint "fhex"!\n", bp->addr);
|
||||
}
|
||||
break;
|
||||
{
|
||||
if(!SetHardwareBreakPoint(bp->addr, (bp->titantype>>8)&0xF, (bp->titantype>>4)&0xF, bp->titantype&0xF, (void*)cbHardwareBreakpoint))
|
||||
dprintf("could not set hardware breakpoint "fhex"!\n", bp->addr);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -528,10 +529,11 @@ static void cbCreateProcess(CREATE_PROCESS_DEBUG_INFO* CreateProcessInfo)
|
|||
modInfo.SizeOfStruct=sizeof(modInfo);
|
||||
if(SymGetModuleInfo64(fdProcessInfo->hProcess, (DWORD64)base, &modInfo))
|
||||
modload((uint)base, modInfo.ImageSize, modInfo.ImageName);
|
||||
bpenumall(0); //update breakpoint list
|
||||
//bpenumall(0); //update breakpoint list
|
||||
char modname[256]="";
|
||||
if(modnamefromaddr((uint)base, modname, true))
|
||||
bpenumall(cbSetModuleBreakpoints, modname);
|
||||
GuiUpdateBreakpointsView();
|
||||
if(!bFileIsDll and !bIsAttached) //Set entry breakpoint
|
||||
{
|
||||
pDebuggedBase=(uint)CreateProcessInfo->lpBaseOfImage; //debugged base = executable
|
||||
|
@ -692,10 +694,11 @@ static void cbLoadDll(LOAD_DLL_DEBUG_INFO* LoadDll)
|
|||
modInfo.SizeOfStruct=sizeof(IMAGEHLP_MODULE64);
|
||||
if(SymGetModuleInfo64(fdProcessInfo->hProcess, (DWORD64)base, &modInfo))
|
||||
modload((uint)base, modInfo.ImageSize, modInfo.ImageName);
|
||||
bpenumall(0); //update breakpoint list
|
||||
//bpenumall(0); //update breakpoint list
|
||||
char modname[256]="";
|
||||
if(modnamefromaddr((uint)base, modname, true))
|
||||
bpenumall(cbSetModuleBreakpoints, modname);
|
||||
GuiUpdateBreakpointsView();
|
||||
bool bAlreadySetEntry=false;
|
||||
if(bFileIsDll and !_stricmp(DLLDebugFileName, szFileName) and !bIsAttached) //Set entry breakpoint
|
||||
{
|
||||
|
@ -756,6 +759,7 @@ static void cbUnloadDll(UNLOAD_DLL_DEBUG_INFO* UnloadDll)
|
|||
char modname[256]="???";
|
||||
if(modnamefromaddr((uint)base, modname, true))
|
||||
bpenumall(cbRemoveModuleBreakpoints, modname);
|
||||
GuiUpdateBreakpointsView();
|
||||
SymUnloadModule64(fdProcessInfo->hProcess, (DWORD64)base);
|
||||
dprintf("DLL Unloaded: "fhex" %s\n", base, modname);
|
||||
|
||||
|
|
|
@ -1,183 +0,0 @@
|
|||
#include "sqlhelper.h"
|
||||
#include "console.h"
|
||||
#include "threading.h"
|
||||
|
||||
static char lasterror[deflen]="";
|
||||
|
||||
const char* sqllasterror()
|
||||
{
|
||||
return lasterror;
|
||||
}
|
||||
|
||||
bool sqlexec(sqlite3* db, const char* query)
|
||||
{
|
||||
lock(WAITID_USERDB);
|
||||
char* errorText=0;
|
||||
if(sqlite3_exec(db, query, 0, 0, &errorText)!=SQLITE_OK) //error
|
||||
{
|
||||
if(errorText)
|
||||
strcpy(lasterror, errorText);
|
||||
sqlite3_free(errorText);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
*lasterror=0;
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool sqlhasresult(sqlite3* db, const char* query)
|
||||
{
|
||||
lock(WAITID_USERDB);
|
||||
sqlite3_stmt* stmt;
|
||||
if(sqlite3_prepare_v2(db, query, -1, &stmt, 0)!=SQLITE_OK)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
if(sqlite3_step(stmt)!=SQLITE_ROW)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool sqlgettext(sqlite3* db, const char* query, char* result)
|
||||
{
|
||||
if(!result)
|
||||
return false;
|
||||
lock(WAITID_USERDB);
|
||||
sqlite3_stmt* stmt;
|
||||
if(sqlite3_prepare_v2(db, query, -1, &stmt, 0)!=SQLITE_OK)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
if(sqlite3_step(stmt)!=SQLITE_ROW)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
strcpy(result, (const char*)sqlite3_column_text(stmt, 0));
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool sqlgetint(sqlite3* db, const char* query, int* result)
|
||||
{
|
||||
if(!result)
|
||||
return false;
|
||||
lock(WAITID_USERDB);
|
||||
sqlite3_stmt* stmt;
|
||||
if(sqlite3_prepare_v2(db, query, -1, &stmt, 0)!=SQLITE_OK)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
if(sqlite3_step(stmt)!=SQLITE_ROW)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
*result=sqlite3_column_int(stmt, 0);
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool sqlgetuint(sqlite3* db, const char* query, uint* result)
|
||||
{
|
||||
if(!result)
|
||||
return false;
|
||||
lock(WAITID_USERDB);
|
||||
sqlite3_stmt* stmt;
|
||||
if(sqlite3_prepare_v2(db, query, -1, &stmt, 0)!=SQLITE_OK)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
if(sqlite3_step(stmt)!=SQLITE_ROW)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
#ifdef _WIN64
|
||||
*result=sqlite3_column_int64(stmt, 0);
|
||||
#else
|
||||
*result=sqlite3_column_int(stmt, 0);
|
||||
#endif // _WIN64
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return true;
|
||||
}
|
||||
|
||||
void sqlstringescape(const char* string, char* escaped_string)
|
||||
{
|
||||
if(!string or !escaped_string)
|
||||
return;
|
||||
int len=strlen(string);
|
||||
*escaped_string=0;
|
||||
for(int i=0,j=0; i<len; i++)
|
||||
{
|
||||
if(string[i]=='\"' or string[i]=='\'')
|
||||
j+=sprintf(escaped_string+j, "''");
|
||||
else
|
||||
j+=sprintf(escaped_string+j, "%c", string[i]);
|
||||
}
|
||||
}
|
||||
|
||||
bool sqlloadsavedb(sqlite3* memory, const char* file, bool save)
|
||||
{
|
||||
lock(WAITID_USERDB);
|
||||
//CREDIT: http://www.sqlite.org/backup.html
|
||||
int rc;
|
||||
sqlite3* pFile;
|
||||
sqlite3_backup* pBackup;
|
||||
sqlite3* pTo;
|
||||
sqlite3* pFrom;
|
||||
rc=sqlite3_open(file, &pFile);
|
||||
if(rc==SQLITE_OK)
|
||||
{
|
||||
pFrom=(save?memory:pFile);
|
||||
pTo=(save?pFile:memory);
|
||||
pBackup=sqlite3_backup_init(pTo, "main", pFrom, "main");
|
||||
if(pBackup)
|
||||
{
|
||||
sqlite3_backup_step(pBackup, -1);
|
||||
sqlite3_backup_finish(pBackup);
|
||||
}
|
||||
rc=sqlite3_errcode(pTo);
|
||||
}
|
||||
sqlite3_close(pFile);
|
||||
unlock(WAITID_USERDB);
|
||||
return (rc==SQLITE_OK);
|
||||
}
|
||||
|
||||
int sqlrowcount(sqlite3* db, const char* query)
|
||||
{
|
||||
lock(WAITID_USERDB);
|
||||
int rowcount=0;
|
||||
sqlite3_stmt* stmt;
|
||||
if(sqlite3_prepare_v2(db, query, -1, &stmt, 0)!=SQLITE_OK)
|
||||
{
|
||||
sqlite3_finalize(stmt);
|
||||
unlock(WAITID_USERDB);
|
||||
return false;
|
||||
}
|
||||
while(sqlite3_step(stmt)==SQLITE_ROW)
|
||||
rowcount++;
|
||||
unlock(WAITID_USERDB);
|
||||
return rowcount;
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
#ifndef _SQLHELPER_H
|
||||
|
||||
#include "_global.h"
|
||||
|
||||
const char* sqllasterror();
|
||||
bool sqlexec(sqlite3* db, const char* query);
|
||||
bool sqlhasresult(sqlite3* db, const char* query);
|
||||
bool sqlgettext(sqlite3* db, const char* query, char* result);
|
||||
bool sqlgetuint(sqlite3* db, const char* query, uint* result);
|
||||
bool sqlgetint(sqlite3* db, const char* query, int* result);
|
||||
void sqlstringescape(const char* string, char* escaped_string);
|
||||
bool sqlloadsavedb(sqlite3* memory, const char* file, bool save);
|
||||
int sqlrowcount(sqlite3* db, const char* query);
|
||||
|
||||
#endif // _SQLHELPER_H
|
Binary file not shown.
Binary file not shown.
|
@ -1,207 +0,0 @@
|
|||
LIBRARY "sqlite.dll"
|
||||
EXPORTS
|
||||
sqlite3_aggregate_context
|
||||
sqlite3_aggregate_count
|
||||
sqlite3_auto_extension
|
||||
sqlite3_backup_finish
|
||||
sqlite3_backup_init
|
||||
sqlite3_backup_pagecount
|
||||
sqlite3_backup_remaining
|
||||
sqlite3_backup_step
|
||||
sqlite3_bind_blob
|
||||
sqlite3_bind_double
|
||||
sqlite3_bind_int
|
||||
sqlite3_bind_int64
|
||||
sqlite3_bind_null
|
||||
sqlite3_bind_parameter_count
|
||||
sqlite3_bind_parameter_index
|
||||
sqlite3_bind_parameter_name
|
||||
sqlite3_bind_text
|
||||
sqlite3_bind_text16
|
||||
sqlite3_bind_value
|
||||
sqlite3_bind_zeroblob
|
||||
sqlite3_blob_bytes
|
||||
sqlite3_blob_close
|
||||
sqlite3_blob_open
|
||||
sqlite3_blob_read
|
||||
sqlite3_blob_reopen
|
||||
sqlite3_blob_write
|
||||
sqlite3_busy_handler
|
||||
sqlite3_busy_timeout
|
||||
sqlite3_cancel_auto_extension
|
||||
sqlite3_changes
|
||||
sqlite3_clear_bindings
|
||||
sqlite3_close
|
||||
sqlite3_close_v2
|
||||
sqlite3_collation_needed
|
||||
sqlite3_collation_needed16
|
||||
sqlite3_column_blob
|
||||
sqlite3_column_bytes
|
||||
sqlite3_column_bytes16
|
||||
sqlite3_column_count
|
||||
sqlite3_column_decltype
|
||||
sqlite3_column_decltype16
|
||||
sqlite3_column_double
|
||||
sqlite3_column_int
|
||||
sqlite3_column_int64
|
||||
sqlite3_column_name
|
||||
sqlite3_column_name16
|
||||
sqlite3_column_text
|
||||
sqlite3_column_text16
|
||||
sqlite3_column_type
|
||||
sqlite3_column_value
|
||||
sqlite3_commit_hook
|
||||
sqlite3_compileoption_get
|
||||
sqlite3_compileoption_used
|
||||
sqlite3_complete
|
||||
sqlite3_complete16
|
||||
sqlite3_config
|
||||
sqlite3_context_db_handle
|
||||
sqlite3_create_collation
|
||||
sqlite3_create_collation16
|
||||
sqlite3_create_collation_v2
|
||||
sqlite3_create_function
|
||||
sqlite3_create_function16
|
||||
sqlite3_create_function_v2
|
||||
sqlite3_create_module
|
||||
sqlite3_create_module_v2
|
||||
sqlite3_data_count
|
||||
sqlite3_data_directory DATA
|
||||
sqlite3_db_config
|
||||
sqlite3_db_filename
|
||||
sqlite3_db_handle
|
||||
sqlite3_db_mutex
|
||||
sqlite3_db_readonly
|
||||
sqlite3_db_release_memory
|
||||
sqlite3_db_status
|
||||
sqlite3_declare_vtab
|
||||
sqlite3_enable_load_extension
|
||||
sqlite3_enable_shared_cache
|
||||
sqlite3_errcode
|
||||
sqlite3_errmsg
|
||||
sqlite3_errmsg16
|
||||
sqlite3_errstr
|
||||
sqlite3_exec
|
||||
sqlite3_expired
|
||||
sqlite3_extended_errcode
|
||||
sqlite3_extended_result_codes
|
||||
sqlite3_file_control
|
||||
sqlite3_finalize
|
||||
sqlite3_free
|
||||
sqlite3_free_table
|
||||
sqlite3_get_autocommit
|
||||
sqlite3_get_auxdata
|
||||
sqlite3_get_table
|
||||
sqlite3_global_recover
|
||||
sqlite3_initialize
|
||||
sqlite3_interrupt
|
||||
sqlite3_last_insert_rowid
|
||||
sqlite3_libversion
|
||||
sqlite3_libversion_number
|
||||
sqlite3_limit
|
||||
sqlite3_load_extension
|
||||
sqlite3_log
|
||||
sqlite3_malloc
|
||||
sqlite3_memory_alarm
|
||||
sqlite3_memory_highwater
|
||||
sqlite3_memory_used
|
||||
sqlite3_mprintf
|
||||
sqlite3_mutex_alloc
|
||||
sqlite3_mutex_enter
|
||||
sqlite3_mutex_free
|
||||
sqlite3_mutex_leave
|
||||
sqlite3_mutex_try
|
||||
sqlite3_next_stmt
|
||||
sqlite3_open
|
||||
sqlite3_open16
|
||||
sqlite3_open_v2
|
||||
sqlite3_os_end
|
||||
sqlite3_os_init
|
||||
sqlite3_overload_function
|
||||
sqlite3_prepare
|
||||
sqlite3_prepare16
|
||||
sqlite3_prepare16_v2
|
||||
sqlite3_prepare_v2
|
||||
sqlite3_profile
|
||||
sqlite3_progress_handler
|
||||
sqlite3_randomness
|
||||
sqlite3_realloc
|
||||
sqlite3_release_memory
|
||||
sqlite3_reset
|
||||
sqlite3_reset_auto_extension
|
||||
sqlite3_result_blob
|
||||
sqlite3_result_double
|
||||
sqlite3_result_error
|
||||
sqlite3_result_error16
|
||||
sqlite3_result_error_code
|
||||
sqlite3_result_error_nomem
|
||||
sqlite3_result_error_toobig
|
||||
sqlite3_result_int
|
||||
sqlite3_result_int64
|
||||
sqlite3_result_null
|
||||
sqlite3_result_text
|
||||
sqlite3_result_text16
|
||||
sqlite3_result_text16be
|
||||
sqlite3_result_text16le
|
||||
sqlite3_result_value
|
||||
sqlite3_result_zeroblob
|
||||
sqlite3_rollback_hook
|
||||
sqlite3_set_authorizer
|
||||
sqlite3_set_auxdata
|
||||
sqlite3_shutdown
|
||||
sqlite3_sleep
|
||||
sqlite3_snprintf
|
||||
sqlite3_soft_heap_limit
|
||||
sqlite3_soft_heap_limit64
|
||||
sqlite3_sourceid
|
||||
sqlite3_sql
|
||||
sqlite3_status
|
||||
sqlite3_step
|
||||
sqlite3_stmt_busy
|
||||
sqlite3_stmt_readonly
|
||||
sqlite3_stmt_status
|
||||
sqlite3_strglob
|
||||
sqlite3_stricmp
|
||||
sqlite3_strnicmp
|
||||
sqlite3_temp_directory DATA
|
||||
sqlite3_test_control
|
||||
sqlite3_thread_cleanup
|
||||
sqlite3_threadsafe
|
||||
sqlite3_total_changes
|
||||
sqlite3_trace
|
||||
sqlite3_transfer_bindings
|
||||
sqlite3_update_hook
|
||||
sqlite3_uri_boolean
|
||||
sqlite3_uri_int64
|
||||
sqlite3_uri_parameter
|
||||
sqlite3_user_data
|
||||
sqlite3_value_blob
|
||||
sqlite3_value_bytes
|
||||
sqlite3_value_bytes16
|
||||
sqlite3_value_double
|
||||
sqlite3_value_int
|
||||
sqlite3_value_int64
|
||||
sqlite3_value_numeric_type
|
||||
sqlite3_value_text
|
||||
sqlite3_value_text16
|
||||
sqlite3_value_text16be
|
||||
sqlite3_value_text16le
|
||||
sqlite3_value_type
|
||||
sqlite3_version DATA
|
||||
sqlite3_vfs_find
|
||||
sqlite3_vfs_register
|
||||
sqlite3_vfs_unregister
|
||||
sqlite3_vmprintf
|
||||
sqlite3_vsnprintf
|
||||
sqlite3_vtab_config
|
||||
sqlite3_vtab_on_conflict
|
||||
sqlite3_wal_autocheckpoint
|
||||
sqlite3_wal_checkpoint
|
||||
sqlite3_wal_checkpoint_v2
|
||||
sqlite3_wal_hook
|
||||
sqlite3_win32_mbcs_to_utf8
|
||||
sqlite3_win32_set_directory
|
||||
sqlite3_win32_sleep
|
||||
sqlite3_win32_utf8_to_mbcs
|
||||
sqlite3_win32_write_debug
|
||||
winSysInfo DATA
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
@ -28,7 +28,6 @@
|
|||
<ClCompile Include="plugin_loader.cpp" />
|
||||
<ClCompile Include="reference.cpp" />
|
||||
<ClCompile Include="simplescript.cpp" />
|
||||
<ClCompile Include="sqlhelper.cpp" />
|
||||
<ClCompile Include="stackinfo.cpp" />
|
||||
<ClCompile Include="symbolinfo.cpp" />
|
||||
<ClCompile Include="thread.cpp" />
|
||||
|
@ -66,8 +65,6 @@
|
|||
<ClInclude Include="plugin_loader.h" />
|
||||
<ClInclude Include="reference.h" />
|
||||
<ClInclude Include="simplescript.h" />
|
||||
<ClInclude Include="sqlhelper.h" />
|
||||
<ClInclude Include="sqlite\sqlite3.h" />
|
||||
<ClInclude Include="stackinfo.h" />
|
||||
<ClInclude Include="symbolinfo.h" />
|
||||
<ClInclude Include="thread.h" />
|
||||
|
@ -130,7 +127,7 @@
|
|||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>DeviceNameResolver\DeviceNameResolver_x86.lib;XEDParse\XEDParse_x86.lib;$(SolutionDir)bin\x32\x32_bridge.lib;dbghelp\dbghelp_x86.lib;TitanEngine\TitanEngine_x86.lib;sqlite\sqlite32.lib;BeaEngine\BeaEngine.lib;psapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>DeviceNameResolver\DeviceNameResolver_x86.lib;XEDParse\XEDParse_x86.lib;$(SolutionDir)bin\x32\x32_bridge.lib;dbghelp\dbghelp_x86.lib;TitanEngine\TitanEngine_x86.lib;BeaEngine\BeaEngine.lib;psapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -145,7 +142,7 @@
|
|||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>DeviceNameResolver\DeviceNameResolver_x64.lib;XEDParse\XEDParse_x64.lib;$(SolutionDir)bin\x64\x64_bridge.lib;dbghelp\dbghelp_x64.lib;TitanEngine\TitanEngine_x64.lib;sqlite\sqlite64.lib;BeaEngine\BeaEngine_64.lib;psapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>DeviceNameResolver\DeviceNameResolver_x64.lib;XEDParse\XEDParse_x64.lib;$(SolutionDir)bin\x64\x64_bridge.lib;dbghelp\dbghelp_x64.lib;TitanEngine\TitanEngine_x64.lib;BeaEngine\BeaEngine_64.lib;psapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
<Filter Include="Header Files\dbghelp">
|
||||
<UniqueIdentifier>{5623fb24-3b6d-49a6-a0d3-1cfcc46f87bd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\sqlite">
|
||||
<UniqueIdentifier>{fa9d17d3-a464-4693-b1d8-0d0c10a88bd1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\dbg">
|
||||
<UniqueIdentifier>{c7d6554c-6b4c-42b2-8d0a-7968cdfdba63}</UniqueIdentifier>
|
||||
</Filter>
|
||||
|
@ -90,9 +87,6 @@
|
|||
<ClCompile Include="x64_dbg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sqlhelper.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="plugin_loader.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -179,9 +173,6 @@
|
|||
<ClInclude Include="x64_dbg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sqlhelper.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="plugin_loader.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -239,9 +230,6 @@
|
|||
<ClInclude Include="TitanEngine\TitanEngine.h">
|
||||
<Filter>Header Files\TitanEngine</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sqlite\sqlite3.h">
|
||||
<Filter>Header Files\sqlite</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DeviceNameResolver\DeviceNameResolver.h">
|
||||
<Filter>Header Files\DeviceNameResolver</Filter>
|
||||
</ClInclude>
|
||||
|
|
Loading…
Reference in New Issue