Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69104
| From | dieter <dieter@handshake.de> |
|---|---|
| Subject | Re: gdb python how to output integer for examine memory |
| Date | 2014-03-26 08:10 +0100 |
| References | <e1e8c3a2-5d8d-4aae-9a5d-82af79be8c4c@googlegroups.com> <mailman.8505.1395733762.18130.python-list@python.org> <2aa794ce-7cc1-4d24-a30b-3fb17b89e33f@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.8563.1395817836.18130.python-list@python.org> (permalink) |
Wesley <nispray@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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
gdb python how to output integer for examine memory Wesley <nispray@gmail.com> - 2014-03-24 03:20 -0700
Re:gdb python how to output integer for examine memory Dave Angel <davea@davea.name> - 2014-03-24 08:22 -0400
Re: gdb python how to output integer for examine memory Wesley <nispray@gmail.com> - 2014-03-24 06:37 -0700
Re: gdb python how to output integer for examine memory dieter <dieter@handshake.de> - 2014-03-25 08:49 +0100
Re: gdb python how to output integer for examine memory Wesley <nispray@gmail.com> - 2014-03-25 01:07 -0700
Re: gdb python how to output integer for examine memory dieter <dieter@handshake.de> - 2014-03-26 08:10 +0100
Re: gdb python how to output integer for examine memory Wesley <nispray@gmail.com> - 2014-03-26 18:04 -0700
csiph-web