DBG: enum functions for database
This commit is contained in:
parent
dbbff39ef0
commit
c168bc7336
|
@ -393,6 +393,24 @@ void commentcacheload(JSON root)
|
|||
}
|
||||
}
|
||||
|
||||
bool commentenum(COMMENTSINFO* commentlist, size_t* cbsize)
|
||||
{
|
||||
if(!commentlist && !cbsize)
|
||||
return false;
|
||||
if(!commentlist && cbsize)
|
||||
{
|
||||
*cbsize=comments.size()*sizeof(COMMENTSINFO);
|
||||
return true;
|
||||
}
|
||||
int j=0;
|
||||
for(CommentsInfo::iterator i=comments.begin(); i!=comments.end(); ++i,j++)
|
||||
{
|
||||
commentlist[j]=i->second;
|
||||
commentlist[j].addr+=modbasefromname(commentlist[j].mod);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
///label functions
|
||||
bool labelset(uint addr, const char* text, bool manual)
|
||||
{
|
||||
|
@ -550,6 +568,24 @@ void labelcacheload(JSON root)
|
|||
}
|
||||
}
|
||||
|
||||
bool labelenum(LABELSINFO* labellist, size_t* cbsize)
|
||||
{
|
||||
if(!labellist && !cbsize)
|
||||
return false;
|
||||
if(!labellist && cbsize)
|
||||
{
|
||||
*cbsize=labels.size()*sizeof(LABELSINFO);
|
||||
return true;
|
||||
}
|
||||
int j=0;
|
||||
for(LabelsInfo::iterator i=labels.begin(); i!=labels.end(); ++i,j++)
|
||||
{
|
||||
labellist[j]=i->second;
|
||||
labellist[j].addr+=modbasefromname(labellist[j].mod);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
///bookmark functions
|
||||
bool bookmarkset(uint addr, bool manual)
|
||||
{
|
||||
|
@ -669,6 +705,24 @@ void bookmarkcacheload(JSON root)
|
|||
}
|
||||
}
|
||||
|
||||
bool bookmarkenum(BOOKMARKSINFO* bookmarklist, size_t* cbsize)
|
||||
{
|
||||
if(!bookmarklist && !cbsize)
|
||||
return false;
|
||||
if(!bookmarklist && cbsize)
|
||||
{
|
||||
*cbsize=bookmarks.size()*sizeof(BOOKMARKSINFO);
|
||||
return true;
|
||||
}
|
||||
int j=0;
|
||||
for(BookmarksInfo::iterator i=bookmarks.begin(); i!=bookmarks.end(); ++i,j++)
|
||||
{
|
||||
bookmarklist[j]=i->second;
|
||||
bookmarklist[j].addr+=modbasefromname(bookmarklist[j].mod);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
///function database
|
||||
bool functionadd(uint start, uint end, bool manual)
|
||||
{
|
||||
|
@ -815,6 +869,26 @@ void functioncacheload(JSON root)
|
|||
}
|
||||
}
|
||||
|
||||
bool functionenum(FUNCTIONSINFO* functionlist, size_t* cbsize)
|
||||
{
|
||||
if(!functionlist && !cbsize)
|
||||
return false;
|
||||
if(!functionlist && cbsize)
|
||||
{
|
||||
*cbsize=functions.size()*sizeof(FUNCTIONSINFO);
|
||||
return true;
|
||||
}
|
||||
int j=0;
|
||||
for(FunctionsInfo::iterator i=functions.begin(); i!=functions.end(); ++i,j++)
|
||||
{
|
||||
functionlist[j]=i->second;
|
||||
uint modbase=modbasefromname(functionlist[j].mod);
|
||||
functionlist[j].start+=modbase;
|
||||
functionlist[j].end+=modbase;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//loop database
|
||||
bool loopadd(uint start, uint end, bool manual)
|
||||
{
|
||||
|
@ -972,3 +1046,23 @@ void loopcacheload(JSON root)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool loopenum(LOOPSINFO* looplist, size_t* cbsize)
|
||||
{
|
||||
if(!looplist && !cbsize)
|
||||
return false;
|
||||
if(!looplist && cbsize)
|
||||
{
|
||||
*cbsize=loops.size()*sizeof(LOOPSINFO);
|
||||
return true;
|
||||
}
|
||||
int j=0;
|
||||
for(LoopsInfo::iterator i=loops.begin(); i!=loops.end(); ++i,j++)
|
||||
{
|
||||
looplist[j]=i->second;
|
||||
uint modbase=modbasefromname(looplist[j].mod);
|
||||
looplist[j].start+=modbase;
|
||||
looplist[j].end+=modbase;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -133,6 +133,7 @@ bool commentdel(uint addr);
|
|||
void commentdelrange(uint start, uint end);
|
||||
void commentcachesave(JSON root);
|
||||
void commentcacheload(JSON root);
|
||||
bool commentenum(COMMENTSINFO* commentlist, size_t* cbsize);
|
||||
|
||||
bool labelset(uint addr, const char* text, bool manual);
|
||||
bool labelfromstring(const char* text, uint* addr);
|
||||
|
@ -141,6 +142,7 @@ bool labeldel(uint addr);
|
|||
void labeldelrange(uint start, uint end);
|
||||
void labelcachesave(JSON root);
|
||||
void labelcacheload(JSON root);
|
||||
bool labelenum(LABELSINFO* labellist, size_t* cbsize);
|
||||
|
||||
bool bookmarkset(uint addr, bool manual);
|
||||
bool bookmarkget(uint addr);
|
||||
|
@ -148,6 +150,7 @@ bool bookmarkdel(uint addr);
|
|||
void bookmarkdelrange(uint start, uint end);
|
||||
void bookmarkcachesave(JSON root);
|
||||
void bookmarkcacheload(JSON root);
|
||||
bool bookmarkenum(BOOKMARKSINFO* bookmarklist, size_t* cbsize);
|
||||
|
||||
bool functionadd(uint start, uint end, bool manual);
|
||||
bool functionget(uint addr, uint* start, uint* end);
|
||||
|
@ -156,6 +159,7 @@ bool functiondel(uint addr);
|
|||
void functiondelrange(uint start, uint end);
|
||||
void functioncachesave(JSON root);
|
||||
void functioncacheload(JSON root);
|
||||
bool functionenum(FUNCTIONSINFO* functionlist, size_t* cbsize);
|
||||
|
||||
bool loopadd(uint start, uint end, bool manual);
|
||||
bool loopget(int depth, uint addr, uint* start, uint* end);
|
||||
|
@ -163,5 +167,6 @@ bool loopoverlaps(int depth, uint start, uint end, int* finaldepth);
|
|||
bool loopdel(int depth, uint addr);
|
||||
void loopcachesave(JSON root);
|
||||
void loopcacheload(JSON root);
|
||||
bool loopenum(LOOPSINFO* looplist, size_t* cbsize);
|
||||
|
||||
#endif // _ADDRINFO_H
|
||||
|
|
Loading…
Reference in New Issue