You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I encountered a problem that demangling vc symbolic:
"?setParamWithDefaultArgs@HelloWorld@@SAPEAV1@PEBD@Z" =>
“public: static class HelloWorld * __ptr64 __cdecl HelloWorld::setParamWithDefaultArgs(char const * __ptr64)”
but it return me : "public: static class HelloWorld * __ptr64 __cdecl HelloWorld::setParamWithDefaultArgs()"
missed parameters.
I find that, in VC9Demangler class void parseFunctionProperty(MemberRef mr) missed to parseParams() to paramTypes;
So I modified private List parseParams() ->
private List parseParams() throws DemanglingException {
List<TypeRef> paramTypes = new ArrayList<TypeRef>();
if (!consumeCharIf('X')) {
char c;
// add 3 line here
if (peekChar() == '@') {
consumeChar();
}
while ((c = peekChar() ) != '@' && c != 0 && (c != 'Z' || peekChar(2) == 'Z')) {
TypeRef tr = parseType(false);
if (tr == null) {
continue;
}
paramTypes.add(tr);
}
if (c == 'Z') {
consumeChar();
}
//break;
if (c == '@') {
consumeChar();
}
}
return paramTypes;
}
and build it again.
seems resolved this problem.
I think this is not a best solution, I tried another case "?setParamWithDefaultArgs@HelloWorld@@SAPEAVLink@@PeBd@Z" can be parsed correctly.
I think the error should happened in returnType parser.
I found this problem with test a C++ singleton:
class DllExport HelloWorld
{
public:
HelloWorld(void);
static HelloWorld *getInstance(const char *pszFlowPath = "default param");
~HelloWorld(void);
};
Compiled with VS2010; Exception : java.lang.UnsatisfiedLinkError throws in JVM runtime
Then, I tried this case compile by GCC, works fine.
Activity
MarvelFisher commentedon May 27, 2015
I found this problem with test a C++ singleton:
class DllExport HelloWorld
{
public:
HelloWorld(void);
static HelloWorld *getInstance(const char *pszFlowPath = "default param");
~HelloWorld(void);
};
Compiled with VS2010; Exception : java.lang.UnsatisfiedLinkError throws in JVM runtime
Then, I tried this case compile by GCC, works fine.
koujun2012 commentedon Aug 19, 2019
I encounter this issue too.