While the primary intention of this pretty printing implementation is
to provide what Qt Creator needs, it can be used in a plain commandline
GDB session, too.
With
python sys.path.insert(1, '<path/to/qtcreator>/share/qtcreator/debugger/')
python from gdbbridge import *
in .gdbinit there is a new "GDB command", called "pp".
With code like
int main(int argc, char *argv[])
{
QString ss = "Hello";
QApplication app(argc, argv);
app.setObjectName(ss);
// break here
}
the "pp" command can be used as follows:
(gdb) pp app
app =
[
<QGuiApplication> = {"Hello"}
staticMetaObject = <QMetaObject> = {""}
[parent] = <QObject *> = {"0x0"}
[children] = <QObjectList> = {"<3 items>"}
[properties] = "<>0 items>"
[methods] = "<6 items>"
[signals] = "<1 items>"
],<QApplication> = {"Hello"}
(gdb) pp app [properties],[children]
app =
[
<QGuiApplication> = {"Hello"}
staticMetaObject = <QMetaObject> = {""}
[parent] = <QObject *> = {"0x0"}
[children] = [
<QObject> = {""}
<QObject> = {""}
<QObject> = {"fusion"}
],<QObjectList> = {"<3 items>"}
[properties] = [
windowIcon = <QVariant (QIcon)> = {""}
cursorFlashTime = <QVariant (int)> = {"1000"}
doubleClickInterval = <QVariant (int)> = {"400"}
keyboardInputInterval = <QVariant (int)> = {"400"}
wheelScrollLines = <QVariant (int)> = {"3"}
globalStrut = <QVariant (QSize)> = {"(0, 0)"}
startDragTime = <QVariant (int)> = {"500"}
startDragDistance = <QVariant (int)> = {"10"}
styleSheet = <QVariant (QString)> = {""}
autoSipEnabled = <QVariant (bool)> = {"true"}
],"<10 items>"
[methods] = "<6 items>"
[signals] = "<1 items>"
],<QApplication> = {"Hello"}
(gdb) pp ss
ss =
<QString> = {"Hello"}
In order to hook a new debugger backend into this "common pretty printing system",
the backend should expose a Python API containing at least the following:
class Value:
name() -> string # Name of this thing or None
type() -> Type # Type of this value
asBytes() -> bytes # Memory contents of this object, or None
address() -> int # Address of this object, or None
dereference() -> Value # Dereference if value is pointer,
# remove reference if value is reference.
hasChildren() -> bool # Whether this object has subobjects.
expand() -> bool # Make sure that children are accessible.
nativeDebuggerValue() -> string # Dumper value returned from the debugger
childFromName(string name) -> Value # (optional)
childFromField(Field field) -> Value # (optional)
childFromIndex(int position) -> Value # (optional)
class Type:
name() -> string # Full name of this type
bitsize() -> int # Size of type in bits
code() -> TypeCodeTypedef
| TypeCodeStruct
| TypeCodeVoid
| TypeCodeIntegral
| TypeCodeFloat
| TypeCodeEnum
| TypeCodePointer
| TypeCodeArray
| TypeCodeComplex
| TypeCodeReference
| TypeCodeFunction
| TypeCodeMemberPointer
| TypeCodeUnresolvable
unqualified() -> Type # Type without const/volatile
target() -> Type # Type dereferenced if it is a pointer type, element if array etc
stripTypedef() -> Type # Type with typedefs removed
fields() -> [ Fields ] # List of fields (member and base classes) of this type
templateArgument(int pos, bool numeric) -> Type or int # (optional)
class Field:
name() -> string # Name of member, None for anonymous items
isBaseClass() -> bool # Whether this is a base class or normal member
type() -> Type # Type of this member
parentType() -> Type # Type of class this member belongs to
bitsize() -> int # Size of member in bits
bitpos() -> int # Offset of member in parent type in bits
parseAndEvaluate(string: expr) -> Value # or None if not possible.
lookupType(string: name) -> Type # or None if not possible.
listOfLocals() -> [ Value ] # List of items currently in scope.
readRawMemory(ULONG64 address, ULONG size) -> bytes # Read a block of data from the virtual address space
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共970个文件
png:122个
qml:113个
cpp:106个
型号:昭阳 R5000T-1 系统:Kylin-4.0.2-desktop-sp2_lenovo-20180409-arm64 QT-Creator:编译版本是qt-creator-4.2.0 测试编译qt-creator-4.2.0 其他设备、系统、自行测试 ----------------------------------------------------------------------------- qt-creator-4.2.0,亲测可用 qt-creator-4.2.0,亲测可用 qt-creator-4.2.0,亲测可用
资源推荐
资源详情
资源评论
收起资源包目录
Kylin-4.0.2-desktop-sp2-arm64 编译完成qt-creator-4.2.0 (970个子文件)
libqbscore.so.1.7.0 2.58MB
libCPlusPlus.so.4.2.0 2.5MB
libQtcSsh.so.4.2.0 2.21MB
libModeling.so.4.2.0 1.91MB
libUtils.so.4.2.0 1.89MB
libQmlJS.so.4.2.0 1.57MB
libSqlite.so.4.2.0 861KB
libQmlEditorWidgets.so.4.2.0 412KB
libGLSL.so.4.2.0 328KB
libExtensionSystem.so.4.2.0 287KB
libTimeline.so.4.2.0 261KB
libClangbackendipc.so.4.2.0 236KB
libQmlDebug.so.4.2.0 192KB
libqbsqtprofilesetup.so.1.7.0 135KB
libLanguageUtils.so.4.2.0 63KB
libFlameGraph.so.4.2.0 43KB
libAggregation.so.4.2.0 23KB
libqbscore.so.1 2.58MB
libqbsqtprofilesetup.so.1 135KB
libCPlusPlus.so.4.2 2.5MB
libQtcSsh.so.4.2 2.21MB
libModeling.so.4.2 1.91MB
libUtils.so.4.2 1.89MB
libQmlJS.so.4.2 1.57MB
libSqlite.so.4.2 861KB
libQmlEditorWidgets.so.4.2 412KB
libGLSL.so.4.2 328KB
libExtensionSystem.so.4.2 287KB
libTimeline.so.4.2 261KB
libClangbackendipc.so.4.2 236KB
libQmlDebug.so.4.2 192KB
libLanguageUtils.so.4.2 63KB
libFlameGraph.so.4.2 43KB
libAggregation.so.4.2 23KB
libCPlusPlus.so.4 2.5MB
libQtcSsh.so.4 2.21MB
libModeling.so.4 1.91MB
libUtils.so.4 1.89MB
libQmlJS.so.4 1.57MB
libSqlite.so.4 861KB
libQmlEditorWidgets.so.4 412KB
libGLSL.so.4 328KB
libExtensionSystem.so.4 287KB
libTimeline.so.4 261KB
libClangbackendipc.so.4 236KB
libQmlDebug.so.4 192KB
libLanguageUtils.so.4 63KB
libFlameGraph.so.4 43KB
libAggregation.so.4 23KB
libqbscore.so.1.7 2.58MB
libqbsqtprofilesetup.so.1.7 135KB
buildoutputparser 27KB
main.c 102B
qtquickcontrols2.conf 319B
cpaster 104KB
nodeinstanceserver.cpp 49KB
objectnodeinstance.cpp 25KB
qmlprivategate.cpp 25KB
quickitemnodeinstance.cpp 22KB
servernodeinstance.cpp 18KB
nodeinstanceclientproxy.cpp 18KB
qmlprivategate_56.cpp 14KB
sharedmemory_unix.cpp 12KB
qt5testnodeinstanceserver.cpp 12KB
metaobject.cpp 11KB
qt5informationnodeinstanceserver.cpp 10KB
designercustomobjectdata.cpp 10KB
nodeinstanceserverinterface.cpp 8KB
imagecontainer.cpp 8KB
mouse.cpp 7KB
qt5rendernodeinstanceserver.cpp 6KB
valueschangedcommand.cpp 5KB
qml2puppetmain.cpp 5KB
createscenecommand.cpp 5KB
instancecontainer.cpp 5KB
informationcontainer.cpp 5KB
nodeinstancesignalspy.cpp 4KB
qmlpropertychangesnodeinstance.cpp 4KB
qt5previewnodeinstanceserver.cpp 4KB
qmlstatenodeinstance.cpp 4KB
qt5nodeinstanceserver.cpp 4KB
main.cpp 4KB
reparentcontainer.cpp 4KB
propertyvaluecontainer.cpp 3KB
childrenchangedcommand.cpp 3KB
addimportcontainer.cpp 3KB
propertybindingcontainer.cpp 3KB
enumeration.cpp 3KB
mockuptypecontainer.cpp 3KB
tokencommand.cpp 3KB
qt5nodeinstanceclientproxy.cpp 3KB
main.cpp 3KB
itemmodel.cpp 3KB
propertyabstractcontainer.cpp 3KB
hwgen.cpp 3KB
main.cpp 3KB
main.cpp 3KB
sharedmemory_qt.cpp 3KB
specialfeature.cpp 3KB
lib.cpp 3KB
共 970 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
alin、m
- 粉丝: 92
- 资源: 42
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功