- Timestamp:
- Oct 26, 2010 7:58:53 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r33386 r33445 1607 1607 for mt in m: 1608 1608 s = s.replace(mt, colored(mt,'red')) 1609 print s 1610 uOffset += len(data) 1611 1612 return 0 1613 1614 1615 def findAssertCmd(ctx, args): 1616 if (len(args) < 2): 1617 print "usage: findAssert vm <num>" 1618 return 0 1619 mach = argsToMach(ctx,args) 1620 if mach == None: 1621 return 0 1622 1623 log = 0 1624 if (len(args) > 2): 1625 log = args[2] 1626 1627 uOffset = 0 1628 ere = re.compile(r'Expression: ') 1629 active = False 1630 context = 0 1631 while True: 1632 # to reduce line splits on buffer boundary 1633 data = mach.readLog(log, uOffset, 512*1024) 1634 if (len(data) == 0): 1635 break 1636 d = str(data).split("\n") 1637 for s in d: 1638 if active: 1639 print s 1640 if context == 0: 1641 active = False 1642 else: 1643 context = context - 1 1644 continue 1645 m = ere.findall(s) 1646 if len(m) > 0: 1647 active = True 1648 context = 50 1609 1649 print s 1610 1650 uOffset += len(data) … … 3014 3054 'showLog':['Show log file of the VM, : showLog Win32', showLogCmd, 0], 3015 3055 'findLog':['Show entries matching pattern in log file of the VM, : findLog Win32 PDM|CPUM', findLogCmd, 0], 3056 'findAssert':['Find assert in log file of the VM, : findAssert Win32', findAssertCmd, 0], 3016 3057 'reloadExt':['Reload custom extensions: reloadExt', reloadExtCmd, 0], 3017 3058 'runScript':['Run VBox script: runScript script.vbox', runScriptCmd, 0],
Note:
See TracChangeset
for help on using the changeset viewer.