diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2016-04-14 14:28:34 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2016-04-14 14:28:34 +0000 |
commit | bb00d0b6b29a2ab1c59d3040a21f14156d8779df (patch) | |
tree | cbe5c64120aa89abbfd4cfc9e6d54b958f0e85bd /lldb/packages/Python/lldbsuite/test/python_api | |
parent | 7311bb34f63df58edb4819e5b483b49932b371bd (diff) | |
download | bcm5719-llvm-bb00d0b6b29a2ab1c59d3040a21f14156d8779df.tar.gz bcm5719-llvm-bb00d0b6b29a2ab1c59d3040a21f14156d8779df.zip |
Support Linux on SystemZ as platform
This patch adds support for Linux on SystemZ:
- A new ArchSpec value of eCore_s390x_generic
- A new directory Plugins/ABI/SysV-s390x providing an ABI implementation
- Register context support
- Native Linux support including watchpoint support
- ELF core file support
- Misc. support throughout the code base (e.g. breakpoint opcodes)
- Test case updates to support the platform
This should provide complete support for debugging the SystemZ platform.
Not yet supported are optional features like transaction support (zEC12)
or SIMD vector support (z13).
There is no instruction emulation, since our ABI requires that all code
provide correct DWARF CFI at all PC locations in .eh_frame to support
unwinding (i.e. -fasynchronous-unwind-tables is on by default).
The implementation follows existing platforms in a mostly straightforward
manner. A couple of things that are different:
- We do not use PTRACE_PEEKUSER / PTRACE_POKEUSER to access single registers,
since some registers (access register) reside at offsets in the user area
that are multiples of 4, but the PTRACE_PEEKUSER interface only allows
accessing aligned 8-byte blocks in the user area. Instead, we use a s390
specific ptrace interface PTRACE_PEEKUSR_AREA / PTRACE_POKEUSR_AREA that
allows accessing a whole block of the user area in one go, so in effect
allowing to treat parts of the user area as register sets.
- SystemZ hardware does not provide any means to implement read watchpoints,
only write watchpoints. In fact, we can only support a *single* write
watchpoint (but this can span a range of arbitrary size). In LLDB this
means we support only a single watchpoint. I've set all test cases that
require read watchpoints (or multiple watchpoints) to expected failure
on the platform. [ Note that there were two test cases that install
a read/write watchpoint even though they nowhere rely on the "read"
property. I've changed those to simply use plain write watchpoints. ]
Differential Revision: http://reviews.llvm.org/D18978
llvm-svn: 266308
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
4 files changed, 4 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py index df5658a285f..bedf286e199 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py @@ -28,6 +28,7 @@ class SetWatchpointAPITestCase(TestBase): @add_test_categories(['pyapi']) @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") + @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ def test_watch_val(self): """Exercise SBValue.Watch() API to set a watchpoint.""" self.build() diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py index 3b6a3c8aae0..d7b45a533e3 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py @@ -28,6 +28,7 @@ class WatchpointIgnoreCountTestCase(TestBase): @add_test_categories(['pyapi']) @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") + @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ def test_set_watch_ignore_count(self): """Test SBWatchpoint.SetIgnoreCount() API.""" self.build() diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py index 2ec106c3fcd..8bbb93af07e 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py @@ -58,7 +58,7 @@ class WatchpointIteratorTestCase(TestBase): # Watch 'global' for read and write. value = frame0.FindValue('global', lldb.eValueTypeVariableGlobal) error = lldb.SBError(); - watchpoint = value.Watch(True, True, True, error) + watchpoint = value.Watch(True, False, True, error) self.assertTrue(value and watchpoint, "Successfully found the variable and set a watchpoint") self.DebugSBValue(value) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py index b8108f39f3d..468f3131f33 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py @@ -93,6 +93,7 @@ class TargetWatchAddressAPITestCase(TestBase): @add_test_categories(['pyapi']) @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @skipIf(archs=['mips', 'mipsel', 'mips64', 'mips64el']) # No size constraint on MIPS for watches + @skipIf(archs=['s390x']) # Likewise on SystemZ def test_watch_address_with_invalid_watch_size(self): """Exercise SBTarget.WatchAddress() API but pass an invalid watch_size.""" self.build() |