[Lldb-commits] [lldb] r286101 - Make space for FreeBSD core file tests

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 7 01:58:59 PST 2016


Author: labath
Date: Mon Nov  7 03:58:58 2016
New Revision: 286101

URL: http://llvm.org/viewvc/llvm-project?rev=286101&view=rev
Log:
Make space for FreeBSD core file tests

This renames the functionalities/postmortem/linux-core to elf-core and puts the
"linux" part into the individual names of the core files. Since the tests for
linux and freebsd core files are going to be very similar, having them close
together means they can reuse most of the plumbing.

Added:
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.c
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.c
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.core
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.core
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.out
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.out
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.core
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.core
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.out
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.out
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.core
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.core
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.out
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.out
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.core
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.core
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.out
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.out
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/main.c
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/main.c
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/make-core.sh
      - copied, changed from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/make-core.sh
Removed:
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.c
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.core
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.out
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.core
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.out
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/main.c
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/make-core.sh
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.core
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.out
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.core
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.out

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py Mon Nov  7 03:58:58 2016
@@ -30,13 +30,13 @@ class LinuxCoreTestCase(TestBase):
     @skipIf(triple='^mips')
     def test_i386(self):
         """Test that lldb can read the process information from an i386 linux core file."""
-        self.do_test("i386", self._i386_pid, self._i386_regions)
+        self.do_test("linux-i386", self._i386_pid, self._i386_regions)
 
     @skipIf(oslist=['windows'])
     @skipIf(triple='^mips')
     def test_x86_64(self):
         """Test that lldb can read the process information from an x86_64 linux core file."""
-        self.do_test("x86_64", self._x86_64_pid, self._x86_64_regions)
+        self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions)
 
     # This seems to hang on non-s390x platforms for some reason.  Disabling
     # for now.
@@ -44,7 +44,7 @@ class LinuxCoreTestCase(TestBase):
     @skipIf(triple='^mips')
     def test_s390x(self):
         """Test that lldb can read the process information from an s390x linux core file."""
-        self.do_test("s390x", self._s390x_pid, self._s390x_regions)
+        self.do_test("linux-s390x", self._s390x_pid, self._s390x_regions)
 
     @skipIf(oslist=['windows'])
     @skipIf(triple='^mips')
@@ -52,9 +52,9 @@ class LinuxCoreTestCase(TestBase):
         """Test that we read the information from the core correctly even if we have a running
         process with the same PID around"""
         try:
-            shutil.copyfile("x86_64.out", "x86_64-pid.out")
-            shutil.copyfile("x86_64.core", "x86_64-pid.core")
-            with open("x86_64-pid.core", "r+b") as f:
+            shutil.copyfile("linux-x86_64.out", "linux-x86_64-pid.out")
+            shutil.copyfile("linux-x86_64.core", "linux-x86_64-pid.core")
+            with open("linux-x86_64-pid.core", "r+b") as f:
                 # These are offsets into the NT_PRSTATUS and NT_PRPSINFO structures in the note
                 # segment of the core file. If you update the file, these offsets may need updating
                 # as well. (Notes can be viewed with readelf --notes.)
@@ -70,10 +70,10 @@ class LinuxCoreTestCase(TestBase):
                     # works.
                     f.seek(pid_offset)
                     f.write(struct.pack("<I", os.getpid()))
-            self.do_test("x86_64-pid", os.getpid(), self._x86_64_regions)
+            self.do_test("linux-x86_64-pid", os.getpid(), self._x86_64_regions)
         finally:
-            self.RemoveTempFile("x86_64-pid.out")
-            self.RemoveTempFile("x86_64-pid.core")
+            self.RemoveTempFile("linux-x86_64-pid.out")
+            self.RemoveTempFile("linux-x86_64-pid.core")
 
     @skipIf(oslist=['windows'])
     @skipIf(triple='^mips')
@@ -102,7 +102,7 @@ class LinuxCoreTestCase(TestBase):
 
         # without destroying this process, run the test which opens another core file with the
         # same pid
