diff options
author | Dawn Perchik <dawn@burble.org> | 2015-10-24 02:01:28 +0000 |
---|---|---|
committer | Dawn Perchik <dawn@burble.org> | 2015-10-24 02:01:28 +0000 |
commit | b5d425ecfb621e76c4e74f84d4272a38709f6457 (patch) | |
tree | 49320a8b3e505e76bdd86f0dc87bbbca31ace4ff /lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp | |
parent | c27d2f266ee57a477f9500357da1fd0596f54861 (diff) | |
download | bcm5719-llvm-b5d425ecfb621e76c4e74f84d4272a38709f6457.tar.gz bcm5719-llvm-b5d425ecfb621e76c4e74f84d4272a38709f6457.zip |
[lldb-mi] Fix expansion of anonymous structures and unions
A variable of type:
struct S {
union {
int i1;
unsigned u1;
};
union {
int i2;
unsigned u2;
};
};
had been impossible to evaluate in lldb-mi, because MI assigns '??' as the
variable name to each of the unnamed unions after "-var-list-children" command.
Also '??' incorrectly goes to 'exp' field which is treated by IDE as a
structure field name and is displayed in watch window.
The patch fixes this returning empty string as type name for unnamed union and
assigning $N to variable name, where N is the field number in the parent entity.
Patch from evgeny.leviant@gmail.com
Reviewed by: clayborg, abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13947
llvm-svn: 251176
Diffstat (limited to 'lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp')
-rw-r--r-- | lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp b/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp index 54dabd4e101..d3d85d32c03 100644 --- a/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp +++ b/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp @@ -61,7 +61,7 @@ CMIUtilString CMICmnLLDBUtilSBValue::GetName() const { const char *pName = m_bValidSBValue ? m_rValue.GetName() : nullptr; - const CMIUtilString text((pName != nullptr) ? pName : m_pUnkwn); + const CMIUtilString text((pName != nullptr) ? pName : CMIUtilString()); return text; } |