[Lldb-commits] [PATCH] Add new test for stress testing stack unwinding

Oleksiy Vyalov ovyalov at google.com
Wed Jun 17 12:29:26 PDT 2015


Having a couple of hand-written tests sounds as a good idea to me - it will be kind of proof-of-concept.


================
Comment at: test/functionalities/unwind/standard/TestStandardUnwind.py:39
@@ +38,3 @@
+            base_function_names = [
+                "_start",                # Base function on the stack
+                "__memcpy_base",         # Function reached by a fall through from the previous function
----------------
Add __start_thread ti track unwinding in a thread?

================
Comment at: test/functionalities/unwind/standard/TestStandardUnwind.py:65
@@ +64,3 @@
+        index = 0
+        while process.GetState() == lldb.eStateStopped:
+            index += 1
----------------
What if an inferior exits immediately after launch - for example, reporting 126, 127 exit code?   
Do we need to have assert here to check that process indeed in stopped state?

================
Comment at: test/functionalities/unwind/standard/TestStandardUnwind.py:71
@@ +70,3 @@
+                if self.TraceOn():
+                    print "INDEX:", index, "THREAD:", i
+                    for f in thread.frames:
----------------
print "INDEX: %d, THREAD %d" % (index, i) ?

================
Comment at: test/functionalities/unwind/standard/TestStandardUnwind.py:106
@@ +105,3 @@
+            if f.endswith(".cpp"):
+                d = {'CXX_SOURCES': os.path.join(dirname, f)}
+            elif f.endswith(".c"):
----------------
f should contain a full path - do we need this join here?

================
Comment at: test/functionalities/unwind/standard/TestStandardUnwind.py:116
@@ +115,3 @@
+                self.setTearDownCleanup(d)
+            except:
+                self.skipTest("Inferior not supported")
----------------
Could you log exception if Trace is on?

http://reviews.llvm.org/D10454

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list