Re: gdb python how to output integer for examine memory

2014-03-26 Thread Wesley
在 2014年3月26日星期三UTC+8下午3时10分23秒,dieter写道: > Wesley writes: > > > ... > > > Actually, I can now see the varialbe names at Python level and C level. > > > I just want to verify x command to monitor the memory content. > > > So, in my origin post, I can get variable i's address, and see the value

Re: gdb python how to output integer for examine memory

2014-03-26 Thread dieter
Wesley writes: > ... > Actually, I can now see the varialbe names at Python level and C level. > I just want to verify x command to monitor the memory content. > So, in my origin post, I can get variable i's address, and see the value is 1, > then, I wanna have a try x command, the issue is, when

Re: gdb python how to output integer for examine memory

2014-03-25 Thread Wesley
在 2014年3月25日星期二UTC+8下午3时49分09秒,dieter写道: > Wesley writes: > > > > > I am trying to use gdb debug python script. > > > I am using gdb7.7 and python2.7.6, here is my simple test script: > > > import time > > > > > > def next(i): > > > time.sleep(10) > > > i = 1 - i > > > > > >

Re: gdb python how to output integer for examine memory

2014-03-25 Thread dieter
Wesley writes: > I am trying to use gdb debug python script. > I am using gdb7.7 and python2.7.6, here is my simple test script: > import time > > def next(i): > time.sleep(10) > i = 1 - i > > i = 1 > while True: > next(i) > When this script running, gdb attach to it, and here is s

Re: gdb python how to output integer for examine memory

2014-03-24 Thread Wesley
Hi Dave, Thanks for your response. It's just a simple script for test:-) My concern is use gdb to monitor variable in memory within python process. For details, in my origin post, just wanna why cannot output interger value from the address. Maybe here is not right for gdb python question..but

gdb python how to output integer for examine memory

2014-03-24 Thread Wesley
Hi all, I am trying to use gdb debug python script. I am using gdb7.7 and python2.7.6, here is my simple test script: import time def next(i): time.sleep(10) i = 1 - i i = 1 while True: next(i) When this script running, gdb attach to it, and here is snippet: (gdb) py-bt #5 Frame 0