![]() Return "%s%s" % ( empty, ntainer, _argument(0),, Qt Creator allows you to create Python files (not projects) and run them. Self.data_node = self.nextNode(self.data_node) "GDB iteration, first call returns key, second value and then jumps to the next hash node." #print "nextNode: in while return bucket %s" % bucket #print "nextNode: in while *bucket %s" % bucket #print "nextNode: numBuckets %s" % self.d Next = node.cast(gdb.lookup_type('QHashData::Node').pointer()) "Get the nextNode after the current, see also QHashData::nextNode()." #print "QHashData::firstNode() return e %s" % e #print "QHashData::firstNode() in while, new bucket %s" % bucket #print "QHashData::firstNode() in while, return *bucket %s" % bucket #print "QHashData::firstNode() in while, n %s" % n #print "QHashData::firstNode() *bucket %s" % bucket "Get the first node, See QHashData::firstNode()."Į = self.d.cast(gdb.lookup_type('QHashData::Node').pointer()) Return self.data_node.cast(gdb.lookup_type('QHashNode' % (self.ktype, self.vtype)).pointer()) "Casts the current QHashData::Node to a QHashNode and returns the result. Self.end_node = self.d.cast(gdb.lookup_type('QHashData::Node').pointer()) ![]() Return "%s%s" % ( empty, ntainer, _argument(0), _argument(1) ) Node = ncrete(self.data_node).dereference() Return (data_node.cast(gdb.lookup_type('char').pointer()) - self.payload()).cast(node_type) Node_type = gdb.lookup_type('QMapNode' % (self.ktype, self.vtype)).pointer() Ret -= gdb.lookup_type('void').pointer().sizeof Ret += ret % gdb.lookup_type('void').pointer().sizeof #TODO: find a real solution for this problem #but because of data alignment the value can be higher Ret += gdb.lookup_type('void').pointer().sizeof #as a workaround take the sum of sizeof(members) ![]() #we can't use QMapPayloadNode as it's inlined Return self._iterator(ype, self.val, self.val)ĭef _init_(self, nodetype, begin, size): Return ('' % count, node.cast(self.nodetype))ĭef _init_(self, val, container, itype): Node = array.cast(gdb.lookup_type('QList::Node' % self.nodetype)) Node = array.cast(gdb.lookup_type('QList::Node' % self.nodetype).pointer()) If isLarge or isStatic: #see QList::Node::t() # 'QVariant', 'QFileInfo', 'QUrl', 'QXmlStreamAttribute', 'QXmlStreamNamespaceDeclaration', 'QXmlStreamNotationDeclaration', # 'QRegExpr', 'QPoint', 'QPointF', 'QByteArray', 'QSize', 'QSizeF', 'QBitArray', 'QLine', 'QLineF', 'QModelIndex', 'QPersitentModelIndex', #movableTypes = ['QRect', 'QRectF', 'QString', 'QMargins', 'QLocale', 'QChar', 'QDate', 'QTime', 'QDateTime', 'QVector', #(obviously it won't work for custom types) #this list of types that use Q_DECLARE_TYPEINFO(T, Q_MOVABLE_TYPE) #unfortunately we can't use QTypeInfo::isStatic as it's all inlined, so use #isStatic is not needed anymore since Qt 4.6 IsLarge = > gdb.lookup_type('void').pointer().sizeof If unt >= self.d - self.d:Īrray = self.d + count] Return self._iterator(self.val, self.val) Return dataAsCharPointer.string(encoding = 'UTF-16', length = size * 2) # You should have received a copy of the GNU General Public LicenseĭataAsCharPointer = (gdb.lookup_type("char").pointer()) # GNU General Public License for more details. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ![]() # but WITHOUT ANY WARRANTY without even the implied warranty of # This program is distributed in the hope that it will be useful, # the Free Software Foundation either version 2 of the License, or # it under the terms of the GNU General Public License as published by # This program is free software you can redistribute it and/or modify This is what I've placed into the file (This script is my modified form of the scipts at Niko's Blog): # -*- coding: iso-8859-1 -*. I want to do this without Qt Creator, using regular GDB. I'm trying to create a ~/.gdbinit that contains some Qt pretty printers for various Qt objects, especially QStrings.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |