Some feedback about the python scripting feature
Phil Muldoon
pmuldoon@redhat.com
Tue Nov 10 15:12:00 GMT 2009
On 11/09/2009 10:35 PM, Marcelo Taube wrote:
> Dear gdb team,
>
> I have been using the python scripting feature of gdb7
>
> The feature is great it let me debug my code much better and in a much
> flexible way.
>
> There are some features missing which would improve it even more, though.
>
> I want to mention them in case noone did it before.
Thanks. I'll comment on the two things I know about:
>
> * *calling functions*: From regular gdb command line the user can
> allways simply do " p foo()" to call function and print the
> result, it would be usefull to be able to call C functions (or the
> debugged lenguage) from python and get the result as a Value
> object in the same way a variable is accessed.
There is a patch in the works:
http://sourceware.org/ml/archer/2009-q3/msg00206.html
But for right now you can use:
foo = gdb.parse_and_eval("foo(bar)")
> * *equality of types: *i think there are problems with the equality
> of types in gdb. Look at the case that two type objects were
> obtained and represent the same type, the expression
> 'gdb.lookup_type("int") == gdb.lookup_type("int")' now returns
> false but it should return true.
There was an enhancement filed for this:
http://sourceware.org/bugzilla/show_bug.cgi?id=10676
Regards
Phil
More information about the Gdb
mailing list