This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
21 lines
723 B
Python
21 lines
723 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.assertEquals(text.GetLoadAddress(target), lldb.LLDB_INVALID_ADDRESS)
|
|
|
|
process = self.connect(target)
|
|
self.assertEquals(text.GetLoadAddress(target), 0x471000)
|