[RFC][patch 0/9] Python support in GDB

Vladimir Prus vladimir@codesourcery.com
Fri May 2 18:30:00 GMT 2008


Thiago Jung Bauermann wrote:

> Hi everybody,
> 
> This patch series adds Python scripting support to GDB, and exposes
> some of its subsystems hopefully in a "pythonic" way. These patches
> correspond to the contents of the git repository at gitorious.org,
> rebased to apply cleanly on top of CVS HEAD as of 04/27.

The attached two patches are rebased MI ones. The first is cleanup,
and I'll commit it shortly. The second one is the real one. Since both
patches touch just MI code, this is RFC, not RFA. The second patch
has a couple fixmes that I'll address later, and needs doc that I'll
also write as the other Python patches are in.

Here's an example session:

(gdb)
-var-set-type-visualizer std::vector.* VectorVisualizer
^done
....
~"11\t  std::vector<int> v;\n"
....
~"12\t  v.push_back (7);\n"
^done
(gdb)
-var-create V * v
^done,name="V",numchild="1",value="{...}",type="std::vector<int,std::allocator<int> >",thread-id="1"
(gdb)
-var-list-children V
^done,numchild="0"
(gdb)
next
&"next\n"
~"13\t  v[0] = 11;\n"
^done
(gdb)
-var-update --all-values V
^done,changelist=[{name="V",value="{...}",in_scope="true",type_changed="false",children=[{name="V.0",exp="0",numchild="0",value="7",type="int",thread-id="1"}]}]
(gdb)

The .gdbinit I use is also attached.

- Volodya

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Refactor-varobj_update-interface.patch
Type: application/mbox
Size: 12073 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080502/e2a2326a/attachment.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Implement-Python-based-computation-of-varobj-childre.patch
Type: application/mbox
Size: 29338 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080502/e2a2326a/attachment-0001.mbox>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .gdbinit
Type: text/x-java
Size: 740 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080502/e2a2326a/attachment.bin>


More information about the Gdb-patches mailing list