在 2014年4月8日星期二UTC+8上午10时21分24秒,Wesley写道: > Hi all, > > I have a question regarding gdb python. > > I use gdb7.7 and python2.7.6. > > > > Here is snippet that py-print one variable: > > (gdb) py-print self > > local 'self' = <Connection(timer1220182856=<_Timeout at remote > 0x7f860614b220>, timer513645288=<_Timeout at remote 0xb42f760>, > timer1248840930=<_Timeout at remote 0x7f85f7f4c300>, > timer1678666863=<_Timeout at remote 0x7f85fec0ddf0>, timer888598936=<_Timeout > at remote 0x7f860579a300>, timer1566174556=<_Timeout at remote 0xe69a7d0>, > timer1307561941=<_Timeout at remote 0x7f85e41145a0>, > timer1010094072=<_Timeout at remote 0xb42af40>, to_device={u'sendno': > u'1252682169', u'msg_content': {u'message': {u'command': True}}, u'msg_type': > u'2'}, timer2050775853=<_Timeout at remote 0x7f8606ddcb50>, > timer1115907467=<_Timeout at remote 0x9c02140>, timer333587031=<_Timeout at > remote 0xbb25450>, timer71350378=<_Timeout at remote 0x7f85e5e38220>, > timer1044716881=<_Timeout at remote 0x7f86053094c0>, > timer2069059536=<_Timeout at remote 0x7f85f3d3b530>, > timer2139990080=<_Timeout at remote 0x8bd5370>, timer1121163931=<_Timeout at > remote 0x99e5370>, queue=<Queue(unfinished_tasks=0, queue=<collections.deque > at remote 0x7081600>, maxsize=0, all_ta...(truncated) > > > > self is instance of Connection class. > > So, actually, I wanna check self.status...but you can see the print is > truncated. > > I tried py-print self.status but failed. > > After a lot google work, somebody mention gdb 'set print elements 0/-1', but > still failed.. > > > > So, how to check self.status value? > > > > Thanks. > > Wesley
Does anyone know this? -- https://mail.python.org/mailman/listinfo/python-list