在 2014年3月26日星期三UTC+8下午3时10分23秒,dieter写道:
> Wesley <nisp...@gmail.com> 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 use x/format i's 
> > address, the output is not 1, but other things:-(
> 
> 
> 
> All Python objects start (at C level) with a header (containing
> 
> the reference count, a pointer to the associated type and
> 
> maybe other things); the "real" value starts behind this header.
> 
> 
> 
> This means, to see the "1" in your example, you must skip the
> 
> associated object header -- either in the output or by adding
> 
> the size of the header to the initial address.

Most like this.
I will try later.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to