This revision was automatically updated to reflect the committed changes.
Closed by commit rL242902: [asan] Display ASan history threads in reverse 
chronological order (authored by kuba.brecka).

Changed prior to commit:
  http://reviews.llvm.org/D11295?vs=29999&id=30351#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D11295

Files:
  lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
  lldb/trunk/test/functionalities/asan/TestMemoryHistory.py

Index: lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
===================================================================
--- lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
+++ lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
@@ -176,8 +176,8 @@
     
     HistoryThreads result;
 
-    CreateHistoryThreadFromValueObject(process_sp, return_value_sp, "alloc", 
"Memory allocated at", result);
     CreateHistoryThreadFromValueObject(process_sp, return_value_sp, "free", 
"Memory deallocated at", result);
+    CreateHistoryThreadFromValueObject(process_sp, return_value_sp, "alloc", 
"Memory allocated at", result);
     
     return result;
 }
Index: lldb/trunk/test/functionalities/asan/TestMemoryHistory.py
===================================================================
--- lldb/trunk/test/functionalities/asan/TestMemoryHistory.py
+++ lldb/trunk/test/functionalities/asan/TestMemoryHistory.py
@@ -86,18 +86,18 @@
         history_thread = threads.GetThreadAtIndex(0)
         self.assertTrue(history_thread.num_frames >= 2)
         
self.assertEqual(history_thread.frames[1].GetLineEntry().GetFileSpec().GetFilename(),
 "main.c")
-        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), 
self.line_malloc)
+        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), 
self.line_free)
         
         history_thread = threads.GetThreadAtIndex(1)
         self.assertTrue(history_thread.num_frames >= 2)
         
self.assertEqual(history_thread.frames[1].GetLineEntry().GetFileSpec().GetFilename(),
 "main.c")
-        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), 
self.line_free)
+        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), 
self.line_malloc)
 
         # let's free the container (SBThreadCollection) and see if the 
SBThreads still live
         threads = None
         self.assertTrue(history_thread.num_frames >= 2)
         
self.assertEqual(history_thread.frames[1].GetLineEntry().GetFileSpec().GetFilename(),
 "main.c")
-        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), 
self.line_free)
+        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), 
self.line_malloc)
 
         # now let's break when an ASan report occurs and try the API then
         self.runCmd("breakpoint set -n __asan_report_error")


Index: lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
===================================================================
--- lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
+++ lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
@@ -176,8 +176,8 @@
     
     HistoryThreads result;
 
-    CreateHistoryThreadFromValueObject(process_sp, return_value_sp, "alloc", "Memory allocated at", result);
     CreateHistoryThreadFromValueObject(process_sp, return_value_sp, "free", "Memory deallocated at", result);
+    CreateHistoryThreadFromValueObject(process_sp, return_value_sp, "alloc", "Memory allocated at", result);
     
     return result;
 }
Index: lldb/trunk/test/functionalities/asan/TestMemoryHistory.py
===================================================================
--- lldb/trunk/test/functionalities/asan/TestMemoryHistory.py
+++ lldb/trunk/test/functionalities/asan/TestMemoryHistory.py
@@ -86,18 +86,18 @@
         history_thread = threads.GetThreadAtIndex(0)
         self.assertTrue(history_thread.num_frames >= 2)
         self.assertEqual(history_thread.frames[1].GetLineEntry().GetFileSpec().GetFilename(), "main.c")
-        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), self.line_malloc)
+        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), self.line_free)
         
         history_thread = threads.GetThreadAtIndex(1)
         self.assertTrue(history_thread.num_frames >= 2)
         self.assertEqual(history_thread.frames[1].GetLineEntry().GetFileSpec().GetFilename(), "main.c")
-        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), self.line_free)
+        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), self.line_malloc)
 
         # let's free the container (SBThreadCollection) and see if the SBThreads still live
         threads = None
         self.assertTrue(history_thread.num_frames >= 2)
         self.assertEqual(history_thread.frames[1].GetLineEntry().GetFileSpec().GetFilename(), "main.c")
-        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), self.line_free)
+        self.assertEqual(history_thread.frames[1].GetLineEntry().GetLine(), self.line_malloc)
 
         # now let's break when an ASan report occurs and try the API then
         self.runCmd("breakpoint set -n __asan_report_error")
_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to