mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
remove trezor.debug usage
This commit is contained in:
parent
4d4364f0b5
commit
3fcbf7179b
@ -41,14 +41,8 @@ async def dispatch_DebugLinkStop(session_id, msg):
|
|||||||
|
|
||||||
|
|
||||||
async def dispatch_DebugLinkMemoryRead(session_id, msg):
|
async def dispatch_DebugLinkMemoryRead(session_id, msg):
|
||||||
from trezor.messages.DebugLinkMemory import DebugLinkMemory
|
# TODO: return memaccess(msg.address, msg.length)
|
||||||
from trezor.debug import memaccess
|
pass
|
||||||
|
|
||||||
length = min(msg.length, 1024)
|
|
||||||
m = DebugLinkMemory()
|
|
||||||
m.memory = memaccess(msg.address, length)
|
|
||||||
|
|
||||||
return m
|
|
||||||
|
|
||||||
|
|
||||||
async def dispatch_DebugLinkMemoryWrite(session_id, msg):
|
async def dispatch_DebugLinkMemoryWrite(session_id, msg):
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
from common import *
|
|
||||||
|
|
||||||
from trezor import debug
|
|
||||||
|
|
||||||
class TestDebug(unittest.TestCase):
|
|
||||||
|
|
||||||
def test_memaccess(self):
|
|
||||||
data = debug.memaccess(0, 1024)
|
|
||||||
# don't access contents (will segfault), just the length of the returned data
|
|
||||||
self.assertEqual(len(data), 1024)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
Loading…
Reference in New Issue
Block a user