summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py b/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
index cce19a3bfa7..f70c854ed6d 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
@@ -6,6 +6,25 @@ from gdbclientutils import *
class TestGDBRemoteLoad(GDBRemoteTestBase):
+ def setUp(self):
+ super(TestGDBRemoteLoad, self).setUp()
+ self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+ def tearDown(self):
+ lldb.DBG.SetSelectedPlatform(self._initial_platform)
+ super(TestGDBRemoteLoad, self).tearDown()
+
+ def test_module_load_address(self):
+ """Test that setting the load address of a module uses virtual addresses"""
+ target = self.createTarget("a.yaml")
+ process = self.connect(target)
+ module = target.GetModuleAtIndex(0)
+ self.assertTrue(module.IsValid())
+ self.assertTrue(target.SetModuleLoadAddress(module, 0).Success())
+ address = target.ResolveLoadAddress(0x2001)
+ self.assertTrue(address.IsValid())
+ self.assertEqual(".data", address.GetSection().GetName())
+
def test_ram_load(self):
"""Test loading an object file to a target's ram"""
target = self.createTarget("a.yaml")
OpenPOWER on IntegriCloud