Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
73ee2610
Commit
73ee2610
authored
Jan 11, 2010
by
hjk
Browse files
debugger: more robust QDateTime and QFileInfo dumper for gdb versions without
call()
parent
87d13230
Changes
2
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/gdbmacros/dumper.py
View file @
73ee2610
...
...
@@ -613,9 +613,13 @@ class Dumper:
self
.
putField
(
"value"
,
value
)
def
putStringValue
(
self
,
value
):
str
=
encodeString
(
value
)
self
.
putCommaIfNeeded
()
self
.
put
(
'valueencoded="%d",value="%s"'
%
(
7
,
str
))
if
value
is
None
:
self
.
putCommaIfNeeded
()
self
.
put
(
'value="<not available>"'
)
else
:
str
=
encodeString
(
value
)
self
.
putCommaIfNeeded
()
self
.
put
(
'valueencoded="%d",value="%s"'
%
(
7
,
str
))
def
putByteArrayValue
(
self
,
value
):
str
=
encodeByteArray
(
value
)
...
...
@@ -733,8 +737,11 @@ class Dumper:
self
.
endHash
()
def
putCallItem
(
self
,
name
,
item
,
func
):
result
=
call
(
item
.
value
,
func
)
self
.
putItem
(
Item
(
result
,
item
.
iname
,
name
,
name
))
try
:
result
=
call
(
item
.
value
,
func
)
self
.
safePutItem
(
Item
(
result
,
item
.
iname
,
name
,
name
))
except
:
self
.
safePutItem
(
Item
(
None
,
item
.
iname
))
def
putItemHelper
(
self
,
item
):
name
=
getattr
(
item
,
"name"
,
None
)
...
...
share/qtcreator/gdbmacros/gdbmacros.py
View file @
73ee2610
...
...
@@ -179,27 +179,30 @@ def qdump__QFileInfo(d, item):
#QFile::Permissions permissions () const
perms
=
call
(
item
.
value
,
"permissions()"
)
d
.
beginHash
()
d
.
putName
(
"permissions"
)
d
.
putValue
(
" "
)
d
.
putType
(
d
.
ns
+
"QFile::Permissions"
)
d
.
putNumChild
(
10
)
if
d
.
isExpandedIName
(
item
.
iname
+
".permissions"
):
d
.
beginChildren
(
10
)
d
.
putBoolItem
(
"ReadOwner"
,
perms
&
0x4000
)
d
.
putBoolItem
(
"WriteOwner"
,
perms
&
0x2000
)
d
.
putBoolItem
(
"ExeOwner"
,
perms
&
0x1000
)
d
.
putBoolItem
(
"ReadUser"
,
perms
&
0x0400
)
d
.
putBoolItem
(
"WriteUser"
,
perms
&
0x0200
)
d
.
putBoolItem
(
"ExeUser"
,
perms
&
0x0100
)
d
.
putBoolItem
(
"ReadGroup"
,
perms
&
0x0040
)
d
.
putBoolItem
(
"WriteGroup"
,
perms
&
0x0020
)
d
.
putBoolItem
(
"ExeGroup"
,
perms
&
0x0010
)
d
.
putBoolItem
(
"ReadOther"
,
perms
&
0x0004
)
d
.
putBoolItem
(
"WriteOther"
,
perms
&
0x0002
)
d
.
putBoolItem
(
"ExeOther"
,
perms
&
0x0001
)
d
.
endChildren
()
d
.
endHash
()
if
perms
is
None
:
d
.
putValue
(
"<not available>"
)
else
:
d
.
beginHash
()
d
.
putName
(
"permissions"
)
d
.
putValue
(
" "
)
d
.
putType
(
d
.
ns
+
"QFile::Permissions"
)
d
.
putNumChild
(
10
)
if
d
.
isExpandedIName
(
item
.
iname
+
".permissions"
):
d
.
beginChildren
(
10
)
d
.
putBoolItem
(
"ReadOwner"
,
perms
&
0x4000
)
d
.
putBoolItem
(
"WriteOwner"
,
perms
&
0x2000
)
d
.
putBoolItem
(
"ExeOwner"
,
perms
&
0x1000
)
d
.
putBoolItem
(
"ReadUser"
,
perms
&
0x0400
)
d
.
putBoolItem
(
"WriteUser"
,
perms
&
0x0200
)
d
.
putBoolItem
(
"ExeUser"
,
perms
&
0x0100
)
d
.
putBoolItem
(
"ReadGroup"
,
perms
&
0x0040
)
d
.
putBoolItem
(
"WriteGroup"
,
perms
&
0x0020
)
d
.
putBoolItem
(
"ExeGroup"
,
perms
&
0x0010
)
d
.
putBoolItem
(
"ReadOther"
,
perms
&
0x0004
)
d
.
putBoolItem
(
"WriteOther"
,
perms
&
0x0002
)
d
.
putBoolItem
(
"ExeOther"
,
perms
&
0x0001
)
d
.
endChildren
()
d
.
endHash
()
#QDir absoluteDir () const
#QDir dir () const
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment