Files
clang-p2996/lldb/test/API/functionalities/gdb_remote_client/TestqOffsets.py
Jonas Devlieghere 80fcecb13c [lldb] Replace assertEquals with assertEqual (NFC) (#82073)
assertEquals is a deprecated alias for assertEqual and has been removed
in Python 3.12. This wasn't an issue previously because we used a
vendored version of the unittest module. Now that we use the built-in
version this gets updated together with the Python version used to run
the test suite.
2024-02-16 20:58:50 -08:00

21 lines
721 B
Python

import lldb
from lldbsuite.test.lldbtest import *
from lldbsuite.test.decorators import *
from lldbsuite.test.gdbclientutils import *
from lldbsuite.test.lldbgdbclient import GDBRemoteTestBase
class TestqOffsets(GDBRemoteTestBase):
class Responder(MockGDBServerResponder):
def qOffsets(self):
return "Text=470000;Data=470000"
def test(self):
self.server.responder = TestqOffsets.Responder()
target = self.createTarget("qOffsets.yaml")
text = target.modules[0].FindSection(".text")
self.assertEqual(text.GetLoadAddress(target), lldb.LLDB_INVALID_ADDRESS)
process = self.connect(target)
self.assertEqual(text.GetLoadAddress(target), 0x471000)