Files
clang-p2996/lldb/test/API/functionalities/gdb_remote_client/TestqOffsets.py
Dave Lee 4cc8f2a017 [lldb][tests] Automatically call compute_mydir (NFC)
Eliminate boilerplate of having each test manually assign to `mydir` by calling
`compute_mydir` in lldbtest.py.

Differential Revision: https://reviews.llvm.org/D128077
2022-06-17 14:34:49 -07:00

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)