# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. #
import six import gdb from libreoffice.util import printing
class ImplSchedulerDataPrinter(object): '''Prints the ImplSchedulerData linked list.
This can be used to dump the current state of the scheduler via:
p *ImplGetSVData()->maSchedCtx.mpFirstSchedulerData
This doesn't include currently invoked tasks AKA the stack.
To dump the scheduler stack of invoked tasks use:
p *ImplGetSVData()->maSchedCtx.mpSchedulerStack '''
def to_string(self):
res = "{\n" if self.value['mnTimerPeriod']:
res = res + "mnTimerPeriod = " + str(self.value['mnTimerPeriod']) + "\n" if self.value['mpSchedulerStack']:
res = res + "STACK, " + str(self.value['mpSchedulerStack'].dereference()) if self.value['mpFirstSchedulerData']: for key, value in self.prio.items():
first = self.value['mpFirstSchedulerData'][value.enumval] if first:
res = res + key.replace('TaskPriority::', '') + ", " + str(first.dereference()) return res + "}"
class ImplRegionBandPrinter(object):
class iterator(six.Iterator): '''RegionBand iterator'''
def __init__(self, first):
self.pimplband = first if self.pimplband:
self.sep = self.pimplband.dereference()['mpFirstSep'] else:
self.sep = None
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.