This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Some feedback about the python scripting feature
- From: Marcelo Taube <mail dot marcelo dot taube at gmail dot com>
- To: gdb at sourceware dot org
- Date: Tue, 10 Nov 2009 00:35:41 +0200
- Subject: Some feedback about the python scripting feature
- References: <4AF898F3.50908@gmail.com>
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.
* *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.
* *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.
* *interactive python: *the current python command reads lines using
gdb normal input instead of the regular python prompt line, making
some nice features of python unavailable like
completions-proposals (pressing the tab-key to get the name of a
function completed) or auto indentation. Maybe running the regular
python prompt line can be an option.
* *regular members instead of dictionaries: *it would be more
natural to have members of structs be accessed in their natural
way like in c. For example if we have some struct "struct Type {
int a; int b;}" and we have a value object in python called
'value', Now to access 'value.a' we have to do 'value["a"]' but
that feels preety unnatural, why not just support the syntax
'value.a' ?
Thank you so much for your excelent work and for the time you spent
reading this lines
Marcelo