1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-21 23:18:13 +00:00

remove trezor.debug usage

This commit is contained in:
Pavol Rusnak 2017-05-15 19:12:12 +02:00
parent 4d4364f0b5
commit 3fcbf7179b
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 2 additions and 21 deletions

View File

@ -41,14 +41,8 @@ async def dispatch_DebugLinkStop(session_id, msg):
async def dispatch_DebugLinkMemoryRead(session_id, msg):
from trezor.messages.DebugLinkMemory import DebugLinkMemory
from trezor.debug import memaccess
length = min(msg.length, 1024)
m = DebugLinkMemory()
m.memory = memaccess(msg.address, length)
return m
# TODO: return memaccess(msg.address, msg.length)
pass
async def dispatch_DebugLinkMemoryWrite(session_id, msg):

View File

@ -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()