1
############################################################################
3
# Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
4
# Contact: http://www.qt-project.org/legal
6
# This file is part of Qt Creator.
8
# Commercial License Usage
9
# Licensees holding valid commercial Qt licenses may use this file in
10
# accordance with the commercial license agreement provided with the
11
# Software or, alternatively, in accordance with the terms contained in
12
# a written agreement between you and Digia. For licensing terms and
13
# conditions see http://qt.digia.com/licensing. For further information
14
# use the contact form at http://qt.digia.com/contact-us.
16
# GNU Lesser General Public License Usage
17
# Alternatively, this file may be used under the terms of the GNU Lesser
18
# General Public License version 2.1 as published by the Free Software
19
# Foundation and appearing in the file LICENSE.LGPL included in the
20
# packaging of this file. Please review the following information to
21
# ensure the GNU Lesser General Public License version 2.1 requirements
22
# will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24
# In addition, as a special exception, Digia gives you certain additional
25
# rights. These rights are described in the Digia Qt LGPL Exception
26
# version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28
#############################################################################
32
def qdump__Core__Id(d, value):
34
name = d.parseAndEvaluate("Core::nameForId(%d)" % value["m_id"])
35
d.putValue(d.encodeCharArray(name), Hex2EncodedLatin1)
36
d.putPlainChildren(value)
38
d.putValue(value["m_id"])
41
def qdump__Debugger__Internal__GdbMi(d, value):
42
str = d.encodeByteArray(value["m_name"]) + "3a20" \
43
+ d.encodeByteArray(value["m_data"])
44
d.putValue(str, Hex2EncodedLatin1)
45
d.putPlainChildren(value)
47
def qdump__Debugger__Internal__WatchData(d, value):
48
d.putByteArrayValue(value["iname"])
49
d.putPlainChildren(value)
51
def qdump__Debugger__Internal__WatchItem(d, value):
52
d.putByteArrayValue(value["iname"])
53
d.putPlainChildren(value)
55
def qdump__Debugger__Internal__BreakpointModelId(d, value):
56
d.putValue("%s.%s" % (value["m_majorPart"], value["m_minorPart"]))
57
d.putPlainChildren(value)
59
def qdump__CPlusPlus__ByteArrayRef(d, value):
60
d.putValue(d.encodeCharArray(value["m_start"], 100, value["m_length"]),
62
d.putPlainChildren(value)
64
def qdump__CPlusPlus__Identifier(d, value):
65
d.putValue(d.encodeCharArray(value["_chars"]), Hex2EncodedLatin1)
66
d.putPlainChildren(value)
68
def qdump__CPlusPlus__IntegerType(d, value):
69
d.putValue(value["_kind"])
70
d.putPlainChildren(value)
72
def qdump__CPlusPlus__NamedType(d, value):
73
literal = downcast(value["_name"])
74
d.putValue(d.encodeCharArray(literal["_chars"]), Hex2EncodedLatin1)
75
d.putPlainChildren(value)
77
def qdump__CPlusPlus__TemplateNameId(d, value):
78
s = d.encodeCharArray(value["_identifier"]["_chars"])
79
d.putValue(s + "3c2e2e2e3e", Hex2EncodedLatin1)
80
d.putPlainChildren(value)
82
def qdump__CPlusPlus__Literal(d, value):
83
d.putValue(d.encodeCharArray(value["_chars"]), Hex2EncodedLatin1)
84
d.putPlainChildren(value)
86
def qdump__CPlusPlus__StringLiteral(d, value):
87
d.putValue(d.encodeCharArray(value["_chars"]), Hex2EncodedLatin1)
88
d.putPlainChildren(value)
90
def qdump__CPlusPlus__Internal__Value(d, value):
91
d.putValue(value["l"])
92
d.putPlainChildren(value)
94
def qdump__Utils__FileName(d, value):
95
d.putStringValue(value)
96
d.putPlainChildren(value)
98
def qdump__Utils__ElfSection(d, value):
99
d.putByteArrayValue(value["name"])
100
d.putPlainChildren(value)
102
def qdump__CPlusPlus__Token(d, value):
103
k = int(value["f"]["kind"])
105
d.putValue("T_IDENTIFIER. offset: %d, len: %d"
106
% (value["offset"], value["f"]["length"]))
108
d.putValue("T_NUMERIC_LITERAL. offset: %d, value: %d"
109
% (value["offset"], value["f"]["length"]))
111
d.putValue("T_RPAREN")
113
d.putValue("Type: %s" % k)
114
d.putPlainChildren(value)
116
def qdump__CPlusPlus__Internal__PPToken(d, value):
117
k = value["f"]["kind"];
118
data, size, alloc = d.byteArrayData(value["m_src"])
119
length = int(value["f"]["length"])
120
offset = int(value["offset"])
121
#warn("size: %s, alloc: %s, offset: %s, length: %s, data: %s"
122
# % (size, alloc, offset, length, data))
123
d.putValue(d.readMemory(data + offset, min(100, length)),
125
d.putPlainChildren(value)