|
|
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » [BUG?] MIValue (Why "String &MIValue::Get(void)" is called ? it should not.)
[BUG?] MIValue [message #44532] |
Tue, 24 March 2015 17:54 |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
Hi,
i have added same RLOGs :
Gdb_MI2.cpp,lines 1764 and 1773:
RLOG(">>>============================================");
MICmd("gdb-set disassembly-flavor intel");
MICmd("gdb-set exec-done-display off");
MICmd("gdb-set annotate 1");
MICmd("gdb-set height 0");
MICmd("gdb-set width 0");
MICmd("gdb-set confirm off");
MICmd("gdb-set print asm-demangle");
RLOG("<<<============================================");
MIValue.cpp, line 457: RLOG(string);
MIValue.cpp, line 536: RLOG("String &MIValue::Get(void)");
output :
>>>============================================
String &MIValue::Get(void)
String &MIValue::Get(void)
error:Not a String value type
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
error:Not a String value type
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
error:Not a String value type
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
error:Not a String value type
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
error:Not a String value type
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
error:Not a String value type
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
String &MIValue::Get(void)
error:Not a String value type
String &MIValue::Get(void)
String &MIValue::Get(void)
<<<============================================
Question :
Why "String &MIValue::Get(void)" is called ?
regards
omari.
|
|
|
Re: [BUG?] MIValue [message #44534 is a reply to message #44532] |
Tue, 24 March 2015 18:56 |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
this patch resolve this issu:
file Gdb_MI2Gdb.cpp
1 - MIValue Gdb_MI2::ParseGdb(String const &output, bool wait)
replace :
return res;
by
return pick(res);
2 - MIValue Gdb_MI2::ReadGdb(bool wait)
replace
return ParseGdb(output);
by
return pick(ParseGdb(output));
3 - MIValue Gdb_MI2::MICmd(const char *cmdLine)
replace
res = ReadGdb();
by
res = pick(ReadGdb());
and
return res;
by
return pick(res);
with this patch, the output of RLOG is:
>>>============================================
<<<============================================
then "String &MIValue::Get(void)" is not called.
but still an issue:
MIValue v = MICmd("file-list-exec-source-files"); with that , v equal to "error:Not a String value type"
MIValue& v = MICmd("file-list-exec-source-files"); using reference, v get the good value.
regards
omari.
[Updated on: Tue, 24 March 2015 19:03] Report message to a moderator
|
|
|
Re: [BUG?] MIValue [message #44539 is a reply to message #44534] |
Wed, 25 March 2015 10:52 |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
Hi,
Here is a simple test case, which highlighted the problem (attachment)
MIValue GetTuple()
{
MIValue r;
r.Add("a", "b");
return r;
}
CONSOLE_APP_MAIN
{
MIValue v = GetTuple();
DUMP(v.Get("a"));
}
the output is:
String &MIValue::Get(void)
error:Not a String value type
String &MIValue::Get(void)
String &MIValue::Get(void)
error:Not a Tuple value type
v.Get("a") = error:Not a Tuple value type
regards
omari.
|
|
|
|
Re: [BUG?] MIValue [message #44542 is a reply to message #44532] |
Wed, 25 March 2015 16:27 |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
Hi, thank you for the test,
sorry, I did not put my setup:
the problem appears with the following configuration:
MSC10 WinXP 32bit, the latest version Upp 8296
with MinGW, it is OK.
regards
omari.
|
|
|
Re: [BUG?] MIValue [message #44562 is a reply to message #44542] |
Tue, 31 March 2015 12:52 |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
bug catched:
replacing rval_ by const rval_ in
MIValue(MIValue rval_ v);
MIValue &operator=(MIValue rval_ v);
=>
MIValue(MIValue const rval_ v);
MIValue &operator=(MIValue const rval_ v);
rsolve the probleme with COMPILER_MSC, but create one with others compilers
the origin of the probleme is in Core/Defs.h:
#ifdef COMPILER_MSC
#define pick_
#define rval_ &
#else
#define pick_ const
#define rval_ const &
#endif
Why this difference between COMPILER_MSC and others ?
regards
omari.
|
|
|
|
Goto Forum:
Current Time: Wed Jan 15 09:19:14 CET 2025
Total time taken to generate the page: 0.02449 seconds
|
|
|