DBG: automatic comments will have a '\1' character as prefix.
This commit is contained in:
parent
bc4149b866
commit
842469eff4
|
@ -163,7 +163,7 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDR
|
|||
len--;
|
||||
if(len)
|
||||
len++;
|
||||
sprintf(addrinfo->comment, "%s:%u", filename + len, line.LineNumber);
|
||||
sprintf_s(addrinfo->comment, "\1%s:%u", filename + len, line.LineNumber);
|
||||
retval = true;
|
||||
}
|
||||
else if(!bOnlyCipAutoComments || addr == GetContextDataEx(hActiveThread, UE_CIP)) //no line number
|
||||
|
@ -273,8 +273,10 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDR
|
|||
retval = true;
|
||||
}
|
||||
}
|
||||
comment.resize(MAX_COMMENT_SIZE - 1);
|
||||
strcpy_s(addrinfo->comment, comment.c_str());
|
||||
comment.resize(MAX_COMMENT_SIZE - 2);
|
||||
String fullComment = "\1";
|
||||
fullComment += comment;
|
||||
strcpy_s(addrinfo->comment, fullComment.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -380,7 +380,7 @@ bool apienumexports(uint base, EXPORTENUMCALLBACK cbEnum)
|
|||
///comment functions
|
||||
bool commentset(uint addr, const char* text, bool manual)
|
||||
{
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr) or !text or strlen(text) >= MAX_COMMENT_SIZE - 1)
|
||||
if(!DbgIsDebugging() or !memisvalidreadptr(fdProcessInfo->hProcess, addr) or !text or text[0] == '\1' or strlen(text) >= MAX_COMMENT_SIZE - 1)
|
||||
return false;
|
||||
if(!*text) //NOTE: delete when there is no text
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue