Skip to content
This repository was archived by the owner on Aug 26, 2020. It is now read-only.

Commit 4de502f

Browse files
authored
update
1 parent aec4d4b commit 4de502f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

pluginmain.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ void cbPlugin(CBTYPE cbType, LPVOID generic_param)
4848
std::string output;
4949
std::qsort(info.references, info.refcount, sizeof(info.references[0]), &compareFunc);
5050
int t = -1;
51-
for(int i = 0; i < info.refcount; i++)
51+
int i;
52+
for(i = 0; i < info.refcount && i < 10; i++)
5253
{
5354
if(t != info.references[i].type)
5455
{
@@ -71,11 +72,20 @@ void cbPlugin(CBTYPE cbType, LPVOID generic_param)
7172
ADDRINFO label;
7273
label.flags = flaglabel;
7374
_dbg_addrinfoget(info.references[i].addr, SEG_DEFAULT, &label);
74-
output += label.label;
75+
if(label.label[0] != '\0')
76+
output += label.label;
77+
else{
78+
char temp[18];
79+
sprintf_s(temp, "%p", info.references[i].addr);
80+
output += temp;
81+
}
7582
if(i != info.refcount - 1)
7683
output += ",";
7784
}
85+
if(info.refcount > 10)
86+
output += " ...";
7887
GuiAddInfoLine(output.c_str());
88+
BridgeFree(info.references);
7989
}
8090
}
8191
}

0 commit comments

Comments
 (0)