summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang
diff options
context:
space:
mode:
authorRavitheja Addepally <ravitheja.addepally@intel.com>2015-11-03 14:24:24 +0000
committerRavitheja Addepally <ravitheja.addepally@intel.com>2015-11-03 14:24:24 +0000
commit46bcbaafb5467d26814243bf3e7bfb2bbfb78246 (patch)
treeb33c4035b317a3795186ad498f70ed73b9d78949 /lldb/packages/Python/lldbsuite/test/lang
parent0ca1e2c3f92610bbb552e69daaaa0173dbb7a5e2 (diff)
downloadbcm5719-llvm-46bcbaafb5467d26814243bf3e7bfb2bbfb78246.tar.gz
bcm5719-llvm-46bcbaafb5467d26814243bf3e7bfb2bbfb78246.zip
Changes for Bug 25251
Summary: The solution to bug 24074,rL249673 needed to parse the function information from the Dwarf in order to set the SymbolContext. For that, GetFunction was called for the parent in GetTypeForDIE, which parses the ChildParameters and in the flow, GetTypeForDIE was called for one of the sibling die and so an infinite loop was triggered by calling GetFunction repeatedly for the same function. The changes in this revision modify the GetTypeForDIE to only resolve the function context in the Type Lookup flow and so prevent the infinite loop. A testcase has also been added to check for regression in the future and a test vector had been added to the testcase of 24074. Reviewers: jingham, tberghammer, clayborg Differential Revision: http://reviews.llvm.org/D14202 llvm-svn: 251917
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/typedef/main.c16
2 files changed, 12 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py b/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
index 9a73f851759..594c0528963 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
@@ -32,7 +32,7 @@ class TypedefTestCase(TestBase):
"""Test 'image lookup -t a' at different scopes and check for correct display."""
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
- typearray = ("float", "float", "char", "float", "int", "double", "float", "float")
+ typearray = ("float", "float", "char", "double *", "float", "int", "double", "float", "float")
arraylen = len(typearray)+1
for i in range(1,arraylen):
loc_line = line_number('main.c', '// Set break point ' + str(i) + '.')
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/typedef/main.c b/lldb/packages/Python/lldbsuite/test/lang/c/typedef/main.c
index 6c13affbbc1..62f8a00e664 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/typedef/main.c
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/typedef/main.c
@@ -6,6 +6,11 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
+void test()
+{
+ typedef double * a;
+ a b = 0; // Set break point 4.
+}
int main (int argc, char const *argv[])
{
typedef float a;
@@ -16,25 +21,26 @@ int main (int argc, char const *argv[])
typedef char a;
i++;
a charvariable = 'a'; // Set break point 3.
+ test();
}
{
int c = 0;
- c++; // Set break point 4.
+ c++; // Set break point 5.
for(i = 0 ; i < 1 ; i++)
{
typedef int a;
a b;
- b = 7; // Set break point 5.
+ b = 7; // Set break point 6.
}
for(i = 0 ; i < 1 ; i++)
{
typedef double a;
a b;
- b = 3.14; // Set break point 6.
+ b = 3.14; // Set break point 7.
}
- c = 1; // Set break point 7.
+ c = 1; // Set break point 8.
}
floatvariable = 2.5;
- floatvariable = 2.8; // Set break point 8.
+ floatvariable = 2.8; // Set break point 9.
return 0;
}
OpenPOWER on IntegriCloud