This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: repo to work on python scripting support


>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:

Thiago> My turn at the status update. :-)

Thanks for sending this.  Funnily enough I was just thinking about
asking you to write up an example :)


I've been thinking... maybe we do want $(...) to allow things other
than Python commands.  Or, more precisely, maybe we want to let Python
code register a function by name for use in $(...).  The Python
function would get the uninterpreted string argument for processing.

My reason is that after playing a bit, I'm not over-fond of the
verboseness and extra quoting required by the Python bits.  It is more
gdb-ish, I think, not to do this.

Any opinions?

The canonical example is a function to match the calling function at a
breakpoint.  gdb-ish:

    break inner if $(caller-is outer)

Pythonic:

    break inner if $(gdb.caller_is ('outer'))


BTW other suggestions for fun demos are not only accepted, they are
actually helpful.  I tend to drive my gdb-python hacking by picking
target functionality.  My last hack was making it so I could override
the (barely useful IMO) 'edit' command to instead emit an annotation
that Emacs will pick up :-)

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]