-        self.do_test("x86_64", self._x86_64_pid, self._x86_64_regions)
+        self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions)
 
     def check_memory_regions(self, process, region_count):
         region_list = process.GetMemoryRegions()

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.c (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.c)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.c?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.c&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.c&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
    (empty)

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.core (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.core)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.core?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.core&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.core&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
    (empty)

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.out (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.out)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.out?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.out&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.out&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
    (empty)

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.core (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.core)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.core?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.core&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.core&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
    (empty)

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.out (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.out)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.out?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.out&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.out&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
    (empty)

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.core (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.core)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.core?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.core&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.core&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
Binary files - no diff available.

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.out (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.out)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.out?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.out&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.out&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
Binary files - no diff available.

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.core (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.core)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.core?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.core&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.core&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
    (empty)

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.out (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.out)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.out?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.out&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.out&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
    (empty)

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/main.c (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/main.c)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/main.c?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/main.c&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/main.c&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
    (empty)

Copied: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/make-core.sh (from r286093, lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/make-core.sh)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/make-core.sh?p2=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/make-core.sh&p1=lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/make-core.sh&r1=286093&r2=286101&rev=286101&view=diff
==============================================================================
    (empty)

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py?rev=286100&view=auto
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py (removed)
@@ -1,199 +0,0 @@
-"""
-Test basics of linux core file debugging.
-"""
-
-from __future__ import print_function
-
-import shutil
-import struct
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LinuxCoreTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    _i386_pid = 32306
-    _x86_64_pid = 32259
-    _s390x_pid = 1045
-
-    _i386_regions = 4
-    _x86_64_regions = 5
-    _s390x_regions = 2
-
-    @skipIf(oslist=['windows'])
-    @skipIf(triple='^mips')
-    def test_i386(self):
-        """Test that lldb can read the process information from an i386 linux core file."""
-        self.do_test("i386", self._i386_pid, self._i386_regions)
-
-    @skipIf(oslist=['windows'])
-    @skipIf(triple='^mips')
-    def test_x86_64(self):
-        """Test that lldb can read the process information from an x86_64 linux core file."""
-        self.do_test("x86_64", self._x86_64_pid, self._x86_64_regions)
-
-    # This seems to hang on non-s390x platforms for some reason.  Disabling
-    # for now.
-    @skipIf(archs=no_match(['s390x']))
-    @skipIf(triple='^mips')
-    def test_s390x(self):
-        """Test that lldb can read the process information from an s390x linux core file."""
-        self.do_test("s390x", self._s390x_pid, self._s390x_regions)
-
-    @skipIf(oslist=['windows'])
-    @skipIf(triple='^mips')
-    def test_same_pid_running(self):
-        """Test that we read the information from the core correctly even if we have a running
-        process with the same PID around"""
-        try:
-            shutil.copyfile("x86_64.out", "x86_64-pid.out")
-            shutil.copyfile("x86_64.core", "x86_64-pid.core")
-            with open("x86_64-pid.core", "r+b") as f:
-                # These are offsets into the NT_PRSTATUS and NT_PRPSINFO structures in the note
-                # segment of the core file. If you update the file, these offsets may need updating
-                # as well. (Notes can be viewed with readelf --notes.)
-                for pid_offset in [0x1c4, 0x320]:
-                    f.seek(pid_offset)
-                    self.assertEqual(
-                        struct.unpack(
-                            "<I",
-                            f.read(4))[0],
-                        self._x86_64_pid)
-
-                    # We insert our own pid, and make sure the test still
-                    # works.
-                    f.seek(pid_offset)
-                    f.write(struct.pack("<I", os.getpid()))
-            self.do_test("x86_64-pid", os.getpid(), self._x86_64_regions)
-        finally:
-            self.RemoveTempFile("x86_64-pid.out")
-            self.RemoveTempFile("x86_64-pid.core")
-
-    @skipIf(oslist=['windows'])
-    @skipIf(triple='^mips')
-    def test_two_cores_same_pid(self):
-        """Test that we handle the situation if we have two core files with the same PID
-        around"""
-        alttarget = self.dbg.CreateTarget("altmain.out")
-        altprocess = alttarget.LoadCore("altmain.core")
-        self.assertTrue(altprocess, PROCESS_IS_VALID)
-        self.assertEqual(altprocess.GetNumThreads(), 1)
-        self.assertEqual(altprocess.GetProcessID(), self._x86_64_pid)
-
-        altframe = altprocess.GetSelectedThread().GetFrameAtIndex(0)
-        self.assertEqual(altframe.GetFunctionName(), "_start")
-        self.assertEqual(
-            altframe.GetLineEntry().GetLine(),
-            line_number(
-                "altmain.c",
-                "Frame _start"))
-
-        error = lldb.SBError()
-        F = altprocess.ReadCStringFromMemory(
-            altframe.FindVariable("F").GetValueAsUnsigned(), 256, error)
-        self.assertTrue(error.Success())
-        self.assertEqual(F, "_start")
-
-        # without destroying this process, run the test which opens another core file with the
-        # same pid
-        self.do_test("x86_64", self._x86_64_pid, self._x86_64_regions)
-
-    def check_memory_regions(self, process, region_count):
-        region_list = process.GetMemoryRegions()
-        self.assertEqual(region_list.GetSize(), region_count)
-
-        region = lldb.SBMemoryRegionInfo()
-
-        # Check we have the right number of regions.
-        self.assertEqual(region_list.GetSize(), region_count)
-
-        # Check that getting a region beyond the last in the list fails.
-        self.assertFalse(
-            region_list.GetMemoryRegionAtIndex(
-                region_count, region))
-
-        # Check each region is valid.
-        for i in range(region_list.GetSize()):
-            # Check we can actually get this region.
-            self.assertTrue(region_list.GetMemoryRegionAtIndex(i, region))
-
-            # Every region in the list should be mapped.
-            self.assertTrue(region.IsMapped())
-
-            # Test the address at the start of a region returns it's enclosing
-            # region.
-            begin_address = region.GetRegionBase()
-            region_at_begin = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(begin_address, region_at_begin)
-            self.assertEqual(region, region_at_begin)
-
-            # Test an address in the middle of a region returns it's enclosing
-            # region.
-            middle_address = (region.GetRegionBase() +
-                              region.GetRegionEnd()) / 2
-            region_at_middle = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(
-                middle_address, region_at_middle)
-            self.assertEqual(region, region_at_middle)
-
-            # Test the address at the end of a region returns it's enclosing
-            # region.
-            end_address = region.GetRegionEnd() - 1
-            region_at_end = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(end_address, region_at_end)
-            self.assertEqual(region, region_at_end)
-
-            # Check that quering the end address does not return this region but
-            # the next one.
-            next_region = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(
-                region.GetRegionEnd(), next_region)
-            self.assertNotEqual(region, next_region)
-            self.assertEqual(
-                region.GetRegionEnd(),
-                next_region.GetRegionBase())
-
-        # Check that query beyond the last region returns an unmapped region
-        # that ends at LLDB_INVALID_ADDRESS
-        last_region = lldb.SBMemoryRegionInfo()
-        region_list.GetMemoryRegionAtIndex(region_count - 1, last_region)
-        end_region = lldb.SBMemoryRegionInfo()
-        error = process.GetMemoryRegionInfo(
-            last_region.GetRegionEnd(), end_region)
-        self.assertFalse(end_region.IsMapped())
-        self.assertEqual(
-            last_region.GetRegionEnd(),
-            end_region.GetRegionBase())
-        self.assertEqual(end_region.GetRegionEnd(), lldb.LLDB_INVALID_ADDRESS)
-
-    def do_test(self, filename, pid, region_count):
-        target = self.dbg.CreateTarget(filename + ".out")
-        process = target.LoadCore(filename + ".core")
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetNumThreads(), 1)
-        self.assertEqual(process.GetProcessID(), pid)
-
-        thread = process.GetSelectedThread()
-        self.assertTrue(thread)
-        self.assertEqual(thread.GetThreadID(), pid)
-        backtrace = ["bar", "foo", "_start"]
-        self.assertEqual(thread.GetNumFrames(), len(backtrace))
-        for i in range(len(backtrace)):
-            frame = thread.GetFrameAtIndex(i)
-            self.assertTrue(frame)
-            self.assertEqual(frame.GetFunctionName(), backtrace[i])
-            self.assertEqual(frame.GetLineEntry().GetLine(),
-                             line_number("main.c", "Frame " + backtrace[i]))
-            self.assertEqual(
-                frame.FindVariable("F").GetValueAsUnsigned(), ord(
-                    backtrace[i][0]))
-
-        self.check_memory_regions(process, region_count)
-
-        self.dbg.DeleteTarget(target)

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.c?rev=286100&view=auto
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.c (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.c (removed)
@@ -1,6 +0,0 @@
-void _start(void)
-{
-    const char *F = "_start";
-    char *boom = (char *)0;
-    *boom = 47; // Frame _start
-}

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.core
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.core?rev=286100&view=auto
==============================================================================
Binary files lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.core (original) and lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.core (removed) differ

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.out
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.out?rev=286100&view=auto
==============================================================================
Binary files lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.out (original) and lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/altmain.out (removed) differ

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.core
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.core?rev=286100&view=auto
==============================================================================
Binary files lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.core (original) and lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.core (removed) differ

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.out
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.out?rev=286100&view=auto
==============================================================================
Binary files lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.out (original) and lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/i386.out (removed) differ

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/main.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/main.c?rev=286100&view=auto
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/main.c (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/main.c (removed)
@@ -1,17 +0,0 @@
-static void bar(char *boom)
-{
-    char F = 'b';
-    *boom = 47; // Frame bar
-}
-
-static void foo(char *boom, void (*boomer)(char *))
-{
-    char F = 'f';
-    boomer(boom); // Frame foo
-}
-
-void _start(void)
-{
-    char F = '_';
-    foo(0, bar); // Frame _start
-}

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/make-core.sh
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/make-core.sh?rev=286100&view=auto
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/make-core.sh (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/make-core.sh (removed)
@@ -1,61 +0,0 @@
-#! /bin/sh
-
-linux_check_core_pattern()
-{
-    if grep -q '^|' </proc/sys/kernel/core_pattern; then
-        cat <<EOF
-Your system uses a crash report tool ($(cat /proc/sys/kernel/core_pattern)). Core files
-will not be generated.  Please reset /proc/sys/kernel/core_pattern (requires root
-privileges) to enable core generation.
-EOF
-        exit 1
-    fi
-}
-
-OS=$(uname -s)
-case "$OS" in
-FreeBSD)
-    core_pattern=$(sysctl -n kern.corefile)
-    ;;
-Linux)
-    core_pattern=$(cat /proc/sys/kernel/core_pattern)
-    ;;
-*)
-    echo "OS $OS not supported" >&2
-    exit 1
-    ;;
-esac
-
-set -e -x
-
-file=$1
-if [ -z "$file" ]; then
-    cat <<EOF
-Please supply the main source file as the first argument.
-EOF
-    exit 1
-fi
-
-if [ "$OS" = Linux ]; then
-    linux_check_core_pattern
-fi
-
-ulimit -c 1000
-real_limit=$(ulimit -c)
-if [ $real_limit -lt 100 ]; then
-    cat <<EOF
-Unable to increase the core file limit. Core file may be truncated!
-To fix this, increase HARD core file limit (ulimit -H -c 1000). This may require root
-privileges.
-EOF
-fi
-
-${CC:-cc} -nostdlib -static -g $CFLAGS "$file" -o a.out
-
-cat <<EOF
-Executable file is in a.out.
-Core file will be saved according to pattern $core_pattern.
-EOF
-
-ulimit -s 8 # Decrease stack size to 8k => smaller core files.
-exec ./a.out

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.core
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.core?rev=286100&view=auto
==============================================================================
Binary file - no diff available.

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.out
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/s390x.out?rev=286100&view=auto
==============================================================================
Binary file - no diff available.

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.core
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.core?rev=286100&view=auto
==============================================================================
Binary files lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.core (original) and lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.core (removed) differ

Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.out
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.out?rev=286100&view=auto
==============================================================================
Binary files lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.out (original) and lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/x86_64.out (removed) differ




More information about the lldb-commits mailing list